Closed htdvisser closed 2 months ago
So we can keep this simple and add a gateways: {true/false}
field to the index file for the frequency plans: https://github.com/TheThingsNetwork/lorawan-frequency-plans/blob/master/frequency-plans.yml. Clients can then use this to filter out plans.
We'd need to add a new boolean field to the FrequencyPlan
struct and a new function for the Store to return all frequency plans that are relevant for gateways.
Here is a list of frequency plans which (I think) are not relevant for gateways and hence should be have gateways: false
.
AS_923_925_TTN_AU
EU_863_870_TTN
Any others @johanstokking?
I'll check but basically all that configure stuff other than the frequencies (and data rate for LoRa service channel) that is not already defined in another plan.
So SF9 in RX2 is an example of that.
Also the 6 channel roaming draft can be filtered out. It doesn't hurt for gateways to listen on all 8 channels.
We'd need to add a new boolean field to the FrequencyPlan struct and a new function for the Store to return all frequency plans that are relevant for gateways.
@KrishnaIyer do we need to call this new function somewhere or how we want to use it?
@KrishnaIyer do we need to call this new function somewhere or how we want to use it?
Good point. The primary usecase would be the ListFrequencyPlans RPC. We can add this as an optional flag and filter out non-gateway related plans if the flag is set.
Would also be great if you can add a flag to the list-frequency-plans
commands for the gateway
command in the CLI. https://github.com/TheThingsNetwork/lorawan-stack/blob/v3.32/cmd/ttn-lw-cli/commands/gateways.go#L115
So we can keep this simple and add a
gateways: {true/false}
field to the index file for the frequency plans: https://github.com/TheThingsNetwork/lorawan-frequency-plans/blob/master/frequency-plans.yml. Clients can then use this to filter out plans.We'd need to add a new boolean field to the
FrequencyPlan
struct and a new function for the Store to return all frequency plans that are relevant for gateways.Here is a list of frequency plans which (I think) are not relevant for gateways and hence should be have
gateways: false
.
AS_923_925_TTN_AU
EU_863_870_TTN
Any others @johanstokking?
@KrishnaIyer I just reread again the description and if we want to add gateways: false
to the index file instead of each frequency file then I need to change the FrequencyPlanDescription
instead of FrequencyPlan
contrary as the description says above.
Can you please confirm that is the case?
Hmm I see indeed, I also overlooked this.
I've changed the implementation and now it uses the index file.
I've tested on staging1
and it works as expected.
Test steps:
staging1
environment.
go run ./cmd/ttn-lw-cli use tti.staging1.cloud.thethings.industries
Make sure that your cli has the --gateways-only
flag.
go run ./cmd/ttn-lw-cli gateways list-frequency-plans --help
go run ./cmd/ttn-lw-cli gateways list-frequency-plans | wc -l
Get the gateways' frequency plans but filter out the non gateway related plans. Count how many plans in the list. Should be less then the previous one.
go run ./cmd/ttn-lw-cli gateways list-frequency-plans --gateways-only | wc -l
EU_863_870_TTN
is not there.
go run ./cmd/ttn-lw-cli gateways list-frequency-plans --gateways-only
Thanks a lot. Good stuff 🚀
Summary
For each plan we should indicate whether it's applicable to end devices and/or gateway.
What is already there? What do you see now?
In the Console you can now select both the
EU_863_870
plan and theEU_863_870_TTN
plan when registering a gateway. For gateways, these plans are equivalent, but users don't know that, which makes it confusing.What is missing? What do you want to see?
We should only show relevant plans when registering gateways / end devices.
How do you propose to implement this?
We'd need to indicate in each frequency plan (or perhaps in the index) whether the plan applies to gateways, end devices or both.