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

TTN frequency plan support China 470(uplink). #36

Merged
merged 4 commits into from
Jan 22, 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
4 changes: 4 additions & 0 deletions adafruit_tinylora/adafruit_tinylora.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ def __init__(self, spi, cs, irq, rst, ttn_config, channel=None):
elif ttn_config.country == "EU":
from adafruit_tinylora.ttn_eu import TTN_FREQS

self._frequencies = TTN_FREQS
elif ttn_config.country == "CN":
from adafruit_tinylora.ttn_cn import TTN_FREQS

self._frequencies = TTN_FREQS
else:
raise TypeError("Country Code Incorrect/Unsupported")
Expand Down
21 changes: 21 additions & 0 deletions adafruit_tinylora/ttn_cn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2018 Brent Rubell for Adafruit Industries
# SPDX-FileCopyrightText: 2021 IAMLIUBO
#
# SPDX-License-Identifier: MIT

"""
`ttn_cn.py`
======================================================
The Things Network Frequency Plans - CN470
* Author(s): IAMLIUBO
"""
TTN_FREQS = {
0: (0x79, 0x93, 0x33), # 486.3 MHz
1: (0x79, 0xA0, 0x00), # 486.5 MHz
2: (0x79, 0xAC, 0xCC), # 486.7 MHz
3: (0x79, 0xB9, 0x99), # 486.9 MHz
4: (0x79, 0xC6, 0x66), # 487.1 MHz
5: (0x79, 0xD3, 0x33), # 487.3 MHz
6: (0x79, 0xE0, 0x00), # 487.5 MHz
7: (0x79, 0xEC, 0xCC),
} # 487.7 MHz