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 :)
The following structures are implemented (+ fields): * PhyPayload, MHDR, MType, Major * MIC * AES128 * MacPayload * DataPayload * EUI64 * DevNonce * JoinRequestPayload * JoinAcceptPayload * DevAddr * NwkAdr * FHDR * FCtrl * FRMPayload * FRMDataPayload * FRMMacCommands * MacCommand and creators for them * LinkCkeckReq * JoinRequestCreator * JoinAcceptCreator * DataPayloadCreator
MIC can be checked and FRMPayload and JoinAccept can be decrypted.
JoinRequest, JoinAccept and DataPayload packets can be constructed.
I plan to implement soon:
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 :)