hello,will you please tell me which code i have to use in the sdk 12.2.0 for rf communication with nrf51822 and nrf24l01 .and also tell me which settings i have to do for nrf24l01 side as a transmitter.so that i can receive data on nrf51822 side.
hello,will you please tell me which code i have to use in the sdk 12.2.0 for rf communication with nrf51822 and nrf24l01 .and also tell me which settings i have to do for nrf24l01 side as a transmitter.so that i can receive data on nrf51822 side.
Hi Pallavi
The ESB library in the nRF5 SDK v12.2.0 is designed to be backwards compatible with the nRF24L01/nRF24L01+, assuming you don't use the L01 device in legacy Shockburst mode (ACK's disabled).
On the nRF5 side you can use the esb_ptx and esb_prx examples as a starting point: \nRF5_SDK_12.2.0\examples\proprietary_rf\
For this to work you need the following settings on the nRF24L01 side:
Default address (0xE7E7E7E7E7), with 5 byte address length
16-bit CRC
2Mbps bitrate
Auto ACK and dynamic payload length enabled
For all other settings you can use the default values.
Edit: Added attachment.
Best regards
Torbjørn
sir these settings i have done on the nrf24l01 side.will you please tell me is these settings are write for nrf24l01 as a transmitter.
on nrf24l01 side prograaming ide is arduino.and in nrf51 side using keil ide in nrf51 side i used sdk 12.2.0 and the code from this is esb_prx. but i am failing to do communication between nrf24l01 anf nrf51.
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(18, 19);
String TEXT="";
int x=0;
//const byte rxAddr[6] = "00001";
const byte rxAddr[5] = {0xE7,0xE7,0xE7,0xE7,0xE7};
char values;
void setup()
{
Serial.begin(9600);
radio.begin();
//radio.setPALevel(RF24_PA_MAX);
radio.setDataRate(RF24_2MBPS);
// radio.setChannel(7);
// radio.setRetries(15,15);
radio.setCRCLength(RF24_CRC_16);
radio.enableAckPayload();
radio.enableDynamicPayloads();
radio.openWritingPipe(rxAddr);
radio.stopListening();
}
void loop()
{
// Serial.print("value");
// if(Serial.available()) {
// while (Serial.available()>0){
values = '1';
radio.write(&values,1);
delay(500);
// Serial.print(value); //prints the character just read
}
//Serial.println();
Hi
What kind of hardware are you using on the nRF24L01+ side? Just a regular Arduino Uno?
Have you been able to verify the Arduino/nRF24L01+ kit in isolation by using a similar kit as the receiver, or could there be issues on the Arduino side as well?
Best regards
Torbjørn
i am using arduino uno board. i have done the tx rx communication of nrf24l01+arduino with another nrf24l01+arduino uno;with the above same specifications of rf. but it is not working with nrf51822. as you told i have used radio.enableAckPayload(); //function for enabling the Auto ACK and radio.enableDynamicPayloads(); // function for enabling the dynamic payload is these are write functions i am using for the two purposes,Auto ACK and enabling the dynamic payload.