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

AS_920_923_TTN_JP_3 has invalid FSK channel frequency #57

Closed reissjason closed 2 years ago

reissjason commented 2 years ago

Summary

Invalid radio settings issued by AS_920_923_TTN_JP_3

https://github.com/TheThingsNetwork/lorawan-frequency-plans/blob/9313b1ac0262da74f4f23f9e87aaa1234c468697/AS_920_923_TTN_JP_3.yml#L69

A channel cannot be more than +/- 400 KHz from the radio frequency. ...

Environment

Steps to Reproduce

  1. Set Japan 920-923 MHz with LBT (channels 24-31) - AS_920_923_TTN_JP_3 as gateway Frequency plan
  2. Run basic station

What do you see now?

2022-11-04 15:45:24.821 [RAL:VERB] SX1302 ifchain  9: enable=1 rf_chain=1 freq=1000000 bw=0 SF=50000 sync_word=0/0
2022-11-04 15:45:24.822 [RAL:INFO]  RX/TX RF0:    920.9MHz rssi_offset=-214.5 type=5 rssi_tcomp=0.000 0.000 0.000 0.000 0.000
2022-11-04 15:45:24.828 [RAL:INFO]  RX    RF1:    921.7MHz rssi_offset=-214.5 type=5 rssi_tcomp=0.000 0.000 0.000 0.000 0.000
...
2022-11-04 15:45:24.831 [RAL:INFO]  [FSK]   9:    922.7MHz rf=1 freq=+1000.0 datarate=50000 bw=0 sync_word=0/0
2022-11-04 15:45:24.832 [RAL:ERRO] lgw_rxif_setconf(9) failed
2022-11-04 15:45:24.832 [RAL:ERRO] Concentrator start failed: lgw_rxif_setconf
2022-11-04 15:45:24.832 [RAL:ERRO] ral_config failed with status 0x10
2022-11-04 15:45:24.832 [any:ERRO] Closing connection to muxs - error in s2e_onMsg

...

What do you want to see instead?

The basic station should be able to run, invalid configuration should not be provided. ...

How do you propose to implement this?

A different frequency needs to be defined. ...

Can you do this yourself and submit a Pull Request?

...

reissjason commented 2 years ago

Same issue is seen in AS_920_923_TTN_JP_1 AS_920_923_TTN_JP_2 has similar issue with lora-standard-channel definition.

reissjason commented 2 years ago

I ran a script to test for frequencies more than 400KHz off the radio frequency. The other plans look OK. The JP_1 plan has a few possible errors.

INVALID CHANNEL AS_920_923_TTN_JP_2.yml DIFF: -1000000 {'frequency': 922100000, 'data-rate': 6, 'radio': 1} {'enable': True, 'chip-type': 'SX1257', 'frequency': 923100000, 'rssi-offset': -166}

INVALID CHANNEL AS_920_923_TTN_JP_1.yml DIFF: -500000 {'frequency': 922000000, 'min-data-rate': 0, 'max-data-rate': 5, 'radio': 0} {'enable': True, 'chip-type': 'SX1257', 'frequency': 922500000, 'rssi-offset': -166, 'tx': {'min-frequency': 922000000, 'max-frequency': 923400000}} INVALID CHANNEL AS_920_923_TTN_JP_1.yml DIFF: -1000000 {'frequency': 922100000, 'data-rate': 6, 'radio': 1} {'enable': True, 'chip-type': 'SX1257', 'frequency': 923100000, 'rssi-offset': -166} INVALID CHANNEL AS_920_923_TTN_JP_1.yml DIFF: -1300000 {'frequency': 921800000, 'data-rate': 7, 'radio': 1} {'enable': True, 'chip-type': 'SX1257', 'frequency': 923100000, 'rssi-offset': -166}

INVALID CHANNEL AS_920_923_TTN_JP_3.yml DIFF: 1000000 {'frequency': 922700000, 'data-rate': 7, 'radio': 1} {'enable': True, 'chip-type': 'SX1257', 'frequency': 921700000, 'rssi-offset': -166}