Giter Club home page Giter Club logo

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

Watchers

 avatar  avatar

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

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

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

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

I2s mic and audio

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

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

>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

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

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.

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.

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).

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

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!

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.