What you will need

  • A live Duckiedrone: First boot

  • A properly configured base station: Initial setup

  • A network that supports mDNS, or administrative access to the network

  • (optional) Physical access to the network router, and an Ethernet cable

What you will get

  • A connected Duckiedrone

First connection#

The Duckiedrone is now ready for its first connection.

Connecting to the Duckiedrone#

Establishing a connection between the base station and the Duckiedrone is an essential step. There are several ways to establish a connection, with the preferred one being over Wi-Fi. To connect over Wi-Fi, both the Duckiedrone and the base station need to be connected to the same network.

Duckiedrone Wi-Fi#

The Duckiedrone automatically connects at boot to any known Wi-Fi network in range, including:

  1. The network defined during the microSD card initialization procedure: Software Initialization

  2. The default backup network named duckietown with password quackquack

After the first boot, additional networks can be configured by following Network management.

Checkpoint ✅#

When a connection is established, all three checks below pass. Run them in order.

ROBOT_NAME is the Duckiedrone name chosen during the microSD card flashing procedure. ROBOT_IP is the Duckiedrone IP address, shown in the Address column of dts fleet discover when available.

To verify that the Duckiedrone is on the same network as the base station:

Test

On the base station, run:

dts fleet discover

Use Ctrl-C to stop the command.

Expected Result

The ROBOT_NAME row appears along with its status.

To verify that the base station and the Duckiedrone can communicate over the network:

Test

On the base station, run:

ping ROBOT_NAME.local

Use Ctrl-C to stop the command.

Expected Result

A reply arrives for every packet, as in the example below.

A successful ping example

duckie@basestation ~ % ping amelia.local
PING amelia.local (192.168.0.81): 56 data bytes
64 bytes from 192.168.0.81: icmp_seq=0 ttl=64 time=41.965 ms
64 bytes from 192.168.0.81: icmp_seq=1 ttl=64 time=10.603 ms
64 bytes from 192.168.0.81: icmp_seq=2 ttl=64 time=10.582 ms
64 bytes from 192.168.0.81: icmp_seq=3 ttl=64 time=7.621 ms
64 bytes from 192.168.0.81: icmp_seq=4 ttl=64 time=25.420 ms
^C
--- amelia.local ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 7.621/19.238/41.965/12.955 ms

If ROBOT_NAME.local does not resolve, commands that use that name will not work until name resolution is fixed. The network reachability of the Duckiedrone can still be tested with ping ROBOT_IP.

Warning

The network must support mDNS to resolve ROBOT_NAME.local; mDNS is not required to reach the Duckiedrone by IP address. If name resolution is needed, ask whoever manages the network about mDNS on the subnet.

To verify that Secure Shell (ssh) access works:

Test

On the base station, run ssh duckie@ROBOT_NAME.local, or ssh duckie@ROBOT_IP if .local does not resolve. Enter the password set while preparing the microSD card.

Expected Result

A shell prompt on the Duckiedrone opens.

Type exit to close the ssh session and return to the base station shell.

Troubleshooting#

Troubleshooting

SYMPTOM

None of the connection checks work.

RESOLUTION

The most likely causes are:

  • The base station and the Duckiedrone are not on the same network.

  • The Duckiedrone first boot procedure is not complete yet.

  • ROBOT_NAME.local does not resolve through mDNS.

A general alternative that bypasses Wi-Fi, and can be useful during debugging, is connecting the Duckiedrone to the router with an Ethernet cable, if the router is physically accessible.

Troubleshooting

SYMPTOM

The Duckiedrone answers ping at its IP address, but not at its hostname.

RESOLUTION

mDNS is unavailable on the network or is being filtered. Try a phone hotspot named duckietown with password quackquack, then reboot the Duckiedrone to isolate the network issue. If it works, ask the administrator of the original network to allow mDNS on the relevant subnet.

Other notes on Duckiedrone networking (AP)#

The Duckiedrone experimentally supports access point (AP) network configuration too, a setup in which it is the robot itself emitting the network, and the base station connecting to it. This feature is currently disabled until further testing is conducted. These instructions will be updated in due time to document this feature.