Difference between revisions of "Getting Started with W2"
(→Install Android image) |
(→Install Android image) |
||
Line 51: | Line 51: | ||
Download the latest [https://download.banana-pi.dev/d/3ebbfa04265d4dddb81b/?p=%2FImages%2FBPI-W2%2FAndroid7&mode=list android image] | Download the latest [https://download.banana-pi.dev/d/3ebbfa04265d4dddb81b/?p=%2FImages%2FBPI-W2%2FAndroid7&mode=list android image] | ||
− | Download [https://download.banana-pi.dev/d/3ebbfa04265d4dddb81b/files/?p=% | + | Download [https://download.banana-pi.dev/d/3ebbfa04265d4dddb81b/files/?p=%2FTools%2Fimage_download_tools%2Fw2_android_usb_download_tool.zip BPI-W2 USB flash tool] |
Note: | Note: |
Revision as of 01:03, 26 July 2020
Introduction
Read more: Banana Pi BPI-W2
Development
Let's get start to develop on BPI-W2, see amazing things happen.
Old page:Getting Started with BPI-W2
Basic Development
Prepare
- Prepare 8G/above TF card, USB-Serial interface, PC with Ubuntu System
- Using your USB-Serial Connect debug console on W2
Install Linux Image
Download the latest Linux Images
- Note: Board SW4 switch to 1 for sd boot
Install Image to SD Card with Win32 Disk Imager On Windows
Install Image to SD Card On Linux PC with bpi-tools
- Install bpi-tools on your linux
$ apt-get install pv $ curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
- After you download the image, insert your TF card into your Linux PC
$ bpi-copy xxx.img /dev/sdx
- After step 2, then you can insert your TF card into W2, and press power button setup W2.
Install Image to SD Card with Etcher on Windows, Linux and MacOS
- Balena Etcher is an open source project by Balena, Flash OS images to SD cards & USB drives
Install Image to EMMC with SD Ubuntu
- Prepare a sd with Linux image installed, bootup board from sd card. Copy a Linux image to udisk and plug in W2, mount udisk and use command "bpi-copy xxx-emmc-xxx.img" to flash image to Emmc. After flash successfully, power off the board, eject sdcard and power on again.
Install Android image
Download the latest android image
Download BPI-W2 USB flash tool
Note:
- 1. BPI-W2 USB flash tool is a usb download tool for flashing android image to board emmc, and only support Windows platform.
- 2. Make sure SW4 switch to '0' for emmc boot.
- 3. Read document/bananapi_w2_usb_download_tool_guide.doc before flashing image.
Advanced Development
GPIO
GPIO Control
PWM Control
SATA
1. Mount dev on W2
- After insert sata interface, execute "fdisk -l"
- Then "mount /dev/sdx /mnt/xxx"
2. If you meet some errors when you mount SATA, try these following commands:
- "fdisk /dev/sdx" to create new partition , set your partition numbers and size, after created partitions, input "wq" to save and quit.
- "mkfs.ext2 /dev/sdx" to format the SATA
- "mount /dev/sdx /mnt/xxx"
SSD
1. After you success to insert SATA, we could input following commands to test SATA interface:
- "time dd if=/dev/xxx of=/dev/null bs=1M count=1000" to test read speed
- "time dd if=/dev/zero of=/dev/sdx bs=1M count=1000" to test write speed
HDD
1. After you success to insert SATA, we could input following commands to test SATA interface:
- "time dd if=/dev/xxx of=/dev/null bs=1M count=1000" to test read speed
- "time dd if=/dev/zero of=/dev/sdx bs=1M count=1000" to test write speed
NetWork
GMAC
- iperf3 -c [server]
- iperf3 -u -c [server]
- iperf3 -s
WiFi & BT
1.If you want to use WiFi or BT, you could use RTL8822BE module.
STA
1. 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 -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
- dhclient wlan0
2. Use UI interface to setup WiFi Client
AP
Developing
Develop 4G module with W2
GPU
- Execute "glmark2-es" to start OpenGL test
- glmark2 Score: 30