So I rolled up my sleeves and:
- Picked up the Wio-E5 mini and wrote a simple Mbed OS LoRaWAN traffic sniffer using the LoRa radio driver api.
- Reinstalled OpenWRT on my Spitz (GL-X750V2) along with everything needed for my family to get back online and the needed USB kernel modules.
- Plugged the E5 to the only USB port on the router and to my pleasant surprise I could see some debug messages indicating that the 'gateway' is indeed receiving LoRaWAN join request packages.
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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.