bablokb / pi-usv

Controlprogram for a DIY USV for a Raspberry Pi
GNU General Public License v3.0
5 stars 0 forks source link

Banana PI GPIO with wiring #1

Open fraeggle opened 5 years ago

fraeggle commented 5 years ago

Hi. I am using a Banana PI with Armbian. On this one GPIO 17,27 is not available, because it uses wiring PI. As far as I can see, I have to enter GPIO 0 and 2 (which I understand to be 17/27). If I enter GPIO readall and change the level accordingly at PIN 11/13, I also see this at GPIO readall. However, neither at 17/27 nor at 0/2 in the conf the corresponding scripts are executed. If I enter 0, 2 in the gpio-poll.conf at gpios, a restart of the Banana PI will even cause the network to stop working.

$ gpio readall +----------+-Rev3-+------+--------+------+-------+ | wiringPi | GPIO | Phys | Name | Mode | Value | +----------+------+------+--------+------+-------+ | 0 | 17 | 11 | GPIO 0 | IN | Low | | 1 | 18 | 12 | GPIO 1 | IN | Low | | 2 | 27 | 13 | GPIO 2 | IN | Low | | 3 | 22 | 15 | GPIO 3 | IN | Low | | 4 | 23 | 16 | GPIO 4 | IN | Low | | 5 | 24 | 18 | GPIO 5 | IN | Low | | 6 | 25 | 22 | GPIO 6 | IN | Low | | 7 | 4 | 7 | GPIO 7 | OUT | High | | 8 | 2 | 3 | SDA | ALT5 | Low | | 9 | 3 | 5 | SCL | ALT5 | Low | | 10 | 8 | 24 | CE0 | ALT5 | Low | | 11 | 7 | 26 | CE1 | ALT5 | Low | | 12 | 10 | 19 | MOSI | ALT5 | Low | | 13 | 9 | 21 | MISO | ALT5 | Low | | 14 | 11 | 23 | SCLK | ALT5 | Low | | 15 | 14 | 8 | TxD | ALT0 | Low | | 16 | 15 | 10 | RxD | ALT0 | Low | | 17 | 28 | 3 | GPIO 8 | IN | Low | | 18 | 29 | 4 | GPIO 9 | ALT4 | Low | | 19 | 30 | 5 | GPIO10 | OUT | High | | 20 | 31 | 6 | GPIO11 | ALT4 | Low | +----------+------+------+--------+------+ Waht am i doing wrong? Peter

bablokb commented 5 years ago

HI,

as a start you should change the debug-setting in /etc/gpio-poll.conf (set debug: 1). Then restart the gpio-poll service. Check the system-log for messages.

You should also inspect the directory /sys/class/gpio and below. This is the sysfs-interface to the gpios and the service creates subdirectories for configured gpios. If this directory is not available, then obviously Armbian is lacking the gpio-driver.

Which Armbian-version are you using? I do own a BananaPi and could check myself.

Bernhard

fraeggle commented 5 years ago

ARMBIAN 5.75 stable Debian GNU/Linux 9 (stretch) 4.19.25-sunxi i will try when i am back on saturday... What i saw via VPN... @iobrokerbpi:/sys/class/gpio$ ls export gpiochip0 gpiochip413 unexport there are no other gpio's in the folder... strange....

bablokb commented 5 years ago

Actually not strange. Unless you export a gpio, it will not show up.