I’m hope I’m missing some basic. With a simple Pelion app publishing regular value changes over Wi-Fi this works fine for periods from an hour to maybe a day or two until it loses connectivity. It then does not reconnect. I’m assuming some momentery loss is happening I can easily recreate by disabling the Wi-Fi access point when connected.
Is there anything I can to to either enable it to reconnect automatically or handle some notification of loss and manually re-connect?
The Serial USB reports 2 errors:
client_error(6) → Client in reconnection mode NetworkError
client_error(12) → Client in reconnection mode DnsResolvingFailed
It the client appears to be in a reconnecting state but never succeeds.
To reproduce: I’ve tried two example applications (the second below appears to have the latest mbed-cloud-client.lib). Simply downloaded to the online compiler, changed the Wi-Fi SSID/password and deployed/run.
I tried building mbed-os-example-pelion on DISCO_L475VG_IOT01A, and connect it to my mobile’s wifi hotspot. I disable/enable hotspot to make device re-connect about 5 times, it works every time.
Could you provide reproduce steps and the frequency?
And for detail log, please set "MBED_TRACE_MAX_LEVEL=TRACE_LEVEL_DEBUG" and "mbed-trace.enable" : 1 in mbed_app.json
What Wi-Fi firmware version are you using? The ISM Wi-Fi module firmware should be updated, if possible. Reconnection issues in DNS resolving typically means that the Wi-Fi (or other connectivity module in question) is not responding/working normally anymore. You should update the firmware and report possible issues with the Wi-Fi module to the Wi-Fi driver repository;
Thanks for the reply and the links, I’ll give it a try. It could well be the firmware, I hadn’t thought of that. (I would have hoped that recent boards would come with reasonably late firmware already). I’ll report back.