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

EINVAL: invalid argument, write - stack trace trying to set up a GPIO pin as an input (onoff issue) #83

Closed
dkossman opened this issue Sep 21, 2024 · 1 comment

Comments

@dkossman
Copy link

dkossman commented Sep 21, 2024

I'm trying to set up a pushbutton connected to GPIO 23 (pin 16) to trigger service mode per some comments in the discussions.
However as soon as I enable the pin and save, i get the above write error and a stack trace (see screenshot)

I believe this problem is related to the default "onoff" dependency being incompatible with the latest raspberry Pi OS in terms of the GPIO pin numbering.

Looks like "onoff" is not being maintained. there is an open pull request to address this but it has not been merged. see fivdi/onoff#204.

I found a fork of "onoff" that has that change merged, so pulled this to replace the npm default, and package.json now contains:
"onoff": "github:nwpray/onoff"

this seems to solve the problem...
Screenshot 2024-09-21 at 2 37 36 PM

@dkossman
Copy link
Author

just noticed that there is a board type for Pi4B running Bookworm. changed to this, problem went away. sorry for the false alarm.

@dkossman dkossman closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2024
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

1 participant