Questions tagged [gpio]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
14 views

Blink LED on different times on Linux

I made a python code to blink LED on Ubuntu installed on Raspi3b. Its running and i could blink. Next steps are to blink different times when i power on, after ssh active, end of shutdown. I am very ...
0
votes
1answer
25 views

gpio_name_to_desc in gpiolib.c in Linux kernel should be externalized?

We have an embedded project, and for our purposes, it seems handy to name all the gpios in the gpio controller device tree stanza using gpio-line-names feature in device tree, mentioned in ...
1
vote
0answers
18 views

Idiomatic GPIO control in Linux 4.8+

The userspace interface to GPIOs was changed in Linux 4.8, deprecating the old sysfs interface in favor of a character device. I am struggling to see how I can wrangle this new model into something ...
0
votes
2answers
1k views

What gpio gpiochip0 kernel error means and how to solve?

I found this in my logs: kernel: gpio gpiochip0: (gpio_aaeon): tried to insert a GPIO chip with zero lines kernel: gpiochip_add_data_with_key: GPIOs 0..-1 (gpio_aaeon) failed to register, -22 kernel: ...
3
votes
1answer
249 views

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, ...
0
votes
1answer
32 views

Cannot make persistant Insertion of a kernel object (debian) using Insmod

I'm trying to insert the [.]Ko (Kernel Object) file for the on-board GPIO into my Linux kernel which succeeds using the command insmod < file-name.ko > But when the OS/Device Reboots, the kernel ...
1
vote
1answer
1k views

GPIO Errors - "echo: I/O error" and "write error: Device or resource busy"

I've been trying the past 6 hours to run a very simple LOOKING code. It just turns an LED hooked to pin 18 on and off... This is on a raspberry PI 4. I've tried using different pins I've tried adding ...
0
votes
0answers
16 views

Problem starting application with python script through Ubuntu service

the setup is - Raspberry Pi-4 8GB, Ubuntu-Mate 20.04 64Bits. Requirement - When user makes a certain GPIO pin low, x11vnc should start.(It is working with shutdown command). following is the python ...
0
votes
0answers
46 views

Are /dev/i2c-1 and /dev/mem colliding?

I write a program which should handle a motion sensor and an ultrasonic sensor at the same time. I'm using a Jetson Nano with 40 GPIO-pins. The first one uses I2C interface and thus accesses /dev/i2c-...
1
vote
0answers
1k views

Mmap failed with operation not permitted

I've compiled application on Linux, but I got this error wiringPiSetup: mmap (GPIO) failed: Operation not permitted After that: I've added iomem=relaxed to grub cat /proc/cmdline BOOT_IMAGE=/...
0
votes
1answer
124 views

Rasberry PI 3 debian /sys/class/gpio/export error

I've a problem When I run on my raspberry pi 3 (debian10) echo 17 > /sys/class/gpio/export I get error -bash: echo: write error: Invalid argument Help me please
1
vote
2answers
130 views

USB device driver [closed]

I Wrote a USB device driver for STM32h7 and register the device as GPIO by using Struct gpio_chip structure. my questions are here: I configure usb peripheral in NUCLEO-H743ZI board to CUSTUM HID ...
0
votes
1answer
62 views

how does a gpiochipNN is selected or set in gpiolib kernel?

I am looking into kernel gpiolib and gpio-xilinx.c. I see that my device has only cat /sys/kernel/debug/gpio gpiochip0: GPIOs 960-1023, I am confused on how this 960 has arrived. How does the kernel ...
1
vote
0answers
121 views

How to start system shutdown or poweroff by hardware interrupt

I have a small headless embedded Linux box (NXP i.MX6, with userspace based on Debian, but am interested in more general solution). It has no HID input, no desktop stuff, just a serial console and a ...
1
vote
0answers
198 views

Why is my gpio access from user space slower?

I did some research on how good I am able to access a gpio while other heavy tasks are executed. With a first test I toggeled a gpio pin from user space using the libgpiod API. With a second test I ...
1
vote
0answers
111 views

Defining GPIO for LED board - Meraki MX100

I have a Meraki MX100 that I have installed VyOS on. While otherwise perfectly functional, the one thing that I cannot seem to get working is the LED board on the front panel. I'm no developer which I'...
0
votes
1answer
990 views

Driver development vs sysfs access vs mmap for GPIOs

I believe I could not fully understand the benefits of writing device drivers in embedded systems for some specific devices, such as GPIO, when there are alternative ways of doing the same job. You ...
1
vote
1answer
135 views

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</dev/ttyACM1 #...
0
votes
2answers
10k views

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 ...
0
votes
1answer
189 views

How to Resolve `permission denied` on Cloned Image

I had a Linux image on an Orange Pi that was had access to the GPIO pins via the command line sudo echo 1 > /sys/class/gpio_sw/PA1/data. I took the SD card out and put it into another Orange Pi ...
0
votes
1answer
214 views

How to Set Default Pin State on Orange Pi

When booting an Orange Pi the default pin state seems to be HIGH. Is there a document that I can edit that will change their default state to LOW?
2
votes
0answers
280 views

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 ...
1
vote
1answer
162 views

Why are systemd scripts not producing the expected results at boot, but correctly afterwards?

I have a Raspberry Pi on Raspbian Stretch and I want to enable some GPIO pins at boot time. I wrote the following service: [Unit] Description=GPIO23 exported as output, value off [Service] Type=...
0
votes
1answer
3k views

Unable to export specific gpio pins. How to check what uses GPIO pins and how to access register?

I use an i.mx6 board (yocto(jethro)) and am configuring a device tree. I changed a dts file and put the dtb file in a boot partition. I set GPIO4_IO19 in dts file as follows. &iomuxc { pinctrl-...
1
vote
0answers
345 views

Set GPIO Bank Mux Mode

I'm working with an ARM machine that has a buzzer attached to GPIO pin 102. The machine is running Linux 2.6, so we have a sysfs interface to the pins in /sys/class/gpio. When I first tried to get the ...
3
votes
0answers
306 views

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 ...
2
votes
0answers
164 views

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 ...
2
votes
0answers
83 views

lirc refusing to play

I've installed lirc on a Raspberry Pi (running Wheezy) but can't get it to send any signal. The LED is hooked up correctly (tested it using a python script). See it working here on youtube. I used ...
1
vote
1answer
723 views

Driver gpio_keys type of buttons

I'm confused about the driver gpio_keys. This driver distinguishes between two types of buttons: IRQ-only buttons and GPIO-driven buttons Could anyone explain the difference between one and ...
1
vote
0answers
25 views

configure analogic pin as digital pin

I have the SAMA5D3 Xplained. This kit has several analog ports and my idea is to be configured as analog or digital as needed. Would it be possible to do it in an easy way from the kernel?
4
votes
0answers
2k views

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. ...
6
votes
1answer
808 views

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....
3
votes
1answer
3k views

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)?
0
votes
1answer
443 views

Debian Lenny Adafruit_BBIO failure to install

I have Debian Lenny installed on a Beagle bone Black Rev B. I have been following the outlined steps provided on this web page: https://learn.adafruit.com/character-lcd-with-raspberry-pi-or-beaglebone-...
2
votes
0answers
104 views

How to enable second SIM slot in ALIX6F2 and how to switch 3G to it from the 1st one?

I am trying to enable the SIM slot under the RF card but with no success whatsoever. I'm using Voyage 0.8 (a stripped off Debian distribution) as an operating system. A bit of searching landed me to ...
1
vote
0answers
132 views

Is there a limit of GPIOs that can be used in Linux?

When it comes to use GPIOs, is there a limited number that can be used in Linux (except through the limitation of the physical availability/amount of the ports/pins) or is it theoretically possible to ...
1
vote
1answer
303 views

What priority should I give to a script running on startup?

I 'm running Angstrom distribution on an embedded device. I want to make use of its GPIO expansion ports, that are set to be high on start-up. Below, is the code segment, that releases an expansion ...
0
votes
2answers
421 views

GPIO User Space App

GPIO User Space App describes user space application to test the GPIO. Another related link is Linux GPIO Driver. This would be running on a xilinx zynq board having an ARM Cortex A 9 processor. I ...
8
votes
4answers
27k views

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 ...
1
vote
1answer
1k views

Basic script in Angstrom Linux running on a Beaglebone Black

On my embedded system, I can toggle a user led with: echo > 1 sys/class/leds/beaglebone:green:usr2/value. Similarly, I can find the value of a GPIO (gpio60) (set to input), with more sys/class/...
0
votes
0answers
610 views

RaspberryPi GPIO FreeBSD assignment

First my Assignment: I'm a beginner with BSD and low level peripherals like GPIO etc., and I need to toggle Raspberry GPIO Pins from a C programme on BSD. I am Using this BSD Image i took from here: ...
3
votes
0answers
2k views

Enabling GPIO in kernel not working [closed]

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. ...
3
votes
2answers
4k views

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 ...
7
votes
3answers
3k views

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 "...
4
votes
2answers
5k views

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 ...