edge detection no longer working on Alpine linux 3.11.2 (kernel 5.4)
A Python module to control the GPIO on a Raspberry Pi
Brought to you by:
croston
Hi,
Trying Alpine linux 3.11.2 on a RPi Zero W, with python 3.8 and RPi.GPIO 0.6.5 i found that edge detection no longer works : e.g. throws a RuntimeError Error waiting for edge when calling wait_for_edge.
#python3 testgpio.py function of pin 4 = 1 pin 4 now is 0 Traceback (most recent call last): File "testgpio.py", line 8, in <module> x = g.wait_for_edge(pin, g.BOTH) RuntimeError: Error waiting for edge
this used to work on Alpinelinux 3.10 (python 3.7 and linux 4.19).
add_event_detect also doesn't work
Do you think this is a problem with Linux kernel 5.4 ? or python 3.8 ?
Thanks for any feedback
David
Hi,
Think I've found what the problem is.
RPi.GPIO edge detection relies on sysfs GPIO, which is deprecated since kernel 4.8 (i believe) :
https://www.kernel.org/doc/html/latest/admin-guide/gpio/sysfs.html
I've read that it'll be removed in 20 20 ; i.e. about tomorrow.
And it turns out that alpine linux 3.11.2 dropped support of sysfs gpio in their kernel.
Any plan to move RPi.GPIO on to the new character-device-gpio approach ?
David