lorawan-stack icon indicating copy to clipboard operation
lorawan-stack copied to clipboard

Support dynamic class B ping slot frequency

Open johanstokking opened this issue 4 years ago • 3 comments

Summary

Support dynamic class B ping slot frequency.

References https://github.com/TheThingsNetwork/lorawan-devices/pull/38#discussion_r555044700

Steps to Reproduce

Onboard a device with, for example, band CN470 that supports class B.

What do you see now?

There's no fixed ping slot frequency, which is a required value by NS. It is not possible to specify empty;

{
  "code": 3,
  "message": "error:pkg/networkserver:field_mask (invalid field mask)",
  "details": [
    {
      "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
      "namespace": "pkg/networkserver",
      "name": "field_mask",
      "message_format": "invalid field mask",
      "correlation_id": "2b2b2538c031439d899f8793d604b3f8",
      "cause": {
        "namespace": "pkg/ttnpb",
        "name": "missing_field",
        "message_format": "field `{field}` is missing",
        "attributes": {
          "field": "mac_settings.ping_slot_frequency.value"
        },
        "code": 2
      },
      "code": 3
    }
  ]
}

What do you want to see instead?

This should be dynamic and depending on the band.

How do you propose to implement this?

Support dynamic ping slot frequency as defined in LoRaWAN Regional Parameters based on the band; CN470, US915 and AU915 seem to be affected.

How do you propose to test this?

Test creating devices.

Can you do this yourself and submit a Pull Request?

Can review

johanstokking avatar Jan 20 '21 17:01 johanstokking

Indeed, didn't see this in the spec before. We'll have to do some refactoring to allow for this.

Also, how would this work for ABP? I suppose we will still have to force mac_settings.ping_slot_frequency.value to be set for those devices

rvolosatovs avatar Jan 20 '21 19:01 rvolosatovs

Also, how would this work for ABP? I suppose we will still have to force mac_settings.ping_slot_frequency.value to be set for those devices

I guess so, yes.

johanstokking avatar Jan 21 '21 08:01 johanstokking

I just came across what I believe to might be the same or similar issue. I am in US915 and when I enable class B for my device and configure beacon and ping slot frequency to 923.3 MHz manually, I get the following error:

Screen Shot 2022-04-04 at 01 42 13

Is there any way to enable class B in US915 with TTN v3.18.2?

janakj avatar Apr 04 '22 05:04 janakj