0

Adafruit_BBIO.GPIO unable to setup pins
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit_BBIO.GPIO unable to setup pins

by nturner on Mon Sep 11, 2017 7:49 pm

I'm using the Adafruit_BBIO.GPIO python library to control the pins on my BeagleBone Black. Unfortunately whenever I try to use the setup command I get the following message:
ValueError: Set gpio value failed, missing file or invalid permissions.

I'm logged in as root, so I should have all the permissions I need, and I have no idea what file would be missing. A snippet of my code is below.

Code: Select all | TOGGLE FULL SIZE
import Adafruit_BBIO.GPIO as GPIO

V1 = 'P8_7'

GPIO.cleanup()
GPIO.setup(V1, GPIO.OUT)

nturner
 
Posts: 2
Joined: Mon Sep 11, 2017 7:44 pm

Re: Adafruit_BBIO.GPIO unable to setup pins

by drewfustini on Tue Sep 12, 2017 2:21 am

I believe this a regression caused by this commit:

commit 35718a959b5b73c0774fb3e7d53fd412f1d92ec1
Author: Mark A. Yoder <Mark.A.Yoder@Rose-Hulman.edu>
Date: Fri Jul 28 16:53:39 2017 -0400

Added red and green LEDs


I am investigating further and will update.

drewfustini
 
Posts: 695
Joined: Sat Dec 26, 2015 1:19 pm

Re: Adafruit_BBIO.GPIO unable to setup pins

by drewfustini on Tue Sep 12, 2017 3:15 am

Please paste the output of:
sudo /opt/scripts/tools/version.sh

drewfustini
 
Posts: 695
Joined: Sat Dec 26, 2015 1:19 pm

Re: Adafruit_BBIO.GPIO unable to setup pins

by drewfustini on Tue Sep 12, 2017 3:18 am

It seems that this is not a problem with release 1.0.4:
Release 1.0.4

Please install rlease 1.0.4 and re-test:
https://github.com/adafruit/adafruit-beaglebone-io-python/archive/1.0.4.zip

I believe the problem was introduced in the most recent release (1.0.5). It might be a workaround to use 1.0.4 until this issue is resolved.

drewfustini
 
Posts: 695
Joined: Sat Dec 26, 2015 1:19 pm

Re: Adafruit_BBIO.GPIO unable to setup pins

by nturner on Tue Sep 12, 2017 2:08 pm

drewfustini wrote:Please paste the output of:
sudo /opt/scripts/tools/version.sh



sudo: /opt/scripts/tools/version.sh: command not found


I am running Debian, if that makes any difference.

I'll try running version 1.04 like you suggested and let you know how it goes for me.

nturner
 
Posts: 2
Joined: Mon Sep 11, 2017 7:44 pm

Re: Adafruit_BBIO.GPIO unable to setup pins

by CeesWesseling on Fri Sep 22, 2017 5:46 am

We are experiencing the same problem on BB black 4.4.54-ti-r93 with 1.05. Reverting back to 1.03 worked for us. Will try 1.04 as well.

BTW Is there like a version string in the package? looking at the source I only see VERSION id's of the modules like GPIO.
Adding Adafruit_BBIO.VERSION that has the value as version in the setup.py, e.g the package release number would come in handy.

Thanks.

CeesWesseling
 
Posts: 2
Joined: Fri Sep 22, 2017 5:42 am

Re: Adafruit_BBIO.GPIO unable to setup pins

by CeesWesseling on Fri Sep 22, 2017 6:50 am

1.04 also yielded:
ValueError: Set gpio mode failed, missing file or invalid permissions
on a GPIO.setup call.
So we are sticking to 1.0.3 for the moment.

All under python3.4 BTW, had to tweak Encoder.py for that in 1.0.4 as it used v2 print style

CeesWesseling
 
Posts: 2
Joined: Fri Sep 22, 2017 5:42 am

Please be positive and constructive with your questions and comments.