Network Configuration
Contents
Network Configuration#
This page describes how to configure Wi-Fi networks on your Duckiedrone, including enterprise networks such as eduroam.
What you will need
A Duckiedrone with SD card access
Basic understanding of network settings
What you will get
A Duckiedrone connected to your desired networks
Overview#
Your Duckiedrone uses the wpa_supplicant
service to manage Wi-Fi connections. Network configurations are stored in the wpa_supplicant.conf
file, which can be edited to add new networks or modify existing ones.
Attention
Changes to network configuration require either editing the SD card directly or accessing the Duckiedrone via SSH. Make sure to back up your configuration before making changes.
Adding Wi-Fi Networks#
Method 1: Edit SD Card Before First Boot#
If you have not booted your Duckiedrone yet, you can configure networks during the software initialization process:
After flashing the SD card, navigate to the
config
partitionOpen the
wpa_supplicant.conf
file with a text editorAdd your network configurations as described below
Method 2: Edit Configuration on Running Duckiedrone#
For an already initialized Duckiedrone, you can modify network settings by:
SSH into your Duckiedrone:
ssh duckie@[ROBOT_NAME].local
Edit the configuration file:
sudo nano /config/wpa_supplicant.conf
Add your network configurations and save the file
Restart the robot:
sudo reboot
(dd24-network-configuration)-examples)=
Network Configuration Examples#
Basic Home/Office Network (WPA-PSK)#
For most home and office networks with WPA/WPA2 security:
network={
id_str="home_network"
ssid="MyHomeWiFi"
psk="my_wifi_password"
key_mgmt=WPA-PSK
priority=5
}
Open Network (No Password)#
For open networks without passwords:
network={
id_str="open_network"
ssid="FreeWiFi"
key_mgmt=NONE
priority=1
}
Enterprise Networks (WPA-EAP)#
eduroam Configuration#
For eduroam networks commonly found at universities and research institutions:
network={
ssid="eduroam"
key_mgmt=WPA-EAP
eap=PEAP
identity="[email protected]"
password="your_password"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
ca_cert="/etc/ssl/certs/ca-certificates.crt"
priority=10
}
Parameter explanation:
ssid="eduroam"
: The SSID of the networkkey_mgmt=WPA-EAP
: Enterprise WPA authenticationeap=PEAP
: Most institutions use PEAP for eduroamidentity
: Your login credentials (e.g.,[email protected]
)password
: Your password ⚠️ stored in plain text unless you usewpa_passphrase
phase1
andphase2
: Required for PEAP/MSCHAPv2ca_cert
: Path to CA certificates./etc/ssl/certs/ca-certificates.crt
is standard for Ubuntupriority
: Helps when multiple networks are available (higher number = higher priority)
Warning
Security Notice: Passwords in wpa_supplicant.conf
are stored in plain text. For better security, consider using certificate-based authentication when possible.
Enterprise Network with Custom Certificate#
If your institution provides a custom CA certificate:
network={
ssid="enterprise_network"
key_mgmt=WPA-EAP
eap=PEAP
identity="[email protected]"
password="your_password"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
ca_cert="/path/to/custom-ca.crt"
priority=8
}
Enterprise Network with TTLS#
For networks using TTLS instead of PEAP:
network={
ssid="corporate_wifi"
key_mgmt=WPA-EAP
eap=TTLS
identity="domain\\username"
password="your_password"
phase2="auth=PAP"
ca_cert="/etc/ssl/certs/ca-certificates.crt"
priority=7
}
Complete Configuration File Example#
Here’s a complete wpa_supplicant.conf
file with multiple network configurations:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
# Default Duckietown network
network={
id_str="duckietown_default"
ssid="duckietown"
psk="quackquack"
key_mgmt=WPA-PSK
priority=5
}
# Home network
network={
id_str="home"
ssid="MyHomeWiFi"
psk="home_password"
key_mgmt=WPA-PSK
priority=6
}
# University eduroam
network={
ssid="eduroam"
key_mgmt=WPA-EAP
eap=PEAP
identity="[email protected]"
password="student_password"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
ca_cert="/etc/ssl/certs/ca-certificates.crt"
priority=10
}
# Office network
network={
id_str="office"
ssid="OfficeWiFi"
psk="office_password"
key_mgmt=WPA-PSK
priority=7
}
Configuration Parameters#
Important Parameters#
Parameter |
Description |
Example |
---|---|---|
|
Network name |
|
|
Pre-shared key (password) |
|
|
Security type |
|
|
Connection priority (higher = preferred) |
|
|
Network identifier |
|
Enterprise Parameters#
Parameter |
Description |
Example |
---|---|---|
|
EAP method |
|
|
Username |
|
|
Password |
|
|
Phase 1 parameters |
|
|
Phase 2 authentication |
|
|
CA certificate path |
|
Testing Network Connectivity#
After configuring your networks, test the connection:
Check network status:
iwconfig
Test internet connectivity:
ping -c 4 google.com
Check which network is connected:
iwgetid
View available networks:
sudo iwlist scan | grep ESSID
Troubleshooting#
Common Issues#
Troubleshooting
SYMPTOM
My Duckiedrone won’t connect to the network
RESOLUTION
Check that the SSID and password are correct
Verify that the
country
code matches your locationCheck signal strength:
iwlist scan | grep -A5 "YourNetworkName"
Review the system logs:
sudo journalctl -u wpa_supplicant
Troubleshooting
SYMPTOM
eduroam connection fails
RESOLUTION
Verify your credentials with your IT department
Check if your institution requires specific certificate settings
Try alternative EAP methods (TTLS instead of PEAP)
Some institutions require a domain prefix:
domain\username
Troubleshooting
SYMPTOM
Network connects, but no internet access
RESOLUTION
Check DNS settings:
cat /etc/resolv.conf
Test with different DNS:
nslookup google.com 8.8.8.8
Some corporate networks require proxy settings
Check if your device needs to be registered on the network
Advanced Debugging#
For detailed debugging, enable verbose logging:
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -d
View the logs in real-time:
sudo journalctl -f -u wpa_supplicant
Security Best Practices#
Limit network priorities: Set higher priorities only for trusted networks
Use strong passwords: Avoid common or easily guessable passwords
Regular updates: Keep your Duckiedrone software updated
Monitor connections: Regularly check which networks your drone connects to
Certificate validation: Always use proper CA certificates for enterprise networks
Warning
Be cautious when connecting to public networks. Consider using a VPN for additional security when operating on untrusted networks.
Country-Specific Considerations#
Attention
The country
parameter in your configuration must match your physical location to comply with local radio frequency regulations. Using an incorrect country code may result in connection issues or violate local laws.
Common country codes:
US: United States
CA: Canada
GB: United Kingdom
DE: Germany
FR: France
JP: Japan
AU: Australia
See the full list of country codes for your specific location.
Next Steps#
Once your network configuration is complete:
Proceed to First Connection to access your Duckiedrone
Check the Troubleshooting guide if you encounter issues
Learn about Flight Controller Initialization for advanced setup