AWSIoTMQTTClient keepalive interval?
-
I've just gotten my FiPy to connect to AWS IoT via TLS and MQTT. In monitoring the device it is sending a little over 200 bytes to AWS every 20 seconds. I see Packet sent. (Length: 2) at 20 second intervals. While this might be fine over WiFi it will nearly use up my 1MB LTE Cat M1 data plan after one day just with these keepalive packets. How do I reduce the keepalive interval with the built-in AWSIotMQTTClient? There is no way I can deploy on LTE with this much data being transmitted. This doesn't even include any of my actual MQTT messages! Just the keepalives.
-
-
@cmisztur That does take a parameter, in connect() called keepAliveIntervalSecond, but when I set it it seems to be ignored. Keepalive packets are still being sent every 20 seconds. Following the code, AWSIotMQTTClient.connect() ends up calling MQTTClient._send_connect() and is passed the keepalive parameter, but it does nothing with it.
-
@reidfo Sure looks like it. Change line 294, see if you get a different behavior.
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc385349238
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login