You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running something based off the mqtt example.
I noticed that sometimes, after a few hours or days, a node would stop sending mqtt messages. This only happens to nodes > level 2, e.g. there is a node between them and root.
I am using the same code as the example here:
if (!mwifi_is_connected() || !mwifi_get_root_status()) {
This blocks the mqtt sending task (node_write_task) if either node or root isn't connected.
It turned out the mqtt message wasn't being sent because mwifi_get_root_status() was returning false, even though mwifi_is_connected() is true. The root definitely is connected though because I can send mqtt messages to the node.
The text was updated successfully, but these errors were encountered:
I haven't been able to reproduce for two days. I fixed a possible problem with mwifi_get_root_status(). I hope you can help verify if the problem has been fixed.
If the problem is not resolved, please provide your full log.
Unfortunately the problem is still there. I updated MDF to 8dfc3c0 on Monday and it ran fine until a few minutes ago, when the same problem happened.
But I suspect it's something I've added to the example that is causing the problem. I'll run the vanilla mqtt example for a few days and see if it exhibits the same problem.
Environment
Problem Description
I am running something based off the mqtt example.
I noticed that sometimes, after a few hours or days, a node would stop sending mqtt messages. This only happens to nodes > level 2, e.g. there is a node between them and root.
I am using the same code as the example here:
esp-mdf/examples/function_demo/mwifi/mqtt_example/main/mqtt_example.c
Line 165 in c1cc50f
This blocks the mqtt sending task (node_write_task) if either node or root isn't connected.
It turned out the mqtt message wasn't being sent because
mwifi_get_root_status()
was returning false, even thoughmwifi_is_connected()
is true. The root definitely is connected though because I can send mqtt messages to the node.The text was updated successfully, but these errors were encountered: