nebkat / esp32-xbee

ESP32 XBee UART Interface
GNU General Public License v3.0
87 stars 44 forks source link

Suggestion: Some sort of extra wifi watchdog #10

Open AndrewR-L opened 4 years ago

AndrewR-L commented 4 years ago

To deal with those situations where wifi simply ceases to function for no apparent reason I was just wondering whether some sort of belt and braces test so Xbee can tell if it is connected to the rest of the world would be useful rather than relying solely on the disconnection event to trigger action.

Maybe periodically pinging the gateway while wifi is expected to be up to verify connection and resetting the wifi if it is unreachable.

AndrewR-L commented 4 years ago

It is still doing it.

After being up continuously for some weeks (barring various panic resets etc) wifi connectivity just disappeared both STA and AP.

LED is flashing 3or4 white (quick) 2 blue (medium) 1 yellow (slow) which I think indicates wifi is functioning (blue) and NTRIP caster is functioning (I chose yellow for that).

I tried connecting a terminal to the XBee/Power port to see if there was any debug output but there was nothing.

I left it a few days to see if it recovered, and curiously it did for short periods (average 2 minutes) on around 3 occasions per day (when both the NTRIP caster and server seem to have come alive)

I don't know whether the AP (192.168.4,1) came alive temporarily too because I didn't catch it in the act and don't have a log for that.

I need to use it tomorrow so I have pressed the reset button on SRTK2B and immediately it is running fine again with full connectivity - quick white flashes on the LED followed by 2 blue (wifi) 2 yellow (caster) and 2 red (server) as usual.

I reckon this must be a feature of the Wifi module hard/soft ware not the NTRIP-mater code itself, but the question is whether the code could/should include a workaround.

I don't know if a core_dump has any relevance in this circumstance but I saved one after the reset just in case .... esp32_xbee_v0.5.2_core_dump_dd4176_2020-04-13_15_43_0.zip