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

[bug #44218] linuxgpio not working with raspberryPi 2. "Can't open gpioX/direction" : Permission denied. Fixed by little delay #372

Closed
avrs-admin opened this issue Dec 10, 2021 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@avrs-admin
Copy link

Rizlik rizlik@inventati.org
Mon 09 Feb 2015 11:31:25 PM UTC

Hi,

When trying to use avrdude with my raspberryPi2 using linuxgpio programmer I got:

"Can't open gpioX/direction" : Permission denied

When stepping the code in gdb the problem is not reproduced, so I thought that the problem is that avrdude try to change direction too fast after he exported the gpio pin.

Indeed adding a little delay before trying to switch direction fixes the problem. I attach a little patch that solve the problem for me.

Same problem is shown by

$ echo 2 > /sys/class/gpio/export; echo in > /sys/class/gpio2/direction

So isn't a problem of avrdude.

Hope it helps,
rizlik

file #33041: gpio_fix.patch

This issue was migrated from https://savannah.nongnu.org/bugs/?44218

@mcuee
Copy link
Collaborator

mcuee commented Jun 6, 2022

@mcuee
Copy link
Collaborator

mcuee commented Jul 10, 2022

I will mark this as duplicate of #386 and the fix is in #917.

@mcuee mcuee closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants