LTE-M Reconnect after LoS

Hi,

I am using Thingy 91 in Australia, and I have linked Asset Tracker v2 with overlay-lwm2m.conf to communicate with my own LwM2M server, which is running an instance of Leshan server. Thingy 91 has no problem communicating with my server in both passive and active mode, as long as the cellular link is stable. I took it for a drive, but when I got home, I realised it had stopped sending data to my server as soon as I had entered my underground parking, even though the LED would dutifully blink green and teal every two minutes, just like you'd expect it to behave in active mode. When I connected to it via LTE Monitor I realised the LTE link is disconnected and Thingy 91 cannot reconnect. Recycling the power easily resolved the problem, so I decided to simulate LoS by wrapping it in aluminium foil. Once again, connection was lost and could not be established until either the power was recycled, or I'd issue AT+CFUNC=0 followed by AT+CFUN=1 via LTE Monitor.

My question is, what is the expected behaviour of the modem in case of LoS? Does it not try to reconnect by itself? Does the software have to monitor link connection and recycle the power on the modem if it is unable to establish a link?

I am using nRF Connect SDK v2.0.0, with modem firmware 1.3.2.

Steps tp reproduce:

  1. Compile Asset Tracker v2 with overlay-lwm2m.conf (modified to connect to your own LwM2M server).
  2. Change /50009/0/0 (Passive Mode RID) to false via the server as soon as Thingy 91 registers with it.
  3. Wait a few minutes and see data coming in.
  4. Wrap Thingy 91 in aluminium foil for at least 5 minutes to make sure it experiences LoS for at least one ping.
  5. Unwrap Thingy 91, plug it into LTE monitor, and monitor modem status

Kind Regards,
Iman

  • Trace #2, this morning. This was after driving with Thingy 91 to work, and realising it had stopped communicating when I went through a tunnel.

    2772.trace-2022-06-22T21-58-16.233Z.bin

  • Thanks for providing the modem traces. I will have a look at them and get back to you.


  • Have you done any other changes to the application other than adding lwm2m? 

  • Hi,

    Few changes to support SUPL binary:

    • prj.conf:
      CONFIG_LOG=n
      CONFIG_AT_HOST_LIBRARY=n
    • overlay-lwm2m.conf
      CONFIG_LWM2M_TLS_SESSION_CACHING=n
      CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=n
      CONFIG_LWM2M_CLIENT_UTILS_LOG_LEVEL_DBG=n
      CONFIG_LWM2M_CLIENT_UTILS_DEVICE_OBJ_SUPPORT=y
      CONFIG_LWM2M_CLIENT_UTILS_LOCATION_OBJ_SUPPORT=y
      CONFIG_NRF_CLOUD_AGPS=y
      CONFIG_SUPL_CLIENT_LIB=y
    • src/cloud/CMakeLists.txt
      target_sources_ifdef(CONFIG_SUPL_CLIENT_LIB app
                           PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lwm2m_integration/assistance_supl.c)
    • src/cloud/Kconfig.lwm2m_integration
      config LWM2M_CLIENT_UTILS_SERVER
              string "LwM2M server address"
              default "coaps://mylwm2mhostnamehere:5684"
    • /src/main.c
      .
      .
      .
      #if defined(CONFIG_SUPL_CLIENT_LIB)
      #include "cloud/lwm2m_integration/assistance.h"
      #endif
      .
      .
      .
      void main()
      {
          .
          .
          .
          self.thread_id = k_current_get();
          
      #if defined(CONFIG_SUPL_CLIENT_LIB)
          assistance_init();
      #endif
          .
          .
          .
    • src/cloud/cloud_codec/lwm2m/lwm2m_codec.c
      int cloud_codec_encode_agps_request(struct cloud_codec_data *output,
                                          struct cloud_data_agps_request *agps_request)
      {
      #if defined(CONFIG_SUPL_CLIENT_LIB)
             /* SUPL doesn't usually provide satellite real time integrity information. If GNSS asks
              * only for satellite integrity, the request should be ignored.
              */
             if (agps_request->request.sv_mask_ephe == 0 &&
                 agps_request->request.sv_mask_alm == 0 &&
                 agps_request->request.data_flags == NRF_MODEM_GNSS_AGPS_INTEGRITY_REQUEST) {
                     printk("Ignoring assistance request for only satellite integrity\r\n");
             } else {
                     printk("Assistance data needed, ephe 0x%08x, alm 0x%08x, flags 0x%02x\r\n",
                             agps_request->request.sv_mask_ephe,
                             agps_request->request.sv_mask_alm,
                             agps_request->request.data_flags);
                     assistance_request(&agps_request->request);
             }
             return -ENODATA;
      #else
      // ORIGINAL METHOD
      .
      .
      .
      #endif
    • I also copied assistance.h and assistance_supl.c from GNSS sample for nrf91670

    Would you like me to zip my project folder and send it to you somehow?

  • The modem trace doesn't make much sense. It looks like the device is resetting. How long did you leave the modem trace running? 

Related