Hello CircuitDojo Community,
Over past couple of months I have been working with Sparkfun Thing Plus nRF9160 board, and Nordic Semi’s Zephyr based aws_iot
sample app. I’m sending sensor data to an AWS S3 bucket. I notice however, that my MQTT client-to-broker connections do not persist for very long. Project review of Kconfig settings, using west build -t menuconfig
shows:
AWS_IOT_SEND_TIMEOUT(=y) “Send data with socket timeout”
AWS_IOT_SEND_TIMEOUT_SEC(=60) “Send timeout”
I’m actually working to develop a battery powered device, and prefer to minimize celular and or NB-IoT transmissions, some non-trivial ones of which are needed to do the initial client authentication and certificate sharing.
Question 1: Is there a cost if I disable this “AWS IoT send timeout” configuration item? Would my MQTT client-to-broker connection then persist?
Question 2: Would there as well then be any difficulty to reconnect, if some intermediary failure happened and broke my device’s connection to the MQTT broker?
Part of Nordic Semi’s AWS IoT library API includes a routine to disconnect a client from a broker or remote server. But I’m guessing that disconnect performs some kind of clean up and resetting so that a new connection can be made straight away, whereas an externally dropped or lost connection may leave stuff in the running firmware not properly updated with the lost connection status.
Thanks ahead of time for help you and the community can offer on this topic!