jgromes / RadioLib

Universal wireless communication library for embedded devices
https://jgromes.github.io/RadioLib/
MIT License
1.54k stars 384 forks source link

SX1278 868Mhz Fails to initialize, because of invalid range check #154

Closed lillefyr closed 4 years ago

lillefyr commented 4 years ago

Describe the bug When initializing LoRa with the frequency 868.1 MHz, radioLib returns error -12 Invalid Frequency. This happens because of the code in RadioLib/src/modules/SX127x/SX1278.cpp line 64 (first line in SX1278::setFrequency) int16_t SX1278::setFrequency(float freq) { RADIOLIB_CHECK_RANGE(freq, 137.0, 525.0, ERR_INVALID_FREQUENCY);

Additional info (please complete):

jgromes commented 4 years ago

This is intentional - SX1278 frequency range is 137 - 525 MHz, according to official documentation. See SX1276/77/78/79 datasheet, Table 1 on page 10.