Network Configuration in Duckietown
Contents
Network Configuration in Duckietown#
What you will need
A network router with internet connection
(optional) An ethernet cable
What you will get
Learn how to change network configuration on the Duckiebot.
Basics for debugging network challenges
A connected Duckiebot
Most dts commands rely on the connectivity between the Duckiebot, the computer used to interact with it, and the internet.
To make sure all commands work:
The Duckiebot and computer must appear as physical devices on the same subnet.
The network must have access to the Internet.
Warning
Networks are the most common blocker when using Duckietown. Making sure this step is completely correctly will remove many future headaches.
Wi-Fi connection#
Setting up a working Wi-Fi connection between your base station and Duckiebot is a prerequisite for smooth operations.
Checkpoint#
Check that you can reach the Duckiebot:
ping DUCKIEBOT_NAME.local
If .local does not resolve, use the Duckiebot’s reachable IP address (shown in the Address column of dts fleet discover when available):
ping DUCKIEBOT_IP
You can also use the IP address with dts: run dts duckiebot dashboard DUCKIEBOT_IP to open the Dashboard, or pass -H DUCKIEBOT_IP to commands that accept a target host.
Also check that you can reach the internet by opening a browser or, for example:
ping 8.8.8.8
Test
Run:
dts fleet discover
Expected Result
For example, a connected Duckiebot appears as follows:
| Hardware | Type | Model | Status | Address
-------------- | ----------- | --------- | ----- | -------- | --------------------
DUCKIEBOT_NAME | jetson_nano | duckiebot | DB21J | Ready | DUCKIEBOT_NAME.local
How to add or edit Wi-Fi networks on a Duckiebot#
It is possible to add, remove, or edit networks to which a Duckiebot will connect to by editing the network configuration file, without the need to re-flash the SD card. To do so, one must edit the /etc/wpa_supplicant.conf file on the Duckiebot’s SD card: Modifying the Wi-Fi settings on a Duckiebot.
A word on “corporate” networks, e.g., eduroam#
Some university networks (e.g., the global eduroam) have multiple layers of authentication, i.e., a password is not sufficient to access the network. In these cases, the default network configuration settings used by Duckietown are insufficient to connect to the network.
It is possible to edit the wpa_supplicant.conf file in your Duckiebot to connect to eduroam, but data specific to your university will be required. You will have to coordinate with your network administrator to find out this data.
Here is an example wpa_supplicant.conf setup for the University of Bristol eduroam.
Prerequisites of router and internet connection#
Ideally, you work with Duckietown in an environment in which you have administrator powers over the available network. This is the typical case for home networks or, for example, phone hotspots.
In university or corporate networks, for security reasons, some functionalities like local discovery or access to certain ports or websites are made unavailable. Duckietown relies on the following:
mDNS to resolve
DUCKIEBOT_NAME.local, if you use that name instead of the Duckiebot’s reachable IP address.Internet access to services such as GitHub, Docker Hub, and Duckietown.
These tools are typically deactivated in corporate networks, such as universities or companies. If this is the case in your working environment, ask your IT team to provide a subnet with Internet access and enabled discovery tools. In the meantime, you could:
Use a phone with an unlimited data plan as a hotspot.
Work from your home network.
Create a temporary “pirate” network by connecting a router at work while your IT team configures the main network settings.
Ethernet connection between Duckiebot and Base Station#
For debugging Wi-Fi connections it might be useful to occasionally connect the computer and Duckiebot through an ethernet connection. The simplest option, when you have physical access to the router, is to connect the Duckiebot via ethernet cable to the router itself. In this way it should immediately appear on the network (e.g., discoverable through dts fleet discover).