modem fw v1.3.0
ncs 1.5.0 and master
I'm trying to test LWM2M bootstrapping using https://leshan.eclipseprojects.io/ but my board is failing to connect to the LWM2M server after being served the URL from the bootstrap server. The device was added to both the bootstrap server and normal server, you can search for nrf-352656106650180 to check the configuration.
Log of connecting to bootstrap server and failing to connect to LWM2M server below
uart:~$ *** Booting Zephyr OS build v2.4.99-ncs1 *** [00:00:00.207,824] <dbg> net_lwm2m_engine.lwm2m_engine_init: LWM2M engine socket receive thread started [00:00:00.207,885] <dbg> net_lwm2m_obj_security.security_create: Create LWM2M security instance: 0 --- 19 messages dropped --- [00:00:00.207,946] <dbg> net_lwm2m_obj_server.server_create: Create LWM2M server instance: 0 [00:00:00.208,038] <dbg> net_lwm2m_obj_device.device_create: Create LWM2M device instance: 0 [00:00:00.208,068] <dbg> net_lwm2m_obj_conn_mon.connmon_create: Create LWM2M connectivity monitoring instance: 0 [00:00:00.208,099] <dbg> net_lwm2m_obj_firmware.firmware_create: Create LWM2M firmware instance: 0 [00:00:00.208,129] <dbg> net_lwm2m_obj_location.location_create: Create Location instance: 0 [00:00:00.208,557] <inf> app_lwm2m_client: Run LWM2M client [00:00:00.208,831] <dbg> app_lwm2m_client.main: Set DNS to custom address 8.8.8.8 [00:00:00.209,594] <inf> app_lwm2m_client: Initializing modem. [00:00:00.227,722] <dbg> net_ipso_onoff_switch.switch_create: Create IPSO On/Off Switch instance: 1 [00:00:00.227,752] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3342/1/5500, value:0x2002611f, len:1 [00:00:00.227,844] <dbg> net_lwm2m_engine.lwm2m_engine_create_obj_inst: path:3313/0 [00:00:00.227,874] <dbg> net_ipso_accel.accel_create: Create IPSO Accelerometer instance: 0 [00:00:00.227,966] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:3/0/13, buf:0x2002610c, buflen:4 [00:00:00.227,996] <inf> app_lwm2m_accel: accelerometer normal [00:00:00.228,057] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5702, value:0x20026110, len:8 [00:00:00.228,088] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5703, value:0x20026110, len:8 [00:00:00.228,149] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5704, value:0x20026110, len:8 [00:00:00.228,210] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5518, value:0x200260fc, len:4 [00:00:00.228,271] <inf> app_lwm2m_firmware: Update Counter: current 0, update 0 [00:00:00.228,302] <inf> app_lwm2m_firmware: Image is not confirmed OK [00:00:00.228,363] <inf> app_lwm2m_firmware: Marked image as OK [00:00:00.228,576] <inf> app_lwm2m_firmware: Update Counter updated [00:00:00.228,576] <inf> app_lwm2m_firmware: Firmware updated successfully [00:00:00.228,607] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:5/0/5, value:0x2002610f, len:1 [00:00:02.082,427] <inf> app_lwm2m_client: Connecting to LTE network. [00:00:02.082,458] <inf> app_lwm2m_client: This may take several minutes. [00:00:02.082,519] <dbg> lte_lc.lte_lc_system_mode_set: Sending AT command to set system mode: AT%XSYSTEMMODE=0,1,1,0 [00:00:07.898,010] <dbg> lte_lc.at_handler: +CEREG notification: +CEREG: 2,"2332","02592A20",9 [00:00:08.649,627] <dbg> lte_lc.at_handler: +CSCON notification [00:00:10.377,044] <dbg> lte_lc.at_handler: +CEREG notification: +CEREG: 5,"2332","02592A20",9,,,"11100000","00101000" [00:00:10.377,349] <dbg> lte_lc.parse_psm_cfg: TAU: 28800 sec, active time: -1 sec [00:00:10.377,471] <inf> app_lwm2m_client: Connected to LTE network [00:00:10.378,997] <inf> net_lwm2m_rd_client: Start LWM2M Client: nrf-352656106650180 [00:00:10.413,330] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/0, value:0x20027277, len:1 [00:00:10.413,482] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/8, value:0x20027274, len:4 [00:00:10.413,513] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/9, value:0x20027276, len:2 [00:00:10.413,543] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/10, value:0x20027276, len:2 [00:00:10.482,849] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/2, value:0x2002726f, len:1 [00:00:11.209,991] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x20023c37, buflen:1 [00:00:11.210,052] <inf> net_lwm2m_rd_client: Bootstrap started with endpoint 'nrf-352656106650180' with client lifetime 0 [00:00:11.210,113] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coaps://leshan.eclipseprojects.io [00:00:13.019,439] <dbg> net_lwm2m_rd_client.sm_send_bootstrap_registration: Register ID with bootstrap server as 'ep=nrf-352656106650180' [00:00:13.273,193] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:13.273,223] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:13.273,254] <dbg> net_lwm2m_rd_client.do_bootstrap_reply_cb: Bootstrap callback (code:2.4) [00:00:13.273,254] <inf> net_lwm2m_rd_client: Bootstrap registration done! [00:00:13.273,254] <dbg> app_lwm2m_client.rd_client_event: Bootstrap registration complete [00:00:13.273,315] <dbg> net_lwm2m_engine.lwm2m_udp_receive: reply 0x2001505c handled and removed [00:00:13.308,135] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:13.308,135] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:13.308,166] <dbg> net_lwm2m_engine.handle_request: No accept option given. Assume OMA TLV. [00:00:13.308,288] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x20023a07, buflen:1 [00:00:13.489,135] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:13.489,166] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:13.489,196] <dbg> net_lwm2m_engine.handle_request: No accept option given. Assume OMA TLV. [00:00:13.961,364] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:13.961,364] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:13.961,425] <dbg> net_lwm2m_engine.handle_request: No accept option given. Assume OMA TLV. [00:00:14.196,350] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:14.196,350] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:14.196,411] <dbg> net_lwm2m_engine.handle_request: No accept option given. Assume OMA TLV. [00:00:14.196,502] <dbg> net_lwm2m_obj_security.security_create: Create LWM2M security instance: 1 [00:00:14.381,225] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:14.381,256] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:14.381,317] <dbg> net_lwm2m_engine.handle_request: No accept option given. Assume OMA TLV. [00:00:14.381,408] <dbg> net_lwm2m_obj_server.server_create: Create LWM2M server instance: 0 [00:00:14.560,150] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:14.560,180] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:14.560,211] <inf> net_lwm2m_rd_client: Bootstrap data transfer done! [00:00:15.022,857] <dbg> app_lwm2m_client.rd_client_event: Bootstrap transfer complete [00:00:15.022,888] <dbg> app_lwm2m_client.rd_client_event: Boostrap finished, provisioning credentials. [00:00:15.022,918] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x20023bef, buflen:1 [00:00:15.023,010] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/1/1, buf:0x20023bef, buflen:1 [00:00:15.023,040] <dbg> app_lwm2m_client.find_server_security_instance: Security instance found, 1 [00:00:15.023,101] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/1/2, buf:0x20023c14, buflen:1 [00:00:15.023,101] <dbg> app_lwm2m_client.provision_credentials: PSK mode, provisioning key and identity. [00:00:15.023,223] <inf> net_lwm2m_rd_client: Stop LWM2M Client: nrf-352656106650180 [00:00:15.520,477] <dbg> lte_lc.at_handler: +CEREG notification: +CEREG: 0 [00:00:15.611,511] <dbg> lte_lc.at_handler: +CSCON notification [00:00:16.097,412] <dbg> lte_lc.lte_lc_system_mode_set: Sending AT command to set system mode: AT%XSYSTEMMODE=0,1,1,0 [00:00:17.309,997] <dbg> lte_lc.at_handler: +CEREG notification: +CEREG: 2,"2332","02592A20",9 [00:00:17.769,927] <dbg> lte_lc.at_handler: +CSCON notification [00:00:18.529,174] <dbg> lte_lc.at_handler: +CEREG notification: +CEREG: 5,"2332","02592A20",9,,,"11100000","00101000" [00:00:18.529,479] <dbg> lte_lc.parse_psm_cfg: TAU: 28800 sec, active time: -1 sec [00:00:18.529,632] <inf> net_lwm2m_rd_client: Start LWM2M Client: nrf-352656106650180 [00:00:19.029,846] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x20023c37, buflen:1 [00:00:19.029,907] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/1/1, buf:0x20023c37, buflen:1 [00:00:19.029,968] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/1/10, buf:0x20023c8a, buflen:2 [00:00:19.030,029] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'nrf-352656106650180' with client lifetime 0 [00:00:19.030,090] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coaps://leshan.eclipseprojects.io:5684 [00:00:47.137,634] <dbg> lte_lc.at_handler: +CSCON notification [00:00:53.611,175] <dbg> lte_lc.at_handler: +CSCON notification [00:01:04.027,160] <dbg> lte_lc.at_handler: +CSCON notification [00:01:26.307,189] <dbg> lte_lc.at_handler: +CSCON notification [00:01:36.699,218] <dbg> lte_lc.at_handler: +CSCON notification [00:02:26.577,270] <err> net_lwm2m_engine: Cannot connect UDP (-114) [00:02:26.583,953] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-114) [00:02:27.084,136] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/1/1, buf:0x20023c37, buflen:1 [00:02:27.084,197] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/1/10, buf:0x20023c8a, buflen:2 [00:02:27.084,259] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'nrf-352656106650180' with client lifetime 0 [00:02:27.084,320] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coaps://leshan.eclipseprojects.io:5684 [00:02:27.748,168] <dbg> lte_lc.at_handler: +CSCON notification
I have set the DNS server manually as my SIM provider doesn't server it from the network, otherwise, the example is unchanged.
If I remove the bootstrap options and connect directly to the LWM2M server, it works fine
uart:~$ *** Booting Zephyr OS build v2.4.99-ncs1 *** [00:00:00.207,794] <dbg> net_lwm2m_engine.lwm2m_engine_init: LWM2M engine socket receive thread started [00:00:00.207,855] <dbg> net_lwm2m_obj_security.security_create: Create LWM2M security instance: 0 --- 20 messages dropped --- [00:00:00.207,916] <dbg> net_lwm2m_obj_server.server_create: Create LWM2M server instance: 0 [00:00:00.207,977] <dbg> net_lwm2m_obj_device.device_create: Create LWM2M device instance: 0 [00:00:00.208,038] <dbg> net_lwm2m_obj_conn_mon.connmon_create: Create LWM2M connectivity monitoring instance: 0 [00:00:00.208,038] <dbg> net_lwm2m_obj_firmware.firmware_create: Create LWM2M firmware instance: 0 [00:00:00.208,068] <dbg> net_lwm2m_obj_location.location_create: Create Location instance: 0 [00:00:00.208,496] <inf> app_lwm2m_client: Run LWM2M client [00:00:00.208,770] <dbg> app_lwm2m_client.main: Set DNS to custom address 8.8.8.8 [00:00:00.209,533] <inf> app_lwm2m_client: Initializing modem. [00:00:00.233,428] <dbg> net_ipso_onoff_switch.switch_create: Create IPSO On/Off Switch instance: 1 [00:00:00.233,459] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3342/1/5500, value:0x20025c27, len:1 [00:00:00.233,551] <dbg> net_lwm2m_engine.lwm2m_engine_create_obj_inst: path:3313/0 [00:00:00.233,581] <dbg> net_ipso_accel.accel_create: Create IPSO Accelerometer instance: 0 [00:00:00.233,673] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:3/0/13, buf:0x20025c14, buflen:4 [00:00:00.233,703] <inf> app_lwm2m_accel: accelerometer normal [00:00:00.233,764] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5702, value:0x20025c18, len:8 [00:00:00.233,795] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5703, value:0x20025c18, len:8 [00:00:00.233,856] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5704, value:0x20025c18, len:8 [00:00:00.233,917] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:3313/0/5518, value:0x20025c04, len:4 [00:00:00.233,978] <inf> app_lwm2m_firmware: Update Counter: current 0, update 0 [00:00:00.234,008] <inf> app_lwm2m_firmware: Image is not confirmed OK [00:00:00.234,069] <inf> app_lwm2m_firmware: Marked image as OK [00:00:00.234,283] <inf> app_lwm2m_firmware: Update Counter updated [00:00:00.234,283] <inf> app_lwm2m_firmware: Firmware updated successfully [00:00:00.234,313] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:5/0/5, value:0x20025c17, len:1 [00:00:00.616,241] <inf> app_lwm2m_client: Connecting to LTE network. [00:00:00.616,271] <inf> app_lwm2m_client: This may take several minutes. [00:00:00.616,333] <dbg> lte_lc.lte_lc_system_mode_set: Sending AT command to set system mode: AT%XSYSTEMMODE=0,1,1,0 [00:00:03.693,847] <dbg> lte_lc.at_handler: +CEREG notification: +CEREG: 2,"2332","02592A20",9 [00:00:04.460,479] <dbg> lte_lc.at_handler: +CSCON notification [00:00:06.011,901] <dbg> lte_lc.at_handler: +CEREG notification: +CEREG: 5,"2332","02592A20",9,,,"11100000","00101000" [00:00:06.012,237] <dbg> lte_lc.parse_psm_cfg: TAU: 28800 sec, active time: -1 sec [00:00:06.012,359] <inf> app_lwm2m_client: Connected to LTE network [00:00:06.013,885] <inf> net_lwm2m_rd_client: Start LWM2M Client: nrf-352656106650180 [00:00:06.048,095] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/0, value:0x20026d7f, len:1 [00:00:06.048,248] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/8, value:0x20026d7c, len:4 [00:00:06.048,278] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/9, value:0x20026d7e, len:2 [00:00:06.048,309] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/10, value:0x20026d7e, len:2 [00:00:06.122,558] <dbg> net_lwm2m_engine.lwm2m_engine_set: path:4/0/2, value:0x20026d77, len:1 [00:00:06.708,984] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x20023767, buflen:1 [00:00:06.709,075] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/10, buf:0x20023792, buflen:2 [00:00:06.709,106] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'nrf-352656106650180' with client lifetime 0 [00:00:06.709,167] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coaps://leshan.eclipseprojects.io [00:00:07.947,265] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:1/0/1, buf:0x20023750, buflen:4 [00:00:07.948,974] <dbg> net_lwm2m_rd_client.sm_send_registration: registration sent [23.97.187.154] [00:00:08.199,005] <err> net_lwm2m_engine: Unknown IP address family:0 [00:00:08.199,035] <dbg> net_lwm2m_engine.lwm2m_udp_receive: checking for reply from [unk] [00:00:08.199,066] <dbg> net_lwm2m_rd_client.do_registration_reply_cb: Registration callback (code:2.1) [00:00:08.199,066] <dbg> app_lwm2m_client.rd_client_event: Registration complete [00:00:08.199,096] <inf> net_lwm2m_rd_client: Registration Done (EP='opfCyIbMWz') [00:00:08.199,157] <dbg> net_lwm2m_engine.lwm2m_udp_receive: reply 0x2001505c handled and removed [00:00:18.327,697] <dbg> lte_lc.at_handler: +CSCON notification