This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

CoAP starting process

Hi,

I am trying to implement DALI-104 (IEC-62386:104:2019) on top of openThread protocol.

I am using  Thread: CoAP Client and  Thread: CoAP Server  and want to configure these codes according to DALI-104 standards.

1. According to my application (DALI), devices must support CoAP, CoAPs, and UDP message for transmission and receipt processes. I think it is possible to send and receive these messages with examples of Nordic Thread: CoAP Client and  Thread: CoAP Server. Am I right?

2. Thread: CoAP Client and  Thread: CoAP Server  examples use /provisioning resource for pairing mechanism. In my application, there will be just two resource. One of them is for CoAP and the other one is for CoAPs. The CoAP method is just POST. How to deal with pairing in my application? For example, there will be one client and lots of server in my system. When I add a new device(server) to my system, this device should be connected to client to send and receive CoAP messages. Am I right? How to deal with pairing in my application?

3. What happens in pairing process? I think, a device learn IP address of another device which sends a multicast signal. In Nordic example, it uses multicast CoAP message.   

  • Hi,

    1. According to my application (DALI), devices must support CoAP, CoAPs, and UDP message for transmission and receipt processes. I think it is possible to send and receive these messages with examples of Nordic Thread: CoAP Client and  Thread: CoAP Server. Am I right?

     Yes, correct, CoAP, CoAPs and UDP message transmission is supported with both examples.

    2. Thread: CoAP Client and  Thread: CoAP Server  examples use /provisioning resource for pairing mechanism. In my application, there will be just two resource. One of them is for CoAP and the other one is for CoAPs. The CoAP method is just POST. How to deal with pairing in my application? For example, there will be one client and lots of server in my system. When I add a new device(server) to my system, this device should be connected to client to send and receive CoAP messages. Am I right? How to deal with pairing in my application?

    I found this press release from the Thread group announcing a collaboration with DALI: https://www.threadgroup.org/news-events/press-releases/ID/226/Thread-Group-and-DiiA-Collaborate-to-Shape-the-Future-of-IoT-Lighting-for-Commercial-Buildings

    It seems like this implementation of 104 is under development by DiiA, you should check with them for more help. The article also mentioned that "Together, DiiA and Thread will implement protocols for commisioning and operating devices in lightning and building networks."

    So the pairing process in DALI + Thread may not yet be defined.

    3. What happens in pairing process? I think, a device learn IP address of another device which sends a multicast signal. In Nordic example, it uses multicast CoAP message.   


    The commisioning process for Thread is detailed in chapter 8.4.1.2 Commissioner Authentication in the Thread specification. If you want to know more about what happens in the OpenThread commissioning process here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thread_commissioning.html#openthread-commissioning

    Best regards,

    Marjeris

     

     

  • The commisioning process for Thread is detailed in chapter 8.4.1.2 Commissioner Authentication in the Thread specification. If you want to know more about what happens in the OpenThread commissioning process here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thread_commissioning.html#openthread-commissioning

     

    I didn't ask the commisioning process of Thread. When I use Thread: CoAP Client and Thread: CoAP Server example of NORDIC, already thread network is built. One of them leader and others router... My question is that, why pairing process for CoAP is made. When I press the button on client, it sends a multicast message and server takes it. After that, client can send a unicast message to server. I think, it is made to learn the IP address of server. Is it necessary to implement such as provisioning process. When thread network is built, the devices can lalready earn IP addresses of each other.

  • Hi,

    In the SDK both examples Thread CoAP Client and Thread Coap Server are pre-commissioned to the same Thread network. The multicast and unicast messages between them are on IP protocol level. To properly observe the commissioning process it is recommended to form a new Thread network.

    Pairing of the CoAP server node with the client node in the example is not part of Thread or CoAP specification, and is just implemented and provided specifically to these examples.

    The pairing procedure is explained in the documentation in the infocenter.

    Best regards,

    Marjeris

  • Thanks Marjeris,

    However, I didn't ask that. There is a paragraph below which is written in NORDIC website :

    The Joiner starts broadcasting discovery requests on all available channels. When the Commissioner receives the discovery request, it responds to the sender. After the response, a DTLS session is established to securely authenticate the Joiner and exchange the network credentials.

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v3.1.0%2Fthread_ot_commissioning_configuring.html&anchor=thread_ot_commissioning_configuring_on-mesh

    I am not sure  what  this broadcast message means. Is it send by using mesh local IPv6 address? Also, if this message is sent via IP multicast, what is the response of receiver? It sends its own unique IP address or not?

  • Hi orkunsengur,

    This is Charlie again, sorry for the late reply, I will help you with your questions since my colleague has some personal matters.

    I read through the discussions, you basically have two questions:

    1. Why CoAP client and server need to pair with each other for one-to-one communication?

     Your assumption "When thread network is built, the devices can already earn IP addresses of each other."  is not correct. Just like two computers in the same LAN, the two devices may not know the exact address of each other even they are in the same OT network. Hence when the CoAP Client device has to ask who wants to pair at first, then after you press the button on the target CoAP server, it replies yes and tells the CoAP client its unique address. CoAP client will only send a control command to this paired CoAP server when you press button 3.

    2. How the commissioner commission a Joiner into the OT network?

    The Joiner is assigned a random unique link-local  IPv6 address at first. It multicast in the Link-Local scope to let Commission discover it. The expected discovery response can be found here.

    The external commission process is handled by OT API, the developer normally just used the API on the application level and does not need to bother with details. If you want to learn more about this process, please refer to the OpenThread official GitHub repository. The source codes of Jointer can be found at jointer.cpp. Sorry for that I have limited knowledge of such detail. The experts from OT development team may provide you more information.

    Best regards,

    Charlie

Related