Configuracion y use de GPIO BPI-M2 Zero

Hi Arturo, this is the new minimal image to upload? Can you tell me if the experimental one will have startup checks on the microSD partitions (write / read) to prevent crashing when the file system starts (unmount filesystem safely before the power goes out)

Hello friends, after almost 1 day of serial communication functioning test with my slave machine (I still use the old Armbian Minimal Focal image - 21.11.0-trunk for now) the UART3 serial port on the banana pi M2 Zero - UART3 /dev/ttyS3 port not there is more track (GPIO pin: 8,10).

Python Serial Exception Raised:

serial.serialutil.SerialException: Could not configure port: (5, ‘Input / output error’) Exception_ttyS3_PythonSerial_11

I restarted the banana pi Zero, tried all the commands:

  1. dmesg | grep tty
  2. lsof /dev/ttys3
  3. sudo ls -l /proc/[0-9]/fd/ |grep /dev/ttyS3 … ttyS3_not_found11

but no more traces of the ttyS3 UART3 port yet, the other serial ports have all suddenly broken as well. Working now only my UART0 port /dev/ttyS0 which is the programming port of the banana pi zero.

After formatting and rewriting the Armbian Focal Mininmal image on the microSD again the ttyS3 UART3 port has started working again but I’m afraid it will soon break again. Do you have any information on this? How to solve this problem?

Armbian Focal Trunk Realise image used:

Armbian 21.11.0-trunk Focal with Linux 5.15.25-sunxi


armbian-release: BOARD=bananapim2zero BOARD_NAME=“Banana Pi M2 Zero” BOARDFAMILY=sun8i BUILD_REPOSITORY_URL=https://github.com/armbian/build BUILD_REPOSITORY_COMMIT=14904824d DISTRIBUTION_CODENAME=focal DISTRIBUTION_STATUS=supported VERSION=21.11.0-trunk LINUXFAMILY=sunxi ARCH=arm IMAGE_TYPE=user-built BOARD_TYPE=csc INITRD_ARCH=arm KERNEL_IMAGE_TYPE=Image BRANCH=current


Hello friend, at this moment what I am only looking for is to have a final patch to solve problems in uart communication but in the future I can go reviewing those details

hi Arturo, can you give me stable Armbian Ubuntu picture in UART3 for banana pi, even no trunk is fine but strong and stable. For this urgency I can fill in on that. I have the slave serial machines stopped. a thousand thanks .

I finally found a solution for my problem. Pin change can be done by using user_overlays

The following script exports the source of the original i2c0 overlay, modifies it and create and install a user_overlay. After boot physical pins 8&9 are mapped to i2c1

You need to have i2c0 overlay activated in your armbianEnv.txt! Check for line “overlays=i2c0”.


#create .dts file from original i2c0 overlay

dtc -I dtb -O dts /boot/dtb/overlay/sun8i-h3-i2c0.dtbo >i2c0_P.dts

#replace i2c0 with i2c1

sed -i ‘s/i2c0/i2c1/g’ i2c0_P.dts

#create user-overlay

sudo armbian-add-overlay i2c0_P.dts

#show new config

more /boot/armbianEnv.txt


How about my friend, look, I had already tried it before for a theme with spi for a screen but in the long run it causes problems because the overlay and changing the dts after the construction of the image causes errors in my case I tried to use two oled screens that time one i2c for physical 3 and 5 and another for the spi pins but after creating the change in the dts and restarting a few times it no longer showed me coherent things I realized that time that it was because the spi pins were assigned to others pins as well as i2c 1 was actually i2c 0 here I leave the link for you to give it a little check

https://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO

Today I took some time to analyze the Armbian-Config on the image that lost the UART3- I run armbian-config, and now no more entries are present in it (UART1, UART2, UART3, i2c, and others). I see these messages running fast when I activate armbian-config> hardware configuration and then I find the list of items (uart, i2c,) empty of anything inside. Some idea? image.png

image.png

image.png

I am attaching mine also armbianEnv.txt

image.png

armbianEnv.txt (291 Byte)

Hello friends, I reinstalled the Rpio.GPIO Grazer libraries on the new Roxas Armbian image.

Also fixed missing dependencies. Executed the commands as per procedure but still my callback_1.py fails to start:

  1. sudo apt-get install -y python3-setuptools
  2. sudo apt-get install -y python-setuptools
  3. sudo apt-get install build-essential
  4. sudo apt-get install python3-all python3-all-dev debhelper
  5. sudo apt-get install python-all python-all-dev
  6. git clone https://github.com/GrazerComputerClub/RPi.GPIO.git
  7. cd RPi.GPIO
  8. ./make_deb
  9. sudo python setup.py install
  10. sudo python3 setup.py install

GPIO_lib_error_install_dpkg_3

Some idea?

hello everyone, some have sent me messages and commented that the patch for serial port 0 does not work here I will leave you a small video where I show you that it does work but only in the last test image that I made.

https://mega.nz/file/2cFkVLRC#OlWLJwbpRPJt6yMasyscDb2n00DzeSWk0rCdGrMJbfU

check this https://forum.armbian.com/forum/40-reviews-tutorials-hardware-hacks/