Getting Started with M2M
- 1 Introduction
- 2 Development
- 2.1 Basic Development
- 2.2 Advance Development
- 2.2.1 Bluetooth
- 2.2.2 WiFi Client
- 2.2.3 StartX
- 2.2.4 NAS Application
- 2.2.5 Camara function
- 2.2.6 BPI-Tools
- 2.2.7 RPi.GPIO
- 2.2.8 WiringPi
Banana Pi M2M is another ARM SoC powered development board that offers great computing performance in an ultra portable form factor. It is a 51mm square with Allwinner A33 Quad-core A7 SoC and 512MB DDR3 RAM.
- Read more about : Banana Pi BPI-M2M
- Quad Core ARM Cortex A7 CPU. R16
- 512MB DDR3 SDRAM
- WiFi (AP6212) & Bluetooth onboard
Prepare 8G/above TF card, USB-Serial interface, PC with Ubuntu System, connect USB-Serial to 40 pin header uart2 for kernel console debug, 3 pin header uart0 beside usb port is not debug uart for bpi release images.
$ apt-get install pv $ curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
- If you can't access this URL or any other problems, please go to bpi-tools repo and install this tools manually.
Install bpi image to SD card
- 1. Download latest linux image, defautl user/password is pi/bananapi or root/bananapi.
- 2. Install image with bpi-tools on Linux
- plug your sd card to your Linux PC
$ bpi-copy xxx.img /dev/sdX
- 3. Install bpi image 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
- 1. Prepare a sd which is installed ubuntu image and bootup with sdcard
- 2. Copy emmc image to udisk then plug in M2M, then mount udisk.
- 3. After mount udisk, use command "bpi-copy xxx-emmc-xxx.img" to install image on Emmc.
- 4. After success install, power off M2M, eject the sdcard and poweron with emmc boot.
Build Source Code
Get the bsp source code
$ git clone https://github.com/BPI-SINOVOIP/BPI-M2M-bsp
Build the bsp source code
$ ./build.sh 1
- Get the docker image from Sinovoip Dock Hub, build the source code with this docker image if you have build environment issue.
Install the bsp package to SD card with bpi image flashed
$ sudo ./update_bsp2sd.sh /dev/sdX
- 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
1. Use commands to setup WiFi client
$ sudo su # killall wpa_supplicant # wpa_passphrase <ssid> <passphrase> > /etc/wpa_supplicant/wpa_supplicant.conf # ifconfig wlan0 up # iwlist wlan0 scan # wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf # dhclient eth0
There are some other command line ways, please google for them.
2. Use UI interface to setup WiFi Client
- apt-get install xorg
- apt-get install xserver-xorg
- apt-get install xinit
1. Usb hub + sata to usb
- HDD is supported
- SSD is supported
We use HDF5640 camara.
- Use your UI interface to operate camara
- Applications -> Sound & Video -> guvcview
- 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 "curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash - "
- Execute "bpi-tools"
- 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
- cd /usr/local/bin
- Execute "./bpi_test_g40.py" to test RPi.GPIO
- GitHub: https://github.com/BPI-SINOVOIP/BPI-WiringPi2.git
- We also have built-in test command in "/usr/local/bin"
How to Update WiringPi
- Execute "bpi-update -c pkglist.conf"
- Execute "bpi-update -c bpi-pkg-bpi-wiringpi.conf"
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"