Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 10 months 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:
1 Answer
8 years, 10 months 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);