Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Missing GPIO on Armbian for BananaPI M2B

Featured Replies

Hi,

Just started playing with BananaPi (I have M2Berry model) and installed Armbian from Armbian download page: Armbian_23.5.2_Bananapim2ultra_bookworm_current_6.1.30_minimal (connecting with board over UART/SSH - no need for desktop at this moment).

Wanted to use GPIO, however using sysfs do not work as expected:

 

root@bananapim2ultra:~# echo "24" > /sys/class/gpio/export
-bash: echo: write error: Unknown error 517
root@bananapim2ultra:~# echo "24" > /sys/class/gpio/export
-bash: echo: write error: Device or resource busy

Went with lsmod to check modules but having only:

root@bananapim2ultra:~# lsmod | grep gp
gpu_sched              28672  1 lima

Same for modprobe:

root@bananapim2ultra:~# modprobe gpio
modprobe: FATAL: Module gpio not found in directory /lib/modules/6.1.30-sunxi

 

It looks like the kernel do not have gpio module, which is really strange since the GPIO is main feature for such boards. Running armbian-config - maybe I will find something.

 

Can somebody help me out a little with it?

Edited by WernherVonData

Solved by WernherVonData

  • Author
  • Solution

Never mind. Solved it.

Went here: https://linux-sunxi.org/GPIO (this image is on sunxi kernel, probably for other kernels it might be different).

 

Checked this file

cat /sys/kernel/debug/pinctrl/*/pinmux-pins

And there finally I was able to know which pin on the board is mapped to which port in the system. 24 is not on that list, thus it was raising an error.

Then just went with the libgpiod library and the magic happened.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.