Configuracion y uso de GPIO BPI-M2 Zero

hello look at the image I no longer have it available because they reported the link to me a while ago so for the moment only the ones on my git page are available,

but soon I hope to be able to upload new, more updated compilations

Hello Roxas, I tested armbian 21-08-1 focal with linux 5.10.60-sunxi with your script version 1.2 . all looks good but errors on examples python3 scripts?

then I tested your link ​Ubuntu Focal GPIO configured rev1.3 28-03-22 And all works great, all python3 examples i tested and works great.

Then i add my bme280 i2c temp en pressure device. 76 roxas@bananapim2zero:~$ i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: – -- – -- – -- – -- – -- – -- – 10: – -- – -- – -- – -- – -- – -- – -- – -- 20: – -- – -- – -- – -- – -- – -- – -- – -- 30: – -- – -- – -- – -- – -- – -- – -- – -- 40: – -- – -- – -- – -- – -- – -- – -- – -- 50: – -- – -- – -- – -- – -- – -- – -- – -- 60: – -- – -- – -- – -- – -- – -- – -- – -- 70: – -- – -- – -- 76 –

the 76 is oke detected. so i download script https://github.com/bortek/bme280/blob/master/bme280_file.py line with bus = smbus.SMBus(1) # changed to 0

roxas@bananapim2zero:~$ sudo python3 bitb-bme280.py Temperature : 24.37 C Pressure : 1001.37 hPa roxas@bananapim2zero:~$

so i want you to know that bme280 also works fine .

Good morning friend, I tell you that I think you did not review all my article or you do not review all my video since what you tell me is part of the secondary confirmations not being configured, I leave you the link for that part so you can solve it

and really it is not an error just that you have not enabled the configuration, that is something that is done manually and my script does not do it automatically

Hello everyone, I hope you are well. Soon I will publish in git the new images for the banana pi m2 zero here I show you a small preview of the new images based on ubuntu and debian, so stay tuned because as soon as I have some time I will finish compressing them and uploading them to mediafire, in addition to When I publish them, I will publish a small video on YouTube so that you are aware.

Captura%20de%20pantalla%20de%202022-05-30%2001-21-38

New Images

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