Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to open gpio chip on Ubuntu Core 24 / Raspberry Pi 5 #67

Open
jpm-canonical opened this issue May 2, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@jpm-canonical
Copy link

jpm-canonical commented May 2, 2024

Beta version of snap, following Wiki:

$ sudo snap install matter-pi-gpio-commander --beta
matter-pi-gpio-commander (beta) 2.0.0 from Canonical IoT Labs installed
$ sudo snap set matter-pi-gpio-commander gpio=4
$ sudo snap connect matter-pi-gpio-commander:gpio-memory-control
error: snap "matter-pi-gpio-commander" has no plug named "gpio-memory-control"
$ sudo matter-pi-gpio-commander.test-blink
GPIO: 4
GPIOCHIP: 0
Failed to open gpio chip: /dev/gpiochip0

Release version of snap following docs:

$ sudo snap remove matter-pi-gpio-commander --purge
matter-pi-gpio-commander removed
$ sudo snap install matter-pi-gpio-commander
matter-pi-gpio-commander 1.1.0 from Canonical IoT Labs installed
$ sudo snap set matter-pi-gpio-commander gpio=4
$ sudo snap connect matter-pi-gpio-commander:gpio-memory-control
$ sudo matter-pi-gpio-commander.test-blink
GPIO: 4
Oops: Unable to determine board revision from /proc/cpuinfo
 -> No "Hardware" line
 ->  You'd best google the error to find out why.

Beta version following #60 - these steps work on Ubuntu Server 24.04 on Raspberry Pi 5, but not when using Core 24:

$ sudo snap remove matter-pi-gpio-commander --purge
matter-pi-gpio-commander removed
$ sudo snap install matter-pi-gpio-commander --beta
matter-pi-gpio-commander (beta) 2.0.0 from Canonical IoT Labs installed
$ sudo snap set matter-pi-gpio-commander gpiochip=4
$ sudo matter-pi-gpio-commander.test-blink
Unset or empty environment variable: GPIO
$ sudo snap set matter-pi-gpio-commander gpio=4
$ sudo matter-pi-gpio-commander.test-blink
GPIO: 4
GPIOCHIP: 4
Failed to open gpio chip: /dev/gpiochip4

System info

$ ls /dev/gpio*
/dev/gpiochip0  /dev/gpiochip2  /dev/gpiochip4  /dev/gpiomem1  /dev/gpiomem3
/dev/gpiochip1  /dev/gpiochip3  /dev/gpiomem0   /dev/gpiomem2  /dev/gpiomem4
$ cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 108.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x4
CPU part	: 0xd0b
CPU revision	: 1

processor	: 1
BogoMIPS	: 108.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x4
CPU part	: 0xd0b
CPU revision	: 1

processor	: 2
BogoMIPS	: 108.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x4
CPU part	: 0xd0b
CPU revision	: 1

processor	: 3
BogoMIPS	: 108.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x4
CPU part	: 0xd0b
CPU revision	: 1

Revision	: d04170
Serial		: <redacted>
Model		: Raspberry Pi 5 Model B Rev 1.0
@jpm-canonical
Copy link
Author

jpm-canonical commented May 2, 2024

Manually connection for gpio worked:

$ sudo matter-pi-gpio-commander.test-blink
GPIO: 4
GPIOCHIP: 4
Failed to request output line.
Permission denied
$ sudo snap connect matter-pi-gpio-commander:custom-gpio matter-pi-gpio-commander:custom-gpio-dev 
$ sudo matter-pi-gpio-commander.test-blink
GPIO: 4
GPIOCHIP: 4
Setting GPIO 4 to Off
Setting GPIO 4 to On
Setting GPIO 4 to Off
Setting GPIO 4 to On
^C

Assertion file: https://pastebin.canonical.com/p/NpqPcyv3Jr/

@farshidtz farshidtz changed the title Ubuntu Core 24 on Raspberry Pi 5 issues Failed to open gpio chip on Ubuntu Core 24 / Raspberry Pi 5 May 2, 2024
@farshidtz farshidtz added the bug Something isn't working label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants