Skip to content
Package lorawan provides structures and tools to read and write LoraWAN messages from and to a slice of bytes.
Go Makefile
Branch: master
Clone or download

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Move to CircleCI. May 23, 2019
airtime Implement LoRa airtime calc. functions. Feb 22, 2018
applayer multicastsetup: Fix McKeyEncrypted byte order. Mar 12, 2019
backend Add http.Handler interface providing a join-server API. Jan 3, 2019
band
gps Add helper functions to handle Time <> GPS Epoch time conversion. Feb 11, 2019
sensitivity Add functions for calculating sensitivity and link budget. Nov 15, 2019
.gitignore Initial commit. Nov 22, 2015
Dockerfile-devel Update README. Bump Go version. Nov 5, 2019
LICENSE Update documentation. Jan 3, 2019
Makefile Update Dockerfile. Jul 9, 2019
README.md Update README. Bump Go version. Nov 5, 2019
cid_string.go Update CIDs with stringer. Jan 29, 2019
devicemodeclass_string.go Implement missing DeviceModeConfPayload. Feb 19, 2019
doc.go Update documentation. Jan 3, 2019
docker-compose.yml Use Go modules for tracking dependencies. Mar 5, 2019
eirp.go Update EIRP comments. Jul 9, 2019
eirp_test.go Implement functions for EIRP <> index calculation. Jul 3, 2019
fhdr.go
fhdr_test.go Update NwkID bits for NetID type 3 and 4. Aug 14, 2019
go.mod
go.sum Update goconvey to support Go 1.12. Apr 2, 2019
jointype_string.go
mac_command_payload_test.go Remove coded EIRP to real EIRP from TXParamSetupReqPayload. Jul 9, 2019
mac_commands.go
mac_commands_test.go Remove coded EIRP to real EIRP from TXParamSetupReqPayload. Jul 9, 2019
macpayload.go Code simplifications. (#45) Sep 25, 2019
macpayload_test.go Implement LoRaWAN 1.1. Jun 27, 2018
major_string.go Implement class-b mac-commands + fields. Feb 22, 2018
mtype_string.go Implement LoRaWAN 1.1. Jun 27, 2018
netid.go Implement LoRaWAN 1.1. Jun 27, 2018
netid_test.go Implement LoRaWAN 1.1. Jun 27, 2018
payload.go Implement LoRaWAN 1.1. Jun 27, 2018
payload_test.go Implement LoRaWAN 1.1. Jun 27, 2018
phypayload.go Code simplifications. (#45) Sep 25, 2019
phypayload_test.go

README.md

LoRaWAN (Go)

CircleCI GoDoc

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
  • gps functions to handle Time <> GPS Epoch time conversion

Documentation

See https://godoc.org/github.com/brocaar/lorawan. There is also an 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.

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/).

You can’t perform that action at this time.