Close

​Day 2 - Wired & Wireless

A project log for Low Power LoRaWAN Gateway

Low power, low cost, low parts and low channel count USB talking LoRaWAN gateway (without concentrator) for OpenWRT routers and pals

morphmorph 02/02/2023 at 18:290 Comments

So I rolled up my sleeves and:

Next I will probably write a simple packet decoder for the stm32, I could also dump every hot potato raw payload to the router, but thinking ahead some message format/protocol would be in order. There will be downlink messages after all. Who knows, the LoRaWAN packet does carry most of the necessary information anyway. Traditionally the communication is JSON, but I've been meaning to play around with alternative options like MessagePack and Protobuf. One thing to consider is the target single channel gateway mcu families, we would value a low footprint in the memory department.

Eventually I will measure power draw. The Wio-E5 STM32WLE5JC Module draws 6.7mA in receive with mcu (active?) as per the manufacturer. The STM32WLE5JC datasheet does show similar figures when all the peripherals are switched off. Lowering the clock speed will drop that value as will sleep modes. It would be interesting to see if the SoC transceiver can wake up the MCU from deep sleep with a receive interrupt. Much to discover, and to get tangled up in, been there done that - looking at you Mbed OS...

One the router side I currently feel like I want to pass the potato to the cloud as fast as possible with minimal effort. I might start with the traditional Semtech UDP forwarder method, it works. The traffic will probably land in my Chirpstack instance. However, yet again there is a chance to experiment, it would be nice to try MQTT message queuing/buffering when the connection to the external LoRaWAN network server is down. Someday I would like to write my own LoRa protocol for mesh networks and at least some infrastructure could be built now.

Link to repo coming soon.

Discussions