Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mwifi_get_root_status() sometimes returns false even though root is connected #67

Open
will-emmerson opened this issue Jul 19, 2019 · 2 comments

Comments

@will-emmerson
Copy link

Environment

  • Development Kit: ESP32-DevKitC
  • Kit version (for WroverKit/PicoKit/DevKitC): v4
  • MDF version: c1cc50f
  • Development Env: CLion
  • Operating System: Fedora
  • Power Supply: USB

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:

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.

wujiangang pushed a commit that referenced this issue Jul 25, 2019
1. mwifi_get_root_status() sometimes returns false even though root is connected #67
2. mwifi_root_write return MDF_OK instead of error code #72
@zhanzhaocheng
Copy link
Collaborator

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.

@will-emmerson
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants