-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Debian 10: wiringPiSetup: mmap (GPIO) failed: Operation not permitted #108
Comments
One possible cause may be that this line setting piGpioBase to 0 was triggered. It's not clear that the logic there is correct, because it then proceeds to use To be clear, though, that's just a quick guess. |
That did it! Here's the patch if anyone else needs it:
|
Great! There may be other pitfalls lurking, so feel free to open other issues if any arise, of course. And while it's possible that removing the |
As I read the code further, I see how The discussion and code linked here suggests the offset doesn't matter and is in fact ignored. But then why did changing the offset make a difference for you? My guess is that it may be another kernel difference between Debian and Raspberry Pi OS. That discussion and the kernel code linked, combined with your result, suggests more strongly that leaving |
In my case (Debian GNU/Linux 12 (bookworm)) I had the same problem and adding |
[To workaround issue #107] I hardcoded the return of
piBoardId()
to PI_MODEL_4B,0,0,0 seeing that the rest of the values don't seem to matter and finally got past the error:But I still can't get it working on plain Debian 10, getting this:
Tried to add
iomem=relaxed
to/boot/firmware/cmdline.txt
as suggested in the Debian Wiki and running as root but it didn't make any difference.Originally posted by @albertmonzo in #107 (comment)
The text was updated successfully, but these errors were encountered: