7 years, 5 months ago.

SX1276lib/SX1276PingPong LoRaWAN bandwidth register setup is different from its datasheet ?

Accoding to SX127X datasheet (at pg112/113, depends on document version), its RegModemConfig1 in LoRa mode should have bandwidth configuration from 0x00 to 0x09, stands for following setup:

  • 7.8KHz
  • 10.4KHz
  • 15.6KHz
  • 20.8KHz
  • 31.25KHz
  • 41.7KHz
  • 62.5KHz
  • 125KHz
  • 250KHz
  • 500KHz

But in SX1276lib and its PingPong demo code, we can found only 125KHz to 500KHz is allowed in LoRa mode.

main.cpp

    #define LORA_BANDWIDTH                              2         // [0: 125 kHz,
                                                                  //  1: 250 kHz,
                                                                  //  2: 500 kHz,
                                                                  //  3: Reserved]

<<code title=SX1276Lib/sx1276.cpp>>

if( bandwidth > 2 ) { Fatal error: When using LoRa modem only bandwidths 125, 250 and 500 kHz are supported while( 1 ); } bandwidth += 7; this->settings.LoRa.Bandwidth = bandwidth;

<<code>>

The bandwidth +=7 happens twice in SetTx() and SetRx() methods.

Is there any silicon revision and document support about that change ? Since I found some code was using narrow band like 10.4KHz BW.

Be the first to answer this question.