Hello Jared Wolff Community,
I am a somewhat new user to Zephyr and nRF9160 based boards. I’m developing firmware for an edge sensor that will send summary readings data about once a day over a cellular link, using MQTT protocol. Presently I’m experimenting with Nordic Semi’s aws_iot
sample app from their sdk-nrf v1.6.1.
On the cloud side I have an account with AWS, and have learned some basics of using S3 buckets there. Also using the account’s MQTT broker facility, and an MQTT client which is part of the cloud account. I’ve set up certificates, the original aws_iot sample app sends MQTT packets to a shadow topic with three sub-topics. I’ve created a couple of test topics on the cloud side, and can publish to them there and see messages appear on the prototype edge device. (Have a serial console enabled there for development)
Problem is, when I back off from having edge prototype send a message regularly, I find that even with repeated MQTT subscription actions, I lose cloud-to-device message delivery when the edge device has the radios in sleep or power down mode for more than about 90 seconds.
In the prj.conf file for this Zephyr based app, there’s an MQTT keep alive parameter set to 1200. If that’s in seconds, that works out to 20 minutes. I don’t see any other project configuration symbols which speak to keep alive or persistence settings.
There is probably something really simple I am missing here, but I’m not sure what I need to ask about. I’ve spent past couple days searching. Came across another developer who needed to enable in a similar Nordic sample a symbol like CONFIG_MQTT_SESSION_CLEAN=y
. I found I need to add this in order for firmware to pick up new or altered MQTT topic subscriptions across firmware reboots. But this does not address the issue of edge-received packets stopping when the edge device is radio idle for more than a minute or two.
Thanks ahead of time for any help the community can offer!