brainsteam.co.uk/brainsteam/content/posts/2024/10/19-meshtastic.md

3.9 KiB

title date draft description url type mp-syndicate-to tags
Flashing Heltec v3 nodes on Ubuntu 2024-10-19T13:12:27+01:00 false Some troubleshooting tips for successfully flashing Heltec v3 nodes on Ubuntu. /2024/10/19/flashing-heltec-meshtastic posts
https://brid.gy/publish/mastodon
meshtastic
ubuntu
linux
heltec

I recently purchased a Heltec v3 Radio after being inspired by Jan Wildeboer and in turn Andy Kirby to try out meshtastic, a LoRa mesh network that facilitates off-grid messaging over a mesh network. I purchased my radio from AliExpress and it took a couple of weeks to get here but it arrived this morning.

The first thing you need to do in order to connect it to the meshtastic network is flash the firmware onto the device. Meshtastic provide a very fancy web-based firmware flashing tool which uses standard browser APIS in Chromium to talk to your device over USB serial port in order to write the new firmware. The provided documentation is very good and provides links to USB drivers for windows and mac. As it happens, drivers for linux are typically already installed in modern distributions like Ubuntu but there may be a little bit of extra work involved in setting things up so that your machine can use them.

I ran through all of the following steps but the breakthrough was the final step - connecting Chrome's snap container to raw USB comms.

Ensure the Kernel Modules are loaded

The drivers you need are cp210x and usbserial. You can load them into the kernel (if they're not already loaded) by running:

sudo modprobe usbserial
sudo modprobe cp210x

This will ensure that your machine can talk to the device. If you run lsusb you should be able to see the CP210x drivers show up:

> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...
other stuff
...
Bus 001 Device 005: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
...
other stuff

Ensure Permissions are Correct

On a couple of forums I visited, it was suggested that users need to be in the dialout group in order to have read/write access to the USB serial port. You can set this by running:

sudo usermod -a -G dialout <yourusername>

You might need to reboot or log out of your desktop environment and log back in again to ensure that this new group permission propagates to all running applications.

Ensure snap Permissions are Correct

Modern Ubuntu distros typically ship Chrome and Chromium in snap packages rather than normal deb packages these days. Snap packages are isolated from the rest of the operating system in a kind of lightweight VM. By default these packages don't have permission to access USB devices on the machine so you need to add this by running:

sudo snap connect chromium:raw-usb

If you restart chrome/chromium you should see a bunch of additional USB devices in the selection box.

Which Device Do I Pick?

Assuming your Heltec board is plugged in, when the flasher tool pops up and asks for permission to talk to your device you want to select CP2102 USB to UART Bridge from the dropdown menu.

a screenshot of the device list as displayed in chrome

Flashing the device

Once you get this far you should be able to follow the meshtastic instructions and flash the device via the web tool.

What to do next

Once you're done flashing your device you can start connecting to the mesh network. Check out some of the other meshtastic resources over at the meshtastic website or Andy Kirby's youtube channel.