-->
Page 3 of 3

Re: Get external IP from Ipify

PostPosted: Fri Aug 14, 2015 9:27 pm
by martinayotte
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 ! :?

Re: Get external IP from Ipify

PostPosted: Fri Aug 14, 2015 11:22 pm
by Rod
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

Re: Get external IP from Ipify

PostPosted: Sat Aug 15, 2015 7:10 pm
by Rod
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\")");

Re: Get external IP from Ipify

PostPosted: Thu Oct 01, 2015 2:04 pm
by Rafael R
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;