Using cheap wireless modules to chat over long distances using AX25 and XMPP in the unlicenced ISM band.
Raspberry Pi - Arduino - LoRa - AX25 - XMPP - OTR
This is a work in progress project to create a cheap, long range chat device for private, decentralized communication. This project is completely open source and contributions are very welcome!
How It Works:
User connects to a Raspberry Pi hotspot that hosts an XMPP chat server that you can connect to using almost any XMPP client. Users can then send data over long distances without the use of telephone networks or the internet via cheap RF modules.
I recently discovered the fantastic Arduino-Kiss software by Folkert van Heusden (Github user: flok99) Arduino-kiss allows for an Arduino and HopeRF module to be used as a KISS TNC
The AX25 protocol allows us to do so many things like Addressing, routing and we can even use TCP/IP.
This software uses the Radiohead Packet Library so any compatible wireless tranceiver should work (with a little bit of modification)
Although the Performance limitations of the Arduino ATMega328P limit what we can do, we still have enough processing power to send short encrypted messages using software by John Goerzen (GitHub: jgoerzen) called ax25xmpp that lets us send messages using any XMPP client, you can even use OTR encryption.
An Arduino with ATMega328P only has 2048 bytes of RAM and the Arduino-KISS software allocates 3 * maxPacketSize. so for LoRa devices that is 762 bytes of ram which means some better hardware should improve the performance, I'm currently waiting on a few Moteino Megas and Arduino Dues to see if I can get it running fast enough for a BBS or viewing web pages.
Example BBS:
I also have a few Maple Mini clones that are supposedly compatible with the RadioHead Packet Library that Arduino-KISS uses but I havent been able to get it working, if you know anything about Radiohead+Maple Mini please get in touch! Getting the Maple Mini working with this would make it so much cheaper than the other options, Maple Mini clones on AliExpress are extremely cheap and powerful, they use a STM32 F103RCBT6 32-bit ARM Cortex M3 microprocessor with 120 KB Flash and 20 KB SRAM!
Range: People have claimed huge distances with LoRa modules, some say in the dozens of Kilometers others say over 100 Kilometers (High Altitude Balloons) I'll report back as soon as I've done my own range tests.
My Tests:
8.35km Test. No dropped packets and a very good signal strength, I think it can go much further that this but it was getting late and I had to return home. Next test I'll try go closer to 20km.
Hardware:
-Raspberry Pi (any model)
-Inair9b Module or HopeRF RFM95
-Arduino UNO (awaiting testing on something more powerful
-USB Wifi adapter that supports Hotspot
-Wires to connect module to Arduino / Pi
-alternatively, instead of using the wifi adapter you could use an esp8266, Bluetooth module, UART or any other method you prefer
Current prototype software:
Arduino-KISS by Folkert van Heusden (flok99)
ax25xmpp by John Goerzen (jgoerzen)
-hostapd to set up an access point on the Raspberry Pi
-isc-dhcp-server for serving DHCP to Wifi hotspot
-Prosody XMPP Server
-Xabber XMPP for Android / Pidgin XMPP for Windows/Linux (if you know a good client for iOS or any other platform let me know!
Hopeful future features:
-Fully working BBS
-Send GPS coordinates and view on offline Open Street Map, measure distance etc
-Codec2/FreeDV voice chat
https://github.com/freedv/codec2
-Narrow Band Television Video chat
https://en.wikipedia.org/wiki/Narrow-bandwidth_television
https://www.youtube.com/watch?v=1ShYefsbnAE
-send small files, maybe create a simple web page based Image/Sound/whatever converter
-Encrytion for every feature
-TCP/IP
Inspirations:
Toorcon 14 badge hacked into RF chat system in 2 days!
Toorchat github
Toorchat Hak5 demo with YARD stick one device
GoTenna device, similar idea to what I want but uses the Multi Use Radio System (MURS) and is expensive.
Installation Instructions:
https://github.com/dmahony/Lora-Chat-Device/wiki/Installation-Instructions
For the Hardware:
EASIEST/ PREMADE: Moteino with built in RFM95
OR MAKE YOUR OWN: Inair9b (sx1276) or HopeRF RFM95 connected to Arduino via SPI
I'll eventually release a Raspberry Pi prebuilt image to make it easier for those not comfortable with Linux!
Contact
If anyone would like to contribute or ask any questions please don't hesitate to contact me on [email protected]
Possible Github repos to use
pySX127x
RadioHead Packet Library
Toorchat
Lora-net
PiInTheSky Lora-gateway
LoRaFABIAN
TheThingsNetwork
Other Information
Introducing LoRa™, by manuka
SX1276/7/8 Datasheet
InAir9b product page
RadioHead Packet Radio library for embedded microprocessors
DecodingLora; using RTL-SDR/software radio to decode LoRa