I've had a go at adapting my existing Ripple LoRa mesh project to come up with a standalone messenger device which doesn't need a companion Android device.
This device can be used either with other standalone messenger devices, or with Ripple mesh devices which use the Ripple Messenger app. They are interoperable, and they automatically form their own mesh network, with end-to-end ECC encryption. And, of course, they all can utilise dedicated repeater radios for better range/reliability.Getting started
You will need a micro SD memory card, which will hold your ID, settings, contacts and saved conversations. You have to prepare the SD card with a configuration file, which you typically only need to do just once.
Amongst the people you want to form a network with, you need to confer and assign unique ID's for each person, in the range of 1 to 254. There is no central server, no internet, so this is up to you to allocate.
On a computer, insert the SD card, and create a folder called 'ripple'. In that directory, create a plain text file called 'conf.txt' (Unix format, Not MS-DOS!) This file should end up looking like this:
The lines can be in any order, but the first 2 characters are the property name (eg. 'ID' is your ID) followed by the value, terminated with a newline.
The properties are:
- GR - Group ID (can just leave as 0)
- ID - Your unique ID (1..254)
- FQ - LoRa frequency to use
- SF - LoRa spreading factor to use (10..12)
- NM - Your display name (others see this)
- TZ - Your timezone in minutes ahead of GMT. (optional)
NOTE: everyone in your group must use the same GR, SF, and FQ values!!
Once you have configured your SD card, just insert into the right-side slot, and power up the device.
The 4-way direction keys are used to navigate. Up/Down to select a contact, Right to select. (Left or ESC is used to go back to previous screen).
To add another user, ie. a contact, you need to enter the special '-Exchange-' room. For this chat room, you need to agree on a 4-digit passcode with the other(s), type that in, then press ENTER.
Here you select the top item '-My Details-' and press ENTER to broadcast your ID, name, and public encryption key to everyone else in the room. When others do this, you will see their ID, name appear in the list. Use Up/Down keys to select, then Right or ENTER key to ADD that user to your contacts (saved to your SD card).
You can do this at any time, to add or update users to your contacts list.
From the main screen, use Up/Down keys to select a contact, then Right to enter the conversation screen.
Just use the keyboard to type in messages you wish to send, then press ENTER key. The text will flash on/off while the send is in progress. If successful, the message scrolls up into the conversation, otherwise if it failed to be delivered it will stop flashing and stay below the horizontal line.
The screen automatically turns off after 15 seconds if no keys are pressed. If a new message arrives, the screen turns on showing a full screen preview of the message and sender name, with the green LED flashing, and buzzer beeps.
From here, you can press Left key to go back to home screen, or Right key to enter the conversation screen.EDIT: New Post Office feature
The Ripple family now has a new member-- dedicated repeaters with the Post Office feature! These nodes are ideal for mounting somewhere at a high elevation, and can provide enormous range. Now, they can also hold virtual 'mailboxes' for users, storing queued messages, and forwarding once you turn your device back on, or get back in range.
I will possibly do a whole new article on this, but for now am working on documenting this on the github wiki:Wiring
Below is a wiring diagram for your reference. It is fairly simple, just involving two I2C slave modules (RTC clock, and keyboard), and a piezo buzzer.
The V2 (with Blackberry keyboard) is almost the same wiring, just the 4 wires to the keyboard go to control module pins:
If, like me, your eyesight is not so great and you find it hard to read the tiny 0.96" OLED display, you can now wire up an external OLED like this one:
Luckily, these modules can be configured to use one of two I2C addresses, so that it doesn't conflict with the built-in I2C OLED module. The built-in uses address 0x3C, so you need to configure this one to use 0x3D, which you do by pulling the 'DC' pin high (using a 10K resistor to the VCC pin).
I've also released a new binary for flashing, which is configured to use the 0x3D address. (see next section)
The only tricky part of using these modules is removing the tiny 'R4' zero Ohm resistor, which is basically a jumper that configures the module to operate in SPI mode. We need to use the I2C mode, and to use this you need to remove the 'R4', and jumper the 'R3' and 'R5' pads. See below for a wiring guide:
Flashing the firmware
The firmware will be at the Ripple github page: https://github.com/spleenware/ripple
NOTE: remove the micro SD card before attempting to flash firmware! For some reason this interferes with the USB serial.
There are instructions on the site on how to flash the firmware onto the TTGO ERSP32 board. If you are using the Blackberry keyboard, you need to flash the 'RippleQwerty-TTGOV2-BB.bin' firmware. Otherwise, if you are using the larger keyboard, you need to flash the 'RippleQwerty-TTGOV2.bin' firmware.
New: if you are using the Blackberry keyboard + the external OLED, you need to flash the 'RippleQwerty-TTGOV2-BB-3D.bin' firmware.Setting the clock
To seed the RTC module, you need to create a special file on the SD card with your computer. In the 'ripple' folder, create a plain text file called 'clock.txt' (Unix format, Not MS-DOS). Edit the file and add the following date values on separate lines, in this order:
Save the file, eject the SD card, then slide it into the device. You will need to reboot the device for it to take effect. The RTC clock should now be set, and the home screen should be showing the correct time.Printing the case
See the attachments section of this article for the STL file for 3D printing the case.
The RTC module, buzzer and LiPo battery just go underneath the TTGO module, at the 'fat' end of the case. The keyboard should fit snugly into the bottom part, and a bit of hot glue will keep it in place.
The TTGO board is kept in place with 2x M2 bolts into the two supports. (unscrew the antenna first, to get into place).EDIT: New Design
I'm working in a new design, and modified firmware, for this cool little keyboard module lifted from an old Blackberry:
OK, here is the final design:
This one feels so much better, is much more compact and pocketable. The STL files are now attached, and the new firmware BIN file is on github.Donate
If you find this project useful and feel like throwing some Bitcoin my way, I'd be really grateful:
My BTC address: 1CspaTKKXZynVUviXQPrppGm45nBaAygmSFeedback
When SHTF happens, or the zombie apocalypse hits, or the asteroid, or whatever, and you need to chat with your family and friends, I hope this gadget comes in handy! :-)
Feel free to leave comments and ask me whatever questions you may have.