Skip to content

Commit 98485a4

Browse files
Merge pull request #235 from TheThingsNetwork/feature/au915
AU915 support
2 parents 20d6964 + 04e2a33 commit 98485a4

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

docs/RN2903A-1.0.3-AU915.zip

113 KB
Binary file not shown.

docs/RN2903A-programming.docx

2.27 MB
Binary file not shown.

docs/RN2903A-uart-bootloader.docx

696 KB
Binary file not shown.

src/TheThingsNetwork.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,30 @@ void TheThingsNetwork::configureUS915(uint8_t fsb)
659659
sendMacSet(MAC_PWRIDX, TTN_PWRIDX_US915);
660660
}
661661

662+
void TheThingsNetwork::configureAU915(uint8_t fsb)
663+
{
664+
uint8_t ch;
665+
uint8_t chLow = fsb > 0 ? (fsb - 1) * 8 : 0;
666+
uint8_t chHigh = fsb > 0 ? chLow + 7 : 71;
667+
uint8_t ch500 = fsb + 63;
668+
for (ch = 0; ch < 72; ch++)
669+
{
670+
if (ch == ch500 || (ch <= chHigh && ch >= chLow))
671+
{
672+
sendChSet(MAC_CHANNEL_STATUS, ch, "on");
673+
if (ch < 63)
674+
{
675+
sendChSet(MAC_CHANNEL_DRRANGE, ch, "0 3");
676+
}
677+
}
678+
else
679+
{
680+
sendChSet(MAC_CHANNEL_STATUS, ch, "off");
681+
}
682+
}
683+
sendMacSet(MAC_PWRIDX, TTN_PWRIDX_AU915);
684+
}
685+
662686
void TheThingsNetwork::configureAS920_923()
663687
{
664688
/* RN2903AS 1.0.3rc9 defaults
@@ -759,6 +783,9 @@ void TheThingsNetwork::configureChannels(uint8_t fsb)
759783
case TTN_FP_US915:
760784
configureUS915(fsb);
761785
break;
786+
case TTN_FP_AU915:
787+
configureAU915(fsb);
788+
break;
762789
case TTN_FP_AS920_923:
763790
configureAS920_923();
764791
break;
@@ -784,6 +811,7 @@ bool TheThingsNetwork::setSF(uint8_t sf)
784811
case TTN_FP_AS920_923:
785812
case TTN_FP_AS923_925:
786813
case TTN_FP_KR920_923:
814+
case TTN_FP_AU915:
787815
dr = 12 - sf;
788816
break;
789817
case TTN_FP_US915:

src/TheThingsNetwork.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#define TTN_PWRIDX_EU868 "1"
1616
#define TTN_PWRIDX_US915 "5"
17+
#define TTN_PWRIDX_AU915 "5"
1718
#define TTN_PWRIDX_AS920_923 "1" // TODO: should be 0, but the current RN2903AS firmware doesn't accept that value (probably still using EU868: 1=14dBm)
1819
#define TTN_PWRIDX_AS923_925 "1" // TODO: should be 0
1920
#define TTN_PWRIDX_KR920_923 "1" // TODO: should be 0
@@ -34,6 +35,7 @@ enum ttn_fp_t
3435
{
3536
TTN_FP_EU868,
3637
TTN_FP_US915,
38+
TTN_FP_AU915,
3739
TTN_FP_AS920_923,
3840
TTN_FP_AS923_925,
3941
TTN_FP_KR920_923
@@ -63,6 +65,7 @@ class TheThingsNetwork
6365
void autoBaud();
6466
void configureEU868();
6567
void configureUS915(uint8_t fsb);
68+
void configureAU915(uint8_t fsb);
6669
void configureAS920_923();
6770
void configureAS923_925();
6871
void configureKR920_923();

0 commit comments

Comments
 (0)