I’m using your fantastic library in Unity3D. I’ve got multiple computers running a Unity game on the same network, each connecting to one EV3 using WiFi. On your guide to connecting using WiFi you explain the procedure of connecting to an EV3. I don’t fully understand all of it but I believe the library listens for a specific UDP message, which could come from any EV3, and then connects with that EV3. So it would appear that the library doesn’t allow for targetted connection to a specific IP address. In Network.cs I find the class WiFiConnection and see in the Open() method the following line:
IPEndPoint groupEP = new IPEndPoint(IPAddress.Any,listenPort);
I added a specific method Open(string _ipaddress) to this class and changed this line to
IPEndPoint groupEP = new IPEndPoint(IPAddress.Parse (_ipaddress), listenPort);
It was a naive idea apparently because still, the library connects to whichever EV3 seems to respond first. I’m not very familiar with C# so maybe I’m missing something and IPAddress.Parse() wasn’t the way to go..
Is there *any* way to employ targetted connecting to an EV3 using WiFi?
Follow