-->
Page 1 of 2

HTTP client problems

PostPosted: Tue Nov 24, 2015 3:05 am
by hubidubi
Hi,

I wrote a simple data logger that sends measured temperature to two logger service: thingspeak and adafruit.

You can find the code here: https://gist.github.com/8abb4bf8433e61644d82

Thingspeak logging basically worked for >10 hours, although according to logs, board reseted for couple of times (logging interval is 10 minutes). This logging returns an incremental counter as text that I can print to console in response.on('data', ...

Adafruit logger sometimes works sometimes not. It usually logs data, although it doesn't run response.on('data', ...
Normally Adafruit returns a json (parsing is another story)

If both logger are enables, board resets constantly.

I use EspruinoBuilds repo and version Build for 2015-11-18

Re: HTTP client problems

PostPosted: Tue Nov 24, 2015 3:20 am
by tve
You might want to try a newer build, see http://forum.espruino.com/conversations/278076/newest/
The older builds just don't have enough free RAM to run two concurrent connections.

Re: HTTP client problems

PostPosted: Tue Nov 24, 2015 5:06 am
by hubidubi
UPDATE:

After burning the mentioned flash we've got quite different situation:
I got following warning during board boot:
Flash map 512KB:256/256, manuf 0xe0 chip 0x4016
WARNING: *** Your flash chip does not match your flash map ***

I have got NodeMCU v0.9 and I burnt with the following command:
esptool.py --port /dev/tty.wchusbserial1440 write_flash --flash_freq 40m --flash_mode qio --flash_size 4m 0x0000 "boot_v1.4(b1).bin" 0x1000 espruino_esp8266_user1.bin 0x7E000 blank.bin

Is it a problem or just a warning?

I can send data by hand (testTs, testAda), Adafruit sends response (that was missing before)
Sending data automatically (measureAndSend) doesn't work at all, I also tried to call function by hand, nothing.

Re: HTTP client problems

PostPosted: Wed Nov 25, 2015 12:06 am
by tve
It's a warning. You have a 4MByte flash chip but the way you flashed your bootloader it's telling the SDK that you only have 512KB. See the README_flash in the zip file you downloaded for the correct esptool.py incantation.