LoRa Chat

Posted on
  • While waiting for some Heltec LoRa 32 (ESP32-S3FN8) modules to arrive, I dug up two 6 year old E32-TTL-100 LoRa modules I had lying around. In the same pile I found a couple of 11 year old Espruino boards from the Kickstarter and some breadboards. And so, a fun weekend project began.

    The result is a LoRa chat in only 100 lines total, half of which run on Espruino and the other half on Node.js. The Node part is a modified REPL that functions as a minimalistic terminal chat. It uses Espruino Tools to communicate with the Espruino board, which sends and receives messages over LoRa.

    I threw in end-to-end encryption, which is really just scrambled Base64 encoding (don't tell anyone). BTN sends a "ping", and the green LED2 lights up when there are messages you haven't replied to (keeps the chat going).

    It works surprisingly well! We chatted between two houses that are about 100m apart without any issues. I haven't tested the range, but that's all I needed.

    The hardest part was getting the Node part to work. I'm using Node's own REPL module, which is possible, but it was not made for chat apps. Getting it to work as I had intended was frustrating, but the reward was a nice terminal chat interface in very little code.

    https://github.com/joakim/espruino-lora-chat

  • That looks really cool - thanks for posting it up!

    I should really have a bit more of a play with LoRa - recently someone brought up the HC-14 LoRa modules which look pretty cool (https://wolles-elektronikkiste.de/en/hc-14-the-simple-lora-module) - they're extremely affordable!

  • Thanks! LoRa is a lot of fun. The HC-14 looks nice, the range test actually lived up to the manufacturer's claim! Not bad for that price :)

  • When searching for the HC-14, I found that HC-15 was released a few months ago. It turns out to be based on the STM32WLE5, which is interesting. It's the same SoC as Seed Studio's Wio-E5 and some RAK modules.

    I had the Chinese datasheet translated, and the functionality appears to be the same as HC-14.

  • (double-post)

  • Very cool, that's interesting - thanks for that!

    Interestingly it feels like the STM32WLE5 could happily run Espruino itself (the one on that module seems to have 256k flash + 64k RAM) so assuming it's not too painful to implement a LoRa stack the HC-15 itself could make quite an interesting board in its own right!

  • Yes, could be the "Espruino LoRa" and take its place on the shop storefront.

  • I noticed that too! I just wasn't sure if there would be space for Espruino with a LoRa stack. It would be a fun little Espruino board for remote sensors and such.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

LoRa Chat

Posted by Avatar for Joakim @Joakim

Actions