Thingy91 lwm2m FOTA update

Good day 

I am trying pull an update from our own server using lwm2m and have attempted to follow the steps accordingly.  The sample I'm using is the standard lwm2m client sample.  I seem to  be getting an error which is documented as a connection timeout.  Any ideas on what I need to do ?

2023-04-17T10:51:55.817Z DEBUG modem << [m[1;32muart:~$ [m[8D[J*** Booting Zephyr OS build v3.2.99-ncs2 ***
2023-04-17T10:51:55.822Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:01.507,812] [0m<inf> app_lwm2m_client: Run LWM2M client[0m
2023-04-17T10:51:55.826Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:01.507,812] [0m<inf> app_lwm2m_client: Initializing modem.[0m
2023-04-17T10:51:55.829Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:01.509,918] [0m<inf> BH1749: BH1749 initialized[0m
2023-04-17T10:51:55.833Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:01.524,810] [0m<inf> app_lwm2m_client: endpoint: urn:imei:******[0m
2023-04-17T10:51:55.836Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:01.571,014] [0m<dbg> app_lwm2m: buzzer_intensity_cb: Intensity: 100[0m
2023-04-17T10:51:57.900Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:03.572,448] [0m<inf> app_sensors: Finished accelerometer calibration[0m
2023-04-17T10:51:57.905Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:03.572,753] [0m<dbg> app_sensors: colour_sensor_create: Created IPSO Colour Sensor instance: 0[0m
2023-04-17T10:51:57.908Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:03.572,906] [0m<dbg> app_sensors: colour_sensor_create: Created IPSO Colour Sensor instance: 1[0m
2023-04-17T10:51:57.912Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:03.573,059] [0m<inf> lwm2m_lte_notification: Registering ncell notification handler[0m
2023-04-17T10:51:57.915Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:03.573,150] [0m<inf> lwm2m_firmware: Image is confirmed OK[0m
2023-04-17T10:51:57.919Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:03.582,031] [0m<inf> app_lwm2m_client: PSM mode requested[0m
2023-04-17T10:51:57.922Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:03.582,031] [0m<inf> app_lwm2m_client: Connecting to network.[0m
2023-04-17T10:51:57.925Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:03.582,061] [0m<inf> app_lwm2m_client: This may take several minutes.[0m
2023-04-17T10:52:00.799Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:06.542,358] [0m<dbg> app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 2[0m
2023-04-17T10:52:03.020Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:08.711,151] [0m<dbg> app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 1[0m
2023-04-17T10:52:03.024Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:08.712,036] [0m<inf> app_lwm2m_client: Connected to NB-IoT network[0m
2023-04-17T10:52:03.027Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:08.712,432] [1;31m<err> gnss_module: Failed to set GNSS use case (-13)[0m
2023-04-17T10:52:03.030Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:08.712,554] [0m<inf> app_lwm2m_client: Client connect to server[0m
2023-04-17T10:52:03.033Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:08.712,615] [0m<inf> 3: Start LWM2M Client: urn:*************[0m
2023-04-17T10:52:03.036Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:09.508,758] [0m<inf> 3: RD Client started with endpoint '********' with client lifetime 43200[0m
2023-04-17T10:52:05.311Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:11.032,226] [0m<inf> lwm2m_security: Need to write credentials, requesting LTE and GNSS offline...[0m
2023-04-17T10:52:05.316Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:11.573,089] [0m<dbg> app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 0[0m
2023-04-17T10:52:05.319Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:11.573,242] [0m<inf> app_lwm2m_client: LwM2M is connecting to server[0m
2023-04-17T10:52:06.424Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:12.168,334] [0m<inf> lwm2m_security: Requesting LTE and GNSS online[0m
2023-04-17T10:52:09.417Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:15.161,254] [0m<dbg> app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 2[0m
2023-04-17T10:52:10.843Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:16.567,321] [0m<inf> lwm2m_security: Modem connection restored[0m
2023-04-17T10:52:10.849Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:16.767,120] [0m<dbg> app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 1[0m
2023-04-17T10:52:10.866Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:16.767,425] [0m<inf> app_lwm2m_client: LwM2M is connecting to server[0m
2023-04-17T10:52:12.263Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:17.969,573] [0m<inf> net_lwm2m_engine: Connected, sock id 0[0m
2023-04-17T10:52:12.267Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:18.547,973] [0m<dbg> app_lwm2m_client: rd_client_event: Registration complete[0m
2023-04-17T10:52:12.270Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:18.548,034] [0m<inf> 3: Registration Done (EP='9CjKyTlser')[0m
2023-04-17T10:52:12.273Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:18.548,339] [0m<inf> app_lwm2m_client: LwM2M is connected to server[0m
2023-04-17T10:52:12.277Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:18.548,431] [0m<inf> app_lwm2m_client: Obtained date-time from modem[0m
2023-04-17T10:52:19.743Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:25.425,445] [0m<inf> download_client: Setting up TLS credentials, tag 16842753[0m
2023-04-17T10:52:19.748Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:25.425,567] [0m<inf> download_client: Connecting to https://download.*redacted*.com[0m
2023-04-17T10:52:19.751Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:25.682,983] [1;31m<err> download_client: Unable to connect, errno 116[0m
2023-04-17T10:52:19.754Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:25.683,380] [1;31m<err> lwm2m_firmware: fota_download_start() failed, return code -116[0m
2023-04-17T10:52:19.757Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:25.684,783] [1;33m<wrn> fota_download: fota_download_cancel invalid state[0m
2023-04-17T10:52:19.760Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:25.684,814] [1;31m<err> lwm2m_firmware: Unsupported Image type 0[0m
2023-04-17T10:52:19.763Z DEBUG modem << [1;32muart:~$ [m[8D[J[00:00:25.684,814] [1;31m<err> lwm2m_firmware: Failed to reset DFU target, err: -13[0m
2023-04-17T10:52:49.241Z DEBUG modem << [1;32muart:~$ [m[8D[J[1;32muart:~$ [m[8D[J[00:00:54.987,121] [0m<dbg> app_lwm2m_client: rd_client_event: Queue mode RX window closed[0m

Parents Reply
  • Modem team has responded now;

    I can only replicate this behavior when I try to connect to a server that does not listen for incoming connections on that port.

    uart:~$ lwm2m update
    [00:04:34.702,362] <inf> net_lwm2m_engine: Connected, sock id 0
    [00:04:34.888,397] <inf> net_lwm2m_rd_client: Update callback (code:2.4)
    [00:04:34.888,427] <dbg> app_lwm2m_client: rd_client_event: Registration update complete
    [00:04:34.888,458] <inf> net_lwm2m_rd_client: Update Done
    [00:04:34.940,155] <inf> download_client: Setting up TLS credentials, tag 16842753
    [00:04:34.940,246] <inf> download_client: Connecting to https://example.com:8000
    
    [00:04:58.942,626] <err> download_client: Unable to connect, errno 116
    [00:04:58.943,023] <err> lwm2m_firmware: fota_download_start() failed, return code -116
    [00:04:58.944,305] <wrn> fota_download: fota_download_cancel invalid state
    [00:04:58.944,335] <err> lwm2m_firmware: Unsupported Image type 0
    [00:04:58.944,366] <err> lwm2m_firmware: Failed to reset DFU target, err: -13
    [00:05:05.216,278] <dbg> app_lwm2m_client: rd_client_event: Queue mode RX window closed
    

    Is this error happening every time with them?

    Also, the timeout seem to happen quite quickly (200 ms). Have they changed some configuration regarding that?

Children
Related