python script with adafruit_blinka and 4D LCD button GPIO probs

Im a having a problem with a python script on a beaglebone-black that worked fine until I updated it via apt update && apt upgrade -y

here is the output of /opt/scripts/tools/version.sh

git:/opt/scripts/:[1b1122751f7051bd8996f353756ba6ff30e71820]
eeprom:[A335BNLT0A5B2313BBBK0121]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster Console Image 2021-10-01]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.04-g923f8b8 (Jan 02 2022 - 19:05:15 +0000)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-g923f8b8]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[BB-ADC-00A0.kernel]
UBOOT: Loaded Overlay:[BB-BONE-LCD4-01-00A1.kernel]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.kernel]
kernel:[4.19.94-ti-r73]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.14.20210821.0-0buster+20210821]
pkg:[bb-customizations]:[1.20221108.0-0
buster+20221108]
pkg:[bb-usb-gadgets]:[1.20220816.0-0buster+20220816]
pkg:[bb-wl18xx-firmware]:[1.20221201.0-0
buster+20221201]
pkg:[kmod]:[26-1]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev gpio admin tisdk weston-launch cloud9ide]
cmdline:[console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait uboot_detected_capes=BB-BONE-LCD4-01, coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 44.289283] remoteproc remoteproc0: wkup_m3 is available
[ 44.302855] remoteproc remoteproc0: powering up wkup_m3
[ 44.302888] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[ 44.303304] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[ 1.020068] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[ 1.033513] gpio-of-helper ocp:cape-universal: ready
END

I am using adafruit_blinka to setup the buttons of the lcd-screen for some functions:
Trying to set the pins required is done via:
leftButton=digitalio.DigitalInOut(board.P9_15)
leftButton.direction = digitalio.Direction.INPUT
rightButton=digitalio.DigitalInOut(board.P9_23)
rightButton.direction = digitalio.Direction.INPUT
upButton=digitalio.DigitalInOut(board.P9_16)
upButton.direction = digitalio.Direction.INPUT
downButton=digitalio.DigitalInOut(board.P9_30)
downButton.direction = digitalio.Direction.INPUT
enterButton=digitalio.DigitalInOut(board.P9_24)
enterButton.direction = digitalio.Direction.INPUT

the beaglebone is connected to a 4D LCD cape, see 4.3" Display Cape for the BeagleBone Black (that has buttons hooked up to SYS_RESET, GPIO1_16, GPIO1_17, GPIO1_19 GPIO3_16 GPIO0_15 and PWR_BUT)

When I try to set the pin manually via config-pin I get this reponse:

root@woodytestbox:~# config-pin p9.15 gpio
ERROR: open() for /sys/devices/platform/ocp/ocp:P9_15_pinmux/state failed, No such file or directory

I also tried it with:
echo 48 > /sys/class/gpio/export
-bash: echo: write error: Operation not permitted

show-pins from the buttons shows this:
P9.15 16 fast rx 7 gpio 1.16 << hi sysfs (pinmux_bb_lcd_keymap_pins)
P9.23 17 fast rx 7 gpio 1.17 << hi sysfs (pinmux_bb_lcd_keymap_pins)
P9.16 19 fast rx 7 gpio 1.19 << hi P9_16 (pinmux_bb_lcd_keymap_pins)
P9.30 102 fast rx 7 gpio 3.16 << hi P9_30 (pinmux_bb_lcd_keymap_pins)
P9.24 97 fast rx 7 gpio 0.15 << hi P9_24 (pinmux_bb_lcd_keymap_pins)

What is going wrong? what has changed?

Hello,

Get it while it is hot? I say that jokingly. I have had some scripts work until they did not.

ls -l /sys/class/gpio/gpio* would be a start.

And…if the DTS file did not change and something w/ DTS did change w/in the kernel or the beagleboard.org naming scheme, then that would definitely explain what or how…

I am not sure if the Cape in question has EEPROM on it or if it is an off the shelf model.

I noticed that an older model Cape of mine, a 5" directly attached Cape stopped producing valuable results at one point. At first it was hard for me to describe.

Then, in time and w/ learning more…

I came to conclusions:

  1. The kernel changes
  2. DTS w/in the kernel changes due to DTS
  3. u-boot for the am335x boards produced by whomever for beagleboard.org seems to be getting updates also…

For instance, it is highly likely now to use u-boot from the command line to boot into a machine that seemed “unworthy” or unworkable at a past tense time. Plus the u-boot definitions now also accept many “whomever produced” beagleboard.org boards. I say “whomever” b/c there have been many, different mfg. w/ many distributors. It is hard to keep track.

Anyway…

I am not familiar w/ adafruit_blinka any longer but I have a 4D_LCD Cape over here I can test in time.

GPIO is gpio. I would think this is the case. Maybe there are particular transitions w/in DTS now or the kernel or the images that are coinciding in a fashion that is hard to explain for now.

I am not sure about pinmux_bb_lcd_keymap_pins being an entity in DTS. It may well be that way now.

I think some things from the past may get harder to debug. For instance, on the am335x images, I have noticed some Compatibility Layer in /dev/bone/.

This is new to me (sort of). And another thing I noticed is that gpiod in python3 is “making its rounds” in specific kernels and images.

Sometimes it works well. At other times, it does not do exactly what is intended.

If you are using C/C++ for instance, libgpiod-dev may be a way to manipulate GPIO pins but ‘sysfs’ is still around in specific kernels I have used.

Is video disabled and does video allow for LCD displays to work is the question I guess.

I also see uboot_detected_capes=BB-BONE-LCD4-01 in the ./version.sh file output.

I will try w/ a newer or older kernel and image and see how far I get.

If Cape_Universal is not listed as on, maybe BB-BONE-LCD4-01 will not work?

Seth

P.S. For now, it is a guessing game for me. I have a Cape to test and I will test it. Please give me some time.

Hello Again,

This gets more interesting. I do not have that model. I have this one: GEN4-4DCAPE-ADAPTOR for connecting 4D Systems gen4 4DCAPES to the BeagleBone Black w/ a LCD attachment.

Anyway, if I get it to work, I will let you know. I will test some GPIO pins on the BBB also while the Cape is attached. Who knows how far we will get?

Seth

Updates

W/ the Cape I listed from this post:

  1. Two BBBWs do not boot
  2. A BBB does not boot
  3. I have tried different cables
  4. I have tried different boards
  5. Maybe something

LCD is not easy these days…

The LCD boots b/c of the 5v barrel jack attached but the BBB or BBBWs are held useless for now. I will keep trying. It seems that the BBB in question may need a Proper OS and not the minimal image. I will reflash.

Okay…

Another Update

I got the BBB to boot w/ an image from 2022. And guess what I see? Boris!

Here:

debian@BeagleBone:~$ ls -l /sys/class/gpio/gpio*
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio10 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio10
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio11 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio11
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio110 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio110
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio111 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio111
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio112 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio112
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio113 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio113
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio114 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio114
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio115 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio115
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio116 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio116
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio117 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpiochip3/gpio/gpio117
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio12 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio12
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio13 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio13
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio14 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio14
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio15 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio15
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio2 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio2
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio20 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio20
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio22 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio22
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio23 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio23
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio26 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio26
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio27 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio27
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio3 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio3
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio30 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio30
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio31 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio31
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio32 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio32
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio33 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio33
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio34 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio34
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio35 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio35
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio36 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio36
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio37 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio37
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio38 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio38
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio39 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio39
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio4 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio4
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio44 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio44
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio45 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio45
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio46 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio46
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio47 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio47
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio48 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio48
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio49 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio49
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio5 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio5
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio50 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio50
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio51 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio51
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio60 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio60
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio61 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio61
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio62 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio62
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio63 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpiochip1/gpio/gpio63
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio65 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio65
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio66 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio66
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio67 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio67
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio68 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio68
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio69 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio69
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio7 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio7
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio70 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio70
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio71 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio71
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio72 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio72
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio73 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio73
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio74 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio74
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio75 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio75
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio76 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio76
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio77 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio77
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio78 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio78
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio79 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio79
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio8 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio8
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio80 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio80
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio81 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio81
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio86 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio86
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio87 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio87
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio88 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio88
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio89 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpiochip2/gpio/gpio89
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpio9 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpiochip0/gpio/gpio9
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpiochip0 -> ../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e07000.target-module/44e07000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpiochip32 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4804c000.target-module/4804c000.gpio/gpio/gpiochip32
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpiochip64 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ac000.target-module/481ac000.gpio/gpio/gpiochip64
lrwxrwxrwx 1 root root 0 Dec 31  1999 /sys/class/gpio/gpiochip96 -> ../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/481ae000.target-module/481ae000.gpio/gpio/gpiochip96

I see root has permissions. Maybe the udev rules have changed in:

/etc/udev/rules.d/*

I cannot be sure. Maybe list out the GPIO symlinks in /etc/udev/rules.d/* and this way I can show you mine too.

Oh. The commands for info. on your part:

cat /etc/dogtag: BeagleBoard.org Debian Bullseye Xfce Image 2022-05-01

and…

uname -a: Linux BeagleBone 5.10.140-ti-r52 #1bullseye SMP PREEMPT Sat Oct 8 19:56:05 UTC 2022 armv7l GNU/Linux

I will test GPIO tonight or maybe another night. I will let you know.

One last update until another day…

w/out config-pin on my board... # While in gpio48 files

echo out > direction && echo 1 > value

That did it for me. No errors which was surprising. I figured something may have been up or changed…

Until another day!

Hello Again,

I think also:

P9.24 maybe the pin in question and not P9.15.

Also…for P9.15, maybe it is already configured as GPIO and as high. It may need be set to low instead of high to start and then the value gets set.

Also, the board may, since GPIO is high, not allow for pin muxing w/out source.

Seth

P.S. It also could already be exported and not need it.

Update

I am reading adafruit_blinka:

  1. Adafruit_Blinka/bbb_digitalio.py at main · adafruit/Adafruit_Blinka · GitHub
    a. easy set up of GPIO but…
  2. Adafruit_Blinka/digitalio.py at main · adafruit/Adafruit_Blinka · GitHub
    a. shows the init function being set to in to start.
    b. Also…setting to out should be switch_to_output function.

I am not too familiar w/ this lib. I am sorry.

It may be easier to set up a GPIO in sysfs or gpiod if necessary.

Thanks for the research, I’ll see what happens when I update the whole she-bang to Bullseye.

Perhaps the combination of buster and blinka and the 4D lcd do not play nice. I’ll test if the script would run without the LCD screen attached.

Hello,

I have some time this morning. @Johan_Henselmans , if you have build steps for blinka, I can try this morning. If you post the build steps later in the day or days later, that is okay too.

I can get to it then.

I think maybe w/ one of the overlays may be at fault w/ the config-pin utility reporting back in error.

So,

P9.15
P9.23
P9.16
P9.30
P9.24

Okay…we have something to work w/ now. Is it all of them, some of them, or just config-pin p9.15 gpio that is causing issues?

Before you write a new image, let me test the GPIO in question, i.e. P9.15.

Seth

P.S. And I would like to say this too…

pinmux_bb_lcd_keymap_pins is not something I am familiar w/ currently. Also…

I have had to restart, power down, and reboot via the PWR button to get the board to boot w/ USB, Barrel Jack, and Ethernet attached along w/ the Cape. Off to try Blinka.

Okay…

Update

I run the source for bbb_digitalio.py and receive some gnarly output. Anyway, since I am new, I guess I should read more tutorials on blinka.

Oh! Here is the output in case you can kind of understand.

Traceback (most recent call last):
  File "/home/debian/Mos/./blinka_led.py", line 27, in <module>
    import board
  File "/home/debian/Mos/lib/python3.9/site-packages/board.py", line 345, in <module>
    raise NotImplementedError(
NotImplementedError:
        Adafruit-PlatformDetect version 3.44.0 was unable to identify the board and/or
        microcontroller running the Linux platform. Please be sure you
        have the latest packages running:
        'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'

Is it looking for the PRU instead? Argh…

Hello @Johan_Henselmans ,

Okay. I am trying a newer image (for whatever reason) to see if I can get the Blinka thing to workout for me w/ the BBB. This one: Index of /rootfs/debian-armhf-iot/2023-04-12

Updates on the way.

Seth

First Update

The ideas I have so far is that I need to install Circuit Python and then Blinka… This may be true or not. So, off to try. W/ the listed image, the LCD Displays and I am trying still to install Blinka on the BBB.

Second Update

wget https://github.com/adafruit/Adafruit_Blinka/archive/refs/tags/8.17.0.tar.gz
tar -xvf 8.17.0.tar.gz
sudo python3 setup.py install

I am still failing. Sorry. My Blinka build is not respecting that I am using the BBB so far. Off to try more ideas.