Correction in RX config error. If REG_LR_PAYLOADLENGTH and REG_LR_PAYLOADMAXLENGTH is not set, the RX is limited to 64 bytes.
Fork of SX1276Lib by
Diff: sx1276/sx1276.cpp
- Revision:
- 25:7ab8cc20ae64
- Parent:
- 24:79c5b50b2b9c
--- a/sx1276/sx1276.cpp Tue Mar 15 13:12:44 2016 +0000 +++ b/sx1276/sx1276.cpp Tue May 03 19:18:20 2016 +0000 @@ -330,9 +330,16 @@ Write( REG_LR_PREAMBLEMSB, ( uint8_t )( ( preambleLen >> 8 ) & 0xFF ) ); Write( REG_LR_PREAMBLELSB, ( uint8_t )( preambleLen & 0xFF ) ); - if( fixLen == 1 ) + //write PAYLOADLENGTH and PAYLOADMAXLENGTH even if it's not in fixedLength + if (payloadLen == 0) { - Write( REG_LR_PAYLOADLENGTH, payloadLen ); + Write(REG_LR_PAYLOADLENGTH, RX_BUFFER_SIZE); + Write(REG_LR_PAYLOADMAXLENGTH, RX_BUFFER_SIZE); + } + else + { + Write(REG_LR_PAYLOADLENGTH, payloadLen); + Write(REG_LR_PAYLOADMAXLENGTH, payloadLen); } if( this->settings.LoRa.FreqHopOn == true )