Here we can all chat about fixing the AT+ command structure and the associated responses.

User avatar
By trauma
#31330 Hi all
I've Started using ESP8266 for a Communicating project, I want to start a network of ESP8266s that are connected to a router (another ESP8266) and send and receive Data. Due to project circumstances i just can't use frameworksor arduino libraries, and i just can use AT commands ,but i've got stocked at the first steps go So, my problem is:
First of all i configured my server like this:
AT+RST
AT+CIPMUX=1
AT+CWSAP="Servername","12345678",4,3
AT+CIPSERVER=1,1234
I did check that with my lap-top WiFi modem and it worked just fine , I got connected to the router (ESP8266) and i had the sending and receiving going on.
Then i started configuring my client side like that:
AT+RST
AT+CIPMUX=1
At + Cwjap = "Servername" , "12345678"
AT+CIPSTART=0,"TCP","192.168.4.1",1234
Note that 192.168.4.1 is my server IP from server configuration. (response to AT+CIFSR when no one is connected),
I've got a error trying to connect to 1234 port (AT+CIPSTART part) and i just couldn't fix that.
Strange thing is , I tried to connect to another router (my internet wireless router) and i checked the client with Hercules on my PC, i it did work just fine when i started to listening the port in Hercules. but then againt, it couldent work with ESP8266 as router ,

Im deeply sorry if my question is typical or already been issued, but ive searched everywhere and ive found nothing it's killing me ! I appreciate any kind of help.

Thank you all!

UPDATE: thanks to lethe, it solved after i changed client mode to station (AT+CWMODE=1) , For further information read lethe's reply below.
Last edited by trauma on Sat Oct 17, 2015 6:56 am, edited 2 times in total.
User avatar
By lethe
#31359 Unless you disable SoftAP (or change its IP) on the client ESP, it will also have an interface with the IP 192.168.4.1, so it will always route packets to 192.168.4.1 to its own interface.
You either need to put the client ESP in client only mode or change its SoftAP IP (if that's possible using AT commands). I would advice you to do the former, since that should also reduce power usage (because the wifi rx does not need to run 100% of the time in client mode).
User avatar
By trauma
#31401
lethe wrote:Unless you disable SoftAP (or change its IP) on the client ESP, it will also have an interface with the IP 192.168.4.1, so it will always route packets to 192.168.4.1 to its own interface.
You either need to put the client ESP in client only mode or change its SoftAP IP (if that's possible using AT commands). I would advice you to do the former, since that should also reduce power usage (because the wifi rx does not need to run 100% of the time in client mode).



Thanks Man! that was a great help, guess i should fortify my network knowledge a bit more! I just changed the client mode to station (AT+CWMODE=1) and it started to work.