-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EPERM, operation not permitted while pin.value(true); #3
Comments
The Raspberry Pi GPIO device files are not available to users by default. You'll need to either start your script via |
Actually, I'm reopening this issue as I review the non-sudo solutions. The device files themselves are "exported" (i.e. created) by this library during normal course of operations: Line 28 in 79c0445
So I'd like to add a CLI script to this package that can be used once (via In the meantime the workaround would be to use the existing Python/C/whatever utilities that do this first. Thanks for the bug report, @kiddyfurby! |
Thank you for your great library! manually export the GPIO and chmod didn't help, actually, not even running as root helps. [root@alarmpi pi-pins]# node test.js fs.js:540 |
On both a raspberry pi (arch linux arm) and a beaglebone black (debian) I get a permission denied running test.js that came with
npm install pi-pins
If I change index.js:46 to use a write() instead of writeSync() there will be no error, however I do want to make sure my write are not just buffered.
trace from
node test.js
fs.js:540
return binding.write(fd, buffer, offset, length, position);
^
Error: EPERM, operation not permitted
at Object.fs.writeSync (fs.js:540:18)
at EventEmitter.gpio.value (/root/nrf/node_modules/nrf/node_modules/pi-pins/index.js:46:16)
at Object. (/root/nrf/node_modules/nrf/node_modules/pi-pins/test.js:9:6)
The text was updated successfully, but these errors were encountered: