Due to high demand expect some shipping delays at this time, orders may not ship for 3-4 business days. On MLK Day no orders will be shipped.
0

Fona/MQTT failure
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Fona/MQTT failure

by anpretorius on Sun Nov 28, 2021 1:25 pm

Hi All

I have a strange issue that I am not able to solve.
I currently use a feather M4 express to talk to a SIM868 modem. The base for the project is the MQTT Fona example from Adafruit.

The idea is to use the GPS functionality of the SIM 868 and send the location in JSON format to a MQTT server.

All the code compile, connect and function as expected, but seems to just stop after data has been send to the server 6 times. I have attached the sketch as well as a serial sniff between the modem and CPU, and the serial console output. There is no obvious reason for the CPU to freeze up. When it freeze I need to fiscally reset the CPU as well as plugging the USB out and re inserting the connection.

Any ideas how i can further trouble shoot would be appreciated.
Attachments
Sim868_28-11-2021.zip
complete program
(4.07 KiB) Downloaded 2 times
Serial console.JPG
Message on serial console
Serial console.JPG (22.43 KiB) Viewed 337 times
snif.PNG
Serial Sniff between modem and CPU
snif.PNG (9.07 KiB) Viewed 337 times

anpretorius
 
Posts: 14
Joined: Tue Aug 07, 2018 2:44 pm

Re: Fona/MQTT failure

by anpretorius on Wed Dec 01, 2021 1:53 am

Hi All

Maybe this can help somebody in the future.

the fault seems to have been in the JSON lib. I have now created my own JSON string and and taken the lib out of the sketch.
So far so good, everything seems to have stabilized.

Andre

anpretorius
 
Posts: 14
Joined: Tue Aug 07, 2018 2:44 pm

Please be positive and constructive with your questions and comments.