Skip to content
EtienneAr edited this page May 17, 2023 · 2 revisions

Optional accessories and tips for Upkie.

Additional Wi-Fi adapter

To configure a secondary Wi-Fi access, e.g. using a USB dongle:

  1. Configure the network you want to connect to in /etc/wpa_supplicant/wpa_supplicant.conf
  2. Add the following lines to /etc/dhcpcd.conf
# USB wireless dongle
interface wlan1
hook wpa_supplicant
  1. Run the following command:
$ sudo wpa_supplicant -iwlan1 -D wext -c/etc/wpa_supplicant/wpa_supplicant.conf

RTC clock

Raspberry Pi don't have anyway to keep the datetime after power off, and usually rely on internet connection to set the datetime at each boot. This mod proposes a solution to keep the datetime (even when powered on), without requiring any internet connection. It is useful mostly for having meaningful logs with appropriate datetime stamps.

It relies on a DS3231 chip/module, that need to be wired appropriately (i.e. powered and connected to I2C bus). To configure the raspberry, do the following:

  1. Enable the I2C bus:
sudo raspi-config
# Interfacing Options –> I2C –> enable
  1. Edit configuration file /boot/config.txt:
sudo nano /boot/config.txt
# add the following line at the end of the file
dtoverlay=i2c-rtc,ds3231
  1. Edit /lib/udev/hwclock-set:
sudo nano /lib/udev/hwclock-set

and comment the 3 following lines:

# if [ -e /run/systemd/system ] ; then
# exit 0
# fi
  1. Reboot
sudo reboot
  1. Check the datetime on the raspberry (and set it eventually) :
date
# To set the datetime use
date -s 2023-05-17T17:46:02+02:00
# To read it from another linux machine use
date --iso=seconds
  1. Write the time on the RTC clock
hwclock -w
# Check that the write worked by reading it
hwclock -r #Should display the correct datetime
  1. Set the datetime automatically at boot
sudo nano /etc/rc.local
# Add the line
sudo hwclock -s