nRF24 / RF24

OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
https://nrf24.github.io/RF24
GNU General Public License v2.0
2.21k stars 1.02k forks source link

Crash on radio.begin() #440

Closed P0W closed 6 years ago

P0W commented 6 years ago

I have connected my NRF24 module as described here http://tmrh20.github.io/RF24/RPi.html to my RPi

I cloned this repository and have Build using SPIDEV (I have ensured SPI was enabled and double checked that SPI module works, following this tutorial .

However when I build and launch ./gettingstarted, is abruptly terminated.

pi@raspberrypi:~/RF24/examples_linux $ ./gettingstarted
RF24/examples/GettingStarted/
terminate called after throwing an instance of 'int'
Aborted

I figured its from radio.begin();

Also if no NFR24 is connected to RPi , the same abort happens.

What I've missed , or doing wrong ?

TMRh20 commented 6 years ago

Use “sudo rf24... “ . The driver neeeds root. The spidev driver can be set up so this is not required.

On Jun 10, 2018, at 12:10, Prashant Srivastava notifications@github.com wrote:

I have connected my NRF24 module as described here http://tmrh20.github.io/RF24/RPi.html to my RPi

I cloned this repository and have Build using SPIDEV (I have ensured SPI was enabled and double checked that SPI module works, following this tutorial .

However when I build and launch ./gettingstarted, is abruptly terminated.

pi@raspberrypi:~/RF24/examples_linux $ ./gettingstarted RF24/examples/GettingStarted/ terminate called after throwing an instance of 'int' Aborted I figured its from radio.begin();

Also if no NFR24 is connected to RPi , the same abort happens.

What I've missed , or doing wrong ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Shucach commented 3 years ago

Use “sudo rf24... “ . The driver neeeds root. The spidev driver can be set up so this is not required. On Jun 10, 2018, at 12:10, Prashant Srivastava @.> wrote: I have connected my NRF24 module as described here http://tmrh20.github.io/RF24/RPi.html to my RPi I cloned this repository and have Build using SPIDEV (I have ensured SPI was enabled and double checked that SPI module works, following this tutorial . However when I build and launch ./gettingstarted, is abruptly terminated. @.:~/RF24/examples_linux $ ./gettingstarted RF24/examples/GettingStarted/ terminate called after throwing an instance of 'int' Aborted I figured its from radio.begin(); Also if no NFR24 is connected to RPi , the same abort happens. What I've missed , or doing wrong ? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

How to set permission for all users? I need to start this without root.

TMRh20 commented 3 years ago

https://github.com/nRF24/RF24/issues/194#issuecomment-172883559