Cannot create device on AVSystem portal with custom endpoint

Hey,

We are trying to create PoC which includes NordicSemi thingy 91 or nRF9160DK, AVSystem portal and AWS cloud.

By default AVSystem uses string "urn:imei:<imei number>" as device identifier. That works fine but because of issue of AVSystem it doesn't allow to create thing on AWS - because of colon usage.

To avoid that we are trying to create new device with endpoint "urnimei<imei number>" but this is where it doesn't work. Sequence is following:

1. Device was successfully added to AVSystem portal via provision.py script from lwm2m client application and at_client application. Device become visible on AVSystem portal in state bootstrap.

2. Next step - connect device using lwm2m_client application. In order to use updated endpoint following config was added to Pjt.conf file: CONFIG_APP_ENDPOINT_PREFIX="urnimei"

3. On connection terminal shows following:

[00:00:00.296,020] <inf> net_lwm2m_obj_loc_assistance: Created a location assistance object: 0
[00:00:00.296,234] <inf> app_lwm2m_client: Run LWM2M client
[00:00:00.501,342] <inf> app_lwm2m_client: Initializing modem.
[00:00:00.505,218] <inf> app_lwm2m_client: endpoint: urnimei351516172688616
[00:00:00.510,223] <inf> lwm2m_neighbour_cell: Registering ncell notification handler
[00:00:00.510,559] <inf> lwm2m_firmware: Update Counter: current 0, update 0
[00:00:00.510,589] <inf> lwm2m_firmware: Image is not confirmed OK
[00:00:00.510,681] <inf> lwm2m_firmware: Marked image as OK
[00:00:00.510,894] <inf> lwm2m_firmware: Update Counter updated
[00:00:00.510,894] <inf> lwm2m_firmware: Firmware updated successfully
[00:00:00.510,955] <inf> app_lwm2m_client: Connecting to LTE network.
[00:00:00.510,955] <inf> app_lwm2m_client: This may take several minutes.
[00:00:23.136,199] <inf> app_lwm2m_client: Connected to LTE network
[00:00:23.140,136] <inf> lwm2m_connmon: Updating modem data on connmon
[00:00:23.141,662] <inf> net_lwm2m_rd_client: Start LWM2M Client: urnimei351516172688616
[00:00:23.800,262] <inf> net_lwm2m_rd_client: Bootstrap started with endpoint 'urnimei351516172688616' with client lifetime 0
[00:02:50.961,822] <err> net_lwm2m_engine: Cannot connect UDP (-116)
[00:02:50.968,597] <err> net_lwm2m_rd_client: Cannot init LWM2M engine (-116)

Unfortunately guys from AVSystem have lack of knowledge with Thingy side.

Can you please suggest how to debug this?

Thanks,

Mykhaylo 

 

Parents
  • Hey Markus,

    Thanks for hint.

    I see following: %CMNG: 35724861,4,"0404040404040404040404040404040404040404040404040404040404040404","urn:imei:351516172688616", which is weird as I called provision.py with identity = f'urnimei{imei}'.

    How can this happen?

    Here are my steps:

    1. Flash at_client app.

    2. Call provision.py with identity = f'urnimei{imei}'.

    3. Check device in bootstrap state on AVSystem portal. Identity is correct "urnimei<imei>" as expected.

    4. Flash lwm2m_client app, start capturing pcap file

    5. Wait until error -116 happens. 

    I see in pcap file that client is trying to connect with Identity "urn:imei:<imei>".

    Then I'm trying to flash at_client again and run AT%CMNG=2,35724861,4 and result is as you can see above.

    Why it gets reprogrammed in modem? How to avoid this?

    Thanks,

    Mykhaylo

    UPD: it looks fixed when I comment following lines in configuration:

    #CONFIG_LWM2M_CLIENT_UTILS_BOOTSTRAP_TLS_TAG=35724861
    #CONFIG_LWM2M_CLIENT_UTILS_SERVER_TLS_TAG=35724861

    which were there for some reasons.

    Can you please explain how this config works? So I can avoid same error in the future. Thanks

  • Hi Mykhaylo,

    Markus has some other business to do so I will continue to help you on this case.

    If you are adding a device to the Bootstrap server, I think you should set the BOOTSTRAP_TLS_TAG to 35724862 as follow:

    CONFIG_LWM2M_CLIENT_UTILS_BOOTSTRAP_TLS_TAG=35724862

    Best regards,

    Charlie

Reply Children
No Data
Related