This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF9160: How to recover when modem call lte_lc_connect() returns -116.

I'm using SDK 1.7.0. Here's how I have the modem code setup.

  • Init modem outside of thread loop
  • Set modem at+ comman CFUN=1 (start searching for a tower)
  • Once +CEREG returns data with a 1, I know I have connected to a tower (+CEREG: 5,1,"8404","02073301",7,,,"00001000","00100110").
  • I connect with lte_lc_connect()
  • Create a socket
  • Send some data
  • Close the socket
  • Disconnect the modem with lte_lc_offline()
  • Set modem at+ comman CFUN=4 (airplane mode)
  • Put thread asleep until it's time to send data again.

The above works well and can connect to a tower, send data and disconnect many times over. But once lte_lc_connect() returns -116, it will never connect again and I have to reboot the board. Any idea of how I can recover from this?

Parents
  • Hello,

    But once lte_lc_connect() returns -116, it will never connect again and I have to reboot the board. Any idea of how I can recover from this?

    Have you tried just calling lte_lc_connect_async() after receiving the -116 error? I'm not sure that's the best way to handle it, but I guess you can try that.

Reply
  • Hello,

    But once lte_lc_connect() returns -116, it will never connect again and I have to reboot the board. Any idea of how I can recover from this?

    Have you tried just calling lte_lc_connect_async() after receiving the -116 error? I'm not sure that's the best way to handle it, but I guess you can try that.

Children
Related