Banana Pi BPi-M2 Ultra (M2U) Wiringpi gpio demo

Banana Pi BPi-M2 Ultra (M2U) Wiringpi gpio demo

BPI-M2 Ultra gpio define

https://bananapi.gitbooks.io/bpi-m2-ultra-open-source-single-board-computer/content/bpi-m2ultragpiopindefine.html

we try to do one wiringpi lib support all banana pi board.:slight_smile:

Hi.

How to install/build the correct version of wiringPi on M2U? I need to get access to gpio’s but all the versions I’ve tried can’t be compiled and the built-in (Raspbian version) is not working too.

Please help!

are you see here :

or what image are you used . our image have support wiringpi defaults:

also see here:

Thanks guys :grin: I’ve already found the solution: you pointed me to my thread!

This worked for me in several distros and compilations but now it does not work anymore

 ____                                  ____  _   __  __ ____  _   _
| __ )  __ _ _ __   __ _ _ __   __ _  |  _ \(_) |  \/  |___ \| | | |
|  _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | | | |\/| | __) | | | |
| |_) | (_| | | | | (_| | | | | (_| | |  __/| | | |  | |/ __/| |_| |
|____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_|   |_| |_|  |_|_____|\___/


Welcome to ARMBIAN 5.64 user-built Ubuntu 18.04.1 LTS 4.18.13-sunxi
System load:   0.43 0.70 0.88   Up time:       7:40 hours
Memory usage:  14 % of 2014MB   IP:            192.168.8.13
Usage of /:    43% of 7.1G

[ General system configuration (beta): armbian-config ]

Last login: Sun Oct 21 16:43:09 2018 from 192.168.8.70

bpi@bpim2u:~$ uname -a
Linux bpim2u 4.18.13-sunxi #8 SMP Sat Oct 13 05:02:31 -03 2018 armv7l armv7l armv7l GNU/Linux
bpi@bpim2u:~$

bpi@bpim2u:~$ sudo gpio readall [sudo] password for bpi: Unable to determine hardware version. I see: Hardware : Allwinner sun8i Family

expecting BCM2708, BCM2709 or BCM2835. If this is a genuine Raspberry Pi then please report this to projects@drogon.net. If this is not a Raspberry Pi then you are on your own as wiringPi is designed to support the Raspberry Pi ONLY.

bpi@bpim2u:~$ ls
BPI-WiringPi2  Downloads         Pictures   thinclient_drives
Desktop        hyperion.service  Public     Videos
Documents      Music             Templates
bpi@bpim2u:~$

If you look closer to WiringPi source code, you can see it receive info about board from:

/var/lib/bananapi/board.sh

The easiest solution (not saying it is the right one) is to create it with this content (copied from bananapi images):

BOARD=bpi-m2u
BOARD_AUTO=bpi-m2u
BOARD_OLD=bpi-m3

Tested on Armbian image.

It is correct I created the folder and the file in the aforementioned route added the previous parameters and now it works without problems. Thank you very much for your help, do not even reach to see the source code