7 releases (breaking)

new 0.12.1 May 16, 2024
0.12.0 Jan 20, 2024
0.11.0 Sep 25, 2023
0.10.0 Apr 25, 2023
0.7.1 Apr 26, 2022

#118 in Hardware support

Download history 2/week @ 2024-01-19 2/week @ 2024-02-16 27/week @ 2024-02-23 17/week @ 2024-03-01 1/week @ 2024-03-08 1/week @ 2024-03-15 31/week @ 2024-03-29 8/week @ 2024-04-05

496 downloads per month
Used in lora-phy

MIT license

345KB
7.5K SLoC

lorawan-device

Latest Version Docs

This is an experimental LoRaWAN device stack with both non-blocking (nb_device) and async (async_device) implementations. Both implementations have their respective radio::PhyRxTx traits that describe the radio interface required.

Note: The lorawan-radio feature in the lora-phy crate provides LorawanRadio as an async implementation of radio::PhyRxTx.

Both stacks share a dependency on the internal module, mac where LoRaWAN 1.0.x is approximately implemented:

  • Class A device behavior
  • Class C device behavior (async only)
  • Over-the-Air Activation (OTAA) and Activation by Personalization (ABP)
  • CFList is supported for fixed and dynamic channel plans
  • Regional support for AS923_1, AS923_2, AS923_3, AS923_4, AU915, EU868, EU433, IN865, US915 (note: regional power limits are not enforced (#168)

Currently, MAC commands are minimally mocked. For example, an ADRReq is responded with an ADRResp, but not much is actually done with the payload.

Furthermore, both async and non-blocking implementation do not implement any retries for failed joins or failed confirmed uplinks. It is up to the client to implement retry behavior; see the examples for more.

Please see examples for usage.

A public chat on LoRa/LoRaWAN topics using Rust is here.

Dependencies

~1.7–2.3MB
~46K SLoC