Home
build details

# DB17 Networking aka the hardest part

Modified yesterday by tanij

A Duckiebot in configuration DB17-CO+w

Either a router that you have control over that has internet access, or your credentials for connecting to an existing wireless network

A Duckiebot that you can connect to and that is connected to the internet

this page is primarily for folks operating with the “two-network” configuration, C0+w. For a one adapter setup you will can skip directly to Section 11.2 - Setting up wireless network configuration, but you will have to connect to a network that you can ssh through.

The basic idea is that we are going to use the “Edimax” thumbdrive adapter to create a dedicated wireless network that you can always connect to with your laptop. Then we are going to use the built-in Broadcom chip on the Pi to connect to the internet, and then the network will be bridged.

## Setting up wireless network configuration

Modified 2018-06-22 by Andrea Censi

You are connected to the Duckiebot via WiFi, but the Duckiebot also needs to connect to the internet in order to get updates and install some software. This part is a little bit more of a “black art” since we cannot predict every possible network configurations. Below are some settings that have been verified to work in different situations:

### Option 5: ETH Wifi

Modified 2018-06-22 by Andrea Censi

The following instructions will lead you to connect your PI to the “eth” wifi network.

First, run the following on duckiebot

duckiebot $iwconfig ... lo no wireless extensions. enxbxxxxxxxxxxx no wireless extensions. ...  Make note of the name enxbxxxxxxxxxxx. xxxxxxxxxxx should be a string that has 11 characters that is formed by numbers and lower case letters. Second, edit the file /etc/network/interfaces which requires sudo so that it looks like the following, and make sure the enxbxxxxxxxxxxx matches. Pay special attention on the line “pre-up wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf”.This is expected to be exactly one line instead of two but due to formatting issue it is shown as two lines. Also, make sure every characters match exactly with the provided ones. TAs will not help you to do spelling error check. # interfaces(5) file used by ifup(8) and ifdown(8) Include files from /etc/network/ interfaces.d: source-directory /etc/network/interfaces.d # The loopback network interface auto lo auto enxbxxxxxxxxxxx # the wired network setting iface enxbxxxxxxxxxxx inet dhcp # the wireless network setting auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp pre-up wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf post-down killall -q wpa_supplicant  Third, edit the file /etc/wpa_supplicant/wpa_supplicant.conf which requires sudo so that it looks like the following, and make sure you substitute [identity] and [password] content with your eth account information: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="eth" key_mgmt=WPA-EAP group=CCMP TKIP pairwise=CCMP TKIP eap=PEAP proto=RSN identity="your user name goes here" password="your password goes here" phase1="peaplabel=0" phase2="auth=MSCHAPV2" priority=1 }  Fourth, reboot your PI. duckiebot$ sudo reboot


Then everything shall be fine. The PI will connect to “eth” automatically everytime it starts.

Note that, if something went wrong, your Duckiebot tries to connect to the network for 5.5mins at startup while it’s blocking SSH connection to it completely (“Connection refused” error when connecting). If this is the case, please wait those 5.5mins until your Duckiebot lets you connect again and recheck your settings.

TODO: Find a solution to this since it occurs very often

previous task next (9 of 34) index

The following was marked as "todo".

TODO: Find a solution to this since it occurs very often

File book/opmanual_duckiebot/atoms_17_setup_duckiebot_DB17-jwd/1_7_netowrking_config.md.

File book/opmanual_duckiebot/atoms_17_setup_duckiebot_DB17-jwd/1_7_netowrking_config.md
in repo duckietown/docs-opmanual_duckiebot branch master commit 44c6f610
Created by function make in module compmake.jobs.actions.