Meshtastic <--> Secure Scuttlebutt

Any interesting idea. There was a talk a long time a go on integrating various forms of compression for the text part of the payload, possibilities for optimizing location updates, etc.

@LoRaLiker Did you get RAK3172 hardware ? If so what software library are you going to use with it?

For low power applications this module looks very attractive if there is easy software solution.

Thanks.

I ordered 10 with IPEX and 10 without on June 10th, but they still havenā€™t arrived yet. I reached out to RAK yesterday and they said theyā€™d ship it out, so cross my fingers hopefully they arrive soon.

I have done a lot of work with the RAK4270 in the last couple weeks at my day job. Iā€™ve gotten sleep down to 4uA, and rx duty cycled every 1s down to 70uA average! I think it was SF10, BW125. You have to be awake for a minimum number of preamble symbols, so lower data-rate settings will consume more power. It also means the TX has to send a 1s preamble, but for infrequent use cases, it saves a ton of energy on the RX side.

I justed used the code from semtecā€™s GitHub. You just have to implement a couple HAL functions. I used STM32cubeide and Cubemx, so it was pretty easy. Semtecā€™s code doesnā€™t come with an example application, just low level drivers, so youā€™ll have to write your own. Honestly the SX1262 is surprisingly simple compared to some other devices with complicated register and command sets.

When my new modules arrive, Iā€™ll probably just modify my existing code. Cubemx can actually do code generation for the STM32WL devices, but I think they overcomplicate it and it has a number of dependencies, like timers. For custom P2P applications I think itā€™s overkill, but might be necessary if you are planning on doing LoRaWAN.

If you decide to use a RAK4270 or RAK3172 and run into any troubles, let me know and Iā€™ll see if I can help.

1 Like

@LoRaLiker Thank you for your quick but detailed response. I will be following your experiments with it. I am only interested in P2P applications.

Itā€™s been a busy summer but I am finally back to working on LoRa again. My RAK3172 modules showed up after a month of waiting, but unfortunately they were all with IPEX and none without. RAK shipped me the correct modules, and was kind enough to let me keep the ones with IPEX connectors that were sent in error.

I decided to actually use the STM32cubemx generated code base. Itā€™s not terrible to work through, but it is probably more difficult than implementing it yourself depending on what youā€™re doing.

Iā€™ve been happy with the RAK3172, outside of RAK not posting internal schematics for the module and then finding out it doesnā€™t contain a txco despite previous documentation indicating it does. Apparently the chip shortage lead to them making the decision to swap out the txco for a regular crystal oscillator last minute without updating the documentation. The poor/incorrect documentation was disappointing, but I will say RAK wireless does seem to have good support on their community forum and they are quick to answer any questions. The RAK3172 might not be the best device for Meshtastic in itā€™s current form since it doesnā€™t have bluetooth, but I hope that in the future Meshtastic adds support for lower power IOT devices without bluetooth. Bluetooth is great for the final steps of interfacing with the user, but you really only need one BLE->LoRa bridge, putting BLE on each IOT device seems unnecessary.

I was able to get the power consumption of my demo board down to 3uA sleeping and around 75uA for RX duty cycled receiving. I believe the duty cycle specs were 1 RX period every second for SF10 BW125khz, but I would have to double check my notes. The minimum RX period is at least 8 symbol periods plus 1ms for oscillators to stabilize, so higher spread factors and lower bandwidth settings increase the power consumption by increasing the required length of the RX period.

I am going to finish implementing my custom Motion Sensor ā†’ Alarm project. At that point Iā€™d like to look into adapting it to implement a system closer to SSB where each device has a append only feed and surrounding devices sync and propagate that feed. Although latency might be slightly higher, it should in effect essentially be mesh networking with flood routing and store then forward functionality.

3 Likes

Looking forward to your future experiments.
Thanks.

1 Like

First working prototype

A couple of months ago, with andrestaltzā€™s and @sachawā€™s help, Iā€™ve managed to modify the still experimental meshtastic-api to run a pub/bot which publishes #meshtastic messages to SSB :tada: Hereā€™s the repo.

Still very very crude, but functional. Really excited about the possibilities for this, such as:

  • using a community-server running the pub to store messages
  • not needing a Bluetooth connection between phone and radio
  • using Manyverse to communicate over LoRa
  • exchange LoRa messages thru the Internet by having the pub connected to a ssb room

Next steps would be to reduce message sizes as much as possible, split them up, and send them over LoRa in a way that we can add them to the SSB db so that the author themselves appear as publishers. But thereā€™s still a long way to go to get there.

6 Likes

Nice job @luandro. I did not know about Manyverse but it looks promising.

Thank you for sharing.

2 Likes

This is awesome! Great work @luandro! Iā€™m looking forward to this.

1 Like

Nice one @luandro! I wasnā€™t sure this was possible.

Do you think it would run on the Mango Pi? Or does it need more resources than that?

I doubt it @sam_uk. Since itā€™s running on NodeJS, I think 64 of ram wonā€™t be enough. In the future ideally we should run SSB on Rust, which would make things much more efficient.

1 Like

Excuse stupid question

Is the SBC connected via USB to some ESP32 Meshtastic node?

Or is Meshtastic running under linux on the SBC with a LoRa hat?

The setup Iā€™ve been using has been to have both SBC and LoRa node connected to a common WiFi network.

Iā€™m not sure MeshtasticJSā€™s serial API is fully implemented, is it @sachaw?

In the future a LoRa USB dongle might be ideal.

1 Like

@luandro At some point when you get some free time can you do easy to understand step by step howto process to setup Secure Scuttlebutt and Manyverse ?

Thanks.

@happytm Itā€™s definately on my plans. As soon as I have some time Iā€™ll start working on it.

5 Likes

@luandro Thank you very much.

Looking at some Open hardware to run this.

Maybe Zero - Radxa Wiki

With GitHub - reganhimself/LoRa-Hab-Hat: Raspberry Pi Zero LoRa Hab Hat with break out pins

Also interested if this might work over Reticulum

Iā€™d like to test this out with a Pi Zero 2 W to see if itā€™s enough to run it smoothly. But havenā€™t gotten my hands in one yet.

here we await regulatory wifi clearance also to get Pi Zero 2 Wā€¦