Victor
Victor

Reputation: 148

Obtaining MTD IPv6 address

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

Upvotes: 0

Views: 394

Answers (2)

MrChiffre
MrChiffre

Reputation: 18

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)

Upvotes: 0

jhui
jhui

Reputation: 704

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.

Upvotes: 2

Related Questions