It’s only temporary…. unless it works!
I’ve been interested in Meshtastic for a while now. Meshtastic uses low power LoRa devices which are license free to build a distributed RF mesh communications network. I have several of these devices however the area where I live is not well served with meshtastic nodes. So it’s time to fix that with some infrastructure.
Here is the idea – I live between Southampton and Portsmouth. Both of these areas have a good mesh network. The initial aim is to link in with one or the other networks to provide a ‘route out’ from my location into a wider mesh. The longer term goal is to link the two in order to provide distributed communication along a larger area of the South Coast.
Looking at the geography and available nodes a good strategy is to try to establish a link with high ground overlooking Portsmouth. Above Portsmouth sits Portsdown Hill. There are nodes installed on the hill that then provide service into Portsmouth and along the South Coast. Previous experiments show that co-ax loss is a big issue with the low power mesh devices. Therefore this is a key design consideration. Another key consideration is that in order to reach Portsdown Hill the node (or at least the antenna) needs to be elevated to overcome buildings and terrain along the way.
The solution:
I decided to install two heltec radio modules in an enclosure on top of a radio mast. By installing them at the top of the mast I reduce the coax required from around 10m to around 10cm! The challenges are powering them, extracting the data and controlling the nodes. To solve this I also installed a Raspberry Pi Zero with a POE/USB hat in the enclosure. The USB powers the heltec radio and provides a control link for software upgrades/configuration changes etc. The whole setup is powered by an Ethernet link to a power over Ethernet switch in my garage.

In order to use the mesh network the radios need to communicate with an application – this can be a PC application or a phone application (or both). I mainly use the android app. This is achieved using the Heltecs inbuilt WiFi module to connect the devices to the network. Using VPN these can then be accessed worldwide. Because my home WiFi doesn’t reliably cover a point 10 above my garage I created a WiFi hotspot in the Raspberry Pi.
The biggest challenge was creating the WiFi access point in the Raspberry Pi and the associated routing for the network. Here’s the code (yes I know there’s a password in there – it’s not the real password!):
Create the access point: sudo nmcli con add con-name mesh-hotspot ifname wlan0 type wifi ssid lhrn mode ap wifi.band bg ipv4.method shared sudo nmcli con modify mesh-hotspot wifi-sec.key-mgmt wpa-psk sudo nmcli con modify mesh-hotspot wifi-sec.psk "raspberry" Hide the SSID - optional step I just did this for a little security sudo nmcli con modfiy mesh-hotspot wifi.hidden yes Enable WPA2 - I found without this the Heltecs would not connect. sudo nmcli con modify mesh-hotspot 802-11-wireless-security.proto rsn Then using VI I edited this file: sudo vi /etc/NetworkManager/system-connections/mesh-hotspot.nmconnection Added this line under [ipv4] to set the subnet for the hotspot. address1=192.168.125.1/24,192.168.125.1 The using VI I uncomment ipv4.forwarding from /etc/sysctl.conf That enables forwarding IP packets between the ethernet and wifi ports. I found the only way to reliably bring up the hospot was using crontab - so I added this line to my crontab using crontab -e @reboot nmcli con up mesh-hotspot Then install python and pip sudo apt-get install pip -y sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED Install esptool for flashing the heltecs over serial pip install --upgrade esptool --user Enable the serial drivers sudo modprobe cp210x And then install the Meshtastic CLI pip install --upgrade pytap2 pip install meshtastic --user
The physical build is only intended to be temporary (unless it works). I fitted everything into an old Tupperware container. I one node is connected to a directional antenna which is aimed at Portsdown Hill to link into the wider mesh. The other node is connected to an omnidirectional antenna to provide local coverage.


One response to “Meshtastic Infrastructure”
[…] I have two Meshtastic nodes mounted on top of a mast as infrastructure to contribute to the mesh. You can read about the solution here. […]