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

Remove hardware specific fields in LBS Router Config #4190

Merged
merged 3 commits into from
May 20, 2021
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ For details about compatibility between different releases, see the **Commitment
- The default cap is at 4KB, see the new `as.formatters.max-parameter-length` config option.
- A maximum cap of 16KB per script is set at the API level.
- This only prevents setting large payload formatter scripts for new devices and applications; it does not remove payload formatters from existing applications and devices. Scripts sourced from the Device Repository are not affected. See [issue #4053](https://github.com/TheThingsNetwork/lorawan-stack/issues/4053) for more context on this change.
- LoRa Basics Station `router_config` message omits hardware specific fields.

### Deprecated

Expand Down
9 changes: 9 additions & 0 deletions config/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7460,6 +7460,15 @@
"file": "lbslns.go"
}
},
"error:pkg/pfconfig/lbslns:invalid_key": {
"translations": {
"en": "key `{key}` invalid"
},
"description": {
"package": "pkg/pfconfig/lbslns",
"file": "lbslns.go"
}
},
"error:pkg/pfconfig/shared:empty_gateway_server_address": {
"translations": {
"en": "gateway server address is empty"
Expand Down
44 changes: 12 additions & 32 deletions pkg/gatewayserver/io/ws/ws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,25 +542,16 @@ func TestVersion(t *testing.T) {
{7, 250, 0},
{0, 0, 0},
},
SX1301Config: []shared.SX1301Config{
SX1301Config: []pfconfig.LBSSX1301Config{
{
LoRaWANPublic: true,
ClockSource: 1,
AntennaGain: 0,
Radios: []shared.RFConfig{
Radios: []pfconfig.LBSRFConfig{
{
Enable: true,
Frequency: 867500000,
TxEnable: true,
RSSIOffset: -166,
Enable: true,
Frequency: 867500000,
},
{
Enable: true,
Frequency: 868500000,
TxEnable: false,
TxFreqMin: 0,
TxFreqMax: 0,
RSSIOffset: -166,
Enable: true,
Frequency: 868500000,
},
},
Channels: []shared.IFConfig{
Expand All @@ -575,7 +566,6 @@ func TestVersion(t *testing.T) {
},
LoRaStandardChannel: &shared.IFConfig{Enable: true, Radio: 0, IFValue: 800000, Bandwidth: 250000, SpreadFactor: 7, Datarate: 0},
FSKChannel: &shared.IFConfig{Enable: true, Radio: 0, IFValue: 1300000, Bandwidth: 125000, SpreadFactor: 0, Datarate: 50000},
TxLUTConfigs: []shared.TxLUTConfig{},
},
},
},
Expand Down Expand Up @@ -625,25 +615,16 @@ func TestVersion(t *testing.T) {
NoCCA: true,
NoDwellTime: true,
NoDutyCycle: true,
SX1301Config: []shared.SX1301Config{
SX1301Config: []pfconfig.LBSSX1301Config{
{
LoRaWANPublic: true,
ClockSource: 1,
AntennaGain: 0,
Radios: []shared.RFConfig{
Radios: []pfconfig.LBSRFConfig{
{
Enable: true,
Frequency: 867500000,
TxEnable: true,
RSSIOffset: -166,
Enable: true,
Frequency: 867500000,
},
{
Enable: true,
Frequency: 868500000,
TxEnable: false,
TxFreqMin: 0,
TxFreqMax: 0,
RSSIOffset: -166,
Enable: true,
Frequency: 868500000,
},
},
Channels: []shared.IFConfig{
Expand All @@ -658,7 +639,6 @@ func TestVersion(t *testing.T) {
},
LoRaStandardChannel: &shared.IFConfig{Enable: true, Radio: 0, IFValue: 800000, Bandwidth: 250000, SpreadFactor: 7, Datarate: 0},
FSKChannel: &shared.IFConfig{Enable: true, Radio: 0, IFValue: 1300000, Bandwidth: 125000, SpreadFactor: 0, Datarate: 50000},
TxLUTConfigs: []shared.TxLUTConfig{},
},
},
},
Expand Down
34 changes: 7 additions & 27 deletions pkg/pfconfig/lbslns/lbslbs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,16 @@ func TestGetRouterConfig(t *testing.T) {
NoCCA: true,
NoDutyCycle: true,
NoDwellTime: true,
SX1301Config: []shared.SX1301Config{
SX1301Config: []LBSSX1301Config{
{
LoRaWANPublic: true,
ClockSource: 0,
AntennaGain: 0,
Radios: []shared.RFConfig{
Radios: []LBSRFConfig{
{
Enable: true,
Frequency: 922300000,
TxEnable: true,
},
{
Enable: false,
Frequency: 923000000,
TxEnable: false,
},
},
Channels: []shared.IFConfig{
Expand Down Expand Up @@ -175,21 +170,16 @@ func TestGetRouterConfig(t *testing.T) {
[3]int{8, 500, 0},
[3]int{7, 500, 0},
},
SX1301Config: []shared.SX1301Config{
SX1301Config: []LBSSX1301Config{
{
LoRaWANPublic: true,
ClockSource: 0,
AntennaGain: 0,
Radios: []shared.RFConfig{
Radios: []LBSRFConfig{
{
Enable: true,
Frequency: 922300000,
TxEnable: true,
},
{
Enable: false,
Frequency: 923000000,
TxEnable: false,
},
},
Channels: []shared.IFConfig{
Expand Down Expand Up @@ -303,21 +293,16 @@ func TestGetRouterConfigWithMultipleFP(t *testing.T) {
NoCCA: true,
NoDutyCycle: true,
NoDwellTime: true,
SX1301Config: []shared.SX1301Config{
SX1301Config: []LBSSX1301Config{
{
LoRaWANPublic: true,
ClockSource: 0,
AntennaGain: 0,
Radios: []shared.RFConfig{
Radios: []LBSRFConfig{
{
Enable: true,
Frequency: 924300000,
TxEnable: true,
},
{
Enable: false,
Frequency: 925000000,
TxEnable: false,
},
},
Channels: []shared.IFConfig{
Expand All @@ -334,19 +319,14 @@ func TestGetRouterConfigWithMultipleFP(t *testing.T) {
FSKChannel: &shared.IFConfig{Enable: false, Radio: 0, IFValue: 0, Bandwidth: 0, SpreadFactor: 0, Datarate: 0},
},
{
LoRaWANPublic: true,
ClockSource: 0,
AntennaGain: 0,
Radios: []shared.RFConfig{
Radios: []LBSRFConfig{
{
Enable: true,
Frequency: 924300000,
TxEnable: true,
},
{
Enable: false,
Frequency: 925000000,
TxEnable: false,
},
},
Channels: []shared.IFConfig{
Expand Down
Loading