https://github.com/brocaar/lorawan
Package lorawan provides structures and tools to read and write LoraWAN messages from and to a slice of bytes.
https://github.com/brocaar/lorawan
lora-server
Last synced: about 1 year ago
JSON representation
Package lorawan provides structures and tools to read and write LoraWAN messages from and to a slice of bytes.
- Host: GitHub
- URL: https://github.com/brocaar/lorawan
- Owner: brocaar
- License: mit
- Created: 2015-11-22T11:08:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T14:11:40.000Z (about 2 years ago)
- Last Synced: 2025-05-14T04:29:43.551Z (about 1 year ago)
- Topics: lora-server
- Language: Go
- Homepage:
- Size: 494 KB
- Stars: 308
- Watchers: 39
- Forks: 158
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LoRaWAN (Go)

[](https://godoc.org/github.com/brocaar/lorawan)
Package lorawan provides structures and tools to read and write LoRaWAN
1.0 and 1.1 frames from and to a slice of bytes.
The following structures are implemented (+ fields):
```
PHYPayload (MHDR | MACPayload | MIC)
MACPayload (FHDR | FPort | FRMPayload)
FHDR (DevAddr | FCtrl | FCnt | FOpts)
```
The Following message types (MType) are implemented:
* JoinRequest
* RejoinRequest
* JoinAccept
* UnconfirmedDataUp
* UnconfirmedDataDown
* ConfirmedDataUp
* ConfirmedDataDown
* Proprietary
The following MAC commands (and their optional payloads) are implemented:
* ResetInd
* ResetConf
* LinkCheckReq
* LinkCheckAns
* LinkADRReq
* LinkADRAns
* DutyCycleReq
* DutyCycleAns
* RXParamSetupReq
* RXParamSetupAns
* DevStatusReq
* DevStatusAns
* NewChannelReq
* NewChannelAns
* RXTimingSetupReq
* RXTimingSetupAns
* TXParamSetupReq
* TXParamSetupAns
* DLChannelReq
* DLChannelAns
* RekeyInd
* RekeyConf
* ADRParamSetupReq
* ADRParamSetupAns
* DeviceTimeReq
* DeviceTimeAns
* ForceRejoinReq
* RejoinParamSetupReq
* RejoinParamSetupAns
* PingSlotInfoReq
* PingSlotInfoAns
* PingSlotChannelReq
* PingSlotChannelAns
* BeaconFreqReq
* BeaconFreqAns
* DeviceModeInd
* DeviceModeConf
* Proprietary commands (0x80 - 0xFF) can be registered with RegisterProprietaryMACCommand
## Sub-packages
* `airtime` functions for calculating TX time-on-air
* `band` ISM band configuration from the LoRaWAN Regional Parameters specification
* `backend` Structs matching the LoRaWAN Backend Interface specification object
* `backend/joinserver` LoRaWAN Backend Interface join-server interface implementation (`http.Handler`)
* `applayer/clocksync` Application Layer Clock Synchronization over LoRaWAN
* `applayer/multicastsetup` Application Layer Remote Multicast Setup over LoRaWAN
* `applayer/fragmentation` Fragmented Data Block Transport over LoRaWAN
* `applayer/firmwaremanagement` Firmware Management Protocol over LoRaWAN
* `gps` functions to handle Time <> GPS Epoch time conversion
## Documentation
See https://godoc.org/github.com/brocaar/lorawan. There is also an [examples](https://godoc.org/github.com/brocaar/lorawan#pkg-examples)
section with usage examples. When using this package, knowledge about the LoRaWAN specification is needed.
You can download the LoRaWAN specification here: https://lora-alliance.org/lorawan-for-developers
## Support
For questions, feedback or support, please refer to the ChirpStack Community Forum:
[https://forum.chirpstack.io](https://forum.chirpstack.io/).
## License
This package is distributed under the MIT license which can be found in ``LICENSE``.
LoRaWAN is a trademark of the LoRa Alliance Inc. (https://www.lora-alliance.org/).