ubxlib: CME Error: memory full when using MQTT
So I’ve just gotten started using the MQTT client on the ESP32 with the SARA-R510M8S and I seem to be running into ‘memory full’ issues on the radio. This causes incoming messages to be delayed, and sometimes causes outgoing messages to fail. For reference, I’m using MQTT over TLS to try to connect to AWS IoT.
I’m not doing anything else with the radio (I was calling uGnssPosGet over and over in another thread to get a constant position, which is my end goal, but even commenting that out and just triggering this publish to occur over the command line with dummy data still causes this issue).
Any thoughts on what might be the issue / what might fix it? Some logs are below. Memory full on receive:
AT+UMQTTC=9,1,0,"$aws/things/sara-tracker/shadow/update",100
>{"state":{"reported":{"gnss":{"latitude":12.345600,"longitude":-23.448000}}},"clientToken":"000001"}
OK
+UUMQTTC: 9,1
+UUMQTTC: 6,1
The broker says there are 1 message(s) unread.
I (51955) SHADOW: Published!
AT+UMQTTC=6,1
+CME ERROR: memory full
AT+UMQTTER
+UMQTTER: 13,0
OK
U_CELL_MQTT: error codes 13, 0.
AT+UMQTTC=6,1
+CME ERROR: memory full
AT+UMQTTER
+UMQTTER: 13,0
OK
U_CELL_MQTT: error codes 13, 0.
AT+UMQTTC=6,1
+CME ERROR: memory full
AT+UMQTTER
+UMQTTER: 13,0
OK
U_CELL_MQTT: error codes 13, 0.
AT+UMQTTC=6,1
+UMQTTC: 6,1,286,47,"$aws/things/sara-tracker/shadow/update/accepted",239,"{"state":{"reported":{"gnss":{"latitude":12.3456,"longitude":-23.448}}},"metadata":{"reported":{"gnss":{"latitude":{"timestamp":1639522422},"longitude":{"timestamp":1639522422}}}},"version":44,"timestamp":1639522422,"clientToken":"000001"}"
OK
I (54455) SHADOW: Got message from topic $aws/things/sara-tracker/shadow/update/accepted: {"state":{"reported":{"gnss":{"latitude":12.3456,"longitude":-23.448}}},"metadata":{"reported":{"gnss":{"latitude":{"timestamp":1639522422},"longitude":{"timestamp":1639522422}}}},"version":44,"timestamp":1639522422,"clientToken":"000001"}
Memory full on send:
AT+UMQTTC=9,1,0,"$aws/things/sara-tracker/shadow/update",100
+CME ERROR: memory full
AT+UMQTTER
+UMQTTER: 13,0
OK
U_CELL_MQTT: error codes 13, 0.
W (170145) SHADOW: Unable to publish our message "{"state":{"reported":{"gnss":{"latitude":12.345600,"longitude":-23.448000}}},"clientToken":"000006"}"!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (8 by maintainers)
Hi Rob,
What a breakdown! That makes a lot of sense, and ‘my device has turned into a ping-flooding weapon’ is a fun answer to this query. I switched my application back to using ubxlib for MQTT, added the timeout (60 seconds), and was able to get 50 messages up and 50 messages down, so I do believe the workaround is working on my end. Resolution sounds good, too.
Thanks again for all of your help with this, and for enlightening me with the details! You guys are awesome, and I look forward to using more of ubxlib as it grows 😃
(feel free to close this at your leisure)