Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By picstart
#46176 martinayotte
Thank you for responding and caring.
I'm a little more convinced that there is an issue with the core. It also appears the issue accumulates ( several packets) then it blows up.
Something akin to a memory leak.
I'm relatively new to the Arduino IDE for esp8266 having used for decades PIC MCU's with a realtime debugger ( step a line at a time until the crash throws you off the cliff) but Arduino is lexigraphic and seems to rely on the external file date ( no internal dating within the code itself and no change log) .
Lazarus for example has a good change log and a good error reporting log. Maybe Arduino has it too. I was unaware of the stack trace feature so it is probable Arduino has a good change and bug reporting log and I just don't know about it.

Another fact is that the error is always the same it only varies as to how many packets get displayed before the error occurs.
User avatar
By martinayotte
#46178 This bug is really strange ... The line 43 of core_esp8266_main.cpp doesn't give any clues, the stack is probably corrupted somehow ...
Maybe it is only related with UDP, which I never use, because I have no problem with the 2.2.0 TCP connections.
User avatar
By picstart
#46192 I agree I haven't had any issues with TCP. MQTT subscribe and publish works fine etc.
The UDP broadcast is fine I can see the packets with wireshark and they are correctly formed.
It is the UDP receive that blows up after a short while.....I have only tested with multicast packets so far.
User avatar
By bbx10node
#46195 The code works OK using IDE 1.6.8, board package 2.2.0, board type NodeMCU 1.0 and a simple netcat sender test.

Send test data using netcat from Linux. Should work on Mac as well.
Code: Select all$ nc -u 239.0.0.57 5001
;lkjasdf;lkjas;dkflja;skldj;lj
;lkajsdf;lkjasd;flkjas;dfkjasd;lfkas;dlkjfa;lksfdj;aksjdf
;alskdf;laksjdf;laksjdf;klajsfd;aksjdf;klasjdf;lkajsdf;lkajsdf;lkjasdf;lkjas;dflkja;sklfdj;alksdjf;lkasjf;lkajsdf;klajsdfa;ksjd
;kajsdfa;lskdjf


Serial monitor output.
Code: Select all821:Packet of 31 received from 192.168.1.11:33185
;lkjasdf;lkjas;dkflja;skldj;lj

824:Packet of 58 received from 192.168.1.11:33185
;lkajsdf;lkjasd;flkjas;dfkjasd;lfkas;dlkjfa;lksfdj;aksjdf

830:Packet of 7 received from 192.168.1.11:33185
a;ksjd

833:Packet of 16 received from 192.168.1.11:33185
;kajsdfa;lskdjf



Note the code skipped over the packet longer than 64 bytes. The code does not read packets longer than 64 bytes which I thought might jam up the UDP stack. I think it would be safer to read all packets even thought this simple test appears to work.