Introduction: LoRa Mesh Radio
This is a fairly simple add-on for mobile phones to enable SMS-like messaging in a group when outside cell coverage, or in disaster scenarios. It utilises Semtech LoRa radios, for low-power/long-range communications. There are a lot of hardware options, and I am still trying different devices and manufacturers, but for now this tutorial will show how to assemble and setup one of the following boards:
- TTGO ESP32 Lora with OLED
- Adafruit Feather M0 RFM96
Supplies
The hardware can be purchased here:
Optional items, but recommended are:
- small on/off switch
- Piezo buzzer
- small 1S Lipo battery
- USB OTG cable
Step 1: TTGO ESP32 Setup
This board is quite nice in that it includes a nice OLED screen and Bluetooth radio. Unfortunately, the LoRa radio is not as good as the Feather, and only seems to get about half the range.
With this board you can choose whether to connect to handset via UDB OTG cable, Bluetooth Classic or Bluetooth LE. You simply flash the board with the appropriate firmware image (there are three different firmware binaries for each connection type).
Steps:
- flash the board with the Ripple firmware image: Follow ReadMe on GitHub
- wire up battery and switch
- wire up the piezo buzzer: TTGO V2 -> to GND and Pin 13, other boards -> to GND and Pin 25
- optional: 3D print the case
I have also designed a 3D-printable case for this, which you can download from here: https://www.thingiverse.com/thing:3865750
Step 2: Adafruit Feather Setup
These boards are nice quality, but a bit more expensive. There is a bit more involved with these, as you need to do some more soldering to install a LoRa antenna.
Steps:
- flash the board with the Ripple firmware: Follow ReadMe on GitHub
- wire up the piezo buzzer to GND and digital pin 11 . (EDIT: NOT pin 13 as previously stated)
- solder a u.fl antenna connector to underside, connect antenna to u.fl
- Optional: 3D print the case. See here for the files: https://www.thingiverse.com/thing:3879020
(Optional) Soldering the Dipole Antenna
The 3D printable case is designed for use with this dipole antenna: https://www.banggood.com/T-Type-900MHz-Long-Range-Receiver-Antenna-IPEX-4-for-FrSky-R9-Mini-R9-MM-p-1361029.html
It's a good antenna, but doesn't have the right connector, so you need to cut IPEX4 one off, then separate the coax braids and solder to the antenna ground pads (see end pic above). To do this, you need to strip about 10mm of the outer plastic off the end of the cable, then separate the very fine surrounding coax wire mesh then put some solder onto this. Then remove about 1mm of the plastic from the inner active wire and put a small amount of solder on this.
Next, pre-tin the antenna ground pads on the Feather, and the active antenna pad in the middle, then solder the antenna to these pads (separated coax to ground pads, active inner wire to antenna pad).
Step 3: Setup the Ripple Messenger App
The companion app for this is called Ripple Messenger. Currently there is only an Android version, which you can download from the Play store: Ripple Messenger
Each person in your group must be allocated a unique numerical ID, between 1 and 254. You need to sort this out among yourselves. There's no central server for coordinating.
You can also (optionally) organise into sub-groups by assigning yourselves with different Group-IDs (again, between 1 and 254). By default you can all just stay in group zero. The groups are like 'channels', and will form separate mesh networks.
Adding Friends
Once you have entered your own details in the Setup screen and selected SAVE, you can then be added as a Friend to other user's handsets by scanning each other's QR codes. This exchanges public keys so you can send messages to each other privately. Other devices in your group will silently relay your messages, but cannot 'open' them up.
Connecting Radio
The radio board can be connected to the tablet/handset either via USB OTG cable, or via Bluetooth. You must set your preference for this by selecting the 'Preferences' menu from the top action bar. There is an icon on the top action bar which will go solid white when it has detected your radio board is connected.
For Bluetooth Classic, you need to make sure bluetooth is on and you need to Pair your handset/tablet with the board manually. Go to Bluetooth setting, and select scan/refresh and tap on 'Ripple Device' when it comes up. Go back to the Ripple app then tap the 'Choose Device' button and select 'Ripple Device' from the list.
For Bluetooth LE you shouldn't need to pair. Just make sure you select 'Ripple Service' in the 'Choose Device' screen.
Conversations
From the main screen you just tap on the friend you want to chat with, which transitions to the conversation screen (as pictured above). The action bar will show their name, and to the right is a signal indicator which will show whether that user's device is currently reachable, and how strong the nearest signal is.
Just type messages, or tap on the 'pin' icon to the left of the text box to send your current location.
When other users send their location you will see it underlined, and with a calculation of how far away they are and at roughly which compass heading. You can tap on the link to see the location on Google Maps.
Step 4: Feedback
This is just something I have done as a hobby, and because I enjoy this kind of work. It has been an interesting challenge, and is ongoing.
I'm still looking for better radio modules and hardware combinations, along with 3D printing designs to make it more like a consumer device.
There are likely still a number of bugs to iron out. Let me know if this has worked for you, or if you encounter problems. The feedback is very welcome.
Enjoy!
regards,
Scott Powell.
Donate
If you find this project useful and feel like throwing some Bitcoin my way, I'd be really grateful: My BTC address: 1CspaTKKXZynVUviXQPrppGm45nBaAygmS
1 Person Made This Project!
- tomr5005 made it!
89 Comments
Question 2 years ago
Hi, I'm an electronic engineering final year student. my final year project's aim is to develop a device that can communicate with other node without any cellular network or coverage based on Lora or Lora- WAN technology. my doubt is, can we create a mesh network without any cellular network or coverage or wifi network based on Lora? please help me!
Answer 12 months ago
Check out Meshtastic: https://meshtastic.org/
1 year ago on Step 4
Discovered that if you try to scan a contact's QR code and their phone is using 'dark' or 'night mode' (in the system settings) then Black and White are inverted and the QR is not recognized. switching to 'light' or 'Day' mode fixes it.
Hope that helps someone.
Question 2 years ago
Did you send message with rsa encryption? how
Answer 2 years ago
no, it uses ECC 'Curve25519' encryption.
2 years ago
Hello. BTW Grate Project I enjoy using this across all my smartphones. I do Have a question. Im trying to add a pizo buzzer to this to let me know I have a message. However When connecting pin 25 and GND the buzzer is always on. Is this supposed to be always on? Idk how to correct this because the sorce code is not available to view. Or is their something in the ripple app that can alert me if I recive a new message. Thanks for your time.
Reply 2 years ago
Hi,
If you are using the V2 TTGO LoRa board, then you need to attach buzzer to pin 13. For the older boards, and the Heltech ones, is still pin 25. Sorry for the confusion.
Reply 2 years ago
Thank you. And Good work BTW
Question 2 years ago
Hello sqij! I followed your project with lora radios and honor 7s phones. I was able to flash lora radios, connect to lora radios via bluetooth, configure and scan the chat "friends" on both phones, but once I write a message, I get "could not send the message". Both icons showing signal are faded. What could be a problem, since I am not using the usb otg cable at the moment? I also use at the moment standard antenas, that arived with the lora radios. Could you please help me? Thank you.
Answer 2 years ago
Hello sqij! I figure it out. I tried all of the images and this one works for me:
TTGO/Heltech V1 boards: Messenger - 433 to 915MHz (configurable), (Bluetooth LE)
I'll try OTG later, wenn I replace the phones with the USB-C and OTG support. Thanks you!
2 years ago on Introduction
Hey sqij a very great project, I'm very impressed, I want to ask how the form of this project series?
2 years ago
I want to make sure i understand the way this project works,
A board like the Feather with LoRa radio integrated is connect to a phone via bluetooth or cable and the combination of the phones "Ripple application" and the LoRa radio gives a means to send a measage with the users GPS coordinates when cell service is not available?
Who is the message going to, does it reach anyone in my phone contact that is in range of the radio, or do i need to contact people through the "Ripple" app and they must also have a LoRa radio of some sorts listening on the same frequency?
Reply 2 years ago
Yes, it's like a private network, where each user has their own handset and LoRa radio module. The Ripple app has its own 'contacts' list. You just scan other user's details from the app on their handset, to get their id and public key (for encryption).
Question 3 years ago
I've obtained the LILYGO TTGO board as you spec'd from Banggood and figured out your command incantations, just wanted to confirm the following address locations to flash to:
0x1000 bootloader_dio_80m.bin
0x10000 Ripple-Bluetooth.TTGOV2.bin
0x8000 Ripple-Bluetooth.TTGOV2.partitions.bin
Actually, I only want to use an USB cable to connect this to my smartphone so was unsure whether to use this based on previous comments or to use the Ripple-GeoPager .bin files instead.
Eitherway, unfortunately, it didn't appear to work. To verify the board functionality, I tried using the tutorial mentioned on this page : https://randomnerdtutorials.com/ttgo-lora32-sx1276-arduino-ide/
And the board is working with the OLED display transmitting packets...
Can you specify exactly which libraries to include in Arduino IDE to support your sketch?
Additionally, if one wanted to use USB only, which of your .bin file configurations would you recommend?
Probably asking a lot but it would be nice if you could release the sketch so people could confirm they were loading the right libraries, etc.
As well, I had to change your .stl case slightly to fit my LiPo battery in Fusion 360, so it's a little bigger then yours but no big deal.
It's a cool project and I'm looking forward to testing it out, any advice regarding the a/n would be greatly appreciated!
Answer 3 years ago
OK, I have prepared a new build for TTGO V2 board, for USB-OTG. Download latest files in the repo, and see here on how to flash : https://github.com/spleenware/ripple/blob/master/README.md#repeater-or-messenger---433-to-915mhz-configurable--usb-otg-only-5
Reply 3 years ago
I'm pleased to report that I was successful in getting both of my test boards up and going and was able to send and receive messages via Ripple. It appeared that my boards were Version 1 TTGO and they don't seem to like USB-OTG so I use your binaries for Bluetooth LE and both boards worked with BT connectivity as well as displaying the messages on the OLED display. Thanks again for the assistance, next step is to try out the range of the devices...
Reply 3 years ago
AH, great to hear! It's been really difficult to cover the various board types/versions and then the three connection methods (USB, BLE, BT). Seem to be so many quirks between them all :-(
3 years ago
Can you explain more about where to put the bin files and how to flash the firmware? I have the board working in arduino ide (TTGO LoRa32-OLED v1) and can upload scripts, but there seems to be more prerequisites than specified. Looking at your command lines I gathered you need to have esptools and espressif arduino-esp32 (which is not required for arduino ide to support this board) and followed the instructions here https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/windows.md.
But I still can't get past the first command line as I'm getting this error:
esptool write_flash: error: argument : Must be pairs of an address and the binary filename to write there
Reply 3 years ago
You can put the bin files wherever you like on your local machine. When you open the command line (Terminal on OSX, or Command on Windows) make sure you change to this directory first. See this article on how to add Esp32 support to Arduino: https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/
Reply 3 years ago
Hey dude, i just upload an example to the board and saw that it's not a 3 steps line in the github instructions. ITS JUST ONE LINE!!!!!!!!! check: