1

I'm currently trying to resolve an issue, where my OnOffShim doesn't shut down the Pi 3B anymore.

So I checked /sys/class/gpio and was a little surprised that I don't find all GPIOs there:

user@rpi:~ $ ls -l /sys/class/gpio
insgesamt 0
-rwxrwx--- 1 root gpio 4096 Jan 13 22:18 export
lrwxrwxrwx 1 root gpio    0 Jan 13 22:19 gpio13 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio13
lrwxrwxrwx 1 root gpio    0 Jan 13 22:19 gpio16 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio16
lrwxrwxrwx 1 root gpio    0 Jan 13 22:19 gpio19 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio19
lrwxrwxrwx 1 root gpio    0 Jan 13 22:19 gpio20 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio20
lrwxrwxrwx 1 root gpio    0 Jan 13 22:19 gpio21 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio21
lrwxrwxrwx 1 root gpio    0 Jan 13 22:19 gpio26 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio26
lrwxrwxrwx 1 root gpio    0 Jan 13 22:18 gpiochip0 -> ../../devices/platform/soc/3f200000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root gpio    0 Jan 13 22:18 gpiochip504 -> ../../devices/platform/soc/soc:firmware/soc:firmware:expgpio/gpio/gpiochip504
-rwxrwx--- 1 root gpio 4096 Jan 13 22:18 unexport

I'm especially missing the GPIO4 and GPIO17, which are supposed to work with OnOffShim.

So is this as it should be or are there really some GPIO entries missing?

1

Should control this with wiringPi instead of ?

sudo apt-get install wiringPi
gpio readall
  • Thanks that helped to find out it was not related to SW. A cable was broken. – Simon Jan 15 at 21:35
2

Only GPIO the sysfs has been asked to control will be listed in /sys/class/gpio.

The GPIO not mentioned (i.e. other GPIO in the range 0-27) are not being controlled by sysfs.

Without knowing details of the operation of the OnOffShim we can't say if the absence of GPIO 4/17 is significant or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.