I have 2 eps's that I am trying to get sending messages back and forth. One, lets call it server_a, creates an AP, and also a WiFiServer. The other, lets call it client_b, connects to server_a's AP without a problem, but cannot connect to server_a's WiFiServer.
Here is a gist with server_a.ino and client_b.ino:
https://gist.github.com/rDr4g0n/ce7efed ... rver_a-ino
https://gist.github.com/rDr4g0n/ce7efed ... ient_b-ino
The server comes up fine and is listening for tcp connections, and the client connects to the AP fine, and repeatedly tries to connect to the server with no success.
It should be noted, i can use my laptop to connect to the server's AP and create TCP connections (using netcat) to it with no problems. Also, If I have both esp's connect to my home wifi AP (instead of having server_a setup an AP), the client is able to connect to server_a as expected. This issue I am running into only happens with server_a acts as AP and tcp server, and client_b connects to server_a's AP and attempts to connect to it's tcp server.
One final detail... I dug into WiFiClient.cpp and verified that the connect method fails at the following spot: https://github.com/esp8266/Arduino/blob ... t.cpp#L118
However, my poor C skills prevent me from making much sense of the tcp_new function, so I cannot troubleshoot further.
Any suggestions? Am I doing something hilariously and obviously wrong?
Thanks!