BW16 MQTT publish issue

MQTT can publish normally.
But when I manually cut off the network,
I will find that it will get stuck in Publish after a while.
Watchdog also can’t reset itself.
Does anyone have encountered this problem or know how to solve it?

I found that when I continue to publish after I disconnect from the network,
it will get stuck in _client->write after a few seconds.
Since the disconnection message cannot be obtained through client.connected() and WiFi.status() immediately after disconnection, the publish action cannot be stopped immediately after disconnection.
Hope someone can help, thanks.

This problem occurs when the BW16 is directly connected to the iPhone’s AP,
but when I connect the BW16 to the laptop’s AP, it does not happen…
Could it be related to the WPA version or something?

You should test with a normal AP like ones broadcasted from a Wireless router for more meaningful results, bcos iPhone AP is not a complete AP, it’s merely a mobile HotSpot

Hi @xidameng ,
As you said, iPhone hotspot is not a complete AP, but it shouldn’t cause a crash.
At present, the test is that even Watchdog cannot trigger reset when it stuck.

This seems like a network issue causing the firmware to hang/crash without warning msg, which version of the Ameba Arduino package are you using?

Hi @xidameng ,
I have tested versions 3.1.3 and 3.1.1, and both have this problem.

1 Like

Hi @xidameng @daphwl ,
Is there a solution to this problem?
This problem is also encountered when the BW16 is put into the test field.
This has caused a big problem to our product development.

I observed that when my AP is disconnected, the BW16 WIFI does not disconnect immediately.
Instead, it is disconnected after the wifi beacon timeout.
Is there a way to adjust the beacon timeout time?

Shut down AP at 11:20:37

It took about 30 seconds to notice the disconnection

Hope this issue can be improved.
When I continue to publish after the AP is turned off, it will crash before the wifi disconnect is detected. And when I do not publish there is no crash problem.
This problem occurs when the publish frequency is above 1Hz.