Wireless Sensor Networking

Using dynamic payload lengths for NRF24L01 with PDLIB_NRF24L01

In the previous post I have mentioned about the library which I developed for the NRF24L01 module. In the first release I could not include some of the features it had, such as Dynamic Payload capability and Ack Payload capability. I have included those features in the version 1.02. Following is a small description about the changes.

Dynamic Payload

Dynamic Payload capability is very useful in communication. This enables modules to communicate using non-static payload lengths. For example if I don’t have this feature, in order to send 10 bytes of data among the modules, I will have to configure both the devices to accept 10 data bytes. Later, if I want to change the number of bytes to 15, I will have to reconfigure the devices.

However, with Dynamic Payload enabled we don’t need to do that. We can simply send data between modules without configuring the data length. But the maximum data length for NRF24L01 is 32 bytes.

To configure the feature, we only need to call the function NRF24L01_EnableFeatureDynPL() with the required pipe number after we initialize the module. Then we can perform communication using the same functions we used previously. (Please refer to the previous post for more details)