lorawan cleanup and optimizations:

- Remove all default loraconf default initialisation in lorawan examples (Region Settings takes care of this now)
- Remove retries while receiving JoinAccept and increase LoraRX to 10s (no need to wait more than 10s)
- Add constants for RegionSetting default frequencies
- Standardize all lora default configurations in lora examples
- Add new AT+LW=NET,(ON|OFF) command in atcmd example
This commit is contained in:
Olivier Fauchon
2023-01-30 16:50:24 +01:00
committed by deadprogram
parent 4e687b29c3
commit fa0cf6ec7f
16 changed files with 89 additions and 102 deletions
+11
View File
@@ -39,3 +39,14 @@ Builds/flashes atcmd console application on Lora-E5 using onboard SX126x.
tinygo flash -target lorae5 ./examples/lora/lorawan/atcmd/
```
## Joining a Public Lorawan Network
```
AT+ID=DevEui,0101010101010101
AT+ID=AppEui,0123012301230213
AT+KEY=APPKEY,AEAEAEAEAEAEAEAAEAEAEAEAEAEAAEAE
AT+LW=NET,ON
AT+JOIN
```
AT+LW=NET,(ON|OFF) command changes Lora Sync Word to connect on public network(ON) or private networks(OFF)
+13
View File
@@ -337,6 +337,19 @@ func delay(setting string) error {
func lw(setting string) error {
cmd := "LW"
param, val, hasComma := strings.Cut(setting, ",")
if hasComma {
if param == "NET" {
if val == "ON" {
lorawan.SetPublicNetwork(true)
println("SET PUBLIC NET")
} else {
lorawan.SetPublicNetwork(false)
println("SET PRIVATE NET")
}
}
}
writeCommandOutput(cmd, setting)
return nil