Advertisement

Orange Pi Manual
Copy right by Shenzhen Xunlong Software Co., Ltd
Orange Pi Zero Plus2(H5)

User Manual

www.orangepi.org
1
www.xunlong.tv

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Orange Pi Zero Plus2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Shenzhen Orange Pi Zero Plus2

  • Page 1: User Manual

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi Zero Plus2(H5) User Manual www.orangepi.org www.xunlong.tv...
  • Page 2: Table Of Contents

    Contents I. Orange Pi Introduction........................... 3 1. What is Orange Pi Zero Plus2?..................... 3 2. What can I do with Orange Pi Zero Plus2?................3 3. Whom is it for?........................3 4. Hardware specification of Orange Pi Zero Plus2..............3 5. GPIO Specifications......................6 6.
  • Page 3: Orange Pi Introduction

     .. Pretty much anything else, because Orange Pi Zero Plus2 is open source 3. Whom is it for? Orange Pi Zero Plus2 is for anyone who wants to create with technology– not just consuming. It's a simple, fun, useful tool and you can use it to take control of the world around you.
  • Page 4 13 Pins Header,with 2x USB, IR pin, AUDIO(MIC, GPIO(1x3) pin UART, ground. Power led & Status led Supported OS Android Lubuntu, Debian, Raspberry Pi Image Interface definition Product size 46mm × 48mm Weight Orange Pi™ is a trademark of the Shenzhen Xunlong Software CO., Limited www.orangepi.org www.xunlong.tv...
  • Page 5: Top View

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Top view Bottom view www.orangepi.org www.xunlong.tv...
  • Page 6: Gpio Specifications

    Copy right by Shenzhen Xunlong Software Co., Ltd Interface instructions 5. GPIO Specifications A 26-pin GPIO interface on the Orange Pi Zero Plus2 is the same as Model A and Model B of Raspberry Pi. The picture below is GPIO pin define of Orange Pi Zero Plus2.
  • Page 7: Specification Of Csi Camera Connector

    The CSI Camera Connector is a 24-pin FPC connector which can connect external camera module with proper signal pin mappings. The pin of CIS connector can be defined as follows. The connector marked with "CON 1" on the Orange Pi Zero Plus2 is camera connector. www.orangepi.org www.xunlong.tv...
  • Page 8: Using Method Introduction

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi Zero Plus2-CSI CON1-P01 CON1-P02 CON1-P03 TWI2-SDA PE13 CON1-P04 VCC-CSI CON1-P05 TWI2-SCK PE12 CON1-P06 CSI-RESET# PE15 CON1-P07 CSI-VSYNC CON1-P08 CSI-STBY-EN PE15 CON1-P09 CSI-HSYNC CON1-P10 VDD1V8-CSI CON1-P11 VCC-CSI CON1-P12...
  • Page 9: Step 1: Prepare Accessories Needed

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1. Step 1: Prepare Accessories Needed You need at least some accessories like the following if it is your first time to use the Orange Pi(we would suggest you using the Expansion board at the same time).
  • Page 10: Step 2: Prepare A Tf Card Or Emmc Image

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2. Step 2: Prepare a TF Card or EMMC Image In order to use Orange Pi normally, you must install the operating system into TF card first. Write Linux into TF Card Based on Windows Platform a.
  • Page 11 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd iv Make sure the inserted TF card disk are in accordance with the chosen disk. v Click the "Format" button. c. Download the operating system image file from the download page, the page address is as following: http://www.orangepi.org/downloadresources...
  • Page 12 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2) Write Linux into TF card based on Linux platform? a. Inserting the TF card into the computer, the capacity of the card must be larger than the operating system image, usually requires 4GB or greater capacity.
  • Page 13 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd PhoenixCard tool is applicable for Android image writing. a. Download the Android OS image and PhoenixCard tool. Download PhoenixCard from here: https://drive.google.com/file/d/0B_VynIqhAcB7NTg2UkRDdHRWX2s/ edit?usp=sharing Download Android OS image from here: http://www.orangepi.org/downloadresources/...
  • Page 14 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd e. Burn the Android OS image into your TF card. Please pay attention to the following with red marks. f. Click "Burn" button for writing to TF card and wait for it finish g.
  • Page 15 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Download image writing tool such as Rufus, the download page: https://rufus.akeo.ie/ ii Select the image file path that has been unzipped iii Click "start" button and wait for the image to write.
  • Page 16 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd iv After the image is written, click "close" button 5) Write Android image into EMMC Steps for writing image into EMMC is almost the same with writing into TF card.
  • Page 17 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd In this section would take image: ubuntu_server_zeroplus2_H5_V0_1.img as an example to illustrate how to write Linux image into EMMC. We would recommend you use the server version image since the RAM of zero plus2 is not too big.
  • Page 18: Step 3: Boot Your Orange Pi

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Select the fourth one Storage Setting Select the first one, Format EMMC as Normal Storage First format EMMC Select fourth one, Install Image into EMMC Install image into EMMC and re-boot 3.
  • Page 19 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi Zero Plus2 runs on Android 5.1 system www.orangepi.org www.xunlong.tv...
  • Page 20 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi Zero Plus2 runs on Debian system Orange Pi Zero Plus2 runs on Ubuntu system www.orangepi.org www.xunlong.tv...
  • Page 21 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Details of Booting Steps a. Insert the TF card with written image in to the TF card slot. b. You could use HDMI cable to connect your Orange Pi to HDMI TV or monitor.
  • Page 22: Step 4: Turn Off Your Orange Pi Correctly

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd long time to start the first time, please wait patiently. The next time will boot very fast. 4. Step 4: Turn off your Orange Pi Correctly  You can use the shutdown button on the interface to safety close the Orange Pi.
  • Page 23 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd  Method 2: a. Build wifi hotspot configuration file of wpa_supplication.conf for on /etc/network/ directory and add the following: network={ ssid="wifi hot spot name" psk="wifi hot spot password" priority=1 b.
  • Page 24: Universal Software Configuration

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd  Check the IP with ifconfig, login via ssh of root user 3) HDMI or 3.5mm Sound Output(3.5mm sound output would require using an expansion board) a. The sound was default to output via HDMI on image, it could check and change via alsamixer.
  • Page 25 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd b. $ usermod -l zhangsan orangepi Change orangepi account into Zhangsan c. $ groupmod -n zhangsan orangepi Change group d. $ mv /home/ornagepi /home/zhangsan Change directory of original orangepi e.
  • Page 26 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd b. Edit source file Replace the source file with your favorite source. Take an example of Ubuntu 16.04 on Zhonkeda source: http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe http://mirrors.ustc.edu.cn/ubuntu-ports/...
  • Page 27 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd executing vncserver directly. It will prompt you to enter the password twice, when prompted whether can be read only to select the N. c. Open more desktops vncserver vncserver:1(vncserver:2)… you can also transfer more parameters...
  • Page 28 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Transmit the corresponding file on the computer to the corresponding folder through samba. Note: It is recommended to download MoliPlayer on the mobile device. The effect is good and no blue light pressure on both Android and IOS.
  • Page 29 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd v Copy this activation code to http://yuancheng.xunlei.com (Which required to log in with account of Thunder). Then click the tab on the top right corner to add, fill in the activation code to complete the binding according to the following figure.
  • Page 30: Moify The Size Of Ext4 File System

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd iii chmod +x etm_monitor iv Run ./etm_monitor, there will be an activation code page like version 1.0.32. And then binding on the Thunder remote page (above steps 4, 5). There might be one or two errors while running, ignore it (selection type of shell and generation of INI file).
  • Page 31 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Enter into system and expend via resize_rootfs.sh Enter resize_rootfs.sh on command line, the system will expending automatically, Reboot the system and use df -lh to check whether expending is successful a.
  • Page 32: How To Use Gc2035 On Linux

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd same as you deleted, and enter the number as you desire. v Enter w to save the partition data. vi Use the following command to check the file system(make sure it is...
  • Page 33: Eth0 And Wlan0 Static Mac Address Setting

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd a. Use find command to find the location of the following files, and load it according to the specified order insmod videobuf-core.ko insmod videobuf-dma-contig.ko insmod uvcvideo.ko insmod cci.ko insmod vfe_os.ko insmod vfe_subdev.ko...
  • Page 34: Orange Pi Android Root

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd and add the following: $ vim /etc/rc.local MAC=00:e0:4c:a1:2b:d4 ifconfig wlan0 down ifconfig wlan0 hw ether $MAC ifconfig wlan0 up dhclient & After rebooting, you could use ifconfig to check whether mac address has changed.
  • Page 35 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd OS and open it, tick "enable usb device mode" and use debug cable to connect OTG port and PC (make sure it is micro usb-cable in case other cables could not be recognized). Normally PC would search and install adb driver software automatically.
  • Page 36: Linux Kernel Source Code Compilation

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Linux Kernel Source Code Compilation III. In order to support the rapid development of the project, we are writing this sections for project configuration options to the binary file. When the...
  • Page 37: Compile Project Source Code

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Subsection and compress the file, then unzip it after finish downloaded: buildroot: Project compilation script brandy: gcc-linaro, boot and uboot source code and open source cross compiler tool linux-3.10: Kernel source code tools: Tools of project compilation build.sh: compilation script...
  • Page 38 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd  Use the following command to compile the entire project $ ./build.sh config At this point the system will prompt the choice of the chip, as shown below, for OrangePi, select sun50iw2p1...
  • Page 39: Update The Kernel Image File And Replace Library

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 3. Update the Kernel Image File and Replace Library  After compilation is finished, the following files will be generated in the directory: libs: lichee/out/sun50iw2p1/android/common/lib/modules/3.10.65 Download image from official website:...
  • Page 40 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd The first boot partition The second rootfs partition Copy the kernel image file generated by the compiler to the first partition (boot partition) Copy the lib library which generated after compilation to the second...
  • Page 41 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Enter password of root Update Kernel directory and module Select corresponding file directory and update uImage and modules www.orangepi.org www.xunlong.tv...
  • Page 42: Android Kernel Source Code Compilation

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd IV. Android Kernel Source Code Compilation Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1 Software Linux host computer, which hard disk space at least 50G (to meet a fully...
  • Page 43: Install Platform Supported Software

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd The following will illustrate jdk1.6 installation, it would be same for jdk1.7 installation.  Download and install JDK, you will obtain jdk-6u31-linux-x64.bin  Modify the permission of jdk-6u31-linux-x64.bin, which has no prior permission ...
  • Page 44: Install Compiler Tool Chain

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 4. Install Compiler Tool Chain The compiler tool chain has been integrated in Android SDK. Tool chain is on: lichee/brandy/gcc-linaro/ of Android SDK(already exist) 5. Compile Lichee Source Code...
  • Page 45 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ lunch dolphin_fvd_p1-eng # Select the scheme number $ extract-bsp # Copy the kernel and the drive module $ make The rear values of # is for the simultaneous compilation...
  • Page 46 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ cd */lichee/tools/pack/ Write image: Copy the generated image file i to the SD card, switch to the windows operating system. Programming software download website: http://www.orangepi.org/downloadresources/ Download the compressed package, unzip and get the folder...
  • Page 47 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Insert the TF card with written image to OrangePi, turn on the computer then you could enter to Android system. www.orangepi.org www.xunlong.tv...
  • Page 48: Use Project Configuration Files

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Use Project Configuration Files 1. sys_config.fex Introduction Configure hardware: sys_config.fe The sys_config.fex is a binary configuration file that used by the SOC kernel driver or LiveSuit for a particular target board, including how to set up a variety of peripherals, ports, and I/O which based on the target version.
  • Page 49 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd screen0_output_mode= 11 screen1_output_type= 2 screen1_output_mode= 11 dev0_output_type = 4 dev0_output_mode = 4 dev0_screen_id = 0 dev0_do_hpd = 1 dev1_output_type = 2 dev1_output_mode = 11 Modify sys_confi and replace it when it generated OrangePiH5.dtb. If would be faster if use compilation system on githug.
  • Page 50 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd ctp_int_port=xx GPIO configuration of the interrupt signal of capacitive touch panel ctp_wakeup=xx GPIO configuration of the wake-up signal of capacitive touch panel ctp_io_port=xx Capacitive screen IO signal, currently share...
  • Page 51: Orangepi Driver Development

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd OrangePi Driver development In order to help developers become more familiar with OrangePi, this manual describes how to use simple device driver modules and applications on the development board.
  • Page 52 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2) Driver Program (OrangePi_misc.c) www.orangepi.org www.xunlong.tv...
  • Page 53 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd www.orangepi.org www.xunlong.tv...
  • Page 54: Compile Device Driver

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2. Compile device driver Copy the OrangePi_misc.c to the */lichee/linux-3.4/driver/misc directory: Enter to */lichee/linux-3.10/drivers/misc/, and modify makefile www.orangepi.org www.xunlong.tv...
  • Page 55 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Modify Makefile on currently file, shown as following: There is Kconfig on the same sibling folders with Makefile. Each Kconfig respectively describes the the source directory file related kernel configuration menu.
  • Page 56: Cross Compiler Application Program

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ ./build.sh After compiled the kernel, there will be an orangepi_misc.ko file generated on the directory of lichee/linux-3.10/output/lib/modules/3.10.65 There is a .ko module which generated after compiled of OrangePi_misc.c on */lichee/linux-3.4/output/lib/modules/3.4.39/...
  • Page 57 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd While compiling the application, you will fill that you need the cross compiler arm-linux-gnueabihf-gcc, download and install it. Unzip the downloaded file and enter the the directory Check the information after entering bin directory pwd hows the path and export it into the whole project www.orangepi.org...
  • Page 58: Running Driver And Application

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ ll /etc/environment shows that the file can only read, need to modify permissions $ chmod 755 /etc/environment Modify permission Add the path to the whole environment variable Compile the application with cross compiler $ arm-linux-gnueabihf-gcc app.c –o aq...
  • Page 59 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ lsmod To check whether it is loaded $ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, the specific look at the driver code) Executive application (note the use of the application, the specific check at the code) $ ./aq /dev/orangepimisc...
  • Page 60: Using Debug Tools On Orangepi

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Using Debug tools on OrangePi VII. Orange Pi development board*1, Card reader*1, TF card*1, power supply*1 Hardware: TTL to USB cable 1. Operation Steps on Windows www.orangepi.org www.xunlong.tv...
  • Page 61 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd In order to get more debugging information in the project development process of using OrangePi, OrangePi default support for serial information debugging. For developers, you can simply get the serial port debugging information with the materials mentioned above.
  • Page 62 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd  Unzip and install  Open program after installed, as shown below 3) Connecting method Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC 4) Equipment information acquisition ...
  • Page 63 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd  Click on the device manager to check the port number www.orangepi.org www.xunlong.tv...
  • Page 64: Operation Steps On Linux

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 5) Putty Configuration Serial port should set to the corresponding port number (COM5), the speed should set to 115200 6) Serial Debug Port Power on and boot OrangePi, the serial port will automatic print debug log 2.
  • Page 65 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1) Install Kermit  Install the Kermit by execute command: $ sudo apt-get install ckermit  Configurate Kermit $ sudo vi /etc/kermit/kermrc  Add lines: set line /dev/ttyUSB1 set speed...
  • Page 66 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2) Connecting method Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC 3) Equipment information acquisitio Input command in the PC terminal to check the device number of...
  • Page 67 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd  It can be seen from the figure that TTL to the serial port cable is identified as ttyUSB0, configure the /ect/kermit/kermitc file, update the serial port information. $ sudo vi /etc/kermit/kermitc ...
  • Page 68 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd  Power on and boot OrangePi, the serial port will automatic print debug www.orangepi.org www.xunlong.tv...

Table of Contents