LWM2M Errors when first connecting to server - Normal behavior?

Hi, 

I'm using the asset tracker example code with the LWM2M overlay to connect to the Coiote server.

This seems to work fine, and messages do get through. But when booting the device I always get several errors as shown below. Is this normal behavior for a first time connection process?

*** Booting nRF Connect SDK 3758bcbfa5cd ***
[00:00:00.271,270] <inf> at_host: UART check failed: 12. Dropping buffer and retrying.
[00:00:00.282,135] <inf> app_event_manager: APP_EVT_START
[00:00:00.511,749] <inf> app_event_manager: MODEM_EVT_INITIALIZED
[00:00:00.647,613] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTING
[00:00:00.710,296] <inf> lwm2m_firmware: Image is confirmed OK
[00:00:01.324,432] <inf> app_event_manager: DATA_EVT_CONFIG_INIT
%CESQ: 60,3,14,2
+CEREG: 2,"56BD","019B5501",7
[00:00:02.229,003] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
+CSCON: 1
+CGEV: ME PDN ACT 0,0
[00:00:03.768,615] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTED
[00:00:03.769,622] <inf> net_lwm2m_rd_client: Start LWM2M Client: urn:imei:xxxx
[00:00:03.770,141] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:xxxx' with client lifetime 43200 using server object 0
+CNEC_ESM: 50,0
%MDMEV: SEARCH STATUS 2
+CEREG: 5,"56BD","019B5501",7,,,"00001111","11100000"
+CEDRXP: 4,"0000","0000","0000"
%XTIME: "80","42609121624280","01"
[00:00:03.983,581] <inf> app_event_manager: MODEM_EVT_LTE_PSM_UPDATE
[00:00:03.984,191] <inf> app_event_manager: MODEM_EVT_LTE_EDRX_UPDATE
[00:00:03.984,771] <inf> app_event_manager: DATA_EVT_DATE_TIME_OBTAINED
[00:00:04.068,054] <inf> lwm2m_security: Need to write credentials, requesting LTE and GNSS offline...
[00:00:04.068,572] <inf> app_event_manager: CLOUD_EVT_LTE_DISCONNECT
+CGEV: ME PDN DEACT 0
[00:00:04.163,146] <inf> app_event_manager: MODEM_EVT_LTE_DISCONNECTED
+CEREG: 0
[00:00:04.263,427] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
+CGEV: ME DETACH
%CESQ: 255,0,255,0
+CSCON: 0
[00:00:07.849,975] <inf> lwm2m_security: Requesting LTE and GNSS online
[00:00:07.850,494] <inf> app_event_manager: CLOUD_EVT_LTE_CONNECT
[00:00:07.892,150] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTING
%CESQ: 61,3,18,2
+CEREG: 2,"56BD","019B5501",7
[00:00:09.451,354] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
+CSCON: 1
[00:00:09.852,111] <err> net_lwm2m_engine: Failed to enable TLS_DTLS_CID: -22
[00:00:09.852,569] <err> net_lwm2m_engine: Cannot connect UDP (-114)
[00:00:09.852,813] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-114)
[00:00:09.853,149] <err> net_lwm2m_rd_client: sm_do_network_error, retries 0
[00:00:09.853,393] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:xxxx' with client lifetime 43200 using server object 0
[00:00:09.853,698] <err> net_lwm2m_message_handling: Unable to resolve address
[00:00:09.853,729] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
[00:00:09.853,942] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1
%CESQ: 56,2,16,2
%CESQ: 52,2,11,1
[00:00:10.854,827] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1
[00:00:10.855,072] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:xxxx' with client lifetime 43200 using server object 0
[00:00:10.855,407] <err> net_lwm2m_message_handling: Unable to resolve address
[00:00:10.855,407] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
[00:00:10.855,743] <err> net_lwm2m_rd_client: sm_do_network_error, retries 2
+CGEV: ME PDN ACT 0,0
[00:00:11.447,906] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTED
+CNEC_ESM: 50,0
%MDMEV: SEARCH STATUS 2
+CEREG: 5,"56BD","019B5501",7,,,"00001111","11100000"
%XTIME: "80","42609121621380","01"
%CESQ: 47,2,12,1
[00:00:11.759,948] <inf> app_event_manager: MODEM_EVT_LTE_PSM_UPDATE
%CESQ: 52,2,12,1
[00:00:12.855,682] <err> net_lwm2m_rd_client: sm_do_network_error, retries 2
[00:00:12.855,957] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:xxxx' with client lifetime 43200 using server object 0
[00:00:12.938,385] <err> net_lwm2m_engine: Failed to enable TLS_DTLS_CID: -22
[00:00:13.376,739] <inf> net_lwm2m_engine: Connected, sock id 2
[00:00:13.853,363] <inf> net_lwm2m_rd_client: Registration Done (EP='urn:imei:xxxx')
[00:00:13.854,156] <inf> app_event_manager: CLOUD_EVT_CONNECTED

So the specific error that I'm talking about are:

[00:00:09.852,111] <err> net_lwm2m_engine: Failed to enable TLS_DTLS_CID: -22
[00:00:09.852,569] <err> net_lwm2m_engine: Cannot connect UDP (-114)
[00:00:09.852,813] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-114)
[00:00:09.853,149] <err> net_lwm2m_rd_client: sm_do_network_error, retries 0
[00:00:09.853,393] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:xxxx' with client lifetime 43200 using server object 0
[00:00:09.853,698] <err> net_lwm2m_message_handling: Unable to resolve address
[00:00:09.853,729] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
[00:00:09.853,942] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1
%CESQ: 56,2,16,2
%CESQ: 52,2,11,1
[00:00:10.854,827] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1
[00:00:10.855,072] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:xxxx' with client lifetime 43200 using server object 0
[00:00:10.855,407] <err> net_lwm2m_message_handling: Unable to resolve address
[00:00:10.855,407] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
[00:00:10.855,743] <err> net_lwm2m_rd_client: sm_do_network_error, retries 2



Appart from those error during the first connection I also get some errors during use after that, when it tries to connect again. Is this also normal or something that I should look into?

[00:05:13.858,337] <err> net_lwm2m_location_assist: Temporary error in location services retry scheduled
[00:05:13.858,337] <err> cloud_module: cloud_wrap_cloud_location_send, err: -120
+CSCON: 0
%XT3412: 46799999
%XT3412: 0
+CSCON: 1
%CESQ: 59,2,13,1
+CSCON: 0
%XT3412: 46799999
%XT3412: 0
+CSCON: 1
%CESQ: 53,2,11,1
%CESQ: 58,2,10,1
+CSCON: 0
%XT3412: 46799999
[00:06:14.030,426] <err> net_lwm2m_location_assist: No response error in location services
[00:06:14.030,487] <err> net_lwm2m_obj_gnss_assistance: Result code 2
%CESQ: 255,0,255,0
%CESQ: 61,3,14,2
%MDMEV: SEARCH STATUS 2
%XT3412: 0
+CSCON: 1
%CESQ: 56,2,12,1
+CSCON: 0
%XT3412: 46799999
%CESQ: 255,0,255,0
[00:07:46.751,037] <wrn> net_lwm2m_rd_client: Registration Update Timeout
[00:07:46.751,129] <inf> lwm2m_rai: RAI disabled
[00:07:46.751,159] <wrn> lwm2m_integration: LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT
[00:07:46.751,800] <inf> app_event_manager: CLOUD_EVT_CONNECTING
[00:07:46.759,429] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:350457794446409' with client lifetime 43200 using server object 0
%CESQ: 63,3,19,2
%MDMEV: SEARCH STATUS 2
%XT3412: 0
+CSCON: 1
%CESQ: 56,2,12,1
[00:07:47.666,717] <err> net_lwm2m_engine: Failed to enable TLS_DTLS_CID: -22
[00:07:47.779,113] <inf> net_lwm2m_engine: Connected, sock id 2
[00:07:47.942,321] <inf> net_lwm2m_rd_client: Registration Done (EP='urn:imei:350457794446409')
[00:07:47.945,068] <inf> lwm2m_rai: RAI enabled
[00:07:47.945,434] <inf> app_event_manager: CLOUD_EVT_CONNECTED
[00:07:48.178,253] <inf> net_lwm2m_rd_client: Update callback (code:2.4)
[00:07:48.178,375] <inf> net_lwm2m_rd_client: Update Done
[00:07:48.221,069] <inf> lwm2m_rai: Ongoing traffic, RAI disabled
+CSCON: 0
%XT3412: 46799999
%CESQ: 60,3,17,2
[00:08:11.398,925] <err> net_lwm2m_location_assist: No response error in location services
[00:08:11.398,956] <err> net_lwm2m_obj_ground_fix: Result code 2

Parents
  • Hi,

    Which board do you use?

    Which SIM card do you use? Which network does your device connect to?

    Can you provide a modem trace? You can follow the guide for capturing modem traces.

    Best regards,
    Dejan

  • Hi Dejan,

    I'm using a Thingy 91, version 1.6.0.

    Its using an iBASIS eSim, connecting to Vodafone NL.

    This is the modem trace:

    trace-2024-06-27T11-34-45.200Z.mtrace

    Thank you for your time!

  • Hi,

    CID error might happen if you use old modem firmware version. You could try to update modem firmware.
    Problem with location services might happen if you have not properly set up location services on the cloud side.

    Best regards,
    Dejan

  • Thank you for your response,

    I just updated my modem firmware to 1.3.6, but this didn't make a difference.
    It still gives me the same lwm2m module-related errors:

    [00:00:11.112,457] <err> net_lwm2m_engine: Cannot connect UDP (-114)
    [00:00:11.112,731] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-114)
    [00:00:11.113,128] <err> net_lwm2m_rd_client: sm_do_network_error, retries 0
    [00:00:11.113,372] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'urn:imei:350457794446409' with client lifetime 43200 using server object 0
    [00:00:11.113,708] <err> net_lwm2m_message_handling: Unable to resolve address
    [00:00:11.113,739] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
    [00:00:11.113,952] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1
    +CGEV: ME PDN ACT 0,0
    [00:00:11.510,925] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTED
    +CNEC_ESM: 50,0
    %MDMEV: SEARCH STATUS 2
    +CEREG: 1,"7EF6","011ED70D",7,,,"00001111","11100000"
    %XTIME: "80","42709001425080","01"
    [00:00:12.114,715] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1



    I'm not sure what problems with the location services you are discussing. Could you elaborate on that?

    As far as I'm aware, I'm just having LWM2M connection error issues.


    Thank you!

  • Hi,

    hubert_11 said:
    I'm not sure what problems with the location services you are discussing. Could you elaborate on that?

    You had these 2 lines in your initial log
    [00:08:11.398,925] <err> net_lwm2m_location_assist: No response error in location services
    [00:08:11.398,956] <err> net_lwm2m_obj_ground_fix: Result code 2
    Result code resource provides information about the request handling on the server side. In your case result_code is 2 which means that you did not receive response from the server in LOCATION_ASSISTANT_RESULT_TIMEOUT seconds.  

    Can you check if you get the same error using nrf9160-dk board?

    Best regards,
    Dejan

  • Ah, yes, I had missed those lines. But I'm not going to use the location services in my application eventually, so I'm not too worried about those errors.

    I, unfortunately, do not have access to an nrf9160-dk board, only to several thingies 91's.
    Is there anything else I can try on the thingy?

  • Hi,

    For nrf9160 you should keep CONFIG_LWM2M_DTLS_CID=n.
    Your trace file indicates that DTLS succeeds, and data is sent. Most likely LWM2M stack is attempting to connect before device connects to LTE network causing errors. Eventually, device connects to the network, and everything seems to be fine. There seem to be no problem in communication, and you could probably just ignore the errors.

    Best regards,
    Dejan

Reply
  • Hi,

    For nrf9160 you should keep CONFIG_LWM2M_DTLS_CID=n.
    Your trace file indicates that DTLS succeeds, and data is sent. Most likely LWM2M stack is attempting to connect before device connects to LTE network causing errors. Eventually, device connects to the network, and everything seems to be fine. There seem to be no problem in communication, and you could probably just ignore the errors.

    Best regards,
    Dejan

Children
No Data
Related