Skip to content

GPIO value set up failure #228

@rd-tyler

Description

@rd-tyler

I am currently running into an issue using the BBB version of the GPIO set up using this library. I am able to set up PWM and GPIO manually but using anything included in the Char_LCD library, including the example sets ( https://github.com/adafruit/Adafruit_Python_CharLCD ) I receive the following error:

debian@beaglebone:~/Adafruit_Python_CharLCD/examples$ sudo ./char_lcd_rgb_pwm.py
Traceback (most recent call last):
  File "./char_lcd_rgb_pwm.py", line 71, in <module>
    enable_pwm=True)
  File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 367, in __init__
  File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 152, in __init__
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 278, in setup
ValueError: Set gpio value failed, missing file or invalid permissions.

After some digging I was able to find similar issues having been resolved by upgrading the kernel version. In attempting to do so I get the following:

debian@beaglebone:/opt/scripts/tools$ sudo ./update_kernel.sh --lts-4_14
info: checking archive
2018-01-23 23:47:42 URL:https://rcn-ee.com/repos/latest/stretch-armhf/LATEST-ti [136/136] -> "LATEST-ti" [1]
-----------------------------
Kernel Options:
ABI:1 LTS41 4.1.30-ti-r70
ABI:1 LTS44 4.4.110-ti-r143
ABI:1 LTS49 4.9.77-ti-r92
ABI:1 LTS414 4.14.14-ti-r27
-----------------------------
Kernel version options:
-----------------------------
LTS44: --lts-4_4
LTS49: --lts-4_9
LTS414: --lts-4_14
STABLE: --stable
TESTING: --testing
-----------------------------
info: you are running: [4.4.91-ti-r133], latest is: [4.14.14-ti-r27] updating...
Ign:1 http://deb.debian.org/debian stretch InRelease                          
Hit:2 http://repos.rcn-ee.com/debian stretch InRelease                        
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://deb.debian.org/debian-security stretch/updates InRelease
Hit:5 http://deb.debian.org/debian stretch Release
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Checking dpkg...
Checking apt-cache...
debug: installing: [linux-image-4.14.14-ti-r27]
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Trying to execute the recommended command just temporarily disconnects the beaglebone, resets it to the standard landing screen, and doesn't actually resolve the issue as it persists and repeats the message.

When executing:

sudo apt list --upgradable

I get the following:

debian@beaglebone:~$ sudo apt list --upgradable
[sudo] password for debian:
Listing... Done
bb-node-red-installer/unknown 0.17.5-0rcnee5~stretch+20180120 armhf [upgradable from: 0.17.5-0rcnee0~stretch+20170816]
N: There is 1 additional version. Please use the '-a' switch to see it

So, I tried to upgrade node red using the following approach:

sudo apt remove bb-node-red-installer --purge
sudo apt update
sudo apt install bb-node-red-installer

however I was unable to remove the old version and was stopped on the first step:

debian@beaglebone:~$ sudo apt remove bb-node-red-installer --purge
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

For additional reference my version.sh returns:

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[b5d4d4251cc19ff84bc5ad0076cc4493caa3a7f1]
eeprom:[A335BNLT00C03917BBBK1D4C]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2017-10-10]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.09-00002-g0f3f1c7907]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.09-00002-g0f3f1c7907]
kernel:[4.4.91-ti-r133]
nodejs:[v6.12.3]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20180119.0-0rcnee0~stretch+20180119]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
dmesg | grep pinctrl-single
[    2.131993] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
END

and my uEnv.txt:

debian@beaglebone:~$ cat /boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.4.91-ti-r133
#uuid=
#dtb=


###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_uio (4.4.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks...
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:1024x768@60e

##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
#cape_enable=bone_capemgr.enable_partno=

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

My next step is to attempt the newest release of debian as a clean flash but I have yet to attempt it. Any insights would be greatly appreciated.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions