mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-13 19:33:39 +00:00
lora/lorawan: set functions for keys
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -83,6 +83,16 @@ func (o *Otaa) GetNetID() string {
|
||||
return hex.EncodeToString(o.NetID[:])
|
||||
}
|
||||
|
||||
func (o *Otaa) SetNetID(netID []uint8) error {
|
||||
if len(netID) != 3 {
|
||||
return ErrInvalidNetIDLength
|
||||
}
|
||||
|
||||
copy(o.NetID[:], netID)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GenerateJoinRequest Generates a LoraWAN Join request
|
||||
func (o *Otaa) GenerateJoinRequest() ([]uint8, error) {
|
||||
// TODO: Add checks
|
||||
|
||||
Reference in New Issue
Block a user