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

User avatar
By Arun Prasad
#32604 Dear ..

I have the following issue
I am using ai-thinker-0.9.5 firmware and the issue is

AT+CWSAP="ESP8266","12345678",1,0
OK

AT+CWSAP="ESP8266","12345678",1,1
ERROR

AT+CWSAP="ESP8266","12345678",1,2
ERROR

AT+CWSAP="ESP8266","12345678",5,3
ERROR

The documentation on this command set is very poor, not only this others also, there needs to be explained do's & dont's with the command and the reason and remedy for errors

Arun
User avatar
By Rodrigonh
#52148 Despite "\0" being the escape sequence for CIPSENDEX accordingly the manual, the ESP firmware handles "\" as escape character, regardless what's coming next, what I think is problematic because a data stream should be capable of sending anything in the usual 0 - 255 range. At the same time I understand that determining what could be a escape sequence, that deals right with CIPSENDEX buffer boundaries is not something easy to find a solution.
Maybe a good idea would be creating an additional AT command that triggers CIPSENDEX escape by pulling/signaling LOW/HIGH one of the ESP GPIO's ? Sounds like a nice option to simplify some things while interfacing with ESP externally.

Anyway, the fix for this behaviour could be: Everytime my data to be sent contains a "\" I send two additional "\". As for most compilers "\" is also a escape character then In the source code it ends like sending "\\" and "\\" again for each "\" to be transmitted.
User avatar
By paolovr70
#84959 HI, I have a problem with AT commands when starting a SERVER with PORT different than 80. Otherwise is fine. Under the setup routine.
If I use a PORT different than 80 after the first CIPSEND the server CLOSE the connection. WHY?
thanks!
p.


sendData("AT+CWMODE=3\r\n",1000,DEBUG); // configure as both mode 3000
sendData("AT+CIPMUX=1\r\n",1000,DEBUG); // configure for multiple connections 2000
sendData("AT+CIPSTA=\"192.168.178.151\"\r\n",1000,DEBUG);
sendData("AT+CWJAP=\"DXXX6_PR\",\"12XXXXX6\"\r\n", 8000, DEBUG); // connect to wifi 8000
sendData("AT+CWJAP=\"FRXXXXR\",\"12XXXX6\"\r\n", 10000, DEBUG); // connect to wifi 8000
sendData("AT+CIFSR\r\n",2000,DEBUG); // get ip address 7000
sendData("AT+CWSAP=\"ESP8266\",\"12XXXX0\",5,3,1,0\r\n",1000,DEBUG); // turn on server on port 80 1000
sendData("AT+CIPSTO?\r\n",1000,DEBUG); // turn on server on port 80 1000
sendData("AT+CIPSTART=1,\"TCP\",\"192.168.178.151\",80\r\n",3000,DEBUG); // turn on server on port 80 1000
sendData("AT+CIPSERVER=1,80\r\n",1000,DEBUG); // turn on server on port 80 1000
sendData("AT+CIPSTATUS\r\n",2000,DEBUG); // reset module