Skip to content

Commit 47bfead

Browse files
committed
Fix #553: add CFG_au915, other region to ttn-abp example
1 parent c99f2a2 commit 47bfead

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

examples/ttn-abp/ttn-abp.ino

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ void setup() {
237237
// frequencies, so be sure to configure the full frequency range of
238238
// your network here (unless your network autoconfigures them).
239239
// Setting up channels should happen after LMIC_setSession, as that
240-
// configures the minimal channel set.
240+
// configures the minimal channel set. The LMIC doesn't let you change
241+
// the three basic settings, but we show them here.
241242
LMIC_setupChannel(0, 868100000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_CENTI); // g-band
242243
LMIC_setupChannel(1, 868300000, DR_RANGE_MAP(DR_SF12, DR_SF7B), BAND_CENTI); // g-band
243244
LMIC_setupChannel(2, 868500000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_CENTI); // g-band
@@ -251,12 +252,39 @@ void setup() {
251252
// devices' ping slots. LMIC does not have an easy way to define set this
252253
// frequency and support for class B is spotty and untested, so this
253254
// frequency is not configured here.
254-
#elif defined(CFG_us915)
255-
// NA-US channels 0-71 are configured automatically
255+
#elif defined(CFG_us915) || defined(CFG_au915)
256+
// NA-US and AU channels 0-71 are configured automatically
256257
// but only one group of 8 should (a subband) should be active
257258
// TTN recommends the second sub band, 1 in a zero based count.
258259
// https://github.com/TheThingsNetwork/gateway-conf/blob/master/US-global_conf.json
259260
LMIC_selectSubBand(1);
261+
#elif defined(CFG_as923)
262+
// Set up the channels used in your country. Only two are defined by default,
263+
// and they cannot be changed. Use BAND_CENTI to indicate 1% duty cycle.
264+
// LMIC_setupChannel(0, 923200000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_CENTI);
265+
// LMIC_setupChannel(1, 923400000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_CENTI);
266+
267+
// ... extra definitions for channels 2..n here
268+
#elif defined(CFG_kr920)
269+
// Set up the channels used in your country. Three are defined by default,
270+
// and they cannot be changed. Duty cycle doesn't matter, but is conventionally
271+
// BAND_MILLI.
272+
// LMIC_setupChannel(0, 922100000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_MILLI);
273+
// LMIC_setupChannel(1, 922300000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_MILLI);
274+
// LMIC_setupChannel(2, 922500000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_MILLI);
275+
276+
// ... extra definitions for channels 3..n here.
277+
#elif defined(CFG_in866)
278+
// Set up the channels used in your country. Three are defined by default,
279+
// and they cannot be changed. Duty cycle doesn't matter, but is conventionally
280+
// BAND_MILLI.
281+
// LMIC_setupChannel(0, 865062500, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_MILLI);
282+
// LMIC_setupChannel(1, 865402500, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_MILLI);
283+
// LMIC_setupChannel(2, 865985000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_MILLI);
284+
285+
// ... extra definitions for channels 3..n here.
286+
#else
287+
# error Region not supported
260288
#endif
261289

262290
// Disable link check validation

0 commit comments

Comments
 (0)