First connection
Contents
What you will need
A live Duckiedrone: First boot
A properly configured Duckiedrone: Network management
A properly configured base station: Initial setup
A network that supports mDNS, or for which you have administrative access
(optional) Physical access to the network router, and an Ethernet cable
What you will get
A connected Duckiedrone
First connection#
You are now ready to connect to your Duckiedrone.
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 your 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:
The network defined during the microSD card initialization procedure: Software Initialization
The default backup network named
duckietownwith passwordquackquack
After the first boot, you can configure additional networks by following Network management.
Testing the connection#
When a successful connection is established, all the following will work:
Duckietown fleet discovery tool#
Open a terminal on the base station and run:
dts fleet discover
If the robot is on the same network, it will appear along with its status.
ping#
To test if your computer and Duckiedrone are able to communicate over the network, open a terminal and:
ping <hostname>.local
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
where <hostname> is the robot name chosen during the microSD card flashing procedure.
If <hostname>.local does not resolve, commands that use that hostname will not work until name resolution is fixed. You can still test network reachability with the Duckiedrone’s IP address.
Warning
The network must support mDNS to resolve <hostname>.local; mDNS is not required to ping the Duckiedrone’s IP address. Commands that use <hostname>.local depend on mDNS. Availability varies by network, so ask your network administrator to enable mDNS on the subnet used by your class or lab.
The Dashboard#
You can access the robot’s Dashboard at http://<hostname>.local, or through the command dts duckiebot dashboard <hostname>.
Accessing the Duckiedrone’s Dashboard provides access to many tools to manage the Duckiedrone.
Create a dedicated Duckiedrone dashboard explanation page.
Secure Shell (ssh)#
You can ssh into the Duckiedrone with ssh duckie@<hostname>.local, using the password set while preparing the microSD card.
Troubleshooting#
If any of these basic interfacing commands are not working, the most likely causes are:
Your computer and Duckiedrone are not on the same network.
The Duckiedrone’s first boot procedure is not complete yet.
<hostname>.localdoes not resolve through mDNS.
A general alternative networking solution that bypasses Wi-Fi, and can be useful during debugging, is connecting the Duckiedrone via an Ethernet cable to the router, if you have physical access to it.
Troubleshooting
SYMPTOM
I cannot ping my Duckiedrone with hostname, but I can with its IP address.
RESOLUTION
mDNS is unavailable on your 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 original network’s administrator 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.