Hello, good news, it seems working fine now!
When the AP is down I see in log the following coming repeatedly:
MQTT client disconnected no BLE scan
*WM: [2] [EVENT] WIFI_REASON: 201
*WM: [2] [EVENT] WIFI_REASON: NO_AP_FOUND
BT Task running on core 0
*WM: [2] [EVENT] WIFI_REASON: 201
*WM: [2] [EVENT] WIFI_REASON: NO_AP_FOUND
MQTT connection…
[E][WiFiClient.cpp:232] connect(): connect on fd 55, errno: 118, “Host is unreachable”
failure_number
81
failed, rc=
-2
When the AP is up again, a new connection is made successfully, mqtt publishing starts again, everything is fine. Tried this several times and every time the ESP32 recovers the wifi connection successfully
One thing I noticed with previous versions was the the BT scanning (until it was turned off in last versions when there was no mqtt connection) always seemed to work even if the wifi was disconnected. So could this wifi disconnect, if it happened for any reason, actually have been the cause why the gateway was experienced as “dead”?
What I mean here is that one type of behavior (mqtt publishing ended) could have been caused by a another problem, i.e. temporary wifi connection error that was never recovered
Anyway, time will tell, so far it looks really good!!
PS In the serial monitor I see several devices being found, including my sonos speakers, but for some reason the text (manufacturerdata) is not readable, is it something in the platformio that can be adjusted, like supporting character set utf-8 or so? Or is it in the actual code where you publish the results to mqtt?
{“id”:“f3:33:41:94:64:d5”,“manufacturerdata”:“�␅␃␑Sonos_Uq9RJ”,“rssi”:-84,“txpower”:0,“distance”:
{“id”:“f3:33:ac:c2:d7:6e”,“manufacturerdata”:“�␅␃␒u1w1PbgkSBO”,“rssi”:-87,“txpower”:0,“distance”:
{“id”:“f3:33:ac:c2:d7:6e”,“manufacturerdata”:“�␅␃␐␁�Dޭ��”,“rssi”:-87,“txpower”:0,“distance”:18.07