Skip to content
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

Error: EINVAL: invalid argument, write #59

Open
Rocketman21 opened this issue Dec 2, 2017 · 1 comment
Open

Error: EINVAL: invalid argument, write #59

Rocketman21 opened this issue Dec 2, 2017 · 1 comment

Comments

@Rocketman21
Copy link

Hello! I'm trying to launch a test script on my Orange Pi Zero, node version is 8.9.1, and I execute the command as root user, but I get this error:

> [email protected] test /root/nrf-test
> node node_modules/nrf/test.js

fs.js:735
    return binding.writeBuffer(fd, buffer, offset, length, position);
                   ^

Error: EINVAL: invalid argument, write
    at Object.fs.writeSync (fs.js:735:20)
    at Object.fs.writeFileSync (fs.js:1301:24)
    at Object.exports.connect (/root/nrf-test/node_modules/pi-pins/index.js:28:16)
    at Object.exports.connect (/root/nrf-test/node_modules/nrf/index.js:32:19)
    at Object.<anonymous> (/root/nrf-test/node_modules/nrf/test.js:23:17)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
npm ERR! Test failed.  See above for more details.

Any ideas why is this happening? Help me please.

@natevw
Copy link
Owner

natevw commented Dec 4, 2017

Hmm, this happens when the nrf library tries to initialize the GPIO pins (via https://github.com/natevw/pi-pins/blob/79c044540a6efa5400b50d524028b013845858a2/index.js#L28)

The built in test program is configured to use cePin = 24, irqPin = 25 and maybe just a simple mismatch with what is available on the Orange Pi is causing this?

(Otherwise we might need to do a bit more debugging with how the Orange Pi distro has the GPIO devices set up. I found this thread which may/may not help if it comes to that: https://forum.armbian.com/topic/1471-solved-difficulty-accessing-gpio-via-the-sunxi-gpio-export-interface/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants