mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
examples: lorawan atcmd outputs needed info after Join to reuse, aka 'OTAA provisioning'
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -289,6 +289,8 @@ func mode(setting string) error {
|
||||
}
|
||||
|
||||
func join(setting string) error {
|
||||
// TODO: check that DevEUI, AppEUI, and AppKey have values
|
||||
|
||||
cmd := "JOIN"
|
||||
writeCommandOutput(cmd, "Starting")
|
||||
if err := lorawan.Join(otaa, session); err != nil {
|
||||
@@ -298,7 +300,12 @@ func join(setting string) error {
|
||||
}
|
||||
|
||||
writeCommandOutput(cmd, "Network joined")
|
||||
// TODO: display NetID and DevAddr
|
||||
writeCommandOutput(cmd, "DevEui, "+otaa.GetDevEUI())
|
||||
writeCommandOutput(cmd, "AppEui, "+otaa.GetAppEUI())
|
||||
writeCommandOutput(cmd, "DevAddr, "+session.GetDevAddr())
|
||||
writeCommandOutput(cmd, "NetID, "+otaa.GetNetID())
|
||||
writeCommandOutput(cmd, "NwkSKey, "+session.GetNwkSKey())
|
||||
writeCommandOutput(cmd, "AppSKey, "+session.GetAppSKey())
|
||||
writeCommandOutput(cmd, "Done")
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user