Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
htdvisser opened this issue Nov 29, 2021 · 10 comments · May be fixed by #62
Closed

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

htdvisser opened this issue Nov 29, 2021 · 10 comments · May be fixed by #62
Assignees
Milestone

Comments

@htdvisser
Copy link
Contributor

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.

@github-actions github-actions bot added the needs/triage We still need to triage this label Nov 29, 2021
@NicolasMrad NicolasMrad removed the needs/triage We still need to triage this label Nov 30, 2021
@NicolasMrad
Copy link

#38

@adriansmares adriansmares self-assigned this Jan 29, 2022
@adriansmares adriansmares added this to the 2022 Q1 milestone Jan 29, 2022
@NicolasMrad NicolasMrad modified the milestones: 2022 Q1, 2022 Q2 Mar 29, 2022
@NicolasMrad NicolasMrad modified the milestones: 2022 Q2, 2022 Q3 Jun 23, 2022
@NicolasMrad NicolasMrad modified the milestones: 2022 Q3, 2022 Q4 Oct 10, 2022
@adriansmares adriansmares assigned ysmilda and unassigned adriansmares Nov 29, 2022
@ysmilda ysmilda mentioned this issue Dec 9, 2022
4 tasks
@NicolasMrad NicolasMrad modified the milestones: 2022 Q4, 2023 Q1 Jan 2, 2023
@NicolasMrad NicolasMrad assigned adriansmares and unassigned ysmilda Apr 12, 2023
@NicolasMrad NicolasMrad modified the milestones: 2023 Q1, 2023 Q2 Apr 12, 2023
@KrishnaIyer KrishnaIyer modified the milestones: 2023 Q2, Backlog Oct 1, 2023
@KrishnaIyer KrishnaIyer assigned halimi and unassigned adriansmares Jul 31, 2024
@KrishnaIyer KrishnaIyer modified the milestones: Backlog, Aug 2024, v3.32.0 Aug 1, 2024
@KrishnaIyer
Copy link
Member

KrishnaIyer commented Aug 1, 2024

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?

@johanstokking
Copy link
Member

johanstokking commented Aug 1, 2024

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
Copy link
Contributor

halimi commented Aug 13, 2024

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
Copy link
Member

KrishnaIyer commented Aug 28, 2024

@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

@KrishnaIyer KrishnaIyer modified the milestones: v3.32.0, v3.32.1 Aug 29, 2024
@halimi
Copy link
Contributor

halimi commented Aug 30, 2024

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
Copy link
Member

Hmm I see indeed, I also overlooked this.

@halimi
Copy link
Contributor

halimi commented Sep 4, 2024

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

@halimi
Copy link
Contributor

halimi commented Sep 12, 2024

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

Test steps:

  • Make sure that your cli is using the 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
  • Get the gateways' frequency plans and count how many plans are there.
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
  • Get the list again with the filter and check that the EU_863_870_TTN is not there.
go run ./cmd/ttn-lw-cli gateways list-frequency-plans --gateways-only

@KrishnaIyer
Copy link
Member

Thanks a lot. Good stuff 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants