This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Send / receive a fix length proprietary packet in nRF51822 QFAAG0

Hi,

As well know, the max packet length is 252 byte in nRF51822 proprietary protocol.

Would you please tell me how to send / receive 252 byte packet? Where can I found the example file?

Thank you,

Chianglin 

  • Hi

    You would have to change the NRF_ESB_MAX_PAYLOAD_LENGTH define in nrf_esb.h to support 252 byte payload. By using the standard esb_ptx and esb_prx examples in the SDK you should be able to make this modification, and take advantage of the larger packet size. 

    Please be aware that the NRF_ESB_CREATE_PAYLOAD macro doesn't work for payloads this large, so you would have to fill the struct manually:

    nrf_esb_payload_t tx_payload = {0};
    tx_payload.data[0] = x;
    tx_payload.data[1] = y;
    .
    .

    Best regards
    Torbjørn

Related