-
Notifications
You must be signed in to change notification settings - Fork 55
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
[BUG] Getting coreMQTT: Collision
when starting demo
#123
Comments
Hmm. It's possible you may need to tweak some network settings. Collision is most likely caused by either the device not acking a packet from AWS before AWS re-sends it (i.e. AWS sends a packet, device receives packet but sends its ack back too late so AWS resends the packet the device had already received, causing collision) or AWS not sending requested packets back to the device in time before the device retries (i.e. device requests some sort of response, AWS sends the response but device does not receive the response before it retries, device receives the initial response that was sent, and later gets the second response it requested on retry, leading to collision). I will look into how to adjust this project's settings so you can try some things. Best, Jason Carroll |
Thanks! |
Hi all here my log: 2024-12-25 19:17:16.497] I (232682) MAIN: Send TOPIC: FLTE20/EWB/out/memcheck MESSAGE: {"time": 232366, "portime": 232, "HeapFree": 61856, "MinHeapFree": 5408, "fwVer": "1.8.0", "rssi": -64} |
Hi @WilliamFrasson, Hmm... well that gives another data point. I apologize for the delay - I am still looking into this, but am waiting on an ESP32-C3 to come in. So what @WilliamFrasson mentioned (in that it worked a few months ago) - I wonder if it has anything to do with this PR https://github.com/FreeRTOS/iot-reference-esp32/pull/104/files. Could you try altering the values of the timeout and see if that fixes anything? Best, Jason Carroll |
I was not getting this with esp32c6 devkit yesterday, but now see it when I switched to esp32s3 devkit. Power cycling the devkit, erase/reflash, closing/reopening connection on aws had little effect (see below). I switched back to esp32c6 and confirm it's still ok. Then back to esp32s3, and now it's ok. So it may be intermittent, I will update if I find the failure mode. I applied the same aws certs to the esp32s3 as I did the esp32c6, and running main branch as of today [f4c15d5]. I also notice that when it's failing as shown below the iteration count that appears in aws console seems to alternate between a low single digit count and a count offset by about 10430, example, 1, 14030, 2, 10431. This is not consistent, some sessions it seemed to count normally. I can control the LED but it takes several pub attempts to get through to it when it's in this state.. I (144033) sub_pub_unsub_demo: coreMQTT-Agent connected. I (146793) sub_pub_unsub_demo: coreMQTT-Agent connected. |
@orlyprofili |
In aws console webview, viewing the subscribed temperature message as they came in, there is an iteration counter as part of each temperature message. Normally it increments, but when it was acting up, it patterned something like what I described above. |
@orlyprofili I still have not been able to reproduce this error... I will take a deeper look at the code next week... seems to be some bug there with the iteration count ... I wonder if commands are going out of scope to the coreMQTT-Agent (when you make a command to coreMQTT-Agent one must ensure that the memory passed to the command stays in scope - otherwise bad things ensue as memory is corrupted. |
Thanks. I haven't observed it since either. Will share if it comes up again. |
Have not had time to look closer into it yet. I am going to try to next week Best. |
@orlyprofili, from inspection I did not see any places where coreMQTT-Agent command contexts went out of scope. I also have not been able to replicate your issue.... definitely seems like it shows up more on the S3. Hmm.. I think I will check task stack settings next... wonder if something is possibly bleeding over from one task to another. |
@jasonpcarroll thanks for looking, I've shifted to some other tasks in the past week or so. If I observe this again when I come back to this stuff, I'll post here. |
Describe the bug
I was able to create/download the AWS certs, build the firmware, and successfully connect. However, I keep getting this error in the log:
System information
Expected behavior
I don't expect to see MQTT message collisions in the log
Screenshots or console output
See above
Additional context
I had some trouble getting the proper policies for the MQTT topics. I ended up using this one:
The text was updated successfully, but these errors were encountered: