Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By picstart
#46204 I don't really understand the interplay between IDE versions and cores eg 1.6.5 and core 2.2 and 1.6.8 and core 2.2. or even how versioning is controlled with Arduino. I have read that 1.6.8 is extremely slow when compiling since it re compiles everything every time perhaps this isn't true I don't know. When I asked for an opinion as to the efficacy of using 1.6.8 I was told instead that the versions you run aren't optional. I'm not sure if this is the official position but it was very officious.
With my issue it took about 1 minute for the esp8266 to crash or about 30 messages. It crashes even if the message buffer is 512 bytes I made it smaller in case 512 was the issue. Did you run it for some time in your test?
I only showed the last packet since the prior 30 or so were almost identical messages (the GPS antenna didn't move).
User avatar
By bbx10node
#46207 I suggest removing the delay(20) because this limits the loop function to processing at most 50 packets/second. If loop reads too slowly, unread packets may cause problems.

Read all packets regardless of length.

OLD: if ( noBytes > 0 && noBytes < 64)
NEW: if ( noBytes > 0)

I thought it crashed on the first packet. Intermittent crashes are much harder to solve. I made the above changes sent 120 test packets of varying sizes up to 65 bytes (64 byte buffer) in 2 minutes without crashing.

I do not know the official policy but when things are not working, I try the latest versions.
User avatar
By picstart
#46229 Well I have installed 1.6.8 there are still many who recommend against it arguing it should have been pulled. Anyway it is now installed but it made no difference.
Here is the trace ( the delay(20) was commented out just in case it was an issue).
Exception (0):
epc1=0x40106752 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffd80 end: 3fffffb0 offset: 01a0

>>>stack>>>
3fffff20: 40221c4b 005e0001 4020ba3c 3ffec4d0
3fffff30: 3ffefccc 00000001 40221c8a 4020ba55
3fffff40: 40221a99 3fff024c 3ffec4d0 3ffeb270
3fffff50: 3ffe0000 3ffefccc 3ffee820 40222488
3fffff60: 3fff024c 3fff00cc 3ffeb298 3ffec4d0
3fffff70: 3fff00cc 00000014 40221796 3fff024c
3fffff80: 3fff00cc 3fffdc80 3fff0134 3ffeebb0
3fffff90: 4021912b 3fff024c 00000000 4020300f
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(1,7)

Decoding 11 results
0x40221c4b: igmp_tmr at ?? line ?
0x4020ba3c: ieee80211_deliver_data at ?? line ?
0x40221c8a: igmp_tmr at ?? line ?
0x4020ba55: ieee80211_deliver_data at ?? line ?
0x40221a99: igmp_input at ?? line ?
0x40222488: ip_input at ?? line ?
0x40221796: ethernet_input at ?? line ?
0x4021912b: ets_snprintf at ?? line ?
0x4020300f: loop_task at C:\Arduino\arduino-1.6.8\portable\packages\esp8266\hardware\esp8266\2.2.0\cores\esp8266/core_esp8266_main.cpp line 43

Now this is with a WIN10 pro 64 bit OS so perhaps that is in the mix. I see the successful runs are with Linux.

The compile speed with 1.6.8 wasn't markedly different