LWM2M Client on nRF9161 "out of the box" not working

Hi, I received out nRF9161 DK a couple of days ago...

To reduce the number of possible failure points, I registered on ONOMONDO with the SIM provided together with the DK.

I verified the successful network connection using the AT terminal:

AT#XGETADDRINFO="www.google.com"

#XGETADDRINFO: "172.217.174.100"

This guarantees me that there are no SIM or network problems preventing the system from working properly

Using SDK 2.6.1 in VSC, I was able to configure, build and flash the LWM2M Client sample application provided by Nordic Semic. configured to connect to the public coaps://leshan.eclipseprojects.io:568 LWM2M server.

A first question: on https://docs.nordicsemi.com/bundle/ncs-2.6.0/page/nrf/samples/cellular/lwm2m_client/README.html it is clearly stated that the sample supports the nRF9161_DK  with the target nrf9161_DK  nrf9161_ns.

On VSC application build configuration instead the nrf9161_DK is NOT listed under the "compatible boards" list....

When I connect to the nRF9161 serial port (the shell) and I execute uart:~$ > lwm2m start joebreIOT  I get the following error reports:

[00:08:30.704,254] <inf> net_lwm2m_rd_client: Start LWM2M Client: joebreIOT
[00:08:30.882,202] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 1
[00:08:30.882,263] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[00:08:30.882,293] <dbg> net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x20015744, buflen:4
[00:08:30.882,354] <dbg> net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x20015782, buflen:2
[00:08:30.882,385] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'joebreIOT' with client lifetime 30 using server object 0
[00:08:30.882,476] <dbg> net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coaps://leshan.eclipseprojects.io:568
[00:08:30.882,568] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-123)
[00:08:30.882,629] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[00:08:30.882,629] <err> net_lwm2m_rd_client: sm_do_network_error, retries 0
[00:09:02.882,446] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[00:09:02.882,507] <err> net_lwm2m_rd_client: sm_do_network_error, retries 0
[00:09:02.882,537] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[00:09:02.882,598] <dbg> net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x20015744, buflen:4
[00:09:02.882,629] <dbg> net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x20015782, buflen:2
[00:09:02.882,690] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'joebreIOT' with client lifetime 30 using server object 0
[00:09:02.882,751] <dbg> net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coaps://leshan.eclipseprojects.io:568
[00:09:02.882,843] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-123)
[00:09:02.882,904] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[00:09:02.882,904] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1
[00:09:03.882,202] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[00:09:03.882,263] <err> net_lwm2m_rd_client: sm_do_network_error, retries 1
[00:09:03.882,293] <dbg> net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[00:09:03.882,324] <dbg> net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x20015744, buflen:4
[00:09:03.882,385] <dbg> net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x20015782, buflen:2
[00:09:03.882,446] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'joebreIOT' with client lifetime 30 using server object 0
[00:09:03.882,507] <dbg> net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coaps://leshan.eclipseprojects.io:568
[00:09:03.882,598] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-123)
...

I was somehow expecting that using the provided SIM together with the "as is" sample provided by Nordic Semi. everything should work properly.

Do I missed anything ?

Is there any additional configuration step to be done in order to get this sample working ?

Is the LWM2M sample supposed to run properly on the nRF9161 DK platform ?

Regards, Joel

Parents
  • HI Joel, 

    Due to summer vacation period in throughout Nordic Semiconductor we are lower staffed than normal, this may cause some delays in our answers. Sorry for the inconvenience. 


    [00:08:30.882,568] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-123)
    #define NRF_EPROTONOSUPPORT 123 /**< Protocol not supported */
    This should not be caused by the SIM from what I can understand. Have you followed all steps in the configuration sub-chapter

    Just to clarify, are you using correct sample? nRF LwM2M Sample should be used in this case.
    On VSC application build configuration instead the nrf9161_DK is NOT listed under the "compatible boards" list....
    This seems to be a bug in our samples. I will report this to our developers.

    Kind regards,
    Øyvind
  • Hi Øyvind, thanks for your replay... I see now what was the problem....

    On https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/samples/cellular/lwm2m_client/sample_description.html#configuration the sample i referred as LWM2M Client sample (as it should be) ... when generating a new application on VSC starting from a sample, I got the following choices for LWM2M:

    Here instead lwm2m_client is the zephyr sample. The nrf sample, as you stated in your answer, is referred as LWM2M Sample. This is also whi I did not found nRF9161 DK as a supported target for LWM2M Client... 

    There is just a little confusion with the names used in the code, VSC and the web page.

    Knowing this, I built and flashed LWM2M sample and ... the DK successfully registered on the LWM2M server.

    Many thanks... Joel

  • I fully agree, Joel! The naming of this sample can easily be confused with the Zephyr sample. Will forward this info to our tech pubs.

    Happy to hear that it is working now!

    Kind regards,
    Øyvind

Reply Children
No Data
Related