Configuracion y use de GPIO BPI-M2 Zero

Hi Arturo how are you? Great so if I have not misunderstood you have loaded the new Armbian Ubuntu image with the boot system error fixed? If solved the startup error block it would be great.

It block here (serial connection):

Loading, please wait…

Starting version 245.4-4ubuntu3.15

Begin: Loading essential drivers … done.

Begin: Running /scripts/init-premount … done.

Begin: Mounting root file system … Begin: Running /scripts/local-top … done.

Begin: Running /scripts/local-premount … done.

Begin: Will now check root file system … fsck from util-linux 2.34

[/usr/sbin/fsck.ext4 (1) – /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1 /dev/mmcblk0p1: recovering journal …===> Block

https://mega.nz/file/cv4jVSxa#TXcxp0NTlptjFTXyjTsUpZmxXeigTp9brz4nkHw9lWo

1 Like

Hello, how have you been, friend, look, I checked it and I still don’t know why it doesn’t work well for you and creates the block, but I tried it with a 16GB Kingston SD and I had no problems, but I also tried it with a 32GB SD just like Kingston and I got the same crash, I tell you to check the kernel configuration according to me, it’s fine, do a quick test and everything gives me the same results, the only test that gave me good results was to save the image from the Linux terminal I don’t know if it has any significant difference, but at the moment of testing it, it turns out that the blocking is avoided, it could be an option that you could try to see if it solves your problem, friend.

And another way I found to avoid the lock was loading the same kernel that uses pear arch and I had no problem, besides friends who also work with this board told me that the lock could be avoided by pressing enter at the time of loading in my case I have not tried it but you could try it, according to what they arrived at, it was that the lack of interaction at the time of loading causes the blockage.

good night for those who have the problem with the usb serial connection I already have a new image but due to problems with my usb serial converter I can’t test it could someone help me test it I’ll be uploading the modified image these days

Roxas: What do you need? I am willing to help.

Roxas, when I burn the bullseye image and then run your script it fails the compilation of some of the prjects cloned with git. For example WiringPi2

hello friend and thanks in advance what you needed is for you to test the ttl serial connection of a new image to see if the problem of being stunned was solved, I would try this but my adapter died

hello, look, in fact, this is why the script I created for the gpio pins is only functional in Ubuntu, it shouldn’t work at the moment, but you could try compiling everything by hand

ok thanks. I will try it and give you some feedback. Thanks for all the work.

Another question, did you know if yours M2 Zero images work in a P2 Zero? supposedly should, but I didnt tested yet

Don’t worry, I’m glad my work is useful to you.

in fact i tried them but i don’t remember if i had good results in fact i think i had to create specific images

Hello, I’m new with Bana PI M2 so thanks to Roxas for your work done, helped me a lot. Because of unavailibility of Raspberry PIs I try to port my LISY project ( www.lisy.dev ) to Banana PI M2 now. I installed latest buster image from Roxas github and wiringPI2, works in general but I have a few problems:

  1. pull-up resistors not working In my project with raspberry PI I use internal ‘pull-up resistors’ for a few input ports. For example with GPIO.21 With banana PI it stays at ‘0’ in gpio readall even I set the internall pull-up with ‘sudo gpio mode 21 up’. ( same method works with Raspberry PI) For testing, I added an external pull up resistor and with that the port is read as ‘1’ Is that a problem in general?

  2. pins for I2C1 bus wrong With Raspberry I’m using I2C bus with device /dev/i2c-1which are mapped to physical pins 2&3 ( SDA.1 & SCL.1 ). However with banana PI pins 2&3 are mapped to /dev/i2c-0. (which is IMHO wrong ) Can I adjust the pin settings by software?

  3. serial console With Raspberry I’m using the serial console with physical pins 8&10 ( TxD,RxD) Connecting it on banana PI I see ‘some’ characters, but its garbage. So I assume its just a baud setting? Where can I adjust parameters for serial console? ( with Raspberry it is /boot/cmdline.txt … )

any help appreciated

good friend look I’m busy but if you have time in a while I’ll free up all your doubts why you gave me a lot :sweat_smile::sweat_smile:

hi Arturo, can you tell me if your new image armbian server focal minimal (no graphics) has the fix boot system boot error?

Which one do you recommend the best. I have banana pi plugged in on machine, so I need to unplug and hang up several times a day banana pi zero power supply without causing operating system crash.

I would be ready to recompile my Rom on banana pi card. Thanks

thanks for your quick reply and no problem, take your time … In the meantime I have recompiled my programm to i2c-0, so I have a workaround for No 2.

found a solution for the serial console, so now only the ‘pull-up’ problem is there :slightly_smiling_face:

grafik

here are the steps you need to do for activating serial console on pins 6(GND), 8(TxD) and 10(RxD) which is ttyS3/UART3 on banana PI M2 Zero NOTE: pins are at 3Volt level, DO NOT connect directly to a 5Volt serial port!!!

  • activate uart3 via armbian-config
  • edit armbianEnv with “sudo vi /boot/armbianEnv”
    • change line beginning with “console=…” to “console=serial” save it
  • edit /boot/boot.cmd with “sudo vi /boot/boot.cmd”
    • look for line “if test “${console}” = “serial”; then setenv consoleargs “console=ttyS0,115200”; fi” and change ttyS0 to ttyS3 save it
  • recompile /boot/boot.scr by issuing the following command “sudo mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr”
  • reboot
  • enjoy …

good afternoon friend I have an experimental image but it is to try it since my serial programmer was damaged I would not be able to tell you if it still works but if you want to try it go ahead I will be uploading it these days but the friend @bontango has been able to find a very good solution I recommend that see how I detail it :slight_smile:

in fact friend I wanted to comment on this that the i2c pins on the banana pi would be 3 and 5 respectively for SDA and SCL speaking of physical pins so it may seem wrong friend but there is no issue with that besides that here we have three pairs of pins for i2c plus you can also change the addressing by software

another thing what you tell me about the pins is correct in that the problem is because of the library that is used to manage them, I managed to make it work with the time I spent on it but I still cannot perfect it, besides it is complicated to keep it working with the updates of the python dependencies what I can tell you is that I already have a new library that works a little better here I leave the post where I showed it but it is very unstable since it conflicts with the image after a while

What a great friend, thanks for this situation. I’ve been looking for a way to solve it for a long time, but I couldn’t get it in a good way.