Report
3 years, 1 month ago.

TX only null

Hi, first of all, thank for your work.

I'm trying to connect an Arduino and a Nucleo 411 with the GettingStarted example.

It works except when the Nucleo sends data to the Arduino. The Arduino receives the packets, but they contain only zeros. All the other directions of communications work fine.

So basically the problem is in .write() somewhere, because che packet is sent, but the data is corrupted.

Thank you again, Luca

Question relating to:

Maniacbug's RF24 arduino library ported to mbed. Tested, it works for Nucleo F411 maniacbug, nRF24L01, nRF24L01P, RF24
Comment on this question

1 Answer

3 years, 1 month ago.

The library is setting the payload data length to 0 (well technically to an undefined value but 0 if a variable is initializing to 0) and then filling the unused portion of the packet with 0's.

Change line 116 of RF24.cpp from

    uint8_t data_len = rf24_min(data_len, payload_size);

to

    uint8_t data_len = rf24_min(len, payload_size);

I changed that line and it worked perfectly! Is this a know bug?

posted by Luca Olivieri 22 Feb 2016

I have no idea if this is known or not, it's the first time I've ever looked at this code. You should submit a pull request to get the library fixed.

posted by Andy A 22 Feb 2016

Thanks for finding this bug Andy, have updated the library...

posted by Akash Vibhute 23 Feb 2016

To post an answer, please log in.