Now I want to keep all of the packets received at the LG01 or LoRa shield.
However, in current implementation of RadioHead, with enabling CRC, only packets that pass CRC check will be keeped.
I have tried my best to disable CRC but it can not work.
I have looked up from the datasheet sx1276_77_78_79 to find the register, and modify the corresponding value for RxPayloadCrcOn in RegModemConfig2(0x1E).
According to the description,
Enable CRC generation and check on payload:
0 -> CRC disable
1 -> CRC enable
If CRC is needed, RxPayloadCrcOn should be set:
in Implicit header mode: on Tx and Rx side
in Explicit header mode: on the Tx side alone (recovered from
the header in Rx side)
Then it should be worked when I add a new function like this.
According to the output from the serial, I have successfully modified the value of RxPayloadCrcOn from 1 to 0.
However, when I recompile the sketch of LoRa_simple_client_arduino and LoRa_Simple_server_Yun.
The LoRa shield can not received the packets from the LG01 anymore.
Now I want to keep all of the packets received at the LG01 or LoRa shield. However, in current implementation of RadioHead, with enabling CRC, only packets that pass CRC check will be keeped.
I have tried my best to disable CRC but it can not work. I have looked up from the datasheet sx1276_77_78_79 to find the register, and modify the corresponding value for RxPayloadCrcOn in RegModemConfig2(0x1E). According to the description,
Enable CRC generation and check on payload: 0 -> CRC disable 1 -> CRC enable If CRC is needed, RxPayloadCrcOn should be set:
Then it should be worked when I add a new function like this.
void RH_RF95::setCRCState(int8_t crcState) { spiWrite(RH_RF95_REG_1E_MODEM_CONFIG2, (spiRead(RH_RF95_REG_1E_MODEM_CONFIG2) & 0xfb) | ((crcState << 2) & 0x04)); }
According to the output from the serial, I have successfully modified the value of RxPayloadCrcOn from 1 to 0. However, when I recompile the sketch of LoRa_simple_client_arduino and LoRa_Simple_server_Yun. The LoRa shield can not received the packets from the LG01 anymore.
Therefore, how to disable CRC check correctly?