Banana Pi BPI-M2 Ultra is a quad-core mini single board computer built with Allwinner R40 SoC. It features 2GB of RAM and 8GB eMMC. It also has onboard WiFi and BT. On the ports side, the BPI-M2 Ultra has 2 USB A 2.0 ports, 1 USB OTG port, 1 HDMI port, 1 audio jack, a DC power port, a SATA port.
More Infomation: Banana Pi BPI-M2_Ultra |
Banana Pi BPI-M2 Berry is a quad-core mini single board computer built with Allwinner V40 SoC. It features 1GB of RAM . It also has onboard WiFi and BT. On the ports side, the BPI-M2 Berry has 4 USB A 2.0 ports, 1 USB OTG port, 1 HDMI port, 1 audio jack, a DC power port, a SATA port.
More Infomation: Banana Pi BPI-M2_Berry |
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 constant on to flashing, 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.
M2 Ultra and M2 Berry are compatiable with same Linux image.
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-ultra-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-ultra-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-m2-ultra-xxx.img of=/dev/mmcblk0 bs=10M status=noxfer
Install the linux image in udisk with bpi-tools command
$ sudo bpi-copy xxx-bpi-m2-ultra-xxx.img.zip /dev/mmcblk0
After download complete, power off safely and eject the SDcard.
Install tools
apt-get udpate
apt-get install gcc-arm-linux-gnueabihf u-boot-tools
apt-get install pv
curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
Clone code
git clone: https://github.com/BPI-SINOVOIP/BPI-M2U-bsp.git
./build.sh
Mount SATA on M2U
After insert sata interface, execute
fdisk -l
Then
mount /dev/sdx /mnt/xxx
If you meet some errors when you mount SATA, try these following commands:
Create new partition
fdisk /dev/sdx
set your partition numbers and size, after created partitions, input “wq” to save and quit.
Format the SATA
mkfs.ext2 /dev/sdx
Mount
mount /dev/sdx /mnt/xxx
After you success to insert SATA, we could input following commands to test SATA interface:
Test read speed
time dd if=/dev/xxx of=/dev/null bs=1M count=1000
Test write speed
time dd if=/dev/zero of=/dev/sdx bs=1M count=1000
On M2U console:
Execute
/usr/local/bin/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 M2U and PC(with Ubuntu system)
Execute
adb devices
to see if PC has recognised M2U OTG
If yes, we could execute
adb shell
to connect M2U by adb now
Execute
bpi-bootsel
you’ll see a list of boot files.
Find "BPI_M2U_LCD7.img.gz"
Then execute
bpi-bootsel /usr/lib/u-boot/bananapi/bpi-m2u/BPI_M2U_LCD7.img.gz
Use iperf3 to test gmac
On PC Terminal:
Execute
iperf3 -s
On M2U console:
TCP test:
iperf3 -c serverIP
UDP test:
iperf3 -u -c serverIP
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
nano /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_ov5640_image_mode.sh
to test picture taking function,
./cameratest.sh
to test video recording function.
Execute
getevent
Use your IR device to send information to M2U
Execute
git clone https://github.com/BPI-SINOVOIP/RPi.GPIO
After clone the repo
cd RPi.GPIO
Execute
sudo apt-get update
Execute
sudo apt-get install python-dev python3-dev
Execute
sudo python setup.py install
or
sudo python3 setup.py install
to install the module
We also have built-in test command in
/usr/local/bin
RGB 1602 LCD
Execute
/usr/local/bin/bpi_test_lcd1602.sh
0.96 Inch OLED Display
Execute
/usr/local/bin/bpi_test_52pi.sh
8x8 RGB LED Martix
Firstly you need a GPIO Extend Board for 8x8 LED Martix
Execute
/usr/local/bin/bpi_test_gpio40.sh
Prepare a 32Gb TF card
Use GParted to resize root point '/' as 32Gb
apt-get install libxcb*
download qt5.7
make & make install
apt-get install qtcreator
Config qtcreator