TheThingsNetwork / lorawan-frequency-plans

LoRaWAN Frequency Plans for The Things Stack
https://www.thethingsnetwork.org
Apache License 2.0
40 stars 28 forks source link

Indicate whether plan is applicable to gateways / end devices #41

Closed htdvisser closed 2 months ago

htdvisser commented 2 years ago

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 the EU_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.

NicolasMrad commented 2 years ago

https://github.com/TheThingsNetwork/lorawan-frequency-plans/issues/38

KrishnaIyer commented 3 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.

Any others @johanstokking?

johanstokking commented 3 months ago

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.

halimi commented 3 months ago

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 commented 3 months ago

@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

halimi commented 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?

@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?

KrishnaIyer commented 2 months ago

Hmm I see indeed, I also overlooked this.

halimi commented 2 months ago

I've changed the implementation and now it uses the index file.

halimi commented 2 months ago

I've tested on staging1 and it works as expected.

Test steps:

KrishnaIyer commented 2 months ago

Thanks a lot. Good stuff 🚀