Banana Pi M2 Zero is an ultra compact single board computer measures only 60mm*30mm. It uses quad-core Cortex A7 allwinner H2+ processor, with 512MB RAM memory. It’s ideal for light-weight systems with some space-limited applications. Like other members of Banana Pi, it supports both linux and android operating system.
More Infomation: Banana Pi BPI-M2_Zero |
Quad Core ARM Cortex A7 CPU H2+
512MB SDRAM.
WiFi (AP6212) & Bluetooth onboard.
Mini HDMI.
Download PhoenixCard: https://pan.baidu.com/s/1-fjvPqtG_zewVzqnXf1AHw?pwd=eid9
Put your TF card into a TF-USB adapter, and then plug adapter in your Windows PC usb interface.
Prepare your image, and download image burning tools PhoenixCard.exe.
Use "PhoenixCard.exe" to burn android image to TF card.
Select the image in the image path option
Select set as card startup, then click on burn image
Burning ended,
It’s recommended to use A1 rated cards, 8GB at least.
Install bpi-tools on your Linux PC(if flash image with other tools, ignore this step). If you can’t access this URL or any other install problem, please go to bpi-tools source repo, download and install this tools manually.
$ apt-get install pv
$ curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
Download latest Linux Image, and confirm that the md5 checksum is correct.
Default login: pi/bananapi or root/bananapi
Windows PC
Install Image with Balena Etcher.
Balena Etcher is an opensource GUI flash tool by Balena, Flash OS images to SDcard or USB drive.
Click on "Flash from file" to select image.
Click on "Select target" to select USB device.
Click on "Flash!" Start burning.
Linux PC
There are two methods for you to choose from.
Install Image with dd command on Linux, umount SDcard device /dev/sdX partition if mounted automatically. Actually bpi-copy is the same as this dd command.
$ sudo apt-get install pv unzip
$ sudo unzip -p xxx-bpi-m2_zero-xxx.img.zip | pv | dd of=/dev/sdX bs=10M status=noxfer
Install image with bpi-tools on Linux, plug SDcard to Linux PC and run
$ sudo apt-get install pv unzip
$ sudo bpi-copy xxx-bpi-m2_zero-xxx.img.zip /dev/sdX
Get the m2 zero bsp source code
$ git clone https://github.com/BPI-SINOVOIP/BPI-M2P-bsp-4.4
Build the source code according to the README.md, and update the packages to the sdcard with bpi image flashed.
Prepare a SD card which have installed system(Ubuntu/Raspbian/..)
Start with SD card, and after the startup is completed, copy your files and config your system, then poweroff M2 Zero. [If you don’t want to config your system, you can skip this step]
Plug your SD card in PC(which is running Linux)
cd /media
then
ln -s <your account> pi
Execute
bpi-migrate -c bpi-m2z.conf -c ubuntu-mate-from-sd.conf -d /dev/sdx
Then you could get your own image now
On M2 Zero console:
Execute
./adbd.sh
then execute
ps -ax | grep adbd
to see if adbd is set up
On PC terminal:
If adbd was succeed to set up, insert OTG-USB interface to M2 Zero and PC(with Ubuntu system) Execute
adb devices
to see if PC has recognised M2 ZeroP OTG If yes, we could execute
adb shell
to connect M2 Zero by adb now
Use bluetoothctl tool to operate BT Execute
bluetoothctl
If you don’t know how to use bluetoothctl, type "help", you will see more commands
Execute these commands:
You have two ways to setup WiFi Client
Use commands to setup WiFi client
ip link set wlan0 up
iw dev wlan0 scan | grep SSID
vim /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="ssid"
psk="password"
priority=1
}
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
dhclient wlan0
Use UI interface to setup WiFi Client
git clone https://github.com/BPI-SINOVOIP/BPI-files/tree/master/SD/100MB
bpi-bootsel BPI-cleanboot-8k.img.gz /dev/sdX
We use HDF5640 camara.
Guvcview
Use your UI interface to operate camara
Applications → Sound & Video → guvcview
Shell
We also have built-in command in /usr/local/bin to test camara
Test picture taking function
./test_ov5640_image_mode.sh
Test video recording function
./cameratest.sh
How to change display resolution
For Example: we change M2Z HDMI display 1080P.
Execute
mount /dev/mmcblk0p1 /mnt
cd /mnt/bananapi/bpi-m2z/linux
find "sys_config.fex"
Execute
vim sys_config.fex
change
screen0_output_mode = 5
to
screen0_output_mode = 10
After save changed, use
fex2bin
command to transfer sys_config.fex to bin file "fex2bin sys_config.fex script.bin",reboot.
parameters meaning:
Install Bpi-tools
curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash -
Update Bpi-tools
bpi-tools
Install RPi.GPIO
git clone https://github.com/BPI-SINOVOIP/RPi.GPIO
cd RPi.GPIO
sudo apt-get update
sudo apt-get install python-dev python3-dev
Execute
sudo python setup.py install
or
sudo python3 setup.py install
Using RPi.GPIO
cd /usr/local/bin
./bpi_test_g40.py
We also have built-in test command in
/usr/local/bin
How to Update WiringPi
bpi-update -c pkglist.conf
bpi-update -c bpi-pkg-bpi-wiringpi.conf
RGB 1602 LCD
/usr/local/bin/bpi_test_lcd1602.sh
0.96 Inch OLED Display
/usr/local/bin/bpi_test_52pi.sh
8x8 RGB LED Martix
Firstly you need a GPIO Extend Board for 8x8 LED Martix
/usr/local/bin/bpi_test_gpio40.sh