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

Cannot export GPIOs in Raspberry Pi #4

Open
homevk15 opened this issue Mar 30, 2023 · 3 comments
Open

Cannot export GPIOs in Raspberry Pi #4

homevk15 opened this issue Mar 30, 2023 · 3 comments

Comments

@homevk15
Copy link

Hi. I read you connected GPIO in QEMU emulated machine to host. When I type in a shell on my raspberry pi:
sudo -s
echo 4 >/sys/class/gpio/export
I get the error
-bash: /sys/class/gpio/export No such file or directory
My bash script
#!/bin/sh
qemu-system-arm -machine versatilepb -cpu arm1176 -drive file=/home/user1/rootfs/2016-05-27-raspbian-jessie-lite.img -kernel kernel-qemu-4.4.34-jessie -m 256M -serial stdio -append "rw console=ttyAMA0 console=tty1 root=/dev/sda2 rootfstype=ext4 rootwait fsck.repair=yes memtest=1" -nic user,model=virtio-net-pci,ipv4=on,hostfwd=:127.0.0.1:45022-:22 -qtest unix:/tmp/tmp-gpio.sock

I tried many versions of Raspberry Pi and all of them give the same error.
Please, tell me how you made it working.

@wzab
Copy link
Owner

wzab commented Mar 30, 2023 via email

@homevk15
Copy link
Author

homevk15 commented Mar 30, 2023

"Does the /sys/class/gpio directory exist?"
No, it doesn't exist.
"Do other GPIOs export correctly?"
No, the same error with others.
I tried wheezy, jessie, stretch, buster and all of them gives the same error.
I download them from https://downloads.raspberrypi.org/raspbian/images/

Could you give me the link to image you had a luck to emulate successfully (or upload it to some online storage)?

@wzab
Copy link
Owner

wzab commented Mar 30, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants