GithubHelp home page GithubHelp logo

banana-pi-m2-zero-gpio's Introduction

Banana-pi-m2-zero-GPIO

Proyecto de configuración y uso de pin gpio en la placa Banana Pi M2 Zero

BANANAPI-ZERO-01 (1)

Hola soy Roxas

Creé este repositorio debido a la falta de información sobre el manejo GPIO con Bananapi m2 cero, así que mi propósito a través de esta pequeña guía es hacer la vida un poco más fácil en cuento a este tema.

Buy Me a Coffee at ko-fi.com

Hola a todos soy su amigo TuryRx el motivo de abrir este ko-if para con su apoyo seguir el desarrollo y mantenimiento de imágenes sobre banana pi, ya que es algo complicado generar imágenes e información sobre este tipo de placas de desarrollo y su apoyo me ayudaría mucho a seguir desarrollando no solo para esta placa si no para más así como darme apoyo para seguir compartiéndoles todo lo que pueda, de antemano les agradezco a todos los que me puedan apoyar y aunque no lo puedan hacer me alegra mucho que mi contenido les pueda servir.

Tabla de contenidos

Correcciones de configuración y script v 1.6.1

-Problema con puerto Ethernet solucionado.
-Problema con libreria oled solucionado.
-Problema con uso de librerías RPI.GPIO Solucionado.
-Problema con versiones de librerías solucionado.
-Problema con tabla gpio solucionado.

Correcciones de configuración y script v 1.5.2

-Problema de instalación automática solucionado.
-Problema con libreria oled solucionado.
-Problema con el uso de la librería RPI.GPIO solucionado.
-Problema con dependencias faltantes solucionado.

Nuevas características configuración y script v 1.4.9.2

-Nueva tabla gpio con pines corregidos (comando: sudo gpioread)
-Incremento de memoria swap a 1G automático 
-Detección de eventos en pines gpio corregida y funcional   
-Implementación de uso de resistencias pull up corregida y funcional   
-Ejemplos disponibles y uso de pines gpio (https://github.com/TuryRx/Bananapi-m2-zero-GPIO-files)

Instalación Rápida

Mediante la instalación rápida solo se tendrá que seleccionar su directorio una vez lo solicite (Ejemplo:/home/(su_directorio)).

Además de que se tendrá que tener en cuenta que la instalación tardara un poco y que tal vez tengan que ejecutar el script una segunda vez para evitar fallos que se hayan podido suscitar durante la instalación.

sudo git clone https://github.com/TuryRx/Banana-pi-m2-zero-GPIO.git
cd Banana-pi-m2-zero-GPIO
sudo chmod 777 -R Banana_Pi_M2Z_GPIO.sh
sudo ./Banana_Pi_M2Z_GPIO.sh

Para terminar ahora solo quedaria habilitar GPIO e I2C

Nota:Imagen ya configurada para cualquier capacidad de SD en seccion de descargas

Usuario Contraseña
roxas pi
root pi

Instalación Manual

Comenzando tendremos que instalar los siguientes repositorios.

sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo add-apt-repository -y restricted

Luego realizaremos una actualización al sistema.

sudo apt-get update -y
sudo apt-get upgrade -y

Una vez hecho esto, procederemos a la instalación de los paquetes que necesitaremos para poder utilizar las bibliotecas y dependencias que utilizaremos más adelante.

sudo apt-get install -y \
inxi \
git \
build-essential \ 
python3-pip \
python3-dev \
python3-smbus \ 
i2c-tools \
vsftpd \
python3-pil \ 
python3-setuptools \ 
libfreetype6-dev \
libjpeg8-dev \
libsdl1.2-dev \
libsdl-dev \
libportmidi-dev \ 
libsdl-ttf2.0-dev \ 
libsdl-mixer1.2-dev \ 
libsdl-image1.2-dev \
libjpeg-dev \
python-dev \
lm-sensors \
unrar \
libgpiod2 \
python3-libgpiod \
gpiod \
python3-all \
python3-all-dev \
debhelper \
armbian-config

Seguido esto vamos a descargar e instalar las librerías que utilizaremos con python3, dicho esto en este punto no instalaremos todas ya que existen algunas librerías que solo podremos instalar más adelante por falta de algunas dependencias que iremos resolviendo mediante avancemos con la instalación.

sudo pip3 install setuptools==58.3.0
sudo pip3 install wheel==0.37.0
sudo pip3 install pyserial==3.5
sudo pip3 install pyusb==1.2.1
sudo pip3 install pyftdi==0.54.0
sudo pip3 install Adafruit-PureIO==1.1.9
sudo pip3 install Adafruit-PlatformDetect==3.22.0
sudo pip3 install Adafruit-Blinka==7.1.1
sudo pip3 install smbus2==0.4.1
sudo pip3 install Deprecated==1.2.13
sudo pip3 install Pillow==9.4.0
sudo pip3 install RPi.GPIO==0.6.3
sudo pip3 install spidev==3.5
sudo pip3 install argcomplete==2.1.1
sudo pip3 install wrapt==1.14.0
sudo pip3 install pusherclient==0.3.0
sudo pip3 install psutil==5.8.0
sudo pip3 install oauthlib==3.1.1
sudo pip3 install requests-oauthlib==1.3.0
sudo pip3 install tweepy==4.2.0
sudo pip3 install sgmllib3k==1.0.0
sudo pip3 install feedparser==6.0.8
sudo pip3 install subprocess.run==0.0.8
sudo pip3 install vcgencmd==0.1.1

En este punto procederemos a ejecutar la descarga e instalación de las siguientes dependencias que utilizaremos en base a los siguientes repositorios.

git clone https://github.com/adafruit/Adafruit_Python_GPIO.git
cd Adafruit_Python_GPIO
sudo python3 setup.py install
cd

git clone https://github.com/bontango/BPI-WiringPi2.git
cd BPI-WiringPi2
sudo chmod 777 build
sudo ./build 
cd

git clone https://github.com/GrazerComputerClub/RPi.GPIO.git
cd RPi.GPIO
sudo python3 setup.py install
cd

git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapi
cd RPi.GPIO_BP
sudo python3 setup.py install
cd

git clone https://github.com/codelectron/ssd1306.git
cd ssd1306
sudo python3 setup.py install
cd

git clone https://github.com/rm-hull/luma.oled.git
cd luma.oled
sudo python3 setup.py install
cd

git clone https://github.com/rm-hull/luma.examples.git
cd luma.examples
sudo -H pip install -e .
cd

git clone https://github.com/TuryRx/Bananapi-m2-zero-GPIO-files.git

Antiguas Librerias

git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi2.git
cd BPI-WiringPi2
sudo chmod 777 build
sudo ./build 
cd

git clone https://github.com/BPI-SINOVOIP/RPi.GPIO.git
cd RPi.GPIO
sudo python3 setup.py install
cd

Perfecto una vez terminado esto terminaremos con la instalación de las bibliotecas faltantes de python3.

sudo pip3 install Adafruit-SSD1306==1.6.2
sudo pip3 install ssd1306==0.2.0
sudo pip3 install adafruit-circuitpython-busdevice==5.1.0
sudo pip3 install adafruit-circuitpython-framebuf==1.4.7
sudo pip3 install adafruit-circuitpython-ssd1306==2.12.2
sudo pip3 install cbor2==5.4.2
sudo pip3 install luma.oled==3.8.1

Ahora iremos a la carpeta Banana-Pi-m2-zero-GPIO-files y copiaremos los archivos a los siguientes directorios para habilitar el uso de los pines GPIO.

cd Bananapi-m2-zero-GPIO-files/bpi-servicee
cd etc
sudo cp -r * /etc

cd ..

cd usr
sudo cp -r * /usr

cd ..

cd var
sudo cp -r * /var

cd ..

Igualmente realizaremos la copia de los archivos para la nueva tabla de pines gpio con la corrección de BMC que la ejecutaremos con el comando (sudo gpioread)

sudo mv gpioread.sh /usr/local/bin/gpioread
sudo chmod o+x /usr/local/bin/gpioread
sudo chmod 777 /usr/local/bin/gpioread

sudo touch /var/lib/bananapi/gpio
sudo chmod o+x /var/lib/bananapi/gpio
sudo chmod 777 /var/lib/bananapi/gpio

Bueno ahora que hemos copiado los archivos a nuestro sistema solo nos queda cambiar algunas cosas dentro de uno de ellos para que podamos establecer el modelo de nuestra banana pi m2 zero.

sudo nano /var/lib/bananapi/board.sh

Cambiaremos

BOARD=bpi-m3
BOARD_AUTO=bpi-m3
BOARD_OLD=bpi-m64

Por

BOARD=bpi-m2z
BOARD_AUTO=bpi-m2z
BOARD_OLD=bpi-m64

Y ahora procederemos a copiar los archivos de ejemplo que les deje para el uso de los gpio.

cd Bananapi-m2-zero-GPIO-files
sudo chmod 777 led_m2z.py
sudo mv led_m2z.py /home/$directory 
sudo chmod 777 led_button_m2z.py
sudo mv led_button_m2z.py /home/$directory 
sudo chmod 777 button_state_m2z.py
sudo mv button_state_m2z.py /home/$directory
sudo chmod 777 button_event_m2z.py
sudo mv button_event_m2z.py /home/$directory
sudo chmod 777 gpio_funcion_m2z.py
sudo mv gpio_funcion_m2z.py /home/$directory
sudo chmod 777 info_board_m2z.py
sudo mv info_board_m2z.py /home/$directory
sudo chmod 777 info_gpio_m2z.py
sudo mv info_gpio_m2z.py /home/$directory
sudo chmod 777 pwm_m2z.py
sudo mv pwm_m2z.py /home/$directory
sudo chmod 777 button_pull_up_m2z.py
sudo mv button_pull_up_m2z.py /home/$directory
sudo chmod 777 gpio_read_pin_m2z.py
sudo mv gpio_read_pin_m2z.py /home/$directory
sudo chmod 777 button_event_rising_m2z.py
sudo mv button_event_rising_m2z.py /home/$directory
sudo chmod 777 sys_stats.py
sudo mv sys_stats.py /home/$directory/luma.examples/examples/

Ahora solo agregaremos a nuestro usuario a la lista i2c para poder trabajar con el bus de datos.

sudo adduser (your user) i2c

Habilitar GPIO

Para terminar recuerda que también tendrás que habilitar las opciones i2c, wl-gpio, pwm, cpu y uart con armbian-config, así también te dejaré los enlaces de mis imágenes de armbian que e compilado tanto de escritorio como de servidor con la capacidad de hacer overclock si se requiere.

sudo armbian-config

Además, aquí les dejare unos comandos para poder configurar los pines desde terminal, no poner parentesis al ejecutar el comando (Ejemplo: sudo gpio -1 mode 29 in).

Uso Comando
Cambiar modo de pin gpio -1 mode (Numero_de_Pin) (Estado: in o out)
Escribir estado de pin gpio -1 write (Numero_de_Pin) (Modo: 1 o 0)
Leer estado de pin gpio -1 read (Numero_de_Pin)
Activar o Desactivar resistencia pull-up gpio -1 mode (Numero_de_Pin) (Modo: up o down)

Habilitación de pines gpio (I2C,PWM,SPI,UART,OVERCLOCK)

1

2

3

4

5

Ampliar Swap

A la hora de ampliar la memoria de intercambio(swap), se recomienda dejar por defecto solo el doble de la memoria actual, esto en caso de placas como esta aun que se puede establecer la que uno desee utilizar.

Para aumentar la memoria actual al doble solo ejecutar por defecto aumentara 735M para tener 1G.

sudo chmod 777 swap_memori.sh
sudo ./swap_memori.sh

Para aumentar por otra cantidad modificar la línea (sudo fallocate -l 735M) por la cantidad que quieran.

sudo chmod 777 swap_memori.sh
sudo sed -i 's/sudo fallocate -l 735M /sudo fallocate -l (Cantidad #M o #G) /g' swap_memori.sh
sudo ./swap_memori.sh

Uso de ejemplos

Puedes encontrar ejemplos para la pantalla oled en el directorio /home/$user/gpio_files/luma.examples/examples/ y otros ejemplos sobre uso de leds, botones, eventos, pull_up, pwm, informacion de sistema y deteccion de eventos en el directorio /home/$user/gpio-examples/

Tabla de pines gpio mediante terminal (sudo gpioread)

6

Deteccion de direccion i2c de dispositivos (sudo i2cdetect -y 0)

9

Ejemplos de uso de pantalla oled i2c

7

oled

Ejemplo informacion de sistema con pantalla oled i2c

8

sys_info

Ejemplo de uso de led

10

led

Ejemplo coneccion de boton pull_up

11

button

Ubicacion y funciones de pines fisicos

1e2e5830e341ad050857fd65e18ea8e5680841ec

Links y Videos

Espero les guste y sirva este pequeño aporte, ademas aqui les dejo dos videos un poco mas detallado sobre esto.

▶️ Banana PI M2 Zero Configuracion y Uso de GPIO ✔️
https://www.youtube.com/watch?v=LGlon4DOIwc&t=18s

▶️ Banana PI M2 Zero GPIO Script ✔️🔥
https://www.youtube.com/watch?v=yt4lLYp91zM

▶️ Banana PI M2 Zero Nuevas Imagesnes ✔️🔥
https://www.youtube.com/watch?v=d5MLndnQ6w4&t=198s

Tambien les dejare el link de mi canal de youtube y los links de mis imagenes.

▶️ TuryRx 🔥
https://www.youtube.com/channel/UC2qm0bsEO0u1wBgiINs8-5w

Descargas

Imagenes Bananapi M2 Zero 18-02-23

Base Ubuntu Focal

Ubuntu Focal Server

https://www.mediafire.com/file/f3zop887yjmqvo6/Armbian_23.02.0-trunk.0264_Bananapim2zero_focal_current_5.15.93_server.rar/file

Ubuntu Focal Server Minima

https://www.mediafire.com/file/fjba6l2uqfcstqq/Armbian_23.02.2_Bananapim2zero_focal_current_5.15.93_server_minimal.rar/file

Ubuntu Focal Desktop xfce

https://www.mediafire.com/file/yms7q2hiyqeob6u/Armbian_23.02.0-trunk_Bananapim2zero_focal_current_5.15.93_xfce_desktop.rar/file

Base Ubuntu Jammy

Ubuntu Jammy Server

https://www.mediafire.com/file/fvjhy045ybfc81n/Armbian_22.11.0-trunk_Bananapim2zero_jammy_current_5.15.80_server.rar/file

Ubuntu Jammy Server Minima

https://www.mediafire.com/file/509uuchjp8jmk34/Armbian_22.11.0-trunk_Bananapim2zero_jammy_current_5.15.80_server_minimal.rar/file

Ubuntu Jammy Desktop xfce

https://www.mediafire.com/file/250razne7xr4ocq/Armbian_22.11.0-trunk_Bananapim2zero_jammy_current_5.15.80_xfce_desktop.rar/file

Ubuntu Jammy Desktop i3wm

https://www.mediafire.com/file/vjcj0sqdj3hhakn/Armbian_22.11.0-trunk_Bananapim2zero_jammy_current_5.15.80_i3-wm_desktop.rar/file

Base Debian Buster

Debian Buster Server

https://www.mediafire.com/file/kx4zckpabug0y87/Armbian_23.02.0-trunk.0264_Bananapim2zero_buster_current_5.15.93_server.rar/file

Debian Buster Server Mininal

https://www.mediafire.com/file/pjqn7xw9bqbejab/Armbian_23.02.0-trunk.0264_Bananapim2zero_buster_current_5.15.93_server_minimal.rar/file

Debian Buster Desktop lxde

https://www.mediafire.com/file/uofhauefzrkxq91/Armbian_23.02.0-trunk.0264_Bananapim2zero_buster_current_5.15.93_lxde_desktop.img.rar/file

Debian Buster Desktop Mate

https://www.mediafire.com/file/4i761iai2eazgu9/Armbian_23.02.0-trunk.0264_Bananapim2zero_buster_current_5.15.93_mate_desktop.rar/file

Base Debian Bullseye

Debian Bullseye Server

https://www.mediafire.com/file/0jilyu1f2ohtvqk/Armbian_22.11.0-trunk_Bananapim2zero_bullseye_current_5.15.80_server.rar/file

Debian Bullseye Server Mininal

https://www.mediafire.com/file/1yltw5sk4q4vzzu/Armbian_22.11.0-trunk_Bananapim2zero_bullseye_current_5.15.80_minimal.img.rar/file

ArchLinux

coming soon

AlpineLinux

coming soon

LibreELEC

LibreELEC Kodi 20

https://www.mediafire.com/file/6vuzdxlawoomisq/LibreELEC_H2_Bananapi_M2_Zero.rar/file

Imagenes Antiguas

Referencias y Menciones

Menciones

Agradecimiento especial a bontango por ayuda con fallo de pines con uso de nueva librería ademadas de ayuda en uso de comunicación UART

https://www.lisy.dev/
https://forum.banana-pi.org/u/bontango
https://forum.banana-pi.org/t/configuracion-y-uso-de-gpio-bpi-m2-zero/13179/79

Referencias

https://github.com/adafruit/Adafruit_Python_GPIO
https://github.com/adafruit/Adafruit_Python_SSD1306
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi#enable-i2c-and-spi-3-5
https://unipython.com/gpio-raspberry-pi-explicacion-uso-encender-led/
https://github.com/codelectron/ssd1306
https://github.com/PyAV-Org/PyAV/issues/491
https://github.com/rm-hull/luma.oled/wiki/Usage-&-Benchmarking
https://github.com/rm-hull/luma.examples
https://luma-oled.readthedocs.io/en/latest/hardware.html
https://github.com/rm-hull/luma.oled
https://www.raspberrypi-spy.co.uk/2018/04/i2c-oled-display-module-with-raspberry-pi/
https://stackoverflow.com/questions/47694421/pil-issue-oserror-cannot-open-resource
https://github.com/adafruit/Adafruit_CircuitPython_SSD1306
https://github.com/adafruit/Adafruit_Blinka
https://ssd1306.readthedocs.io/en/latest/python-usage.html
https://ssd1306.readthedocs.io/en/latest/index.html
https://ssd1306.readthedocs.io/en/latest/intro.html
https://programmerclick.com/article/48301644742/
https://github.com/BPI-SINOVOIP/RPi.GPIO
https://github.com/LeMaker/RPi.GPIO_BP/blob/bananapro/test/info_RPi.GPIO.py
https://github.com/GrazerComputerClub/RPi.GPIO
https://github.com/BPI-SINOVOIP/BPI-WiringPi2

banana-pi-m2-zero-gpio's People

Contributors

turyrx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

banana-pi-m2-zero-gpio's Issues

Problem with SD image from download section.

Good time! The topic of this question does not apply to the author's GPIO work. However, I have not yet found a solution to this problem, so I want to know if the author of the project had a similar problem, and how it was solved.

In the image that the author provides for download with a preinstalled patch, bluetooth does not work.

Here are some details, the problem is most likely at the level of the driver, the bluetooth module:

Faced the same problem, bluetooth does not work.

pi@bananapim2zero:~$ dmesg | grep Blue
[    7.503852] Bluetooth: Core ver 2.22
[    7.504188] Bluetooth: HCI device and connection manager initialized
[    7.504217] Bluetooth: HCI socket layer initialized
[    7.504228] Bluetooth: L2CAP socket layer initialized
[    7.504264] Bluetooth: SCO socket layer initialized
[    7.657155] Bluetooth: HCI UART driver ver 2.3
[    7.657201] Bluetooth: HCI UART protocol H4 registered
[    7.657208] Bluetooth: HCI UART protocol BCSP registered
[    7.657369] Bluetooth: HCI UART protocol LL registered
[    7.657388] Bluetooth: HCI UART protocol ATH3K registered
[    7.657587] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    7.658160] Bluetooth: HCI UART protocol Broadcom registered
[    9.911415] Bluetooth: hci0: command 0xfc18 tx timeout
[   17.911305] Bluetooth: hci0: BCM: failed to write update baudrate (-110)
[   17.911366] Bluetooth: hci0: Failed to set baudrate
[   19.983846] Bluetooth: hci0: command 0x0c03 tx timeout
[   21.908344] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   21.908386] Bluetooth: BNEP filters: protocol multicast
[   21.908412] Bluetooth: BNEP socket layer initialized
[   28.151347] Bluetooth: hci0: BCM: Reset failed (-110)
[   30.167373] Bluetooth: hci0: command 0xfc18 tx timeout
[   38.391358] Bluetooth: hci0: BCM: failed to write update baudrate (-110)
[   38.391399] Bluetooth: hci0: Failed to set baudrate
[   40.407355] Bluetooth: hci0: command 0x0c03 tx timeout
[   48.631404] Bluetooth: hci0: BCM: Reset failed (-110)
pi@bananapim2zero:~$
pi@bananapim2zero:~$ service bluetooth status
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-03-04 21:36:25 IST; 1min 57s ago
       Docs: man:bluetoothd(8)
   Main PID: 1226 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 900)
     Memory: 2.0M
     CGroup: /system.slice/bluetooth.service
             └─1226 /usr/lib/bluetooth/bluetoothd

Mar 04 21:36:21 bananapim2zero systemd[1]: Starting Bluetooth service...
Mar 04 21:36:24 bananapim2zero bluetoothd[1226]: Bluetooth daemon 5.53
Mar 04 21:36:25 bananapim2zero systemd[1]: Started Bluetooth service.
Mar 04 21:36:25 bananapim2zero bluetoothd[1226]: Starting SDP server
Mar 04 21:36:25 bananapim2zero bluetoothd[1226]: Bluetooth management interface 1.21 initialized
pi@bananapim2zero:~$ service hciuart status
● hciuart.service - Configure Bluetooth Modems connected by UART
     Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
  Condition: start condition failed at Sat 2023-03-04 21:38:05 IST; 23s ago
             └─ ConditionFileNotEmpty=/proc/device-tree/soc/gpio@7e200000/bt_pins/brcm,pins was not met

Mar 04 21:37:38 bananapim2zero systemd[1]: Dependency failed for Configure Bluetooth Modems connected by
Mar 04 21:37:38 bananapim2zero systemd[1]: hciuart.service: Job hciuart.service/start failed with result
Mar 04 21:38:05 bananapim2zero systemd[1]: Condition check resulted in Configure Bluetooth Modems connect

the bluetooth service is working, but the hciuart service is dead, and after restarting it is also dead.

System:

pi@bananapim2zero:~$ uname -ra                                                                          
Linux bananapim2zero 5.15.93-sunxi #23.02.2 SMP Fri Feb 17 23:49:46 UTC 2023 armv7l armv7l armv7l GNU/Linux
pi@bananapim2zero:~$ rfkill list
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

Devices are missing.

Please advise what can be done? I need to connect a wireless keyboard to my device, I can't do it...

Device Bananapi m2 zero

Thanks in advance for any response!

Detailed system information:

pi@bananapim2zero:~$ inxi -Fxxxrz
System:    Kernel: 5.15.93-sunxi armv7l bits: 32 compiler: N/A Console: tty 0 dm: N/A
           Distro: Ubuntu 20.04.5 LTS (Focal Fossa)
Machine:   Type: ARM Device System: Banana Pi BPI-M2-Zero details: Allwinner sun8i Family rev: N/A
           serial: <filter>
CPU:       Topology: Quad Core model: ARMv7 v7l variant: cortex-a7 bits: 32 type: MCP arch: v7l
           rev: 5
           features: Use -f option to see features bogomips: 260
           Speed: 1368 MHz max: 1368 MHz Core speeds (MHz): 1: 1368 2: 1368 3: 1368 4: 1368
Graphics:  Device-1: sun8i-h3-mali driver: lima v: kernel bus ID: N/A chip ID: allwinner:1c40000
           Device-2: sun8i-h3-dw-hdmi driver: sun8i_dw_hdmi v: N/A bus ID: N/A
           chip ID: allwinner:1ee0000
           Device-3: sun8i-h3-display-engine driver: sun4i_drm v: N/A bus ID: N/A
           chip ID: allwinner:display-engine
           Display: server: No display server data found. Headless machine? tty: 105x51
           Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:     Device-1: sun8i-h3-dw-hdmi driver: sun8i_dw_hdmi bus ID: N/A chip ID: allwinner:1ee0000
           Device-2: sun9i-a80-hdmi-audio driver: sun9i_hdmi_audio v: kernel bus ID: N/A
           chip ID: allwinner:sound_hdmi
           Device-3: Generalplus type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-1.4:5
           chip ID: 1b3f:2008
           Sound Server: ALSA v: k5.15.93-sunxi
Network:   Device-1: mmc-pwrseq-simple driver: pwrseq_simple v: kernel port: N/A bus ID: N/A
           chip ID: mmc-pwrseq-simple:wifi_pwrseq
           Device-2: sun8i-h3-emac driver: N/A port: N/A bus ID: N/A chip ID: allwinner:soc
           IF: enx00e04c534458 state: up speed: 100 Mbps duplex: full mac: <filter>
           Device-3: ICS Advent DM9601 Fast Ethernet Adapter type: USB driver: dm9601 bus ID: 1-1.2:4
           chip ID: 0fe6:9700
           IF: enx00e04c534458 state: up speed: 100 Mbps duplex: full mac: <filter>
           IF-ID-1: wlan0 state: down mac: <filter>
Drives:    Local Storage: total: 11.15 GiB used: 3.20 GiB (28.7%)
           ID-1: /dev/mmcblk0 model: SS08G size: 7.40 GiB serial: <filter> scheme: MBR
           ID-2: /dev/sda type: USB model: General USB Flash Disk size: 3.75 GiB serial: <filter>
           rev: 1100 scheme: MBR
Partition: ID-1: / size: 6.83 GiB used: 3.19 GiB (46.6%) fs: ext4 dev: /dev/mmcblk0p1
           ID-2: /var/log size: 48.4 MiB used: 12.8 MiB (26.4%) fs: ext4 dev: /dev/zram1
Sensors:   System Temperatures: cpu: 59.0 C mobo: N/A
           Fan Speeds (RPM): N/A
Repos:     Active apt repos in: /etc/apt/sources.list
           1: deb http://ports.ubuntu.com/ focal main restricted universe multiverse
           2: deb http://ports.ubuntu.com/ focal-security main restricted universe multiverse
           3: deb http://ports.ubuntu.com/ focal-updates main restricted universe multiverse
           4: deb http://ports.ubuntu.com/ focal-backports main restricted universe multiverse
           5: deb http://ports.ubuntu.com/ubuntu-ports/ focal universe multiverse restricted
           Active apt repos in: /etc/apt/sources.list.d/armbian.list
           1: deb http://apt.armbian.com focal main focal-utils focal-desktop
           Active apt repos in: /etc/apt/sources.list.d/ekundo_ppa_list_file.list
           1: deb [signed-by=/etc/apt/trusted.gpg.d/ekundo_ppa.gpg] https://ekundo.github.io/mc/ppa ./
Info:      Processes: 127 Uptime: 42m Memory: 491.7 MiB used: 110.3 MiB (22.4%) Init: systemd v: 245
           runlevel: 5 Compilers: gcc: 9.4.0 alt: 9 Shell: bash v: 5.0.17 running in: tty 0 (SSH)
           inxi: 3.0.38
pi@bananapim2zero:~$

Help solve the problem, this assembly is very good, everything you need except bluetooth works on it. Please help, at least throw a link to some forum to solve the problem.

Build doesn't work with latest Armbian

Hola!
Let me start with saying a big Thanks for the work you've done in enabling the BPi M2Zero and making it more usable (way closer to the RPi), especially filling the gap within the RPi and BPi ways they handle GPIO.

I'm currently working on porting some projects I had working on RPiZero and RPi3B with screen hats into the BPi (due chip shortage) and, while until a week or so ago I was able to build your libraries, after all the updates released this week (117 packages) for Debian (they pushed it from 11 to 11.5), I cannot longer build your libraries. Here is the /etc/os-release of my Armbian OS:

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Uname -a output:
Linux bpim2z 5.15.48-sunxi #22.05.3 SMP Wed Jun 22 07:35:10 UTC 2022 armv7l GNU/Linux

Neofetch:

                                 xxxxxxxx@bpim2z
                                 ---------------
      █ █ █ █ █ █ █ █ █ █ █      OS: Armbian bullseye (21.08.1) armv7l
     ███████████████████████     Host: Banana Pi BPI-M2-Zero
   ▄▄██                   ██▄▄   Kernel: 5.15.48-sunxi
   ▄▄██    ███████████    ██▄▄   Uptime: 27 mins
   ▄▄██   ██         ██   ██▄▄   Packages: 527 (dpkg)
   ▄▄██   ██         ██   ██▄▄   Shell: bash 5.1.4
   ▄▄██   ██         ██   ██▄▄   Resolution: 1280x720
   ▄▄██   █████████████   ██▄▄   Terminal: /dev/pts/0
   ▄▄██   ██         ██   ██▄▄   CPU: Allwinner sun8i Family (4) @ 1.008GHz
   ▄▄██   ██         ██   ██▄▄   Memory: 86MiB / 491MiB
   ▄▄██   ██         ██   ██▄▄
   ▄▄██                   ██▄▄
     ███████████████████████
      █ █ █ █ █ █ █ █ █ █ █

When running the automated build script, I get that apt repositories universe, multiverse and restricted are invalid (also verified this manually in two ways:

  1. By running sudo add-apt-repository universe, which responds with Error: 'universe' invalid
  2. By adding 'universe multiverse restricted' at the end of each line on /etc/apt/sources.list, which makes sudo apt update to indicate those repositories don't exist.

I imagine that, with the high number of new packages, there are quite a number of things that broke up, and I was wondering if you could take a look once you have some time.

Please let me know if you need any additional information.

Thanks in advance,
Wilferik

Old package names?

Hi,
I just tried to install your awesome project :) I really love it.
I just found a minor issue during the quick installation. The python-dev and libsdl-dev packages don't install automaticly python should now probably be python-dev-is-python3 and libsdl-dev probably libsdl1.2-dev.

I installed python3, libsdl, unrar and pip3 manually then most of the installation worked without any problems. Maybe those were caused by my manually installations: RPi.GPIO_BP/setup.py

I am running: Ubuntu Jammy Server (from your github link ;) ) on a Banana pi zero m2

This module can only be run on a Raspberry Pi!

I get this error:

pi@bananapim2zero:~/Banana-pi-m2-zero-GPIO/Bananapi-m2-zero-GPIO-files$ python3 info_gpio_m2z.py
Traceback (most recent call last):
  File "/home/pi/Banana-pi-m2-zero-GPIO/Bananapi-m2-zero-GPIO-files/info_gpio_m2z.py", line 4, in <module>
    import RPi.GPIO as GPIO
  File "/usr/local/lib/python3.9/dist-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

Youtube videos

Hola TuryRx,
Gracias por todo el apoyo, el trabajo se ve genial, he tratado de ver los videos pero al parecer no estan disponibles.

Ukhu

Build recipe and differences from archived Armbian

HI!

Firstly, congrats on the great work here.

I got here because I was searching for a working OS image for my Banana PI M2 Zero and realized that Armbian ditched support for it. That's a shame and I can't find the reason behind this.

Anyway. I downloaded your latest image (based on debian bullseye) and I would like to know how you built it. What are the differences between your images and archived images (available at armbian.org). Could you please share a recipe for building those images? I'm worried about the future of M2 Zeron once there's no more official Armbian support.

One Wire

Hi!

Can you help me to get one wire working for a WS2812 led strip? I have added overlays=w1-gpio to /boot/armbianEnv.txt, but no python libraries seem to work for it sadly.

Thank you for your help in advance!

>Errors when installing on Ubuntu

I was trying to install Banana-pi-m2-zero GPIO on Ubuntu, 2022-09-27-Armbian_22.11.0-trunk_jammy_edge_lubuntu_5.19.6-qt5-swap-bpi-p2z-10804MB but ended up with "broken" OS. I did try 4 times.
During installation as root or as user with "sudo", the following errors

  • Permission errors
  • /home/pi not finding
  • showing the public key is not available: NO_PUBKEY 23F3D4EA75716059
    Could someone help please

I2s mic and audio

img roxas version. Can you use i2s mic and audio like on raspi? Do I need to activate anything?

Richiesta login , pwd

Nel tentativo si configurare la scheda banana GPIO , il server mi chiede Login e PWD.
roxas , pi
root , pi
non funzionano .
Ringrazio Buon Lavoro

How to cancel GPIO debug monitor

hi, thank you for your library, i can say its amazing.
but i have some problem

gpio=22,value=1
gpio=3,value=1
gpio(3),bank(0),num(3)

how to comment this debug print?
thank you

SPI buffer size

Hi,
I am sorry to "spam" you like this. However I am trying to increase the SPI buffer, as it seems many before me.
I have managed to enable the spi and I2C following your advices in your repos, but I am failing to set different buffer size than 4096.

I Have tried both unload the module and load it with parameter (modprobe spidev bufsiz=8192), added "param_spidev_bufsize=20480" to armbianEnv.txt; but no help.

My armbianEnv looks like this:

verbosity=8
bootlogo=false
console=both
#disp_mode=1920x1080p60
disp_mode=1280x720p60
overlay_prefix=sun8i-h3
rootdev=UUID=76ad07d8-a310-4dd0-9975-1a3ebf4cd0b4
rootfstype=ext4
overlays=i2c0 spi-add-cs1 spi-jedec-nor spi-spidev
param_spidev_spi_bus=0
param_spidev_bufsize=20480
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

Could you help? Thanks (I would not even get this far withou your repos).

about gpio BCM ID

请问,修改armbian-config里的hardware功能选项会影响GPIO的BCM编号吗?以下是我执行的gpio readall的结果,和你的图片里的编号都不一样

May I ask if modifying the hardware function option in armbian configuration will affect the BCM and wPi number of GPIO? The following is the result of my gpio readall execution, which is different from the numbering in your image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.