LoRaWAN
Package lorawan provides structures and tools to read and write LoRaWAN messages from and to a slice of bytes.
NOTE: This is a toy-project that I undertake in order to learn more about Rust. Currrently it is far from stable or finished. Use at your own risk :)
Already present
The following structures are implemented (+ fields):
- PhyPayload, MHDR, MType, Major
- MIC
- AES128
- MacPayload
- DataPayload
- EUI64
- DevNonce
- JoinRequestPayload
- JoinAcceptPayload (partial)
- DevAddr
- NwkAdr
- FHDR
- FCtrl
- FRMPayload
- FRMDataPayload
- FRMMacCommands
- MacCommand
- LinkCkeckReq
MIC can be checked and FRMPayload can be decrypted.
Next steps
I plan to implement soon:
- Finish with JoinAcceptPayload.
- Finish with the mac commands.
- Add more tests.
- Add packet creation functions.
Used code and inspiration
I would like to thank the projects lorawan by brocaar for the inspiration and useful examples, rust-crypto by DaGenix for the AES implentation and the form of rust-crypto by a-dma that helped me with the implementation of cmac :)