Advertise targets using Zeroconf
The IANA has assigned a service name for Aseba and Aseba nodes can now advertise tcpin:
targets using Zeroconf with the service type _aseba._tcp
.
Clients could use mDNS-SD to browse for nodes as described in RFC 6763 § 1 ¶ 3. Using mDNS-SD, a wireless Thymio with node id 5036 would be discoverable as Thymio Wireless 5036._aseba._tcp.local.
The SRV record found by the mDNS query indicates the host name and port where the node can be found. For example, the robot above might be found at laptop-01.example.edu
port 49152, assuming the robot was connected by USB to laptop-01
. The TXT record for this host uses the Data Syntax for DNS-SD TXT Records and might specify:
- txtvers = 1
- type = Thymio Wireless
- protovers = 5
- ids = 5036
- pids = 8
indicating a Thymio-II (product id 8 according to productids.h) with node id 5036. A client can receive more that one record for its query and can use the fields in the TXT record to make its choice.
A switch groups together a set of nodes into an Aseba bus and provides a port through which clients can connect to all of them. The switch will advertise itself with a human-readable instance name, and list in its TXT record the ids and pids of the nodes to which it provides access. For example, the TXT record of Classroom 5b Ms\. Coulson._aseba._tcp.local.
might specify:
- txtvers = 1
- type = Aseba Switch
- protovers = 5
- ids = 5036 123 7756 1 3141
- pids = 8 8 8 0 3
indicating three Thymio-IIs, one dummy node and one Marxbot.
If a target is currently being used by an incoming connection, the boolean flag busy
is set in the TXT records. Targets must update it how their status change (incoming connection or connection closed).
Current status
The status of current support is, for infrastructure:
-
basic support in Zeroconf -
advertising when available and forgetting when used. -
advertising when available, forgetting when not running, and busy
TXT
flag when used.
For program support:
-
support in Dummy node -
support in Studio -
support in Playground -
support in Http -
support in old Switch -
support in new Switch