- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I want to change the settings of the keep alive timer of MQTT,
Should I change the defined value of "WICED_AWS_MQTT_KEEP_ALIVE_TIMEOUT" in "aws_common.h"?
Is there a setting value range?
I want to set it to 600 seconds, but it will be disconnected 600 seconds after the last access.
Is there a solution?
Thank you.
Solved! Go to Solution.
- Labels:
-
AWS
-
Wi-Fi Direct
-
WICED Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The connection inactivity (keep-alive interval) for MQTT connections is between 30-1200 seconds as part of the MQTT CONNECT message for AWS IOT.
Following link should help
https://docs.aws.amazon.com/iot/latest/developerguide/limits-iot.html
Following attached code should help
In the sample code, if the button isn't pressed to publish within keep alive time the connection is closed.
Thanks and Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, you can change the value of the Macro "WICED_AWS_MQTT_KEEP_ALIVE_TIMEOUT" in "aws_common.h" file to your specified value of 600 seconds. You can refer to "aws_mqtt.c" where the "keep_alive" interval is replaced with this Macro. The keep_alive is a uint16_t variable.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you very much for your answer.
I tried with "600" and it was disconnected 600 seconds after the last access.
And,I tried with "480" and it was not disconnected even after 480 seconds since the last access.
Is it a problem on the AWS server side to be disconnected when the value is "600"?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The connection inactivity (keep-alive interval) for MQTT connections is between 30-1200 seconds as part of the MQTT CONNECT message for AWS IOT.
Following link should help
https://docs.aws.amazon.com/iot/latest/developerguide/limits-iot.html
Following attached code should help
In the sample code, if the button isn't pressed to publish within keep alive time the connection is closed.
Thanks and Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you very much for your answer.
I'll try.
thank you.