Closed ngfelixl closed 3 years ago
I have written a test program without nodejs which is working very well without segmentation fault when executing as root. Normal execution leads to the same error. Any suggestions for making it `working as non-root or letting nodejs execute its addons as root (if that's possible)?
The bcm SPI driver needs root. You can set it up using spidev driver to use non root. Google for instructions.
On May 25, 2018, at 16:02, Felix Lemke notifications@github.com wrote:
I have written a test program without nodejs which is working very well without segmentation fault when executing as root. Normal execution leads to the same error. Any suggestions for making it `working as non-root or letting nodejs execute its addons as root (if that's possible)?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Spidev driver is working, but now every function call (printDetails etc) in nodejs prints Error: can't send spi message
. Even gdb does not print any c++ related issues, but if I remove the calls it works. In the test program without node everything works as expected, even without root.
Any ideas?
same issue after update nodejs to 12.18.0 and nrf24 to 0.1.5. Before with node js v 8.x and nrf24 0.1.4 it works fine
closing this as it doesn't seem to require changes on our end
Hi, I'm currently trying to build a nodejs nbind c++ addon on top of this library. The configuration and installation of this lib was successful, followed the instructions on this github page for raspberry pi. Next I importet the shared lib to my nbind project and I'm able to create RF24 instances successfully. The program is also able to share data between nodejs and c++. But when I call RF24 member functions (tested printDetails and getChannel) I get a segmentation fault like follows
The printDetails functions breaks after the first 3 lines returning the pins and the clock speed.
Any suggestions on how to debug this?
For completion I also share a simplified version of my code. The .cpp file looks as follows
This is the corresponding header