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

MQTT communication should be robust, GPAD_API FIRMWARE_VERSION "0.12, #66

Open
ForrestErickson opened this issue Nov 11, 2024 · 3 comments
Assignees

Comments

@ForrestErickson
Copy link
Collaborator

Describe the bug
A clear and concise description of what the bug is.
Short Summary of the expected behavior: MQTT communication should be robust. It should recover if interrupted for example.
Short Summary of the buggy behavior: It looks as if from 9 AM till nearly midnight 23:14:56 the MQTT connection was abonrmal

Serial Monitor Screen Shot

image

Send from PMD Processing the A2 command
image

To Reproduce
Steps to reproduce the behavior:

  1. Use the Processing sketch
    image

  2. Load the Krake prototype with firmware FIRMWARE_VERSION "0.12 "

  3. Let run and watch on serial monitor and hope

  4. See error

Expected behavior
A clear and concise description of what you expected to happen.
If the MQTT connection is reported lost, reconnection should be reported too.

Screenshots
If applicable, add screenshots to help explain your problem.

Hardware description
Model: Homework2 Assembly from JLCPCB with LCD and DFPlayer
Serial Number: 20240421_USA1
Other:

@ForrestErickson
Copy link
Collaborator Author

Re scaling the Serial Monitor revealed that reconnection success was reported
image

Here is the text

Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
09:33:23.500 -> Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
10:25:02.221 -> Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
11:32:53.620 -> Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
11:34:53.036 -> Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
11:36:44.863 -> Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
11:56:06.209 -> Attempting MQTT connection...failed, rc=-4Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
23:14:56.580 -> Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...failed, rc=-2Attempting MQTT connection...success!
11:12:38.187 -> Message arrived [KRAKE_20240421_USA1_ALM] |a2MessageFromProcessing_PMD:2|

@ForrestErickson
Copy link
Collaborator Author

Perhaps the formatting of the MQTT failure reported on the serial could be cleaned up for more human friendly review.

Should the LCD Display warn the user of MQTT connection failure?

@ForrestErickson
Copy link
Collaborator Author

Note regarding this issue. To really test MQTT communication interruption we must have a Broker which we can control so as to make unavailable and available during our testing.

Such a broker is MOSQUITO. It can be installed on PCs and Linux machines like RaspberryPi and I assume MACs.

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

3 participants