View: 14746|Reply: 10

gpio in arch linux problems

[Copy link]

10

threads

10

posts

44

credits

Novice

Rank: 1

credits
44
Published in 2018-5-16 19:38:54 | Show all floors |Read mode
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.




        








1

threads

11

posts

98

credits

Registered member

Rank: 2

credits
98
Published in 2018-5-24 23:10:53 | Show all floors
@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
Published in 2024-1-18 20:15:18 | Show all floors
the actually great website. the realy informative plus a this kind of excellent career. i enjoy this kind of.        ufabet777
Published in 2024-2-3 22:15:44 | Show all floors
Decent put up, her the most fascinating blog page which are in this case, cultivate monetary management give good results, could be spine.        транспорт на автомобил от германия
Published in 2025-9-16 19:44:34 | Show all floors
Super info it is actually. My friend has been seeking for this information.        소액결제
Published in 2025-9-17 21:34:59 | Show all floors
강남룸싸롱은 품격 있는 서비스를 합리적인 가격대에 제공하여 누구나 부담 없이 럭셔리한 밤을 즐길 수 있도록 합니다.        강남룸싸롱
Published in 2025-9-24 21:47:47 | Show all floors
최신 아고다 할인코드 & 쿠폰 모음 · AGODASPONCERD – 전 세계 대부분 숙소에 15% 할인 제공 (일부 숙소는 제외) · GODASALE – 전 세계 숙소 5% 할인코드 (선착순 혜택).        아고다 할인코드
Published in 2025-9-25 23:48:32 | Show all floors
트립닷컴 항공권 할인코드 최신 정보 · TRIP3: 전 세계 항공권 3% 할인 쿠폰 (최대 ₩300,000 할인 혜택), ~ 2025년 9월 30일까지 유효. · KAKAOFLT15AUGT: 카카오페이        트립닷컴 할인코드
Published in 2025-9-27 20:26:18 | Show all floors
강남가라오케는 강남에서 가장 핫한 노래방으로, 프라이빗 룸에서 최신 음향 시설과 고급 인테리어를 즐길 수 있습니다. 회식, 모임, 데이트 등 다양한 상황에 완벽한        강남가라오케
Published in 2025-9-29 22:03:44 | Show all floors
탑플레이어포커 머니상이란 탑플레이어포커 게임 내에서 사용되는 코인(골드, 칩 등 게임머니)을 현금과 교환해주는 비공식 거래 서비스를 말합니다        탑플레이어포커 머니상
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list