mDNS Discovery

View source on GitHub

OTBR registers a _meshcop._udp service named OpenThread BorderRouter. This service is configured in the OTBR CMakeLists.txt file. The Thread Specification requires Thread Border Routers to publish the _meshcop._udp service for the Thread Border Agent service. Thread Border Router devices may publish other services that they implement but that is up to each specific device and developer.

There are several ways to discover your Thread network.

DNS Service Discovery (DNS-SD)

Use dns-sd to browse for a service instances of type _meshcop._udp.:

dns-sd -B _meshcop._udp local
Browsing for _meshcop._udp.local
DATE: ---Tue 16 Nov 2021---
13:31:03.197  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
13:31:03.198  Add        2   6 local.               _meshcop._udp.       OpenThread BorderRouter (#3991)

Use dns-sd to resolve the service instance:

dns-sd -L "OpenThread BorderRouter (#3991)" _meshcop._udp local
Lookup OpenThread BorderRouter #(3991)._meshcop._udp.local
DATE: ---Tue 16 Nov 2021---
13:33:05.197  ...STARTING...
13:33:05.350  OpenThread\032BorderRouter\032(#3991)._meshcop._udp.local. can be reached at raspberrypi.local.:49155 (interface 3)

Use dns-sd to resolve the hostname:

dns-sd -G v4/v6 raspberrypi.local
DATE: ---Tue 16 Nov 2021---
14:21:29.485  ...STARTING...
Timestamp     A/R Flags if Hostname           Address                                      TTL
14:21:29.486  Add     3  3 raspberrypi.local. FDDE:AD11:11DE:0000:74D0:6FC9:6BE6:3582%<0>  120
14:21:29.486  Add     3  3 raspberrypi.local. FD00:0000:0000:0000:74D0:6FC9:6BE6:3582%<0>  120
14:21:29.486  Add     3  3 raspberrypi.local. FE80:0000:0000:0000:74D0:6FC9:6BE6:3582%eth0 120
14:21:29.486  Add     3  3 raspberrypi.local. FE80:0000:0000:0000:287F:87CA:F4B3:498A%eth0 120
14:21:29.486  Add     2  3 raspberrypi.local. 192.168.0.10                                 120

Ping your IP address. From the dns-sd results, choose an address that's reachable from your network, for example the global <0> address FD00::74D0:6FC9:6BE6:3582:

ping -6 FD00::74D0:6FC9:6BE6:3582
PING FD00::74D0:6FC9:6BE6:3582(fd00::74d0:6fc9:6be6:3582) 56 data bytes
64 bytes from fd00::74d0:6fc9:6be6:3582: icmp_seq=1 ttl=64 time=27.1 ms
64 bytes from fd00::74d0:6fc9:6be6:3582: icmp_seq=2 ttl=64 time=3.18 ms
64 bytes from fd00::74d0:6fc9:6be6:3582: icmp_seq=3 ttl=64 time=2.76 ms

Avahi utilities

Install avahi-daemon and avahi-utils:

sudo apt-get install -y avahi-daemon avahi-utils

Start the avahi-daemon:

sudo service avahi-daemon start

Use avahi-browse:

avahi-browse -r -t _meshcop._udp
+ eth0 IPv6 OpenThread BorderRouter (#3991)   _meshcop._udp        local
= eth0 IPv6 OpenThread BorderRouter (#3991)   _meshcop._udp        local
   hostname = [raspberrypi.local]
   address = [192.168.0.10]
   port = [49155]
   txt = []

mDNS apps

Search Google Play for mDNS discovery apps, for example: