piface / pifacecommon

Common functions for interacting with PiFace products
GNU General Public License v3.0
42 stars 31 forks source link

The GPIO_INTERRUPT_PIN = 25 is no longer valid in recent kernels #34

Open knob-creek opened 3 months ago

knob-creek commented 3 months ago

Since kernel 6.6 (?), the gpio pins have an offset of 512, so the correct number should be 537, now.

Cf. this bug report concerning the GPIO library

On a side note, the whole of the sysfs based API to GPIO is deprecated, so on the long run, this should be migrated to some GPIO library like lgpio.

BeanGirlThing commented 2 months ago

Unfortunately I don't think we're gonna get a fix, I've been digging through forks and changes over the last few hours trying to get my PiFaceCAD to work again, but it seems like all libraries that exist were made before the API changes. Rendering the device completely obsolite unless someone has the time to fix the issue.

knob-creek commented 1 month ago

@BeanGirlThing You can fix this on your own: all you need to do is to change GPIO_INTERRUPT_PIN in interrupts.py to 512 + 25. This will make pifacecommon work again (as long as the sysfs based api stays alive).

ralfoide commented 1 month ago

I've hit the same problem when updating from an RPi1 to RPi4 with my PiFace. I've made a fork with the change to fix the GPIO_INTERRUPT_PIN on recent kernels: https://github.com/ralfoide/pifacecommon