Ubuntu Server 21.04 GPIO Not Working

Based on this post, as of Linux kernel 5.11, the old methods of communicating with header pins on the Raspberry Pi no longer work. This means packages such as RPi.GPIO no longer function properly with newer kernels hence the node-red-node-pi-gpio is not functioning as well.

According to that post, a new package called LGPIO able to communicate with the header pins on the Raspberry Pi. I've installed it using the command below but it's not working within Node-Red:
sudo apt install python3-lgpio

I assumed that this require a new Node that able to interact with LGPIO library. Can anyone point me to this Node as I'm not able to find it anywhere on the Net?

FYI, below is the specs that I'm currently using for my project:
Hardware: Raspberry Pi 4 Model B Rev 1.2
Operating System: Ubuntu Server 21.04
Kernel: Linux 5.11.0-1017-raspi
Architecture: arm64
Node.js: v14.17.6
Node-RED: v2.0.6

Yes it will probably require a new node - or extensive rework of the old one... Something that I'm not aware of anyone having done. Is this something that will also affect RaspiOS ? What is their solution ?

In one article I found it said the the author of rpi.gpio was making changes to allow for this, but I haven't been able to find anything concrete.

https://github.com/jahudka/node-lgpio Looks interesting, its a set of node bindings direct to the lg library, a new node based on this would avoid the need for the python installs

does it manage to run without having to be root ?

I'm able to run it without being root. I followed this tutorial and manage to run the script using the default user (ubuntu)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.