greglazor post at 2018-5-16 19:38:54

gpio in arch linux problems

Edited by greglazor at 2018-5-16 19:40

Hi,

I managed to install arch linux on a raspberry pi 3. The problem is i cannot use the GPIO. Whenever i try, for example, echo "18" > /sys/class/gpio/export (and other numbers) it says invalid argument. I am root when executing echo. I cannot find a solution to solve this. What could be the problem?

Any help will be apprecited.

I didn't find the right solution from the Internet.

References:
https://www.raspberrypi.org/forums/viewtopic.php?t=207678
Marketing video company

Thank you.




      








jafcobend post at 2018-5-24 23:10:53

@greglazor, I'm not sure why you're asking a RaspberryPi question on the OrangePi forum. I actually found your question looking for the answer to this for the OrangePi. Seems like GPIO values and pin outs should be documented on the oPi wiki. But I'm still looking for them, but I haven't spent much time looking yet.

Anyhow I can answer half of your question. The "invalid argument" basically means that the "18" is not a valid value. This can happen for a few reasons:

1. Its not claimed by a driver.
2. Its is in use for some other purpose (like: in active use for SPI, TWI, ...).
3. The driver is rejecting it for some other reason: can't be reconfigured, GPIO isn't available on that pin, ...

My knee-jerk reaction is a missing driver. A module needs loading? If this were a permissions error you would get a more traditional "access denied" error.

First I'd check the /sys/class/gpio/gpiochip* folders to make sure the appropriate driver is loaded. My RaspberryPi 2B has a ".../gpiochip0/label" of "pinctrl-bcm2835". Depending on yours the "BCM" number may vary a little, but I imagine you ought to see the "gpiochip0" folder.

Second I'd check the "base" entry in the correct folder to make sure you have the correct offset, this sometimes changes between driver/kernel versions. On my Orange and Raspberry PIs this is 0. But if not you'll have to add the "base" to your GPIO #. And you also must know what that GPIO number is which usually requires backtracking the connector pin back to the SOC / expander chip and performing a calculation based on the chip's pin number. Seemed like the Raspberry Pi site had that documented fairly well.

And that last bit is what I'm still trying to scrounge up for my oPi Zeros.

Hope this helps

articleonlineki post at 2024-1-18 20:15:18

the actually great website. the realy informative plus a this kind of excellent career. i enjoy this kind of.        ufabet777

addington.wylan post at 2024-2-3 22:15:44

Decent put up, her the most fascinating blog page which are in this case, cultivate monetary management give good results, could be spine.        транспорт на автомобил от германия
page: [1]
View full version: gpio in arch linux problems