nRF24 data synchronization?

Hi,

I'm trying to send a packet of 6 bytes between two nRF24 modules. Now most tutorials I have seen just use buffers to send and receive data between the nrf modules. For example:

byte payload[6] = {...}
radio.write(&payload,sizeof(payload));
radio.read(&receivedPayload,sizeof(receivedPayload));

Is this a good idea? Could data be desynchronized if connection is disrupted? Or does the nrf do syncing internally?

For example here: Serial Input Basics - updated, in example 3, start- and end bytes are used to synchronize the data for Serial communication.

You appear to be very cautious. It is theoretically possible but the NRF24L01 has a built in, low level checking including CRC checks so such an error is extremely unlikely. More of an issue is when a transmission is larger that the maximum buffer size of 32 bytes and several buffer loads have to be sent consecutively. Then some sort of additional error handling for missing packets etc. is a good idea.

Thank you so much! That's really all I needed to hear as I wasn't sure. I'm making a remote for an rc plane so indeed I want to be cautious as I don't want it to nosedive when a tree gets in between xD.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.