I can't use echo 101 > /sys/class/gpio/export
I have a rather strange error. I am the root and I can't do a thing to export.
root@bananapim3:/sys/class/gpio# ls -l
total 0
--w------- 1 root root 4096 Jan 1 1970 export
lrwxrwxrwx 1 root root 0 Jan 1 1970 gpiochip0 -> ../../devices/platform/soc/1c20800.pinctrl/gpio/gpiochip0
lrwxrwxrwx 1 root root 0 Jan 1 1970 gpiochip352 -> ../../devices/platform/soc/1f02c00.pinctrl/gpio/gpiochip352
lrwxrwxrwx 1 root root 0 Jun 25 09:35 gpiochip414 -> ../../devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp20x-gpio/gpio/gpiochip414
--w------- 1 root root 4096 Jan 1 1970 unexport
root@bananapim3:/sys/class/gpio# echo 101 > /sys/class/gpio/export
bash: echo: write error: Invalid argument
Also, which one is GPIO 101 ? I can't figure it out.
I presume this is the formula for the pin number:
(position of letter in alphabet - 1) * 32 + pin number
Looking through the pin-out of the Banana Pi M3 I have some weird named pins like:
PL10-S-EINT10
PC4 PC4
I hope that PL10-S-EINT10 is actually PL10, and by using the formula I have (12 - 1)*32 + 10 = 362 and that PC4 PC4 is a typo and it should've been PC4 which, using the formula, should be: (3-1)*32+4 = 64
EDIT:
I've tried that script with PL10-S-EINT10 which is Pin 7 and I got a signal on the oscilloscope.
Also, I can't find PE17 on the Banana Pi3.