diff --git a/README.md b/README.md
index 9380d28..0d78d5a 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ sub-bands:
max-eirp: 16.15 # Maximum EIRP for this sub-band (optional; takes precedence over frequency plan's max-eirp)
channels: # List of channels (zero indexed)
- uplink-frequency: 868100000 # Uplink frequency (Hz)
- downlink-frequency: 868100000 # Downlink frequency (Hz) (optional)
+ downlink-frequency: 868100000 # Downlink frequency (Hz)
min-data-rate: SF7BW125 # Minimum data rate
max-data-rate: SF11BW125 # Maximum data rate
radio: 0 # Radio index (see below)
@@ -159,6 +159,8 @@ There are json schemas available for all configuration files. These define files
}
```
+Make sure to run `go run . -schema -docs` after changes or additions to the frequency plans. This ensures that the schemas and documentation stay up to date.
+
### Local Regulations
When submitting a new frequency plan or making changes to an existing frequency plan, please make sure that the band is allowed to be used in the concerning region and that settings respect regional regulations. When submitting a pull request for a new region, please upload or link to a document that describes the local regulations.
diff --git a/docs/frequency-plans.md b/docs/frequency-plans.md
index d20bfaa..9643133 100644
--- a/docs/frequency-plans.md
+++ b/docs/frequency-plans.md
@@ -9,18 +9,43 @@
![EU_863_870](images/end-device/EU_863_870.svg)
## `EU_863_870_TTN`: Europe 863-870 MHz
-Based on [EU_863_870](##EU_863_870) and modified by [rx2_default_data_rata_3.yml](../end-device/modifiers/rx2_default_data_rata_3.yml)
-
+Based on [EU_863_870](##EU_863_870) and modified by [rx2_default_data_rata_3.yml](../end-device/modifiers/rx2_default_data_rata_3.yml)
>> TTN Community Network frequency plan for Europe, using SF9 for RX2
![EU_863_870_TTN](images/end-device/EU_863_870_TTN.svg)
-# Gateway frequency plans
+## [`AS_920_923`](../end-device/AS_920_923.yml): Asia 920-923 MHz
+
+>> TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz
+
+![AS_920_923](images/end-device/AS_920_923.svg)
+## `AS_920_923_LBT`: Asia 920-923 MHz with LBT
+Based on [AS_920_923](##AS_920_923) and modified by [lbt_80_over_128.yml](../end-device/modifiers/lbt_80_over_128.yml)
+
+>> TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz with listen-before-talk
+
+![AS_920_923_LBT](images/end-device/AS_920_923_LBT.svg)
+
+# Gateway frequency plans
## [`EU_863_870`](../gateway/EU_863_870.yml): Europe 863-870 MHz
>> Default frequency plan for Europe
![EU_863_870](images/gateway/EU_863_870.svg)
+
+## [`AS_920_923`](../gateway/AS_920_923.yml): Asia 920-923 MHz
+
+>> TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz
+
+![AS_920_923](images/gateway/AS_920_923.svg)
+
+## `AS_920_923_LBT`: Asia 920-923 MHz with LBT
+Based on AS_920_923 and modified by [lbt_80_over_128.yml](../gateway/modifiers/lbt_80_over_128.yml)
+
+
+>> TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz with listen-before-talk
+
+![AS_920_923_LBT](images/gateway/AS_920_923_LBT.svg)
diff --git a/docs/images/end-device/AS_920_923.svg b/docs/images/end-device/AS_920_923.svg
new file mode 100644
index 0000000..3153466
--- /dev/null
+++ b/docs/images/end-device/AS_920_923.svg
@@ -0,0 +1,271 @@
+
\ No newline at end of file
diff --git a/docs/images/end-device/AS_920_923_LBT.svg b/docs/images/end-device/AS_920_923_LBT.svg
new file mode 100644
index 0000000..9d13638
--- /dev/null
+++ b/docs/images/end-device/AS_920_923_LBT.svg
@@ -0,0 +1,271 @@
+
\ No newline at end of file
diff --git a/docs/images/gateway/AS_920_923.svg b/docs/images/gateway/AS_920_923.svg
new file mode 100644
index 0000000..e769514
--- /dev/null
+++ b/docs/images/gateway/AS_920_923.svg
@@ -0,0 +1,306 @@
+
\ No newline at end of file
diff --git a/docs/images/gateway/AS_920_923_LBT.svg b/docs/images/gateway/AS_920_923_LBT.svg
new file mode 100644
index 0000000..e4763d8
--- /dev/null
+++ b/docs/images/gateway/AS_920_923_LBT.svg
@@ -0,0 +1,306 @@
+
\ No newline at end of file
diff --git a/end-device/AS_920_923.yml b/end-device/AS_920_923.yml
new file mode 100644
index 0000000..bd3236d
--- /dev/null
+++ b/end-device/AS_920_923.yml
@@ -0,0 +1,43 @@
+band-id: AS_923
+sub-bands:
+- min-frequency: 922000000
+ max-frequency: 923400000
+channels:
+- uplink-frequency: 923200000
+ downlink-frequency: 923200000
+ min-data-rate: 0
+ max-data-rate: 5
+- uplink-frequency: 923400000
+ downlink-frequency: 923400000
+ min-data-rate: 0
+ max-data-rate: 5
+- uplink-frequency: 922200000
+ downlink-frequency: 922200000
+ min-data-rate: 0
+ max-data-rate: 5
+- uplink-frequency: 922400000
+ downlink-frequency: 922400000
+ min-data-rate: 0
+ max-data-rate: 5
+- uplink-frequency: 922600000
+ downlink-frequency: 922600000
+ min-data-rate: 0
+ max-data-rate: 5
+- uplink-frequency: 922800000
+ downlink-frequency: 922800000
+ min-data-rate: 0
+ max-data-rate: 5
+- uplink-frequency: 923000000
+ downlink-frequency: 923000000
+ min-data-rate: 0
+ max-data-rate: 5
+- uplink-frequency: 922000000
+ downlink-frequency: 922000000
+ min-data-rate: 0
+ max-data-rate: 5
+lora-standard-channel:
+ frequency: 922100000
+ data-rate: 6
+fsk-channel:
+ frequency: 921800000
+ data-rate: 7
diff --git a/end-device/modifiers/disable_dwell_time.yml b/end-device/modifiers/disable_dwell_time.yml
new file mode 100644
index 0000000..4debef4
--- /dev/null
+++ b/end-device/modifiers/disable_dwell_time.yml
@@ -0,0 +1,4 @@
+dwell-time:
+ uplinks: false
+ downlinks: false
+ duration: 0ms
\ No newline at end of file
diff --git a/end-device/modifiers/enable_dwell_time_400ms.yml b/end-device/modifiers/enable_dwell_time_400ms.yml
new file mode 100644
index 0000000..291fe42
--- /dev/null
+++ b/end-device/modifiers/enable_dwell_time_400ms.yml
@@ -0,0 +1,4 @@
+dwell-time:
+ uplinks: true
+ downlinks: true
+ duration: 400ms
\ No newline at end of file
diff --git a/end-device/modifiers/lbt_80_over_128.yml b/end-device/modifiers/lbt_80_over_128.yml
new file mode 100644
index 0000000..e1d43b8
--- /dev/null
+++ b/end-device/modifiers/lbt_80_over_128.yml
@@ -0,0 +1,4 @@
+listen-before-talk:
+ rssi-offset: -4
+ rssi-target: -80
+ scan-time: 128000
\ No newline at end of file
diff --git a/end-device/schema.json b/end-device/schema.json
index 205e457..8fbdb64 100644
--- a/end-device/schema.json
+++ b/end-device/schema.json
@@ -48,7 +48,7 @@
},
"downlink-frequency": {
"type": "integer",
- "description": "Downlink frequency [Hz] (optional)"
+ "description": "Downlink frequency [Hz]"
},
"min-data-rate": {
"type": "integer",
@@ -63,7 +63,7 @@
"description": "Channel is defined by RP"
}
},
- "required": ["uplink-frequency", "min-data-rate", "max-data-rate"]
+ "required": ["uplink-frequency", "downlink-frequency", "min-data-rate", "max-data-rate"]
}
},
"lora-standard-channel": {
diff --git a/frequency-plans.yml b/frequency-plans.yml
index fbce7d6..5550391 100644
--- a/frequency-plans.yml
+++ b/frequency-plans.yml
@@ -18,6 +18,25 @@ end-device-descriptions:
modifiers: [rx2_default_data_rata_3.yml]
endorsed: true
+- id: AS_920_923
+ band-id: AS_923
+ name: Asia 920-923 MHz
+ description: TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz
+ base-frequency: 915
+ country-codes: [my, sg]
+ file: AS_920_923.yml
+ endorsed: true
+
+- id: AS_920_923_LBT
+ band-id: AS_923
+ base-id: AS_920_923
+ name: Asia 920-923 MHz with LBT
+ description: TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz with listen-before-talk
+ base-frequency: 915
+ country-codes: [jp, my, sg]
+ modifiers: [lbt_80_over_128.yml]
+ endorsed: false
+
gateway-descriptions:
- id: EU_863_870
band-id: EU_863_870
@@ -27,3 +46,22 @@ gateway-descriptions:
country-codes: [al, ad, ao, at, bh, be, ba, bw, bg, cg, hr, cy, cz, dk, ee, sz, fi, fr, gr, hu, is, ie, it, lv, ls, li, lt, lu, mg, mw, mt, mu, md, me, mz, na, nl, mk, ph, pl, pt, ro, ru, sa, rs, sc, sk, si, za, es, se, ch, tz, tr, ae, gb, va, zm, zw]
file: EU_863_870.yml
endorsed: false
+
+- id: AS_920_923
+ band-id: AS_923
+ name: Asia 920-923 MHz
+ description: TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz
+ base-frequency: 915
+ country-codes: [my, sg]
+ file: AS_920_923.yml
+ endorsed: true
+
+- id: AS_920_923_LBT
+ band-id: AS_923
+ base-id: AS_920_923
+ name: Asia 920-923 MHz with LBT
+ description: TTN Community Network frequency plan for Asian countries, using frequencies ≤ 923 MHz with listen-before-talk
+ base-frequency: 915
+ country-codes: [jp, my, sg]
+ modifiers: [lbt_80_over_128.yml]
+ endorsed: false
diff --git a/gateway/AS_920_923.yml b/gateway/AS_920_923.yml
new file mode 100644
index 0000000..6a11d90
--- /dev/null
+++ b/gateway/AS_920_923.yml
@@ -0,0 +1,66 @@
+band-id: AS_923
+sub-bands:
+- min-frequency: 922000000
+ max-frequency: 923400000
+channels:
+- uplink-frequency: 923200000
+ downlink-frequency: 923200000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 0
+- uplink-frequency: 923400000
+ downlink-frequency: 923400000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 0
+- uplink-frequency: 922200000
+ downlink-frequency: 922200000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 1
+- uplink-frequency: 922400000
+ downlink-frequency: 922400000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 1
+- uplink-frequency: 922600000
+ downlink-frequency: 922600000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 0
+- uplink-frequency: 922800000
+ downlink-frequency: 922800000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 0
+- uplink-frequency: 923000000
+ downlink-frequency: 923000000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 0
+- uplink-frequency: 922000000
+ downlink-frequency: 922000000
+ min-data-rate: SF7BW125
+ max-data-rate: SF12BW125
+ radio: 1
+lora-standard-channel:
+ frequency: 922100000
+ data-rate: SF7BW250
+ radio: 1
+fsk-channel:
+ frequency: 921800000
+ data-rate: FSK50
+ radio: 1
+radios:
+- enable: true
+ chip-type: SX1257
+ frequency: 923000000
+ rssi-offset: -166
+ tx:
+ min-frequency: 920000000
+ max-frequency: 923400000
+- enable: true
+ chip-type: SX1257
+ frequency: 922100000
+ rssi-offset: -166
+clock-source: 1
diff --git a/gateway/modifiers/disable_dwell_time.yml b/gateway/modifiers/disable_dwell_time.yml
new file mode 100644
index 0000000..4debef4
--- /dev/null
+++ b/gateway/modifiers/disable_dwell_time.yml
@@ -0,0 +1,4 @@
+dwell-time:
+ uplinks: false
+ downlinks: false
+ duration: 0ms
\ No newline at end of file
diff --git a/gateway/modifiers/enable_dwell_time_400ms.yml b/gateway/modifiers/enable_dwell_time_400ms.yml
new file mode 100644
index 0000000..291fe42
--- /dev/null
+++ b/gateway/modifiers/enable_dwell_time_400ms.yml
@@ -0,0 +1,4 @@
+dwell-time:
+ uplinks: true
+ downlinks: true
+ duration: 400ms
\ No newline at end of file
diff --git a/gateway/modifiers/lbt_80_over_128.yml b/gateway/modifiers/lbt_80_over_128.yml
new file mode 100644
index 0000000..e1d43b8
--- /dev/null
+++ b/gateway/modifiers/lbt_80_over_128.yml
@@ -0,0 +1,4 @@
+listen-before-talk:
+ rssi-offset: -4
+ rssi-target: -80
+ scan-time: 128000
\ No newline at end of file
diff --git a/gateway/schema.json b/gateway/schema.json
index a16ba53..be2b128 100644
--- a/gateway/schema.json
+++ b/gateway/schema.json
@@ -48,7 +48,7 @@
},
"downlink-frequency": {
"type": "integer",
- "description": "Downlink frequency [Hz] (optional)"
+ "description": "Downlink frequency [Hz]"
},
"min-data-rate": {
"type": "string",
@@ -69,7 +69,7 @@
"description": "Channel is defined by RP"
}
},
- "required": ["uplink-frequency", "min-data-rate", "max-data-rate", "radio"]
+ "required": ["uplink-frequency", "downlink-frequency", "min-data-rate", "max-data-rate", "radio"]
}
},
"lora-standard-channel": {
diff --git a/internal/docs/frequency-plans.md.tmpl b/internal/docs/frequency-plans.md.tmpl
index 98c48cb..0d415ca 100644
--- a/internal/docs/frequency-plans.md.tmpl
+++ b/internal/docs/frequency-plans.md.tmpl
@@ -4,8 +4,7 @@
{{- range .EndDeviceDescriptions }}
{{ if .BaseID }}
## `{{ .ID }}`: {{ .Name }}
-Based on [{{ .BaseID }}](##{{ .BaseID }}) and modified by {{ range .Modifiers }}[{{ . }}](../end-device/modifiers/{{ . }}){{ end }}
-{{ else }}
+Based on [{{ .BaseID }}](##{{ .BaseID }}) and modified by {{ range .Modifiers }}[{{ . }}](../end-device/modifiers/{{ . }}){{ end }}{{ else }}
## [`{{ .ID }}`](../end-device/{{ .File }}): {{ .Name }}{{ end }}
>> {{ .Description }}
@@ -14,7 +13,6 @@ Based on [{{ .BaseID }}](##{{ .BaseID }}) and modified by {{ range .Modifiers }}
# Gateway frequency plans
{{- range .GatewayDescriptions }}
-
{{ if .BaseID }}
## `{{ .ID }}`: {{ .Name }}
Based on {{ .BaseID }} and modified by {{ range .Modifiers }}[{{ . }}](../gateway/modifiers/{{ . }}){{ end }}
diff --git a/internal/model/model.go b/internal/model/model.go
index 0546380..18ca0e9 100644
--- a/internal/model/model.go
+++ b/internal/model/model.go
@@ -140,7 +140,7 @@ func (d DwellTime) Validate() error {
type ListenBeforeTalk struct {
RSSIOffset *int `yaml:"rssi-offset,omitempty"`
- RSSITarget *int `yaml:"rssi-targer,omitempty"`
+ RSSITarget *int `yaml:"rssi-target,omitempty"`
ScanTime *int `yaml:"scan-time,omitempty"`
}
diff --git a/internal/schema/frequency-plans-end-device-schema.json.tmpl b/internal/schema/frequency-plans-end-device-schema.json.tmpl
index e198c03..b59f208 100644
--- a/internal/schema/frequency-plans-end-device-schema.json.tmpl
+++ b/internal/schema/frequency-plans-end-device-schema.json.tmpl
@@ -48,7 +48,7 @@
},
"downlink-frequency": {
"type": "integer",
- "description": "Downlink frequency [Hz] (optional)"
+ "description": "Downlink frequency [Hz]"
},
"min-data-rate": {
"type": "integer",
@@ -63,7 +63,7 @@
"description": "Channel is defined by RP"
}
},
- "required": ["uplink-frequency", "min-data-rate", "max-data-rate"]
+ "required": ["uplink-frequency", "downlink-frequency", "min-data-rate", "max-data-rate"]
}
},
"lora-standard-channel": {
diff --git a/internal/schema/frequency-plans-gateway-schema.json.tmpl b/internal/schema/frequency-plans-gateway-schema.json.tmpl
index ab1fb52..acd7b6e 100644
--- a/internal/schema/frequency-plans-gateway-schema.json.tmpl
+++ b/internal/schema/frequency-plans-gateway-schema.json.tmpl
@@ -48,7 +48,7 @@
},
"downlink-frequency": {
"type": "integer",
- "description": "Downlink frequency [Hz] (optional)"
+ "description": "Downlink frequency [Hz]"
},
"min-data-rate": {
"type": "string",
@@ -69,7 +69,7 @@
"description": "Channel is defined by RP"
}
},
- "required": ["uplink-frequency", "min-data-rate", "max-data-rate", "radio"]
+ "required": ["uplink-frequency", "downlink-frequency", "min-data-rate", "max-data-rate", "radio"]
}
},
"lora-standard-channel": {
diff --git a/schema.json b/schema.json
index 06c3ee6..9a18f7c 100644
--- a/schema.json
+++ b/schema.json
@@ -62,19 +62,19 @@
"file": {
"type": "string",
"description": "File of the frequency plan definition.",
- "enum": ["EU_863_870.yml"]
+ "enum": ["AS_920_923.yml","EU_863_870.yml"]
},
"base-id": {
"type": "string",
"description": "ID that this frequency plan extends (refers to id of another frequency plan).",
- "enum" : ["EU_863_870","EU_863_870_TTN"]
+ "enum" : ["AS_920_923","AS_920_923_LBT","EU_863_870","EU_863_870_TTN"]
},
"modifiers": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
- "enum":["rx2_default_data_rata_3.yml"],
+ "enum":["disable_dwell_time.yml","enable_dwell_time_400ms.yml","lbt_80_over_128.yml","rx2_default_data_rata_3.yml"],
"description": "Modifier addressed by filename."
},
"description": "List of files containing the modifiers used to extend the `base-id` end-device."
@@ -389,19 +389,19 @@
"file": {
"type": "string",
"description": "File of the frequency plan definition.",
- "enum": ["EU_863_870.yml"]
+ "enum": ["AS_920_923.yml","EU_863_870.yml"]
},
"base-id": {
"type": "string",
"description": "ID that this frequency plan extends (refers to id of another frequency plan).",
- "enum" : ["EU_863_870","EU_863_870_TTN"]
+ "enum" : ["AS_920_923","AS_920_923_LBT","EU_863_870","EU_863_870_TTN"]
},
"modifiers": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
- "enum":[],
+ "enum":["disable_dwell_time.yml","enable_dwell_time_400ms.yml","lbt_80_over_128.yml"],
"description": "Modifier addressed by filename."
},
"description": "List of files containing the modifiers used to extend the `base-id` end-device."