0

My topology is:

T1 - T2 - T4
   - T3 -

Thread MTD devices (T4) have assigned it's IPv6 address randomly.

How to address packets to T4 from T1 (FTD via NCP, wpan0 interface), if I don't know that address. How to resolve it?

I tried with Service API, but no success. Can service be registered on MTD and if yes, will the thread network assign service RLOC16 to

Victor
  • 148
  • 10

2 Answers2

2

IPv6 address and/or device discovery is considered an application-layer service and out-of-scope for Thread. Some application-layer mechanisms that others have implemented include:

  1. Registering the IPv6 address with an application-specific server. This is very similar to DNS, which you could use as well.
  2. IPv6 multicast query using an application-specific device identifier with unicast response. This is very similar to mDNS/DNS-SD, which you could use as well.

Hope that helps.

jhui
  • 694
  • 4
  • 3
  • To clarify: are both mechanisms exposed by OpenThread API or I have to implement a bunch of code myself? – Victor May 29 '18 at 21:08
  • Do you mean that I should bind some udp port at T4 and make an multicast request from T1 to obtain T4 mesh address? – Victor May 31 '18 at 21:57
  • The above mentioned mechanisms are not currently provided by OpenThread. Binding to a UDP port on T4 and sending a multicast request from T1 may be used to discover T4's address(es). – jhui Nov 06 '18 at 19:53
0

The simplest way -I think- is to send a broadcast request message (using a multicast address e.g. ff03::2), on which every device has to reply.

As soon as you get the response message from a device, you should be able to get the IPv6 address of the sender as well. The sender address info is located in the otMessageInfo.

See example on cli_udp_example.cpp on git.

void UdpExample::HandleUdpReceive(otMessage *aMessage, const otMessageInfo *aMessageInfo)
MrChiffre
  • 18
  • 1