1 Reply Latest reply on Jun 2, 2015 2:45 PM by CMata_Intel

    Gen2 nRF24l01 - UPM examples not working




      for the past few days I've been trying to bring@ ! life to my nRF24l01 radio transcievers. I started coding it hard way, using only MRAA library and writing all registers by hand etc. It was not working, so I thought that I should try some templates provided on github. I used one from link #1 (at the bottom), and result was the same, nothing was working. I tried to first write some registers and then read them, but never have I recieved a proper result.


      Almost each time I read RX_ADDR_P0, the result was different, and very far different from {0x01,0x01,0x01,0x01,0x01}. About SPI - I hooked up shift register (74HC595) to see if it's working and everything was fine, well at least SCK and MOSI lines. Strange thing was, when I changed SCK frequency by calling function mraa_spi_frequeny(), nothing happened, speed remained the same. I also tried to solder a 3.3uF capacitor between VCC and GND pins to eliminate power line distortion; resulted in no change. UPM libraries on both PC and Galileo are up to date.


      I don't have any idea what could be wrong, I'm looking forward to hear your advice Below, there is example code I slightly changed and used.


      uint8_t local_address[5]     = {0x01, 0x01, 0x01, 0x01, 0x02};
      int main(int argc, char **argv)
          comm = new upm::NRF24L01(4,5);
          comm->setSourceAddress ((uint8_t *) local_address);
          comm->setDestinationAddress ((uint8_t *) broadcast_address);
          comm->setPayload (MAX_BUFFER);
          comm->configure ();
          comm->setSpeedRate (upm::NRF_250KBPS);
          comm->setChannel (10);
          comm->dataRecievedHandler = nrf_handler;
          uint8_t *data = new uint8_t[5];
          comm->readRegister(RX_ADDR_P0, data, 5);
          for(int i = 0 ; i < 5; i++) {
          cout << int(data[i]) << " ";
          cout << endl;
          signal(SIGINT, sig_handler);
          std::cout << "exiting application" << std::endl;
          delete comm;
          return 0;



      Link #1 : https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/nrf24l01-receiver.cxx