Banana Pi BPI-P2 Zero is an ultra compact single board computer measures only 65mm*52.5mm. It uses quad-core Cortex A7 allwinner H2+ processor(Option : H3 and H5), with 512MB RAM memory.8G eMMC flash,100M LAN,add PoE function support , 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-P2 Zero |
CPU: Allwinner H2+, Quad-core Cortex-A7
512MB DDR 3 SDRAM
WiFi (AP6212) & Bluetooth onboard
Mini HDMI
40 PIN GPIO, It includes UART, SPI, I2C, IO etc
100M LAN
IEEE 802.3af PoE standard PoE module support
8G eMMC flash onboard
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,
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 mass production card,then click on burn image
Burning ended.
After the image is burned, insert the SD card into the board and power on to start.After startup, the image will be automatically burned to the eMMC.
You can also judge by the light. When the red light changes from normally on to off, the burning is complete.
After the burning is completed, the power will be cut off, and the SD card will be removed. Power on again to start from eMMC.
Linux image support SDcard or EMMC bootup
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-p2_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-p2_zero-xxx.img.zip /dev/sdX
Prepare a SDcard with Linux image flashed and bootup board with this SDcard.
Unzip the image and copy it to a USB drive, plug the udisk to board and mount it.(If automatically mounted, ignore this step)
mount /dev/sdx /mnt
There are two ways to install the linux image to board.
Install with dd command.
sudo dd if=/mnt/xxx.bpi-p2_zero-xxx.img of=/dev/mmcblk0 bs=10M status=noxfer
Install the linux image in udisk with bpi-tools command
$ sudo bpi-copy xxx-bpi-p2_zero-xxx.img.zip /dev/mmcblk0
After download complete, power off safely and eject the SDcard.
Get the p2 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/..)
Boot your SD card with M2 Zero, after M2 Zero finish starting, 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
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
ps -ax | grep adbd
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
see if PC has recognised M2 ZeroP OTG.
If yes, we could execute
adb shel
connect M2 Zero by adb now
Use iperf3 to test network
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/wpasupplicant/wpa_supplicant.conf
network={
ssid="ssid"
psk="password"
priority=1
}
wpa_supplicant -iwlan0 -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