0

I have a RPI3 with Arch on it and I cannot access any of the GPIO pins.

When using a python wrapper like gpiozero to turn a pin on I get an error like:

/usr/lib/python3.6/site-packages/gpiozero/devices.py:451: PinFactoryFallback: Falling back from rpigpio: This module can only be run on a Raspberry Pi!
  'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:451: PinFactoryFallback: Falling back from rpio: No module named 'RPIO'
  'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:451: PinFactoryFallback: Falling back from pigpio: No module named 'pigpio'
  'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:451: PinFactoryFallback: Falling back from native: unable to open /dev/gpiomem or /dev/mem; upgrade your kernel or run as root
  'Falling back from %s: %s' % (name, str(e))))
Traceback (most recent call last):
  File "./lampon", line 2, in <module>
    from gpiozero import LED
  File "/usr/lib/python3.6/site-packages/gpiozero/__init__.py", line 22, in <module>
    from .devices import (
  File "/usr/lib/python3.6/site-packages/gpiozero/devices.py", line 480, in <module>
    Device.pin_factory = _default_pin_factory()
  File "/usr/lib/python3.6/site-packages/gpiozero/devices.py", line 452, in _default_pin_factory
    raise BadPinFactory('Unable to load any default pin factory!')
gpiozero.exc.BadPinFactory: Unable to load any default pin factory!

Other libraries give the same result.

I believe the problem is in fact deeper and has to do with the fact that the device tree does not include the pins, my folder

/sys/class/gpio/

does not contain any pin device/file and so I can't write to their status by echoing.

I've tried loading the device tree from a previous RPI by adding

device_tree=bcm2709-rpi-2-b.dtb

to config.txt (and downloading the file) which prevented the pi from booting. I also tried adding

dtparam=gpio_out_pin=2

Any suggestion? I can't believe the pin don't work on the RPI3 period...

0

You really need to ask on an Arch specific forum.

Arch is a distribution targeted at experts.

gpiozero and the other modules may be complaining because they need the device /dev/gpiomem, and a gpio group, and for the pi user to be a member of the gpio group.

Try my pigpio. It might work on Arch.

| improve this answer | |
  • I will give it a try. But the arch arm forum are a bit dead as it seems. But this seems a larger issue w/ device tree. Does the basic raspbian installation show the gpio under /dev/ ? I might try steal that tree or just flash raspian back – Three Diag Feb 11 '18 at 10:34
  • I think /devgpiomem (for rootless access to GPIO) was added by raspberrypi.org for Raspbian (which is their preferred operating system). – joan Feb 11 '18 at 10:37

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.