Raspberry Pi Setup
These are the instructions to setup a custom Ubuntu 20.04 Focal Fossa on Raspberry Pi 4 B.
In case you don't have a Raspberry Pi 4 B, it is also possible to create the robot using a Jetson Nano from Nvidia. See the related section in the documentation.
Obtain Ubuntu 20.04 Mate Image for Raspberry Pi
Download the latest release of the image and flash it to an empty sd card. To do this follow the instructions on the Raspberry Pi documentation or balenaEtcher. Another way is to use the Raspberry Pi Imager explained here.
Flashing in this context, means the transfer of software data, also refered to as Firmware, from your computer to a device, such as a the sd card in this case. The term “to flash” comes from the Flash storage component of a device where the Firmware is stored.
So far there are no known issues using WiFi with Ubuntu Mate 20.04 arm64 on the Raspberry Pi 4B.
Possible issues with other imagesIf you are not in the US it is possible that you encounter connection problems when connected to a 5Ghz Wifi network. If you are in a different country than the US you need to update your regulatory country. 5Ghz needs this to know the right bands to use. This can be changed by editing the value of `REGDOMAIN` in the file `/etc/default/crda` ([Central Regulatory Domain Agent](https://wireless.wiki.kernel.org/en/developers/regulatory/crda)) to the code for your country [ref](https://github.com/TheRemote/Ubuntu-Server-raspi4-unofficial/issues/98).
There might be some wifi issues where the connection is lost after some time. This might be a firmware issue reported here. Although the wifi power save management is turned off by default, make sure to also do this for external wifi usb dongles by editing the following file
Set this to
2 to turn power management off.
Possible values for the
wifi.powersave field are:
1 2 3 4
(Informal source on GitHub for these values.)
You can check if it is turned off with
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
This is the output when there is one external usb WiFi dongle connected to the Raspberry Pi 4 B and no ethernet cable.
Instructions to install Wifi drivers
In case you use a Realtek USB Wifi dongle it might not be directly supported by the linux kernel.
To install the correct driver, you first have to figure out the driver id. When plugging in the USB Wifi dongle and running
shoud output something similar to:
1 2 3 4 5
idProduct=c811 you can search for the correct driver. In this case it is the
For it the instructions in the
https://github.com/brektrou/rtl8821CU repository can be used to install the driver.
These instructions are specifically for the Realtek (id c811) USB wifi dongle. In case you use another USB dongle it might work directly or there exists a ubuntu package. In general try to use Google for instructions on how to install. The following is only an example on what might be needed to get the driver working.
After cloning this package, the Makefile needs to be adapted to work for the Raspberry Pi 4B:
1 2 3 4
Then follow the instructions from the README.md:
1 2 3
and finally make and install the driver:
After a reboot the USB Wifi dongle should be detected and two wifi adapters should show up - the internal wifi module on the RPi and the USB dongle.
- Disable power management in Stretch
- How to turn off Wireless power management permanently
- RPi4: WiFi client crashes often (brcmf_fw_crashed: Firmware has halted or crashed)
- WLAN Karten Realtek (german)
After flashing the image to the sd card insert it to the Pi, hook it up to a monitor via HDMI and power it up by pluggin in the USB-C connector. Then you should follow the installation instructions on the screen.
Once finished, follow the next steps to install ROS Noetic.
To proceed with the next steps on installing ROS and other related dependencies you can run a bash script.
Just clone this repository: https://github.com/fjp/diffbot.git and run
ubuntu-setup.sh. But to learn more, you should follow the instructions on the following pages.