Skip to content

Commit 8e04634

Browse files
authored
Merge pull request #36 from imliubo/master
TTN frequency plan support China 470(uplink).
2 parents 69b1af2 + 4da105a commit 8e04634

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

adafruit_tinylora/adafruit_tinylora.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ def __init__(self, spi, cs, irq, rst, ttn_config, channel=None):
166166
elif ttn_config.country == "EU":
167167
from adafruit_tinylora.ttn_eu import TTN_FREQS
168168

169+
self._frequencies = TTN_FREQS
170+
elif ttn_config.country == "CN":
171+
from adafruit_tinylora.ttn_cn import TTN_FREQS
172+
169173
self._frequencies = TTN_FREQS
170174
else:
171175
raise TypeError("Country Code Incorrect/Unsupported")

adafruit_tinylora/ttn_cn.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-FileCopyrightText: 2018 Brent Rubell for Adafruit Industries
2+
# SPDX-FileCopyrightText: 2021 IAMLIUBO
3+
#
4+
# SPDX-License-Identifier: MIT
5+
6+
"""
7+
`ttn_cn.py`
8+
======================================================
9+
The Things Network Frequency Plans - CN470
10+
* Author(s): IAMLIUBO
11+
"""
12+
TTN_FREQS = {
13+
0: (0x79, 0x93, 0x33), # 486.3 MHz
14+
1: (0x79, 0xA0, 0x00), # 486.5 MHz
15+
2: (0x79, 0xAC, 0xCC), # 486.7 MHz
16+
3: (0x79, 0xB9, 0x99), # 486.9 MHz
17+
4: (0x79, 0xC6, 0x66), # 487.1 MHz
18+
5: (0x79, 0xD3, 0x33), # 487.3 MHz
19+
6: (0x79, 0xE0, 0x00), # 487.5 MHz
20+
7: (0x79, 0xEC, 0xCC),
21+
} # 487.7 MHz

0 commit comments

Comments
 (0)