Difference between pages "BPI-Bit" and "Getting Started with M64"

From Banana Pi Wiki
(Difference between pages)
Jump to: navigation, search
(Introduction)
 
(Introduction)
 
Line 1: Line 1:
 +
=Introduction=
 +
==BPI-M2M==
 +
[[File:M64_respbian.png|thumb|Overview: BPI-M64 respbian linux]]
  
= Introduction=
+
  Banana Pi BPI-M64 is a 64-bit quad-core mini single board computer. It features 2GB of RAM and 8GB eMMC. It also has onboard WiFi and BT. On the ports side, the BPI-M64 has 2 USB A 2.0 ports, 1 USB OTG port, 1 HDMI port, 1 audio jack, and lastly a DC power port. The processor is pin-to-pin comptialbe with R18, so it comes with two versions:M64 and M64-R18
  
[[File:Webduino_gif.gif|thumb|Overview: BPI:bit]]
+
*Read more about : [[Banana Pi BPI-M64]]
[[File:Webduino_bit_1.JPG|thumb|Overview: BPI:bit]]
 
[[File:BPi_bit_webduino_3.jpg|thumb|Overview: BPI:bit for Webduino]]
 
  
The '''BPI bit''' (also referred to as '''BPI-bit''', stylised as '''bpi:bit''') is an ESP32 with 32-bit Xtensa LX6 dual-core processor based embedded system. It supports Webduino, Arduino, MicroPython as well as Scratch X programming environments.
+
===A64 Key Features===
 +
* 1.2 Ghz Quad-Core ARM Cortex A53 64-Bit Processor-A64
 +
* 2GB DDR3 SDRAM
 +
* 8G EMMC
 +
* 10/100/1000Mbps Ethernet
 +
* WiFi (AP6212) & Bluetooth
  
BPI:bit hardware main function:
+
===R18 Key Features===
 +
* 1.2 Ghz Quad-Core ARM Cortex A53 64-Bit Processor-R18
 +
* 2GB DDR3 SDRAM
 +
* 8G EMMC
 +
* 10/100/1000Mbps Ethernet
 +
* WiFi (AP6212) & Bluetooth
  
[[File:Webduino_web_en_1.png]]
+
=Development=
 +
==Basic Development==
 +
===Prepare to develop===
 +
  * Prepare 8G/above TF card, USB-Serial interface, PC with Ubuntu System
 +
  * Using your USB-Serial Connect debug console on M64
  
bpi:bit board is 5 cm x 5 cm in size, weighs 10 ~ 12 grams, it houses a 20-Pin edge connector, built-in lighting matrix with 25 programmable full-color LEDs , two photosensitive light sensors, two programmable buttons, an NTC resistor, a buzzer and a nine shaft sensor (triaxial acceleration Three-axis gyroscope and three-axis magnetic compass), the I/O space configuration is as follows:
+
===Load your first image on M64===
 +
  1.You could download latest image from our forum
 +
 
 +
  2.Install bpi-tools on your system
 +
  * apt-get install pv
 +
  * curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
 +
 
 +
  3.After you download the image, insert your TF card into your Ubuntu
 +
  * Execute "bpi-copy xxx.img /dev/sdx" to install image on your TF card.
 +
 
 +
  4.After step 3, then you can insert your TF card into M64, and press power button setup M64
  
*Full color LED matrix: GPIO4
+
===Load your first image on M64 EMMC===
*Photosensitive sensor: GPIO36 (Analog A0, upper left), GPIO39 (Analog A3, upper right)
+
  * Run your M64 with TF card
*Button switch : GPIO35 (A), GPIO27 (B)
+
  * Copy "xxx-sd-emmc-xxx.img.zip / xxx-sd-emmc-xxx.img" to your USB disk
*Temperature sensor: GPIO34 (Analog A6)
+
  * Plug your USB disk in M2U
*Buzzer: GPIO25
+
  * After M64 recognise USB disk, execute "bpi-copy xxx-sd-emmc-xxx.img.zip / xxx-sd-emmc-xxx.img" to install image on EMMC
*MPU-9250 9-axis sensor: GPIO0, GPIO21, GPIO22, GPIO33
+
  * Then power off M64, take TF card out, power on M64
  
= Hardware =
+
==Advanced Development==
 +
===How to build uboot & kernel===
 +
====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
  
==Description ==
+
===SATA===
 +
1. Mount SATA on M2U
  
The board is 5 cm × 5 cm and has an ESP32 module with 32bit Xtensa LX6 dual-core processor, with a capacity of up to 600DMIPS, with a built-in 448KB ROM and 520 KB SRAM.accelerometer and magnetometer sensors,2.4G WiFI,Bluetooth and USB connectivity, a display consisting of 25 [[Light-emitting diode|LEDs]], two programmable buttons, and can be powered by either USB or an external battery pack.The device inputs and outputs are through five ring connectors that are part of the 23-pin edge connector.
+
  [[Image:A64_Sata.png]]
  
BPI:bit provides a wide range of onboard resources, supports photosensitive sensor, digital triaxial sensor, digital compass, temperature sensor interface.Webduino:bit have 25 intelligent control LED light source that the control circuit and RGB chip are integrated in a package of 5050 components.Cascading port transmission signal by single line.Each pixel of the three primary color can achieve 256 brightness display, completed 16777216 color full color display, and scan frequency not less than 400Hz/s.
+
* After insert sata interface, execute "fdisk -l"
 +
  [[Image:A64_Sata_fdisk_l.png]]
  
BPI:bit use MPU9250 onboard, MPU-9250 is a multi-chip module (MCM) consisting of two dies integrated into a single QFN package. One die houses the 3-Axis gyroscope and the 3-Axis accelerometer. The other die houses the AK8963 3-Axis magnetometer from Asahi Kasei Microdevices Corporation. Hence, the MPU-9250 is a 9-axis MotionTracking device that combines a 3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer and a Digital Motion Processor™ (DMP) all in a small 3x3x1mm package available as a pin-compatible upgrade from the MPU-6515. With its dedicated I2C sensor bus, the MPU-9250directly provides complete 9-axis MotionFusion™ output. The MPU-9250 MotionTracking device, with its 9-axis integration, on-chip MotionFusion™, and runtime calibration firmware, enables manufacturers to eliminate the costly and complex selection, qualification, and system level integration of discrete devices, guaranteeing optimal motion performance for consumers. MPU-9250 is also designed to interface with multiple non-inertial digital sensors, such as pressure sensors, on its auxiliary I²C port.
+
* Then "mount /dev/sdx /mnt/xxx"
  
==Interface==
+
2. If you meet some errors when you mount SATA, try these following commands:
  
[[File:BPI bit interfact.JPG]]
+
* "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"
  
==Edge interface==
+
3. 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
 +
  [[Image:Sata_test.png]]
  
[[File:BPI bit edge pin define.png]]
 
  
==PIN definitions==
+
===LCD 5" & LCD 7"===
 +
* Execute "bpi-bootsel", you'll see a list of boot files
 +
* Find "BPI_A64_LCD7.img.gz"
 +
* Then execute "bpi-bootsel /usr/lib/u-boot/bananapi/bpi-m64/u-boot-with-dtb-bpi-m64-lcd7-8k.img.gz"
 +
  [[Image:A64_bootsel_lcd7.png]]
  
The edge interface is much compatible with those of micro:bit. so you may able to use micro:bit accessories on bpi:bit
+
===Touch screen===
  
{| class="wikitable"
+
===GMAC===
|-
+
Use iperf3 to test gmac
| style="background: PaleTurquoise; color: black" colspan="4"| '''HardWare PIN define of BPI:bit'''
 
|-
 
|Pin Name||Analog Function1||Analog Function2||Function1||Function2||Power
 
|-
 
|P3||ADC2_CH4|| ||GPIO13||||
 
|-
 
|P0||ADC2_CH8||DAC_1||GPIO25|| ||
 
|-
 
|P4||ADC2_CH3||||GPIO16||||
 
|-
 
|P5||ADC1_CH7|| ||GPIO35|| ||
 
|-
 
|P6||ADC2_CH5|| ||GPIO12|| ||
 
|-
 
|P7||ADC2_CH6|| ||GPIO14|| ||
 
|-
 
|P1||ADC1_CH4|| ||GPIO32|| ||
 
|-
 
|P8||||||GPIO16|| ||
 
|-
 
|P9||||||GPIO17|| ||
 
|-
 
|P10||ADC2_CH9||DAC_2||GPIO26|| ||
 
|-
 
|P11||ADC2_CH7||||GPIO27|| ||
 
|-
 
|P12||ADC2_CH2||||GPIO02|| ||
 
|-
 
|P2||ADC1_CH5||||GPIO33|| ||
 
|-
 
|P13|||| ||GPIO18||SPI_SS||
 
|-
 
|P14|||| ||GPIO19||SPI_SCK||
 
|-
 
|P15||||||GPIO23||SPI_MISO||
 
|-
 
|P16||||||GPIO05||SPI_MOSI||
 
|-
 
|3V3|| || || ||||POWER:3V3
 
|-
 
|3V3|| || || ||||POWER:3V3
 
|-
 
|3V3|| || ||||||POWER:3V3
 
|-
 
|P19||||||GPIO22||I2C_SCL||
 
|-
 
|P20||||||GPIO21||I2C_SDA||
 
|-
 
|GND||||||||||GROUND
 
|-
 
|GND||||||||||GROUND
 
|-
 
|GND||||||||||GROUND
 
|-
 
|}
 
  
== 5*5 LED list==
+
1. On PC Terminal:
BPI:bit have 25 LEDs on board, it can be controlled with a single GPIO.
+
* Execute "iperf3 -s"
{| class="wikitable"
 
|-
 
| style="background: PaleTurquoise; color: black" colspan="4"| ''' 25 5*5 LED list of BPI:bit'''
 
|-
 
|20||15||10||5||0
 
|-
 
|21||16||11||6||1
 
|-
 
|22||17||12||7||2
 
|-
 
|23||18||13||8||3
 
|-
 
|24||19||14||9||4
 
|-
 
|}
 
  
== MPU9250 9-axis sensor==
+
2. On M2U console:
The 9-axis sensor, MPU9250, is placed on the BPI:bit board. and MPU9250 uses I2C 0x69 address.
+
* TCP test: "iperf3 -c serverIP"
 +
* UDP test: "iperf3 -u -c serverIP"
 +
[[Image:A64_Gmac_test.png]]
  
The 9-axis is the combination of 3 separate triple axis sensors. For more detailed information of this chip, click here[https://github.com/yelvlab/BPI-BIT/blob/master/doc/MPU-9250A-01-v1.1.pdf] to view the datasheet.
+
===Bluetooth===
 +
* 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:
  
 +
[[Image:A64_bluetooth.png]]
  
 +
===WiFi on A64===
 +
====WiFi Client====
 +
'''You have two ways to setup WiFi Client'''
  
 +
1. 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 -B -dd -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
 +
* dhclient wlan0
  
= Software =
+
2. Use UI interface to setup WiFi Client
  
== Webduino ==
+
===Clear boot===
 +
* git clone https://github.com/BPI-SINOVOIP/BPI-files/tree/master/SD/100MB
 +
* bpi-bootsel BPI-cleanboot-8k.img.gz /dev/sdX
  
=== What is Webduino ===
+
===Camara function===
[http://www.webduino.com.cn Webduino ]= [http://webcomponents.org WebComponents] + [http://arduino.cc Arduino]
+
We use HDF5640 camara.
  
[[File:Webduino.png]]
+
[[Image:ov5640_camara.png]]
 +
====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
  
Webduino working model:
+
===IR function===
 +
* Execute "getevent"
 +
* Use your IR device to send information to A64
  
*1 use WebComponents  integration Breakout.
+
===WringPi===
*2 use WebSocket(Firmata) to interacting with the server.
+
* GitHub: https://github.com/BPI-SINOVOIP/BPI-WiringPi2.git
*3 Server use TCP/IP(Firmata) to control webduino terminal.
+
* We also have built-in test command in "/usr/local/bin"
  
[[File:Webduino_1.png]]
+
====RGB 1602 LCD====
 +
* Execute "/usr/local/bin/bpi_test_lcd1602.sh"
  
=== Webduino Blockly and simulator ===
+
====0.96 Inch OLED Display====
*Webduino Blockly and simulator
+
* Execute "/usr/local/bin/bpi_test_52pi.sh"
[[File:Blockly_en_wiki_.png]]
 
:: https://bit.webduino.com.cn/blockly/?lang=en
 
  
*Quick start Webduino Blockly and simulator
+
====8x8 RGB LED Martix====
:: http://www.webduino.com.cn/site/zh_cn/docs/blockly.html
+
* Firstly you need a GPIO Extend Board for 8x8 LED Martix
 +
[[Image: WringPi_LED_Martix_Extend_Board.png]]
  
=== Webduino Cloud ===
+
* Execute "/usr/local/bin/bpi_test_gpio40.sh"
  
Webduino cloud platform provides your complete Internet of things services. You can update and operate various iot devices through platform management.
+
===File System===
 +
* read only system change to read & write mode: "mount -o remount,rw /"
  
https://cloud.webduino.io
+
==FAQ==
 
 
=== Webduino firmware programming ===
 
 
 
A special Webduino version have been developed for bpi:bit. Of course, before using it, we need to program bpi:bit flash with the Webduino firmware.
 
 
 
'''Note:''' bpi:bit has been programmed Webduino firmware by default. Only when you reprogram the flash with other firmware, will you need to program Webduino firmware again.
 
 
 
Firmware download address:[https://github.com/yelvlab/BPI-BIT/tree/master/Webduino_bin Webduino for bpi:bit Firmware]
 
 
 
Flash programming procedures:
 
 
 
There are two kinds of burning methods to choose from, we can use ESP Flash Download Tool to burn, we can also use the built-in Python script inside the PlatformIO to achieve burn.
 
 
 
'''
 
One, ESP Flash Download Tool
 
'''
 
Tool download address:[https://github.com/yelvlab/BPI-BIT/tree/master/programming/ESP_Flash_Download_Tool ESP Flash Download Tool]
 
 
 
After downloading, unzip the archive and you will see an ESPFlashDownloadTool_v3.6.2.exe inside the folder. Open this shortcut and open an interface selection mode.
 
 
 
[[File:Webduino_burn_1.png]]
 
 
 
Select ESP32 DownloadTool:
 
 
 
[[File:Webduino_burn_2.jpg]]
 
 
 
Under `Download Path Config`, we need to select the four bin files that need to be burned and fill in the corresponding burn locations.
 
 
 
- File and burn position corresponding to:
 
 
 
{| class="wikitable"
 
|-
 
| style="background: PaleTurquoise; color: black" colspan="4"| '''File and burn position corresponding'''
 
|-
 
|set  || file name      ||Position
 
|-
 
|1    || bootloader_dio_40m.bin      ||0x1000 
 
|-
 
|2    || partitions.bin            ||0x8000
 
|-
 
|3    || boot_app0.bin            ||0xe000 
 
|-
 
|4  || bit_default.bin        ||0x10000 
 
|-
 
|}
 
 
 
- SpiFlashConfig:
 
 
 
{| class="wikitable"
 
|-
 
| style="background: PaleTurquoise; color: black" colspan="4"| '''SpiFlashConfig'''
 
|-
 
|1    || SPI SPEED      ||40MHz 
 
|-
 
|2    || SPI MODE          ||DIO
 
|-
 
|3    || FLASH SIZE            ||32Mbit
 
|-
 
|4  || COM        ||COMx(Fill in the port number assigned by the computer)
 
|-
 
|5  || BAUD      ||1152000
 
|-
 
|}
 
 
 
Normally, you do not need to burn two boot boot files. You can directly burn the firmware (bit_default.bin) and partitions (partitions.bin). If the bootloader is damaged, you can choose to burn along with bootloader_dio_40m.bin and boot_app0.bin. But be sure to pay attention to the settings below
 
 
 
`SpiFlashConfig` Please configure according to the software screenshot, and then select the port in the COM. Porter 115200 does not need to be changed. Select “START” to start recording.
 
 
 
During the burning process:
 
 
 
[[File:Webduino_burn_3.jpg]]
 
 
 
Finished:
 
 
 
[[File:Webduino_burn_4.jpg]]
 
 
 
After the burn is completed, you must reset or re-energize, and then you find the LED red light flashing, indicating that the burn is successful.
 
 
 
Burn time is about 20s
 
 
 
then you can use webduino all function on BPI:bit. Please see the webduino teaching documents
 
 
 
'''Second: PlatformIO comes with a script'''
 
 
 
This method needs to install PlatformIO in advance. Of course, if you are not using PlatformIO for development, you are advised to use the first method. This method is to disassemble the PlatformIO burning procedure.
 
 
 
First of all, you need to find the installation location of PlatformIO on your computer. For example, my installation location is as follows
 
 
 
[[File:Platformio.png]]
 
 
 
Of course, your installation location is not necessarily the same as mine, you need to find it yourself.
 
 
 
Then, we can find a script file .platformio\packages\tool-esptoolpy\esptool.py according to the following path. This file is the script we need to burn. Then, we open the terminal of PlatformIO, or open the computer. Command line tool, enter the following code
 
 
 
Python ~\.platformio\packages\tool-esptoolpy\esptool.py --port COM19 --baud 115200 write_flash -fm dio -fs 4MB 0x010000 ~\BIT\bit_default.bin
 
 
 
The ~ in the above code needs to be replaced with your actual path, and then fill in the corresponding burning position in order, select the corresponding file path, and then execute this code. This method may be very specific for certain situations. Help, usually used at the time, it is recommended to use the first method of burning.
 
 
 
Normally, you do not need to burn two boot boot files. You can directly burn the firmware (bit_default.bin) and partitions (partitions.bin). If the bootloader is damaged, you can choose to burn along with bootloader_dio_40m.bin and boot_app0.bin. But be sure to pay attention to the settings below
 
 
 
===Online tutorials===
 
*tutorials : http://www.webduino.com.cn/site/en/tutorials.html
 
 
 
==Arduino ==
 
 
 
===Arduino IDE===
 
 
 
*[http://wiki.banana-pi.org/BPI-UNO32#Ardino_IDE How to use with Arduino IDE ]
 
 
 
==microPyhton==
 
 
 
*[http://wiki.banana-pi.org/BPI-UNO32#uPyCraft.EF.BC.88microPyhton.29 uPyCraft(microPyhton) ]
 
 
 
==Scratch==
 
 
 
==Examples==
 
 
 
===MPU9250 sample code===
 
 
 
*code update to github : https://github.com/yelvlab/BPI-BIT/tree/master/Code/MPU9250
 
 
 
The following is the result of the return of the serial port
 
 
 
[[File:Mpu9250.jpg]]
 
 
 
=bpi:bit VS micro:bit=
 
 
 
{| class="wikitable"
 
|-
 
| style="background: PaleTurquoise; color: black" colspan="8"| ''' bpi:bit VS micro:bit'''
 
|-
 
|Module||bpi:bit||micro:bit
 
|-
 
|CPU||Dual-core 32bit Xtensa LX6, up to 240MHz||32bit ARM Cortex M0, up to 16MHz
 
|-
 
|RAM||520KB||16KB
 
|-
 
|ROM||448KB||Unkown
 
|-
 
|Flash||4MB||256KB
 
|-
 
|Bluetooth||BT4.2 BR/EDR and BLE|| BLE only
 
|-
 
|WIFI||802.11 b/g/n/e/i||| N/A
 
|-
 
|Buzzer||1x Buzzer||N/A
 
|-
 
|5*5 LEDS||25 intelligent-control full-color (16777216 color) LEDs, Cascading all LEDs by a single line.||25 red LEDs
 
|-
 
|photosensitive sensor|| 2 light sensors||Basic light detection function on LEDs
 
|-
 
|temperature sensor|| Stand along temperature sensor|| On CPU chip temperature sensor
 
|-
 
|Motion sensor|| MPU-9250 9-axis Motion Tracking : 3-axis accelerometer, 3-axis magnetometer, 3-axis gyroscope ||3-axis Accelerometer; 3-axis magnetometer; no gyroscope, no motion processor
 
|-
 
|IO interface || edge interface (compatible with most micro:bit I/O features)|| edge interface
 
|-
 
|Button||2 programmable buttons||2 programmable buttons
 
|-
 
|micro USB||1x micro USB(UART)||1 x micro USB(Mass Storage Device)
 
|-
 
|Software||[http://www.webduino.com.cn Webduino], Arduino, MicroPython, Scratch X|| Microsoft MakeCode, MicroPython, Scratch X
 
|-
 
|Size||5*5 cm||5*4 cm
 
|-
 
|}
 
 
 
=Webduino project VS Arduino and micro:bit project=
 
 
 
{| class="wikitable"
 
|-
 
| style="background: PaleTurquoise; color: black" colspan="4"| '''Webduino project VS Arduino and micro:bit project'''
 
|-
 
|item compared || Webduino    ||Arduino || Micro:bit
 
|-
 
|development language || HTML/JavaScript      || C/C++|| Python/JavaScript
 
|-
 
|development environment  || WEB browser || Arduino IDE|| JavaScript Blocks
 
|-
 
|Simulator ||Webduino Simulator || Third-party support||Microsoft MakeCode
 
|-
 
|graphical programming|| Wbduino blockly||Third-party Scratch || Blockly
 
|-
 
|Cloud Server|| webduino cloud||N/A||N/A
 
|-
 
|attended mode    || WiFi      ||USB || USB
 
|-
 
|Update the program || web online update  || USB burn  || USB disk
 
|-
 
|}
 
 
 
=Resources=
 
 
 
==Github==
 
 
 
*Webduino github: https://github.com/webduinoio
 
 
 
*bpi:bit github: https://github.com/yelvlab/BPI-BIT
 
 
 
==Useful links==
 
*BPI:bit schematic diagram : https://github.com/yelvlab/BPI-BIT/blob/master/doc/BPI-WEBDUINO-BIT-V1_2-20180417.pdf
 
*BPI:bit user manual : https://github.com/yelvlab/BPI-BIT/blob/master/doc/BPI-bit_user_manual.pdf
 
*BPI:bit dxf file : http://forum.banana-pi.org/uploads/default/original/2X/0/0b86ccaeb565cdeef093164fd1ff837727ca2887.rar
 
*ESP32 datasheet: https://github.com/yelvlab/BPI-BIT/blob/master/doc/ESP32-datesheet_english.pdf
 
*MPU9250 datasheet:http://www.invensense.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf
 
*More others : https://github.com/yelvlab/BPI-BIT/tree/master/doc
 
*Webduino official website : http://webuino.io
 
*Webduino website in China : http://www.webduino.com.cn
 
*[https://pt.aliexpress.com/store/product/O-BPI-bit-Webduino-e-placa-arduino-com-educa-o-EPS32-para-VAPOR/302756_32861694375.html?spm=a2g03.12010611.0.0.203230d9sYXj5K Easy to buy bpi:bit sample form aliexpress ]
 
*[https://www.facebook.com/groups/1618158071553661 Facebook group ]
 

Revision as of 00:28, 29 May 2018

Introduction

BPI-M2M

Overview: BPI-M64 respbian linux
  Banana Pi BPI-M64 is a 64-bit quad-core mini single board computer. It features 2GB of RAM and 8GB eMMC. It also has onboard WiFi and BT. On the ports side, the BPI-M64 has 2 USB A 2.0 ports, 1 USB OTG port, 1 HDMI port, 1 audio jack, and lastly a DC power port. The processor is pin-to-pin comptialbe with R18, so it comes with two versions:M64 and M64-R18

A64 Key Features

  • 1.2 Ghz Quad-Core ARM Cortex A53 64-Bit Processor-A64
  • 2GB DDR3 SDRAM
  • 8G EMMC
  • 10/100/1000Mbps Ethernet
  • WiFi (AP6212) & Bluetooth

R18 Key Features

  • 1.2 Ghz Quad-Core ARM Cortex A53 64-Bit Processor-R18
  • 2GB DDR3 SDRAM
  • 8G EMMC
  • 10/100/1000Mbps Ethernet
  • WiFi (AP6212) & Bluetooth

Development

Basic Development

Prepare to develop

 * Prepare 8G/above TF card, USB-Serial interface, PC with Ubuntu System
 * Using your USB-Serial Connect debug console on M64

Load your first image on M64

 1.You could download latest image from our forum
 
 2.Install bpi-tools on your system
 * apt-get install pv
 * curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
 
 3.After you download the image, insert your TF card into your Ubuntu
 * Execute "bpi-copy xxx.img /dev/sdx" to install image on your TF card.
 
 4.After step 3, then you can insert your TF card into M64, and press power button setup M64

Load your first image on M64 EMMC

 * Run your M64 with TF card
 * Copy "xxx-sd-emmc-xxx.img.zip / xxx-sd-emmc-xxx.img" to your USB disk
 * Plug your USB disk in M2U
 * After M64 recognise USB disk, execute "bpi-copy xxx-sd-emmc-xxx.img.zip / xxx-sd-emmc-xxx.img" to install image on EMMC
 * Then power off M64, take TF card out, power on M64

Advanced Development

How to build uboot & kernel

Install tools

SATA

1. Mount SATA on M2U

 File:A64 Sata.png
  • After insert sata interface, execute "fdisk -l"
 File:A64 Sata fdisk l.png
  • 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"

3. 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
 Sata test.png


LCD 5" & LCD 7"

  • Execute "bpi-bootsel", you'll see a list of boot files
  • Find "BPI_A64_LCD7.img.gz"
  • Then execute "bpi-bootsel /usr/lib/u-boot/bananapi/bpi-m64/u-boot-with-dtb-bpi-m64-lcd7-8k.img.gz"
 A64 bootsel lcd7.png

Touch screen

GMAC

Use iperf3 to test gmac

1. On PC Terminal:

  • Execute "iperf3 -s"

2. On M2U console:

  • TCP test: "iperf3 -c serverIP"
  • UDP test: "iperf3 -u -c serverIP"

A64 Gmac test.png

Bluetooth

  • 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:

A64 bluetooth.png

WiFi on A64

WiFi Client

You have two ways to setup WiFi Client

1. 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 -B -dd -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
  • dhclient wlan0

2. Use UI interface to setup WiFi Client

Clear boot

Camara function

We use HDF5640 camara.

Ov5640 camara.png

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

IR function

  • Execute "getevent"
  • Use your IR device to send information to A64

WringPi

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

WringPi LED Martix Extend Board.png

  • Execute "/usr/local/bin/bpi_test_gpio40.sh"

File System

  • read only system change to read & write mode: "mount -o remount,rw /"

FAQ