Optimized High Speed NRF24L01+ Driver Class Documenation  V1.0
TMRh20 2014 - Optimized Fork of NRF24L01+ Driver
Linux cross-compilation

RF24 library supports cross-compilation. Advantages of cross-compilation:

Following prerequisites need to be assured:

Cross compilation steps:

  1. clone RF24 to a machine for cross-compilation
    git clone https://github.com/TMRh20/RF24
    cd RF24
  2. configure for cross compilation
    ./configure --remote=pi@target_linux_host
    eventually
    ./configure --remote=pi@target_linux_host --driver=<driver>
  3. build
    make
  4. (opt) install library to cross-compilation machine into cross-exvironment - important for compilation of examples
    sudo make install
  5. upload library to target machine
    make upload
  6. (opt) compile examples
    cd examples_linux
    make
  7. (opt) upload examples to target machine
    make upload

Cross comilation steps for python wrapper

Prerequisites:

Installation steps:

  1. Assure having libboost-python-dev library in your cross-compilation environment. Alternatively, you can install it into your target machine and copy /usr and /lib directories to the cross-compilation machine. For example
    mkdir -p rpi_root && rsync -a pi@target_linux_host:/usr :/lib rpi_root
    export CFLAGS="--sysroot=/your/dir/rpi_root -I/your/dir/rpi_root/usr/include/python2.7/"
  2. Build the python wrapper
    cd pyRF24
    ./setup.py build --compiler=crossunix
  3. Make the egg package
    ./setup.py bdist_egg --plat-name=cross
    dist/RF24-<version>-cross.egg should be created.
  4. Upload it to the target machine and install there:
    scp dist/RF24-*-cross.egg pi@target_linux_host:
    ssh pi@target_linux_host 'sudo easy_install RF24-*-cross.egg'