Hi,
My device is crashing and rebooting, although not very often, possibly inside the scan() function.
I can't reproduce this when it's just sitting at home, it obviously happens in certain geographical locations more than others. Perhaps there is a bad wifi packet which is killing it. Perhaps a some accesspoints send back a bad response which confuses it.
In each case, the device reboots with a reset_cause of exception (I think).
Is there any way I can easily debug it? I can't make this happen in a controlled environment.
One possibility is to attach a 2nd esp8266 (or something else) with the rx/tx swapped and have it log the output (or from uart 1?) into its flash, but that doesn't help if I don't get useful debug info.
The thing which crashes it, might of course not be inside scan(), but some asynchronous wifi callback thing.
Crash in (I think) wifi accesspoint scan()
Re: Crash in (I think) wifi accesspoint scan()
Unless it's strlen() issue which you fixed, it may be another manifestation of https://github.com/micropython/micropython/issues/1946 . We need a better crash handler, e.g. port one from esp-open-rtos. If you're up to *real* reverse engineering, mind the tools specifically made for that: https://github.com/pfalcon/ScratchABit , https://github.com/pfalcon/ScratchABlock
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Crash in (I think) wifi accesspoint scan()
It does not appear to be the strlen() issue. I think it's probably the same as #1946.
The strlen() issue did overrun the buffer, but usually only by a few bytes and not into an illegal area of memory, so I don't think it often caused a problem (except for returning incorrect data, of course). Plus there aren't many accesspoints with 32 byte ssid.
I'll see if I can simulate a large number of accesspoints and reproduce it.
The strlen() issue did overrun the buffer, but usually only by a few bytes and not into an illegal area of memory, so I don't think it often caused a problem (except for returning incorrect data, of course). Plus there aren't many accesspoints with 32 byte ssid.
I'll see if I can simulate a large number of accesspoints and reproduce it.
Re: Crash in (I think) wifi accesspoint scan()
In the latest version of the SDK, release notes, it says they (Expressif) have apparently fixed this issue:
" The ESP8266 maybe reset if connected to a special router."
http://bbs.espressif.com/viewtopic.php?f=46&t=2198
This could well be the same thing, and for micropython bug #1946
" The ESP8266 maybe reset if connected to a special router."
http://bbs.espressif.com/viewtopic.php?f=46&t=2198
This could well be the same thing, and for micropython bug #1946