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

Several issues encountered with nrf9160 to AWS IOT

Hi,

We modified the lte_ble_gateway example and connected to our aws iot server. And have faced few issues so far and would like to get some hint from you.

We are using mfwnrf9160100 firmware and NCS V1.0.0.

1. MQTT: Seems the mqtt link becomes unstable and there is no puback returned from AWS IOT after sending data few rounds, when sending data interval is 10 minutes, even when mqtt_live and mqtt_input are called every 3 minutes. The mqtt_keep_alive was set to 1200 during mqtt_connect. But the link becomes much stable after reducing the sending data interval to 5 minutes. We would like to be able to send data every hour while ping mqtt every 10 or 20 minutes to keep the mqtt link alive.

2. MQTT: Even the CONFIG_MQTT_KEEPALIVE is set to 1200, we are not able to maintain the mqtt link stable even when we call mqtt_ping every 10 minutes.

3. BSD: getting ERROR_BSD_RECOVERABLE: 3 when sending data interval is 10 minutes

4. LTE_LC: Seems the application is not able to exit lte_lc_power_off() if the lte link is dropped accidentally? I have to force rebooting the application when the lte link is lost, instead of power off the modem first.

5. DEBUG: even when log_level is set to 4 for mqtt module and other modules, debug output will be printed in LTE_LINK_MONITOR app. But after LTE link and mqtt link are established, all debug output are gone and there is only output from main printk function.

It is really a good product and looking forwards to your reply!

Thanks a lot! 

Parents
  • Hi. Sorry for the long delay

    Regarding my earlier comments, when using the newest modem firmware, a reset after setting the modem in "power off" should not be necessary, as it no longer powers off the AT command interface.

    Regarding your point number 5, can you send me your log-related configurations, along with the log, and tell me what you were expecting to see?

    Best regards,

    Didrik

  • As you can see from the log,  after mqtt link is established, there is no more debugging information send out from nrf_cloud_transport and net_mqtt. I have set "NRF_CLOUD_LOG_LEVEL 4" and "MQTT_SOCKET_LOG_LEVEL 4". it seems like the main thread printk overrides the debug level log

  • Hi, and again, sorry for the late reply. There has been a lot to do lately, but it looks like things have calmed down a bit.

    First, you should avoid writing certificates on every reboot. They get stored in non-volatile memory in the modem, so there is no reason to write them every single time. If you write them on every reboot, you wear out the flash, and if you take a modem trace, the certificates would be present in the trace.

    Second, if you disable PSM, do you still get the same connection stability issues?

    What are the PSM values the network grants you? They may not be what you requested. You can check the PSM values with the %XMONITOR AT command.

    Do you get any warnings when running CMake? If you are using SEGGER Embedded Studio, CMake warnings should pop up when loading the project in a window called "JavaScript Alert".

    Are you still using NCS v1.0.0?

    A modem trace might be helpful to see if there is anything wrong happening on the modem side. If you do not know how to capture a modem trace, you can follow this guide: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect

    Best regards,

    Didrik

Reply
  • Hi, and again, sorry for the late reply. There has been a lot to do lately, but it looks like things have calmed down a bit.

    First, you should avoid writing certificates on every reboot. They get stored in non-volatile memory in the modem, so there is no reason to write them every single time. If you write them on every reboot, you wear out the flash, and if you take a modem trace, the certificates would be present in the trace.

    Second, if you disable PSM, do you still get the same connection stability issues?

    What are the PSM values the network grants you? They may not be what you requested. You can check the PSM values with the %XMONITOR AT command.

    Do you get any warnings when running CMake? If you are using SEGGER Embedded Studio, CMake warnings should pop up when loading the project in a window called "JavaScript Alert".

    Are you still using NCS v1.0.0?

    A modem trace might be helpful to see if there is anything wrong happening on the modem side. If you do not know how to capture a modem trace, you can follow this guide: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect

    Best regards,

    Didrik

Children
No Data
Related