manuelbl / ttn-esp32

The Things Network device library for ESP32 (ESP-IDF) and SX127x based devices
MIT License
301 stars 64 forks source link

How to select sub band when using AU915 #40

Closed dgashby closed 11 months ago

dgashby commented 2 years ago

Hi,

I've set things up as per the PlatformIO instructions and am using the AU915 band plan but one thing I'm struggling with is how to select the second sub-band. I can see the LMIC_selectSubBand() function in lmic_au915.c but am unsure how to access it from my main.cpp. Simply adding a call to LMIC_selectSubBand() results in a "'LMIC_selectSubBand' was not declared in this scope" error. None of the examples in the repo demonstrate how to do this, can someone please provide some pointers on how to do this?

Many thanks!

manuelbl commented 2 years ago

The latest version in the master branch selects sub-band 2 by default (for regions with sub-bands) and offers a new method to select the sub-band if needed at all.

This addition is currently in the master branch. I would appreciate it if you could give it a test.