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?