I am developing an application whereby two Arduino Nano's inter communicate as a 'data link' via ESP8266 peripherals. I am using the ESP8266_TCP library to develop functions to Tx and Rx data between the TCP client and server ESP's. However, despite many hours looking at related posts on various forums I am still somewhat confused on how to parse AT commands correctly when creating my own functions. I understand that is is necessary to precede double quotes, where they occur INSIDE the overall string using ''. But, for example I cant get my head around the examples below which include string variables as part of the overall function call.
So, can anyone please enlighten me on the parsing rules and the use of escape characters.
I assume ssid and password are string variables in the examples given.
sendData("AT+CWJAP=\"" + ssid + "\",\"" +password + "\"");
write("AT+CWSAP=\"" + ssid +"\",\""+password+"\","+String(channel)+",4");
Many thanks in anticipation of any help.