Linux Installation¶
Generic Linux devices are supported via SPIDEV, PiGPIO, MRAA, RPi native via BCM2835, or using LittleWire.
Automated Install (Deprecated - 32 bit only)¶
Designed & Tested on RPi - Defaults to SPIDEV on devices supporting it
Install prerequisites if there are any (pigpio, MRAA, LittleWire libraries, setup SPI device etc)
Download the install.sh file from http://tmrh20.github.io/RF24Installer/RPi/install.sh
wget http://tmrh20.github.io/RF24Installer/RPi/install.shMake it executable
chmod +x install.shRun it and choose your options
./install.shRun an example from one of the libraries
cd rf24libs/RF24/examples_linuxEdit the gettingstarted example, to set your pin configuration
nano gettingstarted.cpp make sudo ./gettingstarted
Manual Install (Deprecated - 32 bit only)¶
Install prerequisites if there are any (pigpio, MRAA, LittleWire libraries, setup SPI device etc)
Make a directory to contain the RF24 and possibly RF24Network lib and enter it
mkdir ~/rf24libs cd ~/rf24libsClone the RF24 repo
git clone https://github.com/tmrh20/RF24.git RF24Change to the new RF24 directory
cd RF24Configure build environment using the command:
./configureIt automatically detects device and build environment.
For overriding automatic detections, use command-line arguments, see
./configure --helpfor description.
Build the library, and run an example file
make sudo make install
cd examples_linux
Edit the gettingstarted example, to set your pin configuration
ano gettingstarted.cpp
make
sudo ./gettingstarted
Build using SPIDEV (Deprecated - 32 bit only)¶
Make sure that spi device support is enabled and /dev/spidev<a>.<b> is present
Manual Install using SPIDEV:
./configure --driver=SPIDEV make sudo make installSee the gettingstarted example for an example of pin configuration
Note
The SPIDEV option should work with most Linux systems supporting spi userspace device.
Warning
SPIDEV is now always selected as the default driver because all other Linux drivers are being removed in the future. See RF24 issue #971 for rationale.
Note
See the MRAA documentation for more info on installing MRAA
Warning
SPIDEV is now always selected as the default driver because all other Linux drivers are being removed in the future. See RF24 issue #971 for rationale.