Skip to content

how to disable CRC check in RF95? #1

Open

Description

@desword

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.

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?

Activity

  1. mrx23dot commented on Apr 26, 2024

    @mrx23dot

    on rxdone simply ignore crcerror

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions