Skip to main content
Version: ROS 2 Jazzy

Linux Network Configuration

note

The clearpath_computer_setup package offers a terminal menu tool for configuring a robot computer. The main feature of this tool is the ability to generate netplan configurations. The clearpath_computer_setup package is available on the Clearpath package server.

It should be installed on the robot's computer:

sudo apt install python3-clearpath-computer-setup

To run the tool, call:

sudo clearpath-computer-setup

Connecting to an Existing Wi-Fi Network

Use the sudo clearpath-computer-setup command to connect your robot to an existing wireless network.

 ___     _         _      ___                     _             ___      _
| _ \___| |__ ___| |_ / __|___ _ __ _ __ _ _| |_ ___ _ _ / __| ___| |_ _ _ _ __
| / _ \ '_ \/ _ \ _| | (__/ _ \ ' \| '_ \ || | _/ -_) '_| \__ \/ -_) _| || | '_ \
|_|_\___/_.__/\___/\__| \___\___/_|_|_| .__/\_,_|\__\___|_| |___/\___|\__|\_,_| .__/
|_| |_|
Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
> Netplan Setup

About
Exit

Select Netplan Setup and press the ENTER key.

 _  _     _        _              ___           __ _                    _   _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
Bridge Setup
Ethernet Setup
> Wifi Setup

Pre-set Configurations

Read Configuration YAML
Write Configuration YAML
Apply Configuration Changes
View Netplan Configurations

Use the arrow keys to select Wifi Setup and press ENTER.

If you have multiple wifi interfaces, use the arrow keys to select the one you wish to configure. If you only have one interface, it will be seleced automatically.

__      ___ ___ _   ___      _
\ \ / (_) __(_) / __| ___| |_ _ _ _ __
\ \/\/ /| | _|| | \__ \/ -_) _| || | '_ \
\_/\_/ |_|_| |_| |___/\___|\__|\_,_| .__/
|_|
Interface Menu
Press Q, Esc, or CTRL+C to go back.
--------------------------------------------
> Wi-Fi 'wlp59s0' Setup

Press ENTER once you have selected the interface to configure.

__      ___ ___ _   ___      _
\ \ / (_) __(_) / __| ___| |_ _ _ _ __
\ \/\/ /| | _|| | \__ \/ -_) _| || | '_ \
\_/\_/ |_|_| |_| |___/\___|\__|\_,_| .__/
|_|
Press Q, Esc, or CTRL+C to go back.
--------------------------------------------
> SSID: ssid
Password: password

Save Settings
Reset Settings

Select SSID and press ENTER. You will be prompted to enter the SSID of your wireless network.

Wi-Fi Network SSID
------------------
SSID (ssid):

Then select Password and press ENTER

__      ___ ___ _   ___      _
\ \ / (_) __(_) / __| ___| |_ _ _ _ __
\ \/\/ /| | _|| | \__ \/ -_) _| || | '_ \
\_/\_/ |_|_| |_| |___/\___|\__|\_,_| .__/
|_|
Press Q, Esc, or CTRL+C to go back.
--------------------------------------------
> SSID: ssid
Password: password

Save Settings
Reset Settings

Type in the password for your wireless network and press ENTER. The password is case-sensitive. Note that only wpa family encryption is supported using this tool. If your network requires certificates you must manually configure Netplan.

Wi-Fi Network Password
----------------------
Password (password):

Type the SSID of your network and press ENTER. Note that the SSID is case-sensitive.

Finally, select Save Settings and press the ENTER key.

__      ___ ___ _   ___      _
\ \ / (_) __(_) / __| ___| |_ _ _ _ __
\ \/\/ /| | _|| | \__ \/ -_) _| || | '_ \
\_/\_/ |_|_| |_| |___/\___|\__|\_,_| .__/
|_|
Press Q, Esc, or CTRL+C to go back.
--------------------------------------------
SSID: ssid
Password: password

> Save Settings
Reset Settings

Once you have configured the wireless interfaces, press Esc until you return to the main menu. Select Write Configuration YAML and press ENTER

 _  _     _        _              ___           __ _                    _   _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
Bridge Setup
Ethernet Setup
Wifi Setup

Pre-set Configurations

Read Configuration YAML
> Write Configuration YAML
Apply Configuration Changes
View Netplan Configurations

Enter the path /etc/netplan/60-wifi.yaml and press ENTER.

After saving, run `Apply` to update Netplan.
--------------------------------------------
_ _ _ _ ___ __ _ _ _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Save YAML:
Enter path to Netplan Configuration YAML
>

Finally, select Apply Configuration changes and press ENTER.

 _  _     _        _              ___           __ _                    _   _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Apply Netplan Configuration:
- changes will not take effect until you
apply the configuration.
- applying changes may take a 15-30 seconds
depending on the system.
- depending on the new changes,
you may be disconnected from the system.

Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
> Apply Changes
Cancel

Select Apply Changes and press ENTER. If you are logged into the robot via SSH you may lose your connection when applying the changes. If this happens, simply open a new terminal and log in again.

Standard Clearpath Bridge

Use the sudo clearpath-computer-setup command to connect your robot to an existing wireless network.

 ___     _         _      ___                     _             ___      _
| _ \___| |__ ___| |_ / __|___ _ __ _ __ _ _| |_ ___ _ _ / __| ___| |_ _ _ _ __
| / _ \ '_ \/ _ \ _| | (__/ _ \ ' \| '_ \ || | _/ -_) '_| \__ \/ -_) _| || | '_ \
|_|_\___/_.__/\___/\__| \___\___/_|_|_| .__/\_,_|\__\___|_| |___/\___|\__|\_,_| .__/
|_| |_|
Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
> Netplan Setup

About
Exit

Select Netplan Setup and press the ENTER key.

 _  _     _        _              ___           __ _                    _   _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
> Bridge Setup
Ethernet Setup
Wifi Setup

Pre-set Configurations

Read Configuration YAML
Write Configuration YAML
Apply Configuration Changes
View Netplan Configurations

If you do not have a bridge defined, use the arrow keys to select Bridge Setup and press ENTER.

 ___     _    _            ___      _
| _ )_ _(_)__| |__ _ ___ / __| ___| |_ _ _ _ __
| _ \ '_| / _` / _` / -_) \__ \/ -_) _| || | '_ \
|___/_| |_\__,_\__, \___| |___/\___|\__|\_,_| .__/
|___/ |_|
Interface Menu
Press Q, Esc, or CTRL+C to go back.
---------------------------------------------------
> Add Bridge
Remove Bridge

Use the arrow keys to select Add Bridge and press ENTER.

Enter the name of the bridge you want to create. By default the first bridge should be called br0. Press ENTER to continue.

Bridge interface name must start with 'br'
------------------------------------------
Enter name of bridge to add.
>

Select the bridge to edit (br0 by default) and press ENTER.

 ___     _    _            ___      _
| _ )_ _(_)__| |__ _ ___ / __| ___| |_ _ _ _ __
| _ \ '_| / _` / _` / -_) \__ \/ -_) _| || | '_ \
|___/_| |_\__,_\__, \___| |___/\___|\__|\_,_| .__/
|___/ |_|
Interface Menu
Press Q, Esc, or CTRL+C to go back.
---------------------------------------------------
> Bridge 'br0' Setup

Add Bridge
Remove Bridge

Enable or disable DHCP for IPv4 and IPv6 as desired.

 ___     _    _            ___      _
| _ )_ _(_)__| |__ _ ___ / __| ___| |_ _ _ _ __
| _ \ '_| / _` / _` / -_) \__ \/ -_) _| || | '_ \
|___/_| |_\__,_\__, \___| |___/\___|\__|\_,_| .__/
|___/ |_|
Bridge 'br0' Configuration
Press Q, Esc, or CTRL+C to go back.
---------------------------------------------------
> dhcp4 : [yes]
dhcp6 : [no]
bridged : [[]]
addresses : [[]]

To select what interfaces to bridge together, select bridged and press ENTER. Use the arrow keys to select each interface you want to add to the bridge and press the spacebar to check/uncheck it.

br0 bridged
Press Q, Esc, or CTRL+C to reset.
Press Enter to accept changes and exit.
---------------------------------------
> [ ] enp3s0
[ ] enp4s0
[ ] wlp59s0

Press <space>, <tab> for multi-selection and <enter> to accept

Press ENTER once you have selected all of the desired interfaces to bridge.

To add static IP addresses to the bridge, select addresses and press ENTER.

 ___     _    _            ___      _
| _ )_ _(_)__| |__ _ ___ / __| ___| |_ _ _ _ __
| _ \ '_| / _` / _` / -_) \__ \/ -_) _| || | '_ \
|___/_| |_\__,_\__, \___| |___/\___|\__|\_,_| .__/
|___/ |_|
Bridge 'br0' Configuration
Press Q, Esc, or CTRL+C to go back.
---------------------------------------------------
dhcp4 : [yes]
dhcp6 : [no]
bridged : [['enp3s0', 'enp4s0']]
> addresses : [[]]

Select Add IP Address and enter 192.168.131.1/24 to create the robot's internal network.

Select option to edit, add, or remove bridge IP addresses:
Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------
> Add IP Address
Remove IP Address

Once you have added all desired static IP addresses to the bridge, press Esc until you return to the main menu. Select Write Configuration YAML and press ENTER

 _  _     _        _              ___           __ _                    _   _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
Bridge Setup
Ethernet Setup
Wifi Setup

Pre-set Configurations

Read Configuration YAML
> Write Configuration YAML
Apply Configuration Changes
View Netplan Configurations

Enter the path /etc/netplan/50-clearpath-bridge.yaml and press ENTER.

After saving, run `Apply` to update Netplan.
--------------------------------------------
_ _ _ _ ___ __ _ _ _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Save YAML:
Enter path to Netplan Configuration YAML
>

Finally, select Apply Configuration changes and press ENTER.

 _  _     _        _              ___           __ _                    _   _
| \| |___| |_ _ __| |__ _ _ _ / __|___ _ _ / _(_)__ _ _ _ _ _ __ _| |_(_)___ _ _
| .` / -_) _| '_ \ / _` | ' \ | (__/ _ \ ' \| _| / _` | || | '_/ _` | _| / _ \ ' \
|_|\_\___|\__| .__/_\__,_|_||_| \___\___/_||_|_| |_\__, |\_,_|_| \__,_|\__|_\___/_||_|
|_| |___/
Apply Netplan Configuration:
- changes will not take effect until you
apply the configuration.
- applying changes may take a 15-30 seconds
depending on the system.
- depending on the new changes,
you may be disconnected from the system.

Press Q, Esc, or CTRL+C to go back.
----------------------------------------------------------------------------------------
> Apply Changes
Cancel

Select Apply Changes and press ENTER. If you are logged into the robot via SSH you may lose your connection when applying the changes. If this happens, simply open a new terminal and log in again.

Determining the robot's IP address

The robot's main computer can have several IP addresses for different connections. The robot will always have a static address on its internal network of 192.168.131.1 with a netmask of 255.255.255.0 (24 bits).

note

If your robot has a wireless base-station or long-range wireless radio integrated into it, these are considered part of the robot's internal network. When connected to the base-station you can log into the robot via its 192.168.131.1 IP address.

The robot's wired interface may also be connected to an external DHCP source to provide wired internet access, and the robot can be connected over Wi-Fi. To determine the robot's DHCP address, you must either

  1. Log into your router and look up the current DCHP assignments. This process will vary from vendor-to-vendor, so refer to your router's manual for instructions on how to do this.
  2. Log into the robot via its static 192.168.131.1 address and run the command ip a

Interpreting ip a output

The ip a command produces a lot of output, and can be difficult to understand if you aren't familiar with it.

Sample Output

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
link/ether 12:23:34:45:56:67 brd ff:ff:ff:ff:ff:ff
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
link/ether 12:34:56:78:90:ab brd ff:ff:ff:ff:ff:ff
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
inet 192.168.131.1/24 brd 192.168.131.255 scope global br0
valid_lft forever preferred_lft forever
inet 10.0.100.42/16 metric 100 brd 10.0.255.255 scope global dynamic br0
valid_lft 79814sec preferred_lft 79814sec
inet6 1234::1234:5678:90ab:cdef/64 scope link
valid_lft forever preferred_lft forever
5: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 70:1a:b8:2b:0b:b0 brd ff:ff:ff:ff:ff:ff
inet 10.0.200.101/16 brd 10.0.255.255 scope global wlp2s0
valid_lft forever preferred_lft forever
inet6 1234::1122:3344:5566:7788/64 scope link
valid_lft forever preferred_lft forever
6: vcan0: <NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UP group default qlen 100
link/can
7: vcan1: <NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UP group default qlen 1000
link/can

Note: MAC addresses have been redacted in the sample above

Each numbered item (1 to 7 in the example above) corresponds to a network interface. Each interface that has an active connection will have an entry of the form inet aaa.bbb.ccc.ddd/ee indicating its IP address. Some interfaces, such as the bridge interface described above, may have more than one address.

The items of note are:

  • br0: The Clearpath bridge interface. It will always have the inet 192.168.131.1/24 address, denoting its static address on the internal network. In this example it is also connected to a wireless DHCP source, giving it the address 10.0.100.42/16.
  • wlp2s0: the robot's wireless interface (the wireless interface will always start with w). In in this example the robot is connected to a wireless network with the address 10.0.200.101/16.