The Mercury dashboard runs on a Raspberry Pi using Alpine Linux.
When we work on the solar car software, we frequently connect to the Pi to:
• run the dashboard
• debug telemetry
• monitor CAN communication
• update software
The commands below are the most common commands we use when working with the solar car Raspberry Pi.
When the Pi is connected to the same network as our laptop, we first need to find its IP address.
Laptop
↓
Scan local network
↓
Identify Raspberry Pi
↓
Connect using SSH
What it does
Displays a table of devices that our computer has recently communicated with on the local network.
How we use it
When the Raspberry Pi connects to the network, it appears in this list as:
IP Address ↓ MAC Address
Example: 192.168.1.15 b8:27:eb:45:3a:12
This tells us the Raspberry Pi's IP address is 192.168.1.15.
We can then use that address to connect to the Pi.
Shows the network configuration of our computer.
Important fields include:
• IPv4 address
• subnet mask
• default gateway
We use this command to confirm our laptop is connected to the same network as the Raspberry Pi.
Displays all network interfaces on a Linux machine.
Example interfaces: eth0 wlan0 can0
This command is important because it shows:
• whether ethernet is active
• whether Wi-Fi is active
• whether the CAN interface (can0) exists
example: ping 192.168.1.15
Tests whether the Raspberry Pi is reachable over the network.
Expected output: 64 bytes from 192.168.1.15
If we receive responses, the network connection is working.
Once we know the IP address, we connect to the Raspberry Pi using SSH.
Laptop
↓
SSH connection
↓
Remote terminal on Raspberry Pi
Connects to the Raspberry Pi using SSH (Secure Shell).
Example: ssh admin@192.168.1.15
Explanation:
• ssh → secure shell protocol used to remotely access another computer
• admin → user account on the Raspberry Pi
• IP_ADDRESS → address of the Raspberry Pi on the local network
This command opens a remote terminal session on the Raspberry Pi, allowing us to run commands directly on the dashboard computer.
Logs into the Raspberry Pi as the root (administrator) user.
Example: ssh root@192.168.1.15
Root access allows:
• installing software
• modifying system configuration
• restarting services
• accessing protected system directories
Closes the SSH session.
Example: exit
Returns you to your local computer terminal.
Sometimes we need to copy files or update the dashboard code remotely.
Laptop
→ Secure transfer
→ Raspberry Pi filesystem
Securely copies a file from your computer to the Raspberry Pi.
Example: scp config.ini admin@192.168.1.15:/home/admin/
Synchronizes folders between your computer and the Raspberry Pi.
Example: rsync -av Helios-Mercury/ admin@192.168.1.15:/home/admin/
Once connected to the Pi, we use these commands to move around the filesystem and manage files.
Lists files and folders in the current directory.
Example: ls
Changes the current directory.
Example: cd Helios-Mercury
Shows the full path of the current directory.
Example: pwd
Creates a new directory.
Example: mkdir telemetry_logs
Deletes a file from the filesystem.
Example: rm file.txt
Most quick edits are done directly on the Raspberry Pi using a terminal text editor.
Opens a file in the terminal-based editor.
Example: vi wiegand_test.py
These commands are used while inside the vi editor.
| Key | Function |
|----|----|
| i | Enter insert mode (allows you to type and edit text) |
| Esc | Exit insert mode |
| :wq | Save the file and exit the editor |
To run Python scripts: python3 script.py
Example: python3 wiegand_test.py
To stop, CTRL C
Alpine Linux uses the apk package manager to install, update, and manage software packages.
Updates the package index so the system knows about the latest available software.
Example: apk update
Installs a software package.
Example: apk add git
Updates installed packages to the latest available versions.
Example: apk upgrade
Searches the repository for available packages.
Example: apk search pigpio