This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF9160 aws_iot sample: mqtt topic add does not work

Hi,

I use the latest connect sdk 1.4.0 and modem firmware 1.2.2. If I load the default aws_iot code it does not subscribe to the topics set in "topics_list" in the code. However the device is somehow still subscriped to a topic I set with an older firmware with mqtt_simple example and still gets messages. This behaviour does not chance even after reset and completely erease of the device. 

So my quess is the topic subscription is set in the modem part and does not get reset with the aws_iot sample. What could be the issue?

Best regards

Parents
  • I found the Solution. I need to set: CONFIG_MQTT_CLEAN_SESSION=y and it works. I think the persistend default session option leads to the point where the device identifies at aws and gets the same topics as somewhere set before. this also explains why it survives all resets. Maybe there is a better explanation but these are my thoughts

    Edit: Not shure what others use but I don´t think the persistend session as a default option is a good idea

Reply
  • I found the Solution. I need to set: CONFIG_MQTT_CLEAN_SESSION=y and it works. I think the persistend default session option leads to the point where the device identifies at aws and gets the same topics as somewhere set before. this also explains why it survives all resets. Maybe there is a better explanation but these are my thoughts

    Edit: Not shure what others use but I don´t think the persistend session as a default option is a good idea

Children
No Data
Related