Questions tagged [gpio]

56 questions
8
votes
4 answers

Unable to write to a GPIO pin despite file permissions on /sys/class/gpio/gpio18/value

This is on a Raspberry Pi. Here's the output of sudo ls -lL /sys/class/gpio/gpio18: -rwxrwx--- 1 root gpio 4096 Mar 8 10:50 active_low -rwxrwx--- 1 root gpio 4096 Mar 8 10:52 direction -rwxrwx--- 1 cameron cameron 4096 Mar 8…
Cameron Ball
  • 771
  • 2
  • 8
  • 21
7
votes
4 answers

Set GPIO permissions cleanly

Can the default permissions and ownership of /sys/class/gpio/ files be set, e.g. by configuring udev? The point would be to have a real gid for processes that can access GPIO pins on a board. Most "solutions" include suid wrappers, scripts with…
XTL
  • 1,112
  • 1
  • 10
  • 18
6
votes
1 answer

Running daemon involving GPIO on Pi

I have a daemon that monitors various things using the GPIO ports. I have used python to write the code for this using the RPi.GPIO module. I would like to ensure that the daemon is always running, i.e., restart it after a crash and start it when…
Aaron
  • 187
  • 6
5
votes
2 answers

Are ioctl calls blocking?

I am writing some code around libgpiod's interface. For example, I want to set a line to output high. Under the hood, libgpiod opens an fd provided by the kernel for the line, and then calls ioctl(fd, GPIO_V2_LINE_SET_VALUES_IOCTL, ...). My…
detly
  • 5,020
  • 6
  • 23
  • 29
4
votes
0 answers

Triggering Linux shutdown on power failure

I have an embedded Linux system (currently running Angstrom) with supercapacitor hardware to provide time for writes to complete and avoid corrupted filesystems when external power is removed. Architecture is ARM, SOC is Freescale iMX6Q There's a…
Ben Voigt
  • 289
  • 3
  • 14
4
votes
2 answers

Run Python Portio script as normal user without root access

I know there are risks running a root script as a normal user, but in this case I don't have a choice and what I am doing is machine related. I have an Small Board Computer that has GPIO ports and I need to use one of the outputs to reset a device…
user5881
  • 91
  • 2
  • 3
3
votes
0 answers

Enabling GPIO in kernel not working

I have tried to enable the GPIO pins for my system through the Kernel but I am not able to get them to work. When I try this: echo 1 > /sys/class/gpio/export The terminal window just closes. When using a different number such as 30, the terminal…
ejo4041
  • 31
  • 4
3
votes
2 answers

How can I access GPIO pins from CentOS 6.4?

I have a single board computer with 8 GPIO pins that I would like to access from user space on my CentOS 6.4 installation. I see the GPIO pins mentioned in the 'dmesg' output, but the /sys/class/gpio directory does not exist. Is there a special…
KyleL
  • 445
  • 2
  • 5
  • 13
3
votes
0 answers

GPIO in unprivileged LXC container

I currently try to get GPIO-access into an unprivileged LXC application container. In future this container shall execute an application. But for now (while development) I just start a normal bash in the container: sudo lxc-execute -n gpio-client -f…
3
votes
1 answer

Can one core on a multicore linux system be dedicated to one user-space app?

Can a core be dedicated to one user-space app (e.g. for the purpose of bit-banging GPIO without any interruptions)?
fadedbee
  • 797
  • 1
  • 5
  • 23
2
votes
0 answers

Blink LED on different times on Linux

I made a python program to blink LED on Ubuntu installed on Raspi3b. It's running and I could blink the LED. Next steps are to blink at different times: when I power on, after ssh is active, and the end of shutdown. I am very new to Linux and system…
PeRGeLAdAm
  • 21
  • 2
2
votes
1 answer

GPIO board read/write via bash

Trying to get a GPIO board working, need to access it from script, here is what I am using: stty -F /dev/ttyACM1 115200 raw -echo #CONFIGURE SERIAL PORT exec 3…
alabamatoy
  • 121
  • 1
2
votes
2 answers

How to identify GPIO pin numbers? Is GPIO driver loaded?

I am trying to get the GPIO pins on my mainboard working but I don't know the numbers/descriptions of the pins and if a driver is loaded or not. I found this guide where it says that I should echo the pin description and redirect the output into…
2
votes
0 answers

What is the preferred way to unhog a hogged GPIO pin?

So I'm doing development on an ARM embedded system which is using the device trees. We're going to integrate a small PCB with a processor and support components onto a bigger PCB, which will be the base board of our system. We've received a device…
AndrejaKo
  • 213
  • 1
  • 3
  • 11
2
votes
0 answers

Linux GPIO mapping

I have a WD-Mycloud, which has an LED and a button as the interface. I can access the LED under /sys/class/leds/, but I cannot find where or how the button is mapped. I know how to access the GPIO pins under /sys/class/gpio, but I have no idea…
vakker
  • 21
  • 1
1
2 3 4