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 in openSUSE tumbleweed,4B #218

Open
Dregen-Yor opened this issue Apr 11, 2024 · 11 comments
Open

Error in openSUSE tumbleweed,4B #218

Dregen-Yor opened this issue Apr 11, 2024 · 11 comments
Labels
triage identified and logged, but it hasn't yet been fully reviewed or assigned a priority

Comments

@Dregen-Yor
Copy link

When I try to use gpio readall, it return wiringPiSetup: mmap (GPIO) failed: Operation not permitted.

@Dregen-Yor
Copy link
Author

In addition, I do it as the root.

@mwallner
Copy link
Collaborator

mwallner commented Apr 12, 2024

that's interesting, could you please provide the output when you do the following sequence of commands?

uname -a
su
who
WIRINGPI_DEBUG=1 gpio readall

@mwallner mwallner added the triage identified and logged, but it hasn't yet been fully reviewed or assigned a priority label Apr 12, 2024
@mwallner
Copy link
Collaborator

actually might be related to #211
your kernel configuration might not support DMA for gpio access, so you might have to fall back to libgpiod until we'll have support for the userspace mode access types in WiringPi (on our list, but cannot give you any due dates)

@Dregen-Yor
Copy link
Author

that's interesting, could you please provide the output when you do the following sequence of commands?

uname -a
su
who
WIRINGPI_DEBUG=1 gpio readall

The output is
image

@Dregen-Yor
Copy link
Author

what can I do to solve this problem, please help. qwq

@mstroh76
Copy link
Member

Do you have device
/dev/gpiomem ?

@Dregen-Yor
Copy link
Author

Do you have device
/dev/gpiomem ?

no, but I have /dev/gpiochip0 and /gpiochip1

@mstroh76
Copy link
Member

mstroh76 commented Apr 15, 2024

Wait for #219 or change to kernel with DMA support.

@mstroh76
Copy link
Member

mstroh76 commented Apr 16, 2024

If you're brave, you can test branch GPIOAPI with the new kernel GPIO device implementation (version 3.3). it's Slow and only basic testing is done so far.

Need to call wiringPiSetupGpioDevice() to activate

@mwallner
Copy link
Collaborator

@mstroh76 - would the user always have to call wiringPiSetupGpioDevice, or will this be done automatically as a fallback (when no DMA support is detected)?

@mstroh76
Copy link
Member

mstroh76 commented May 8, 2024

'Support Kernel Character Device interface' is now included since version 3.4 .
It's only used if wiringPiSetupGpioDevice is called from your program. There is no fallback.
'gpio readall' is not working with new Kernel interface, only if DMA is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage identified and logged, but it hasn't yet been fully reviewed or assigned a priority
Projects
None yet
Development

No branches or pull requests

3 participants