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

nRF9160-DK board Cloud API - AWS IoT periodic MQTT connection doesn't work.

Hello all,

This is my first post on your DevZone.


Setup details:

nRF9160 DK Board: 0.8.3
nRF Connect SDK tag: 1.2.0
OS: Windows 10 Pro
LTE Network: NB-IoT on B3 and B20, Operator: A1 Slovenia, PSM: No
Modem Firmware: mfw_nrf9160_1.1.1

Short description of our use case:

Our product periodically connects to AWS, does its PUB/SUB, disconnects and goes to sleep.
The time duration from the first boot message to cloud disconnect is around 17 seconds.
During sleep the modem is powered down using "lte_lc_power_off".
On wakeup the whole process repeats including configuring modem again.

Issue:

After power-on or board reset, connection to cloud works only once. Post wakeup from sleep,
"cloud_connect" function gets stuck in lower layer with a message "Created socket 2" and it stays there
with no timeout. I initially thought it might be network issue but reset, either soft (sys_reboot) or
board reboot, leads to a successful connection. However I want to avoid resetting the board on every wakeup.

How to reproduce the issue:

I took the sample application "nrf/samples/nrf9160/cloud_client" and modified it for simple
connect-disconnect-sleep cycle in loop, there is no modem power-off in this test app.

Please refer to the attached main.c, prj.conf, LTE Link monitor log output.
NOTE: In prj.conf file I have removed our product's AWS IoT settings.

Thanks.

Parents
  • Hello, 

    Thanks for the detailed ticket. I'm not able to reproduce at the moment. Can you please provide a modem trace as well?

    Thanks!

    Kind regards,
    Øyvind

  • An update from my side. I was able to reproduce the error here. Failing at the same time. I have got a modem trace and forwarded it to our R&D team. 

    Will get back to you when I know more. 

    -Øyvind

Reply
  • An update from my side. I was able to reproduce the error here. Failing at the same time. I have got a modem trace and forwarded it to our R&D team. 

    Will get back to you when I know more. 

    -Øyvind

Children
No Data