Created Mon, 25 Feb 2013 21:17:12 +0000 by istvan.sz
Mon, 25 Feb 2013 21:17:12 +0000
Hi. I'm building a project which requires WiFi communication between a PC (Laptop) and an MX4cK with PmodWIFI (preferably Ad Hoc connection, but through a router is okey too). The connection will then be used to command the board from the Laptop. I'm fairly new to MPIDE and also to networking protocols.
My problem is that I cannot establish a TCP server-client connection between the MX4cK and Laptop. Not with the supplied examples, nor with other software (like a Java implementation of TCP server-client communication, which by the way, worked through the router with another PC). I have modified the WiFiTCPEchoClient and WiFiTCPEchoServer examples according to my own network's information, nothing else.
What seems to be working: I can see the available WiFi AP-s. I am able to connect with WPA2-PSK to the router (a TP-Link TL-WR740N), and the router sees it. I am able to connect to the laptop Ad Hoc, the laptop however doesn't acknowledge it and is still waiting for a connection. The server on the MX4cK starts if I connect to the router, fails in Ad Hoc ("Error in initializing, status: 40"). My own Java implementation of the TCP server and client communicate with the provided executable examples (PC side).
Not working: There is no communication between a client and a server (one of them being on the MX4cK). I have tried both ways. Simply the client is unable to connect to the server.
Is there anything I missed? Any help would be greatly appreciated.
P.S.: I still have to see if UDP is working, and I still need to do a deeper analysis of the code.
Thu, 07 Mar 2013 20:21:48 +0000
Update: What I noticed so far is that the WiFiTCPEchoClient example locks down in the 'if(tcpClient.isConnected())' line in the WRITE state. (Connected through router)
Sat, 09 Mar 2013 00:41:35 +0000
AdHoc is not supported by DWIFIcK. Only Infrustructure is supported. You can look at other post of people who have gotten AdHoc to work, but this was never tested.
Sat, 09 Mar 2013 19:49:14 +0000
Thank you. I am still fighting to make infrastructure work.