Guys can you help me please to find out how to use Sockets with RoShmi’s driver? I am going to try using it instead of toolbox WiFlyGSX driver… and WiFlySocket.
My socket server and socket client connection worked well when i used WIFlyGSX. I could connect to socket server and send/recieve data:
WiFlyGSX _wifi = new WiFlyGSX("COM1",230400,"$");
_wifi.EnableStaticIP("192.168.0.62", "255.255.255.0", "192.168.0.1", "192.168.0.1");
_wifi.JoinNetwork("BilityukA", 0, WiFlyGSX.AuthMode.WPA2_PSK, "New999manAlex");
WiFlySocket _socket = new WiFlySocket("192.168.0.43", 1988,_wifi);
_socket.Connect();
I cannot setup RoShmi’s driver to send/recieve data using sockets. Instead of WiFlySocket i am trying to use System.Net.Socket with your wifi_RN171 interface because WiFlySocket doesnt have an option to use your interface, it needs WiFlyGSX interface.
Here is a code where the method _socket.Connect() doesn’t work as expected;
WiFi_RN171 wifi_RN171 = new WiFi_RN171(Reset, Reset, 230400, System.IO.Ports.Parity.None, WiFi_RN171.DebugMode.StandardDebug);
wifi_RN171.SetDebugLevel(WiFi_RN171.DebugLevel.DebugAll);
wifi_RN171.EnableStaticIP("192.168.0.62", "192.168.0.1", "255.255.255.0", "192.168.0.1");
bool ActionResult = wifi_RN171.JoinWirelessNetwork("BilityukA", "New999manAlex", 0, Gadgeteer.Modules.RoSchmi.WiFi_RN171.WirelessEncryptionMode.WPA2_PSK);
System.Net.Socket _socket = new System.Net.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPHostEntry hostEntry = Dns.GetHostEntry("192.168.0.43");
_socket.Connect(new IPEndPoint(hostEntry.AddressList[0],1988));//HERE IT DOESNT WORK. JUST HOLDS WITHOUT ANY EXCEPTION
Also EnableStaticIP in RoSchmi’s driver doesn’t work for me as expected. You can see that i set up static IP as 192.168.0.62, but every time wifi_RN171.LocalIP returns 192.168.0.67
Maybe Roschmi can help ;D