You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+82-12Lines changed: 82 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,28 +133,41 @@ sudo hwclock --show --utc # should match date -u within ~1 second
133
133
134
134
### Internet connectivity (WiFi first, LTE fallback)
135
135
136
-
InfluxDB uploads require internet at boot. The Pi prefers any saved WiFi profile and falls back to the Quectel EG25-G LTE modem when no known network is in range.
136
+
The Pi is configured to automatically manage both WiFi and LTE connections natively using NetworkManager, preferring WiFi when available.
137
137
138
-
Install the connectivity service:
138
+
Since the LTE modem runs in ECM (Ethernet Control Model) mode, it presents itself as a standard Ethernet card (`usb0`). To prevent `ModemManager` from conflicting with the interface or locking the serial ports (which are used by the GPS and status scripts), `ModemManager` is disabled and masked.
139
+
140
+
To install the LTE and WiFi network failover configuration:
Saved WiFi profiles (`nmcli connection show`) are tried automatically. LTE uses APN `fast.t-mobile.com` (Tello/T-Mobile) and can be overridden in `/etc/default/network-connect`.
152
+
# 3. Mask and stop ModemManager (prevents interface hijacking & serial locks)
153
+
sudo systemctl mask ModemManager
154
+
sudo systemctl stop ModemManager ||true
155
+
156
+
# 4. Modify connection metrics in NetworkManager
157
+
# This configures WiFi to have priority (metric 100) and LTE to be the fallback (metric 600)
We have a GitHub Actions pipeline configured in `.github/workflows/build-image.yml` that automatically builds a pre-configured Raspberry Pi OS Lite image and publishes it in the **Releases** tab of your repository.
197
+
198
+
This image comes out-of-the-box with all packages installed, user accounts configured, CAN interfaces prepared, and LTE failover configurations deployed.
199
+
200
+
### Configuring Secrets
201
+
Before running the builder, go to **Settings > Secrets and variables > Actions** in your GitHub repository and add:
202
+
-**`PI_USERNAME`** (Optional): Custom username for the OS (defaults to `sunpi`).
203
+
-**`PI_PASSWORD`** (Optional): Custom password for the OS (defaults to `sunpi`).
204
+
205
+
### Triggering the Build
206
+
1. Go to the **Actions** tab of your repository.
207
+
2. Select the **Build Custom Raspberry Pi Image** workflow.
208
+
3. Click **Run workflow** and select the branch you wish to build.
209
+
4. If building for a release, publishing a new Release on GitHub will automatically trigger the build and attach the `.img.xz` file to the release page.
210
+
211
+
<details>
212
+
<summary><b>🚨 microSD Card Recovery Guide (Click to Expand)</b></summary>
213
+
214
+
In case your Raspberry Pi's microSD card becomes corrupted or fails, follow these steps to restore the system to a clean, pre-configured state:
215
+
216
+
#### 1. Download the Custom OS Image
217
+
* Go to the **Releases** tab of the `can-telem-cloud` repository on GitHub.
218
+
* Locate the latest release from the `main` branch.
219
+
* Download the compressed custom image asset: `driverio-custom-raspios-lite.img.xz`.
220
+
221
+
#### 2. Flash the Image
222
+
* Insert a new/blank microSD card into your laptop.
223
+
* Open the **Raspberry Pi Imager** software (or BalenaEtcher).
224
+
* For **Operating System**, select **Use Custom** and choose the downloaded `driverio-custom-raspios-lite.img.xz` file.
225
+
* For **Storage**, select your microSD card.
226
+
* Click **Write** and wait for the flashing and verification to complete.
227
+
228
+
#### 3. Boot the Pi
229
+
* Remove the microSD card from your laptop and insert it into the Raspberry Pi.
230
+
* Connect the CAN hat, LTE modem, and serial radio if they are not already connected.
231
+
* Power on the Raspberry Pi. The initial boot may take an extra minute as the OS automatically expands the filesystem.
232
+
233
+
#### 4. Log In
234
+
* Connect a monitor and keyboard, or log in via serial console.
235
+
* Log in using the default user credentials mentioned in our **Confluence docs**.
236
+
**Note: If a custom username/password was set in your GitHub secrets during the image build, use those custom credentials instead.*
237
+
238
+
#### 5. Authenticate Tailscale (Required)
239
+
Since Tailscale requires unique hardware node keys, you must manually authenticate the new OS install into your Tailnet:
240
+
* Run the Tailscale login command:
241
+
```bash
242
+
sudo tailscale up
243
+
```
244
+
* Copy the login URL printed in the terminal, open it in your browser, and authenticate using your team's Gmail/Tailscale account.
245
+
* Once logged in, the Pi will join your Tailnet, and you can now SSH into it remotely (`ssh <username>@driverio`)!
0 commit comments