Beginner questions about Commissioning and CoAP

61 views
Skip to first unread message

Tinker Dave

unread,
Apr 20, 2019, 2:29:23 AM4/20/19
to openthread-users
Hi! I have some beginner questions and I hope you can help me...

1. ipaddr always shows 2-4 IPv6-addresses. Why and how do I know which one is right?

2. I use the commissioner example provided by STM32CubeWB. Is it correct, that a commissioner assigns the IPs to all the joiners "randomly"? Kind of DHCP like?

3. I want to send CoAP messages between the device with the commissioner role and a specific joiner device. How can this be done, if the IP is unknown? (It seems to me that CoAP needs the destination IP to send a unicast message)

btw: All of my devices have a 2-digit Pushwheel to select a unique device number in the network. I thought about choosing an IP-Address stem that is the same for all devices + adding the device number as the last 2 digits of the IP. Device number 00 will then be the one with the commissioner role and will be connected to a Raspberry Pi to connect to the internet over MQTT. 
How could this be done if it should be possible to add and remove devices during runtime? Is the commissioner really/useful needed to do this?

Thanks for your help!  

Tinker Dave

unread,
Apr 21, 2019, 8:35:29 AM4/21/19
to openthread-users
I managed to answer myself question 1.:
For the application, the end point address EID is important, because it does not change when the network changes. 
It is the address with "fd" at the start and it does not contain ff:fe00.

This leads me to question 3 again:
When testing, it is no problem to find the EID of all devices by entering "ipaddr" on each devices CLI. That will not be useful in an application, though. How can the leader/commissioner find all EIDs that are connected to the network?

Jonathan Hui

unread,
Apr 22, 2019, 1:00:14 PM4/22/19
to Tinker Dave, openthread-users
Some answers to your questions:
  1. The application is encouraged to use the Endpoint Identifier - that IPv6 address is stable and does not change with the underlying mesh topology (as you correctly discovered).

  2. Like standard IPv6 hosts, Thread devices may configure IPv6 addresses using Stateless Address Autoconfiguration (SLAAC), DHCPv6, and/or manual assignment. The Thread Commissioner does not participate in IPv6 address configuration.

  3. IPv6 address discovery is typically something provided by the higher layers. For example, DNS, CoAP Resource Directory, etc. That said, Thread 1.1.1 Section 10.11 does specify a mechanism to query IPv6 addresses for the purpose of network diagnostics. You can play with this mechanism using the networkdiagnostic CLI command. For example, to query the list of IPv6 addresses from neighboring devices:

    $ networkdiagnostic get ff02::1 8
    DIAG_GET.rsp/ans: 0830fddead00beef0000000000fffe000401fddead00beef0000c78281ddc9dd335cfe800000000000008499cf7cb186cd38
Hope that helps.

--
Jonathan Hui


--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To post to this group, send email to openthre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/c6166396-80dc-4893-8859-0bb5a2be629b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages