8000 GitHub · Where software is built
[go: up one dir, main page]

Skip to content
ArduinoIoTCloudClass::update() stuck when internet connection fails #86
Closed
@raffaelecassia

Description

@raffaelecassia

Hi all,
I'm having trouble keeping a nano33iot running when the internet connection (but not wifi) fails/drops for a short period of time.
It gets stuck in the function void ArduinoIoTCloudClass::update(CallbackFunc onSyncCompleteCallback) called from the loop() code.

After the connection fails, the board will have 45/60 seconds of life before getting completely stuck inside that function. No trying to reconnect occurs.
Even if the internet connection fails for only a couple of seconds, the board will freeze in 45/60 seconds.
The only solution is to reset either the board or the access point (the latter will trigger a wifi drop and the board will come back to life again searching for the wifi network).

Tested repeatedly in the last few days in many ways:

  • unplugging the ethernet cable on a wifi accesspoint
  • disabling the mobile network on android in hotspot mode
  • casually walking away from the AP with the board in hands (this sometimes will trigger the wifi drop+reconnection)
  • different accesspoint/networks
  • on a mkrwifi1010

With some Serial.print-fu I was able to narrow it a little bit to the call _mqttClient->poll() inside the update() function.

Tested sketch is fresh template generated by the Arduino Create IoT Cloud compiled with the latest release of ArduinoIoTCloud (and dependencies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0