Post topics, source code that relate to the Arduino Platform

User avatar
By martinayotte
#26034 Don't expect that AT shell will send true CRLF when typing "\r\n", it won't translate that !
And typing Ctrl-M/Ctrl-J in an AT shell is almost impossible, due to typing speed, it need to be done from from your Arduino sketch, or from PC using a python script or such...
I hate AT firmware ! :?
User avatar
By Rod
#26037 hi guys
I am using ESPlorer now for testing now.. I have tried the Arduino as well with same no success

I know its sending the CRLF because everything is responding the way it should except for the 505 error
I really suspect its something in the get string is unhappy

By the way i have tried the miserable thing with nodemcu with the same results


any help would be appreciated!

Thanks again
Rod
User avatar
By Rod
#26107 got it working with NodeMCU

delay(4000);
Serial1.println("print(wifi.sta.getip())");
delay(1000);
Serial1.println("conn = net.createConnection( net.TCP, false)");
delay(2000);
Serial1.println("conn:on(\"receive\", function(c, payload) print(payload) end)");
Serial1.println("conn:connect(80,\"www.timeapi.org\")");
delay(1000);
Serial1.println("conn:send(\"GET /utc/now?format=%25s HTTP/1.1\\r\\n\")");
delay(300);
Serial1.println("conn:send(\"Host: www.timeapi.org\\r\\n\")");
delay(300);
Serial1.println("conn:send(\"Accept: */*\\r\\n\")");
delay(300);
Serial1.println("conn:send(\"User-Agent: Mozilla/4.0 (compatible; esp8266 Lua; Windows NT 5.1)\\r\\n\")");
delay(300);
Serial1.println("conn:send(\"\\r\\n\")");
User avatar
By Rafael R
#30282 Hi guys, sorry for delay to answer or show the progress on code.

The problem was on Software.Serial that has a characters limit.

Follow how to correct on Arduino.

http://forum.arduino.cc/index.php?topic=244398.0

I had to change line 42 in SoftwareSerial.h to

#define _SS_MAX_RX_BUFF 512

Also :
i changed line 67 and 68 in SoftwareSerial.h to

static volatile uint16_t _receive_buffer_tail;
static volatile uint16_t _receive_buffer_head;


and changed line 137 and 138 in SoftwareSerial.cpp to

volatile uint16_t SoftwareSerial::_receive_buffer_tail = 0;
volatile uint16_t SoftwareSerial::_receive_buffer_head = 0;