LoRa Mesh Radio

40,254

281

86

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:

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

Be the First to Share

    Recommendations

    • Battery Powered Contest

      Battery Powered Contest
    • Plywood Challenge

      Plywood Challenge
    • Plastic Contest

      Plastic Contest

    86 Discussions

    0
    lelikanroj
    lelikanroj

    Question 4 months ago

    Did you send message with rsa encryption? how

    0
    sqij
    sqij

    Answer 4 months ago

    no, it uses ECC 'Curve25519' encryption.

    0
    CommanderCrash
    CommanderCrash

    5 months 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.

    0
    sqij
    sqij

    Reply 5 months 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.

    0
    CommanderCrash
    CommanderCrash

    Reply 5 months ago

    Thank you. And Good work BTW

    0
    lzk2d2
    lzk2d2

    Question 6 months 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.

    0
    lzk2d2
    lzk2d2

    Answer 6 months 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!

    0
    TaufikH21
    TaufikH21

    7 months ago on Introduction

    Hey sqij a very great project, I'm very impressed, I want to ask how the form of this project series?

    0
    TaylorJ48
    TaylorJ48

    7 months 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?

    0
    sqij
    sqij

    Reply 7 months 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).

    0
    yatesr
    yatesr

    Question 9 months ago

    Dear Scott:
    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:

    0xe000 boot_app0.bin
    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!
    1
    yatesr
    yatesr

    Reply 8 months 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...

    0
    sqij
    sqij

    Reply 8 months 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
    guywire
    guywire

    1 year 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

    0
    glomicilina
    glomicilina

    Reply 9 months 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:

    espsuccess.JPG
    1
    yatesr
    yatesr

    Reply 9 months ago

    It may have been a result of not being able to post the command line instruction as per what you would see using cmd / Windows into the Instructables web page, it took me sometime to figure it out - suggest going to the Github page for the tool:
    https://github.com/espressif/esptool

    0
    glomicilina
    glomicilina

    Reply 9 months ago

    Hey! i'm having the same issue, did you resolve it?

    esperror.JPG
    1
    glomicilina
    glomicilina

    9 months ago

    Found a solution:
    The adafruit Feather M0 LoRa needs to be in "bootloader mode"
    you need to push 2 times the reset button in the board, the led will be in pulsing mode
    and the you can run the bossac line to write the firmware. :-D
    i've check this because my 2nd board write without problems so i suppose that the bootloader was in use or not available.
    -----------------------------------------------------------------
    Hi!
    I'm stuck and i need your help or just point me in the right direction :-/
    i'm on windows, so i will resume my steps:
    >>board: Feather M0 LoRa
    >download arduino IDE
    >use the adafruit github json to install the SAMD and Feather board into arduino ide manager
    (and also check if bossac its installed at the end of this process)
    >test the board with the led sketch (it works)
    >unplug and plug it back
    >download your github firmwares, extract it and paste it @ the bossac folder
    >COM11
    >so now from %appdata%\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3:
    run : bossac.exe -i -d --port=COM11 true -i -e -w -v Ripple-USB.Feather_m0.bin -R
    Set Binary mode
    Set auto-baud

    and get stuck here, the console don't do anything else.

    thanks in advance!