LoRa Mesh Radio
LoRa Mesh Radio
LoRa Mesh Radio
by sqij
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 lo t of hardware options, and I am still trying di erent devices and manufacturers, but for now this tutorial
will show how to assemble and setup one of the following boards:
Supplies:
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 ash the board with the appropriate rmware image (there are three di erent rmware binaries for
each connection type).
St e ps :
ash the board with the Ripple rmware 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
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.
St e ps :
ash the board with the Ripple rmware: 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. antenna connector to underside, connect antenna to u.
Optional: 3D print the case. See here for the les: https://www.thingiverse.com/thing:3879020
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 o , 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 o the end of the cable, then separate the very ne 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).
You can also (optionally) organise into sub-groups by For Bluetooth LE you shouldn't need to pair. Just
assigning yourselves with di erent Group-IDs (again, make sure you select 'Ripple Service' in the 'Choose
between 1 and 254). By default you can all just stay in Device' screen.
group zero. The groups are like 'channels', and will
form separate mesh networks. Co nv e rs a t io ns
Adding Frie nds From the main screen you just tap on the friend you
want to chat with, which transitions to the
Once you have entered your own details in the Setup conversation screen (as pictured above). The action
screen and selected SAVE, you can then be added as a bar will show their name, and to the right is a signal
Friend to other user's handsets by scanning each indicator which will show whether that user's device is
other's QR codes. This exchanges public keys so you currently reachable, and how strong the nearest
can send messages to each other privately. Other signal is.
devices in your group will silently relay your messages,
but cannot 'open' them up. Just type messages, or tap on the 'pin' icon to the left
of the text box to send your current location.
Co nne ct ing Ra dio
When other users send their location you will see it
The radio board can be connected to the underlined, and with a calculation of how far away
tablet/handset either via USB OTG cable, or via they are and at roughly which compass heading. You
Bluetooth. You must set your preference for this by can tap on the link to see the location on Google
selecting the 'Preferences' menu from the top action Maps.
bar. There is an icon on the top action bar which will
go solid white when it has detected your radio board
Enjoy!
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.
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.
Thank you. And Good work BTW
Hey sqij a very great project, I'm very impressed, I want to ask how the form of this project series?
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
thanks in advance!
Hello! I am trying to flash my LoRA TTGOv2 for BLE using windows. I have installed all requisite
things so I can upload sketches from the Arduino application. I downloaded the ".bin"s, plugged in
the board via USB, and from the command line, I entered (from the readme file, but with the paths
changed for windows)
Hello Scott, and thank you for your help. I replaced the "--port \dev\cu.SLAB_USBtoUART" with "--
port COM3", and I was able to upload something to the LoRa boards using your help. This was the
output:
--
esptool.py v2.1
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 7281.7 kbit/s)...
Hash of data verified.
Compressed 12304 bytes to 8126...
Wrote 12304 bytes (8126 compressed) at 0x00001000 in 0.1 seconds (effective 984.3 kbit/s)...
Hash of data verified.
Compressed 1011824 bytes to 568476...
Wrote 1011824 bytes (568476 compressed) at 0x00010000 in 12.5 seconds (effective 650.1
kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 1755.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting...
--
Looks good to me, however, there seem to be a few issues that I can't figure out still.
First of all, there is nothing displayed on the OLED screen. This is not normal, right?
I was able to connect to a bluetooth device, but on the Ripple App, the bluetooth symbol does not
We wold love to test this but we need a way to write this bin file on the boards from Windows.
Best greetings,
Dave
Hi Dave,
Yes, those Heltec boards should be fine. I'll get back to you on instructions for Windows. I probably
should update the readme for Windows users, so I'll try to get that out within the day.
Also, I have just published a follow up article which I'm hoping is of interest to you (for SAR):
https://www.hackster.io/scottpowell69/lora-tracker-pager-device-36bdb3
Dear Sqij,
that is a very nice project.
But we prefer having the phone/tablet manage the gps and the messages (also for end to end
crypt).
Therefore we will like more to use the first poject.
I will be glad also to send you some pictures, when we are using them, so that you can upload
them in your profile as case study reference.
P.S. (not sure, i didn't understand, if the heltec esp32 v2 can work in mesh or just point to point)
best greetings,
Hi Dave,
That's fine, whichever you think will be most useful. Yes, the Esp32 will work in a mesh, not just
point to point.
I have dug up an old Windows laptop and installed Arduino on it. Have started to try to replicate the
install/flashing of the firmware. Hopefully by tomorrow I can get some WIndows-specific
instructions up on github.
Finnaly i got the bin uploaded using the Flash Download Tools 3.6.7_1 here the link
shorturl.at/ekoEU with files inside (it may help)
The screenshot shows how setting to upload in Heltec esp32 v2
But it loks like the bluethoot icon in the Ripple app doesn't activate (see image 1)
And the "Advanced" frequency doesn't apply if I write 868 or 915
When i try to text (after adding other phone with qrcode) it says "unable to send message"
I can't see a debug mode so i don't know what the issue can be ( i suppose blouthoot)
Dave
1) I tested the new firmware but after uploading it, is not showing anymore BT on android device
scannings so i rolled back to previous firmware-
3) There is a sort of tilt "status" in BT we are unable to understand. The Heltec start blinking every
0.5, stil receives messages on oled, but doen't send.
Secondo status BT (it shows bright but not connected) . And it gets stuk till i reset.
Do you know what i is?
4) Tryied to send a longer packet. 50 words text, but it sasy "unable to send message". And then
LoRa Mesh Radio: Page 10
stacks as at point 3) Is that due the board, code or app limitation?
Hi Dave,
That's encouraging, that you have 'some' success. The BT Classic firmware is a bit old now. It
probably doesn't have support for the custom radio frequency, for instance. I'll try to rebuild the
Heltec V2 firmware for BT Classic, in case that helps. (Classic does chew through the battery, by
the way) I'm pretty sure the BLE firmware build is quite recent (for Heltec V2). I'll double check, and
rebuild if not. In the app, none of the messaging will work until the handset can establish the serial
link with the device, which the bluetooth icon in the top actionbar shows. There are three states:
grayed out means no connection, solid white means 'connecting', and solid white with a
'transmitting' look (has round arcs next to the bluetooth icon) means connected and handshake
successful.
CORRECTION
Dave
That sounds great!
Thank you for supporting us
This looks like a Great Leap Forward in LoRa communications. There are quite a few good starts
out there, but none seem to have developed. Very keen to make this work.
I've edited the install script and get a good-looking write into the Heltec white board
https://heltec.org/project/wifi-lora-32/
Can you check whether the icon on the titlebar is the 'connected' one? Looks like the Bluetooth
icon with an arc next to it. Also, the icon to the far right on the toolbar should be showing at least
one bar (uses the WiFi icon) to indicate the other node is reachable/online.
Hi, thanks for getting back to me on this.
No, both the left-hand 'Bluetooth-like' icon, and the right-hand WiFi-like 'fan' seen 'in' the entry for
the other unit are both faded, on both machines (Samsung A20 & Nexus 7), and any combination
of the 4 boards that I have your Ripple-USB.ttgo-heltech.bin on.
Should I be able to communicate with the boards via serial terminal? I saw that you had posted the
commands somewhere recently, but didn't notice anything about protocol, baud rate, etc?
Do you know if anyone has it working for these boards?
I'll see if I can dig up a schematic for these things and check the connex as you gave for
ConsinusJ yesterday.
Thanks
Greg
Probably the first thing to try to verify is if the USB serial interface is working. Open up the Serial
Monitor in Arduino IDE, select 9600 baud, just Newline option, then type in 'i0,0' (without the single
quotes) and press ENTER.
There should be a response starting with "I:"
Scott,
Yes, sending 'i0,0' now gets response 'I:126,1' from the Heltec_V2 with your new firmware, thanks!
LoRa Mesh Radio: Page 11
No similar response from the TTGO boards. Should I try the earlier builds?
Also, the 'bluetooth-like' icon is now defined, and '0.3v' appears beside it. No joy on the 'WiFi-like'
icon, so the other boards aren't cooperating yet.
So maybe I'll just have to wait until the other hardware arrives - unless you're inclined to compile
for them too;)
(I can send what details I have on them, but these things seem to have poorly-documented 'micro-
versions'. Is there a sketch that I can put into them that will get a definitive response about what
they actually are?)
Hello,
does your firmware be compatible with the ESP32 T-BEAM board ?
Europeans will love a 868mhz bluetooth version :D
Many thanks ,
Juan
Yes, it should be fine with that board. Use this V2 firmware, and the latest Messenger app, and you
can set the LoRa frequency in preferences: https://github.com/spleenware/ripple#repeater-or-
messenger---ttgoheltech-boards---433-to-915mhz-configurable--usb-otg-only
Any chance we could get a 868Mhz version? I have a lot of these TTGO LoRa32 boards, but they
are all 868 :/
Also, make sure you check your antennas on the TTGO boards, they are notorious for sending
really crap antennas or putting the same antenna for multiple frequencies.. Might account for the
range issue, but it might just be that it doesn't have a PA.
Sure, I'll try to get an 868MHz build out soon. Yeah, the TTGO stock antennas are rubbish! I put
some nice dipoles on, and got over 4km range.
Thanks for share this project.
I can't download android app, I tested with several phones, I get the following error:
Your device is not compatible with this item.
Can you share APK file directly?
Installing via an APK file directly would give the same error. Your device must be incompaitlbe, eg.
doesn't support USB host mode,.
Thanks, but my device is "Huawei Nova Plus 2" and support OTG !
Try downloading the "USB OTG Helper" app from Play, and see what it says about your device
and the OTG support. I know that 'actual' OTG support varies wildly, and is unfortunately
something that is hard to get definitive data on.
good prject!
.. possible to have all the code?
Hello,
My name is Jonathan Torres, I've reed your garage project and I find it fascinating. I would like to
talk to you about the project and ask some questions. Please tell me if you have time for a little
chat on the matter.
Thanks,
Jonathan Torres Rosario