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

Add RP2-1.0.4 support #6482

Merged
merged 8 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions api/ttn/lorawan/v3/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
- [Message `BandDescription.Channel`](#ttn.lorawan.v3.BandDescription.Channel)
- [Message `BandDescription.DataRatesEntry`](#ttn.lorawan.v3.BandDescription.DataRatesEntry)
- [Message `BandDescription.DwellTime`](#ttn.lorawan.v3.BandDescription.DwellTime)
- [Message `BandDescription.RelayParameters`](#ttn.lorawan.v3.BandDescription.RelayParameters)
- [Message `BandDescription.RelayParameters.RelayWORChannel`](#ttn.lorawan.v3.BandDescription.RelayParameters.RelayWORChannel)
- [Message `BandDescription.Rx2Parameters`](#ttn.lorawan.v3.BandDescription.Rx2Parameters)
- [Message `BandDescription.SubBandParameters`](#ttn.lorawan.v3.BandDescription.SubBandParameters)
- [Message `FrequencyPlanDescription`](#ttn.lorawan.v3.FrequencyPlanDescription)
Expand Down Expand Up @@ -2466,6 +2468,7 @@ PeerInfo
| `default_max_eirp` | [`float`](#float) | | |
| `default_rx2_parameters` | [`BandDescription.Rx2Parameters`](#ttn.lorawan.v3.BandDescription.Rx2Parameters) | | |
| `boot_dwell_time` | [`BandDescription.DwellTime`](#ttn.lorawan.v3.BandDescription.DwellTime) | | |
| `relay` | [`BandDescription.RelayParameters`](#ttn.lorawan.v3.BandDescription.RelayParameters) | | |

### <a name="ttn.lorawan.v3.BandDescription.BandDataRate">Message `BandDescription.BandDataRate`</a>

Expand Down Expand Up @@ -2503,6 +2506,20 @@ PeerInfo
| `uplinks` | [`google.protobuf.BoolValue`](#google.protobuf.BoolValue) | | |
| `downlinks` | [`google.protobuf.BoolValue`](#google.protobuf.BoolValue) | | |

### <a name="ttn.lorawan.v3.BandDescription.RelayParameters">Message `BandDescription.RelayParameters`</a>

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `wor_channels` | [`BandDescription.RelayParameters.RelayWORChannel`](#ttn.lorawan.v3.BandDescription.RelayParameters.RelayWORChannel) | repeated | |

### <a name="ttn.lorawan.v3.BandDescription.RelayParameters.RelayWORChannel">Message `BandDescription.RelayParameters.RelayWORChannel`</a>

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `frequency` | [`uint64`](#uint64) | | |
| `ack_frequency` | [`uint64`](#uint64) | | |
| `data_rate_index` | [`DataRateIndex`](#ttn.lorawan.v3.DataRateIndex) | | |

### <a name="ttn.lorawan.v3.BandDescription.Rx2Parameters">Message `BandDescription.Rx2Parameters`</a>

| Field | Type | Label | Description |
Expand Down Expand Up @@ -7078,6 +7095,7 @@ Transmission settings for downlink.
| `RP002_V1_0_1` | 9 | |
| `RP002_V1_0_2` | 10 | |
| `RP002_V1_0_3` | 11 | |
| `RP002_V1_0_4` | 12 | |

### <a name="ttn.lorawan.v3.PingSlotPeriod">Enum `PingSlotPeriod`</a>

Expand Down
46 changes: 41 additions & 5 deletions api/ttn/lorawan/v3/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6296,7 +6296,8 @@
"RP002_V1_0_0",
"RP002_V1_0_1",
"RP002_V1_0_2",
"RP002_V1_0_3"
"RP002_V1_0_3",
"RP002_V1_0_4"
],
"default": "PHY_UNKNOWN"
}
Expand Down Expand Up @@ -6356,7 +6357,8 @@
"RP002_V1_0_0",
"RP002_V1_0_1",
"RP002_V1_0_2",
"RP002_V1_0_3"
"RP002_V1_0_3",
"RP002_V1_0_4"
],
"default": "PHY_UNKNOWN"
}
Expand Down Expand Up @@ -6416,7 +6418,8 @@
"RP002_V1_0_0",
"RP002_V1_0_1",
"RP002_V1_0_2",
"RP002_V1_0_3"
"RP002_V1_0_3",
"RP002_V1_0_4"
]
}
],
Expand Down Expand Up @@ -11924,7 +11927,8 @@
"RP002_V1_0_0",
"RP002_V1_0_1",
"RP002_V1_0_2",
"RP002_V1_0_3"
"RP002_V1_0_3",
"RP002_V1_0_4"
]
}
],
Expand Down Expand Up @@ -17240,6 +17244,18 @@
}
}
},
"BandDescriptionRelayParameters": {
"type": "object",
"properties": {
"wor_channels": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/RelayParametersRelayWORChannel"
}
}
}
},
"BandDescriptionRx2Parameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -18415,6 +18431,22 @@
"default": "ENABLED",
"description": " - ENABLED: No restrictions are in place.\n - WARNING: Warnings are being emitted that the provider will be deprecated in the future.\n - DISABLED: New integrations cannot be set up, and old ones do not start."
},
"RelayParametersRelayWORChannel": {
"type": "object",
"properties": {
"frequency": {
"type": "string",
"format": "uint64"
},
"ack_frequency": {
"type": "string",
"format": "uint64"
},
"data_rate_index": {
"$ref": "#/definitions/v3DataRateIndex"
}
}
},
"TxAcknowledgmentResult": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -20352,6 +20384,9 @@
},
"boot_dwell_time": {
"$ref": "#/definitions/BandDescriptionDwellTime"
},
"relay": {
"$ref": "#/definitions/BandDescriptionRelayParameters"
}
}
},
Expand Down Expand Up @@ -23903,7 +23938,8 @@
"RP002_V1_0_0",
"RP002_V1_0_1",
"RP002_V1_0_2",
"RP002_V1_0_3"
"RP002_V1_0_3",
"RP002_V1_0_4"
],
"default": "PHY_UNKNOWN"
},
Expand Down
11 changes: 11 additions & 0 deletions api/ttn/lorawan/v3/configuration_services.proto
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ message BandDescription {
}

DwellTime boot_dwell_time = 31;

message RelayParameters {
message RelayWORChannel {
uint64 frequency = 1;
uint64 ack_frequency = 2;
DataRateIndex data_rate_index = 3;
}
repeated RelayWORChannel wor_channels = 1;
}

RelayParameters relay = 33;
}

message ListBandsResponse {
Expand Down
1 change: 1 addition & 0 deletions api/ttn/lorawan/v3/lorawan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ enum PHYVersion {
RP002_V1_0_1 = 9;
RP002_V1_0_2 = 10;
RP002_V1_0_3 = 11;
RP002_V1_0_4 = 12;
}

enum DataRateIndex {
Expand Down
51 changes: 34 additions & 17 deletions pkg/band/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,23 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: AS_923_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: AS_923_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: AS_923_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: AS_923_RP2_v1_0_4,
},
AS_923_2: {
ttnpb.PHYVersion_RP002_V1_0_1: AS_923_2_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: AS_923_2_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: AS_923_2_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: AS_923_2_RP2_v1_0_4,
},
AS_923_3: {
ttnpb.PHYVersion_RP002_V1_0_1: AS_923_3_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: AS_923_3_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: AS_923_3_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: AS_923_3_RP2_v1_0_4,
},
AS_923_4: {
ttnpb.PHYVersion_RP002_V1_0_3: AS_923_4_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: AS_923_4_RP2_v1_0_4,
},
AU_915_928: {
ttnpb.PHYVersion_TS001_V1_0_1: AU_915_928_TS1_v1_0_1,
Expand All @@ -56,6 +60,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: AU_915_928_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: AU_915_928_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: AU_915_928_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: AU_915_928_RP2_v1_0_4,
},
CN_470_510: {
ttnpb.PHYVersion_TS001_V1_0_1: CN_470_510_TS1_v1_0_1,
Expand All @@ -70,24 +75,28 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_20_A_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_20_A_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_20_A_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_20_A_RP2_v1_0_4,
},
CN_470_510_20_B: {
ttnpb.PHYVersion_RP002_V1_0_0: CN_470_510_20_B_RP2_v1_0_0,
ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_20_B_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_20_B_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_20_B_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_20_B_RP2_v1_0_4,
},
CN_470_510_26_A: {
ttnpb.PHYVersion_RP002_V1_0_0: CN_470_510_26_A_RP2_v1_0_0,
ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_26_A_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_26_A_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_26_A_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_26_A_RP2_v1_0_4,
},
CN_470_510_26_B: {
ttnpb.PHYVersion_RP002_V1_0_0: CN_470_510_26_B_RP2_v1_0_0,
ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_26_B_RP2_v1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_26_B_RP2_v1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_26_B_RP2_v1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_26_B_RP2_v1_0_4,
},
CN_779_787: {
ttnpb.PHYVersion_TS001_V1_0: CN_779_787_RP1_V1_0,
Expand All @@ -114,6 +123,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: EU_433_RP2_V1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: EU_433_RP2_V1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: EU_433_RP2_V1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: EU_433_RP2_V1_0_4,
},
EU_863_870: {
ttnpb.PHYVersion_TS001_V1_0: EU_863_870_TS1_V1_0,
Expand All @@ -127,6 +137,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: EU_863_870_RP2_V1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: EU_863_870_RP2_V1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: EU_863_870_RP2_V1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: EU_863_870_RP2_V1_0_4,
},
IN_865_867: {
ttnpb.PHYVersion_RP001_V1_0_2_REV_B: IN_865_867_RP1_V1_0_2_Rev_B,
Expand All @@ -137,6 +148,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: IN_865_867_RP2_V1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: IN_865_867_RP2_V1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: IN_865_867_RP2_V1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: IN_865_867_RP2_V1_0_4,
},
ISM_2400: {
ttnpb.PHYVersion_TS001_V1_0: ISM_2400_Universal,
Expand All @@ -150,6 +162,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: ISM_2400_Universal,
ttnpb.PHYVersion_RP002_V1_0_2: ISM_2400_Universal,
ttnpb.PHYVersion_RP002_V1_0_3: ISM_2400_Universal,
ttnpb.PHYVersion_RP002_V1_0_4: ISM_2400_Universal,
},
KR_920_923: {
ttnpb.PHYVersion_RP001_V1_0_2: KR_920_923_RP1_V1_0_2,
Expand All @@ -161,6 +174,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: KR_920_923_RP2_V1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: KR_920_923_RP2_V1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: KR_920_923_RP2_V1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: KR_920_923_RP2_V1_0_4,
},
MA_869_870_DRAFT: {
ttnpb.PHYVersion_TS001_V1_0: MA_869_870_Draft_Universal,
Expand All @@ -174,6 +188,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: MA_869_870_Draft_Universal,
ttnpb.PHYVersion_RP002_V1_0_2: MA_869_870_Draft_Universal,
ttnpb.PHYVersion_RP002_V1_0_3: MA_869_870_Draft_Universal,
ttnpb.PHYVersion_RP002_V1_0_4: MA_869_870_Draft_Universal,
},
RU_864_870: {
ttnpb.PHYVersion_RP001_V1_0_3_REV_A: RU_864_870_RP1_V1_0_3_Rev_A,
Expand All @@ -183,6 +198,7 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: RU_864_870_RP2_V1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: RU_864_870_RP2_V1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: RU_864_870_RP2_V1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: RU_864_870_RP2_V1_0_4,
},
US_902_928: {
ttnpb.PHYVersion_TS001_V1_0: US_902_928_TS1_V1_0,
Expand All @@ -196,30 +212,31 @@ var (
ttnpb.PHYVersion_RP002_V1_0_1: US_902_928_RP2_V1_0_1,
ttnpb.PHYVersion_RP002_V1_0_2: US_902_928_RP2_V1_0_2,
ttnpb.PHYVersion_RP002_V1_0_3: US_902_928_RP2_V1_0_3,
ttnpb.PHYVersion_RP002_V1_0_4: US_902_928_RP2_V1_0_4,
},
}

// LatestVersion contains the latest version of each band.
LatestVersion = map[string]ttnpb.PHYVersion{
AS_923: ttnpb.PHYVersion_RP002_V1_0_3,
AS_923_2: ttnpb.PHYVersion_RP002_V1_0_3,
AS_923_3: ttnpb.PHYVersion_RP002_V1_0_3,
AS_923_4: ttnpb.PHYVersion_RP002_V1_0_3,
AU_915_928: ttnpb.PHYVersion_RP002_V1_0_3,
AS_923: ttnpb.PHYVersion_RP002_V1_0_4,
AS_923_2: ttnpb.PHYVersion_RP002_V1_0_4,
AS_923_3: ttnpb.PHYVersion_RP002_V1_0_4,
AS_923_4: ttnpb.PHYVersion_RP002_V1_0_4,
AU_915_928: ttnpb.PHYVersion_RP002_V1_0_4,
CN_470_510: ttnpb.PHYVersion_RP001_V1_1_REV_B,
CN_470_510_20_A: ttnpb.PHYVersion_RP002_V1_0_3,
CN_470_510_20_B: ttnpb.PHYVersion_RP002_V1_0_3,
CN_470_510_26_A: ttnpb.PHYVersion_RP002_V1_0_3,
CN_470_510_26_B: ttnpb.PHYVersion_RP002_V1_0_3,
CN_470_510_20_A: ttnpb.PHYVersion_RP002_V1_0_4,
CN_470_510_20_B: ttnpb.PHYVersion_RP002_V1_0_4,
CN_470_510_26_A: ttnpb.PHYVersion_RP002_V1_0_4,
CN_470_510_26_B: ttnpb.PHYVersion_RP002_V1_0_4,
CN_779_787: ttnpb.PHYVersion_RP002_V1_0_3,
EU_433: ttnpb.PHYVersion_RP002_V1_0_3,
EU_863_870: ttnpb.PHYVersion_RP002_V1_0_3,
IN_865_867: ttnpb.PHYVersion_RP002_V1_0_3,
ISM_2400: ttnpb.PHYVersion_RP002_V1_0_3,
KR_920_923: ttnpb.PHYVersion_RP002_V1_0_3,
MA_869_870_DRAFT: ttnpb.PHYVersion_RP002_V1_0_3,
RU_864_870: ttnpb.PHYVersion_RP002_V1_0_3,
US_902_928: ttnpb.PHYVersion_RP002_V1_0_3,
EU_433: ttnpb.PHYVersion_RP002_V1_0_4,
EU_863_870: ttnpb.PHYVersion_RP002_V1_0_4,
IN_865_867: ttnpb.PHYVersion_RP002_V1_0_4,
ISM_2400: ttnpb.PHYVersion_RP002_V1_0_4,
KR_920_923: ttnpb.PHYVersion_RP002_V1_0_4,
MA_869_870_DRAFT: ttnpb.PHYVersion_RP002_V1_0_4,
RU_864_870: ttnpb.PHYVersion_RP002_V1_0_4,
US_902_928: ttnpb.PHYVersion_RP002_V1_0_4,
}
)

Expand Down
12 changes: 12 additions & 0 deletions pkg/band/as_923.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,16 @@ var (
},
}
}

as923RelayParameters = func(offset as923GroupOffset) RelayParameters {
return RelayParameters{
WORChannels: []RelayWORChannel{
{
Frequency: uint64(923600000 + offset),
ACKFrequency: uint64(923800000 + offset),
DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
},
},
}
}
)
12 changes: 2 additions & 10 deletions pkg/band/as_923_rp1_v1_0_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ var AS_923_RP1_v1_0_2 = Band{
},
MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

ReceiveDelay1: defaultReceiveDelay1,
ReceiveDelay2: defaultReceiveDelay2,
JoinAcceptDelay1: defaultJoinAcceptDelay1,
JoinAcceptDelay2: defaultJoinAcceptDelay2,
MaxFCntGap: defaultMaxFCntGap,
ADRAckLimit: defaultADRAckLimit,
ADRAckDelay: defaultADRAckDelay,
MinRetransmitTimeout: defaultRetransmitTimeout - defaultRetransmitTimeoutMargin,
MaxRetransmitTimeout: defaultRetransmitTimeout + defaultRetransmitTimeoutMargin,

DefaultMaxEIRP: 14,
TxOffset: []float32{
0,
Expand Down Expand Up @@ -112,4 +102,6 @@ var AS_923_RP1_v1_0_2 = Band{
PingSlotFrequencies: as923BeaconFrequencies(as923Group1Offset),

TxParamSetupReqSupport: true,

SharedParameters: universalSharedParameters,
}
Loading
Loading