In the article “How To Mesh The World” we described how gateways to traditional centralized networks can expand the usefulness of local mesh networks. An Internet gateway, for example, can connect users on mesh networks in different parts of the world. Broadcast data from a satellite or digital radio receiver can also be relayed by a gateway to mobile off-grid users connected via a local mesh network.
In this article we describe a do-it-yourself mesh gateway device that allows local off-grid mesh network users to exchange text messages with people on a traditional mobile phone network. This device can be used to give local mesh networks global connectivity and extend traditional networks into off-grid locations or disaster areas. Built with low-cost off-the-shelf parts, this gateway device can be run by people in their homes or rapidly deployed to where it is needed. Because a single-board computer has low power requirements this project could also be combined with an enclosure, battery and solar charger for off-grid placement.
Our mesh gateway project uses a small board computer with both GSM and mesh radios that runs a Python script to bridge these two networks. Users on the mesh network use a simple Android messaging app to exchange SMS messages with anyone on the GSM mobile network through the gateway device or with other mesh users connected via the local mesh network.
This project was first proposed in a post in early 2019 and the software was updated in early 2020 with the addition of a reference hardware implementation by Tourmaline Wireless. The python script that runs on the gateway is derived from the example script provided by goTenna with their public SDK. The Android messaging app used to communicate over the mesh network through the gateway is a fork of the Signal App that adds support for mesh communication by adding code from the sample Android Mesh app. Our fork only uses the user interface aspects of the Signal App and for simplicity — not it’s encrypted messaging functionality. This allowed us to quickly test a prototype messaging app with our gateway. We are also working on a simple stand-alone open-source mesh messaging app using what we learned from working with the Signal app. We would also be happy to help anyone that wants to integrate mesh gateway functionality into an existing open-source messaging app.
How it works
- Install and run the GML Mesh App with a goTenna Mesh radio attached (instructions)
- Install a Mesh Gateway device with a GSM modem and goTenna Mesh radio attached (instructions)
Mesh to SMS Messaging
- Select a phone contact using the GML Mesh App on your mobile device.
- Compose a message and select to send it using the goTenna Mesh radio to a Mesh Gateway device.
- The Mesh Gateway will receive the message and forward it to the SMS contact via the GSM network.
- The SMS recipient will receive the message as an SMS message from the Mesh Gateway.
- The SMS recipient can reply to the message using any SMS messaging app.
- When the Mesh Gateway receives an SMS message, it looks up the mesh ID of the device that last sent an SMS to the phone number of the incoming SMS.
- If a corresponding mesh sender is found, the gateway forwards the reply to the corresponding mesh device.
- If no corresponding mesh sender is found, the gateway broadcasts the message to mesh devices near the gateway.
- Mesh users receive SMS messages sent as direct replies and broadcasts via the GML Mesh App.
- Messages are sent over the goTenna network to the nearest Mesh Gateway device.
- SMS messages relayed from the Mesh Gateway to a specific recipient can hop over multiple goTenna Mesh radios operating between the gateway and the mobile device user.
- SMS messages broadcast from the Mesh Gateway that are not replies to a specific recipient are not relayed over multiple hops.
The Mesh Gateway script also posts the user provided position and radio range of a gateway device to a web-based map and performs periodic updates so the map can show where and when a gateway is available.
Pink pins with a cloud indicate active mesh gateway devices.
We are currently testing functionality to support arbitrary socket communication via a SOCKS5 proxy integrated into our upcoming Lot49 app. This will allow low-bandwidth applications with support for communicating via a socket proxy like Tor to operate off-grid via a mesh gateway.
To build towards our goal of incentivizing mesh gateway and relay devices we are working with the Bitcoin Development Kit team to create a reference implementation of a low-bandwidth Bitcoin wallet that can operate off-grid via our mesh socket proxy system.
Ultimately our Lot49 app will send incentivized messages between mesh devices using the Bitcoin Lightning protocol. This work involves adding the LND Daemon service wrapper developed by the Blixt Wallet team.
If you are interested in building your own mesh gateway, or wish to follow our progress extending this project, please follow our hackaday.io project page and/or subscribe for updates via the Global Mesh Labs web page.