Contents I. Orange Pi Introduction........................... 1 1. What is Orange Pi PC2?......................1 2. What can I do with Orange Pi PC2?..................1 3. Whom is it for?........................1 4. Hardware specification of Orange Pi PC2................1 5. GPIO Specifications......................4 6.
3. Whom is it for? Orange Pi PC2 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
UART, ground. Power led & Status led Power, IR input Supported OS Android Lubuntu, Debian, Raspberry Pi Image Interface definition Product size 85mm × 56mm Weight Orange Pi™ is a trademark of the Shenzhen Xunlong Software CO., Limited www.orangepi.org www.xunlong.tv...
Copy right by Shenzhen Xunlong Software Co., Ltd Interface instructions 5. GPIO Specifications A 40-pin GPIO interface on the Orange Pi PC2 is the same as Model A and Model B of Raspberry Pi. The picture below is GPIO pin define of Orange Pi PC2.
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 PC2 is camera connector. Orange Pi PC2-CSI CON1-P01...
Copy right by Shenzhen Xunlong Software Co., Ltd II. Using Method Introduction Follow these steps, you can configure and run your Orange Pi in a very short period of time. Boot your Orange Pi need to complete the following steps.
TF card DC power adapter 2. Step 2: Prepare a TF Card for Booting 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.
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd iv After the image is written, click "close" button 3. Step 3: Boot your Orange Pi 1) Hardware Connection Sketch Map Orange Pi PC2 runs on Android 4.4 system www.orangepi.org www.xunlong.tv...
Page 17
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi PC2 runs on Debian system Orange Pi PC2 runs on Ubuntu system www.orangepi.org www.xunlong.tv...
Page 18
Insert the TF card with written image in to the TF card slot. b. It is HDMI interface on the bottom edge of the board. You could use HDMI cable to connect your Orange Pi to HDMI TV or monitor. You could also use AV interface and audio interface to connect output video and audio to analog TV or display.
–h It will be safety to turn off the Orange Pi. If directly use the power button to shut down the system may damage the file system on TF Card. After the system is closed, the power can be cut off by more than 5 seconds’...
Page 20
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1 indicates external phy The above configuration has been configured, you could refer to it when using. 2) Login via vnc and ssh If there is no condition for connecting HDMI, you could enter the system via vnc or ssh remote login.
Zhangsan. Steps are as follows: a. Use root account to login Orange Pi(please note that do not login with the account of orangepi b. $ usermod -l zhangsan...
Page 22
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd c. $ groupmod -n zhangsan orangepi Change group d. $ mv /home/ornagepi /home/zhangsan Change directory of original orangepi e. $ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory f.
Page 23
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 24
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd c. Open more desktops vncserver vncserver:1(vncserver:2)… you can also transfer more parameters through the full command as below: vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565 (Note: If it prompted you that cannot find the file or other error when installing, please run sudo apt-get update to update the software source and try installing again.)
Page 25
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 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. 6) Thunder remote download a.
Page 26
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 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 27
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd ./etm_monitor & ctrl +o and enter, ctrl +x to save and exit. It could be remote downloading on computer, mobile phone or tablet by login yuancheng.xunlei.com 7) Modify the size of ext4 file system After made the written image into SD card for booting, enter into rootfs partition’s expansion of file system.
Page 28
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Reboot the system and use df -lh to check whether expending is successful a. Expand file system i Boot to Linux, umount /dev/sdb1 and /dev/sdb2, if it prompts disk busy, then use fuser to clean the using disk(we will recommend using another Linux booting disk to lead the system).
Page 29
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd resize2fs /dev/sdb2 900M The "s"after the number represents specifying the size of file system via the sectors(every sector calculated by 512 bite). You could also specify it into K(KB), M(MB), G(GB), etc.
Page 30
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd sudo apt-get install motion iii Modify configuration sudo nano /etc/motion/motion.conf stream_localhost off iv Create folder for images saving mkdir ~/motion v Modify permission chmod 777 motion vi Continue modifying configuration...
Page 31
You need to have UsbModeSwitch.apk and UPDATE-SuperSU-v2.46.zip, install kingroot and make sure OTG on Orange Pi could connect to PC. a. Open adb debug mode Use U disk or card reader to install UsbModeSwitch.apk into Orange Pi OS and open it, tick "enable usb device mode"...
Page 32
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd root@rabbit-p1:/system/bin # ln -s busybox-smp unzip Logout adb shell Mode root@rabbit-p1:/exit (Or Ctrl + C) Unzip UPDATE-SuperSU-v2.46.zip You will obtain META-INF/com/google/android/update-binary and put it into specific catalog. adb push /path/UPDATE-SuperSU-v2.46.zip /data/local/tmp path is file’s...
Page 33
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Type: Banana Pro, Revision: 1.2, Memory: 1024MB, Maker: LeMaker iv Display gpio readall www.orangepi.org www.xunlong.tv...
This manual describes how to use the binary file to speed up the development of the project. Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1 Note: In the following sections, * indicates wild-cards, you need to fill in the actual values according to their file storage path.
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 36
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...
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 38
Execute script into the graphical interface of compilation extenal Inside are patch and some configuration kernel file output File generated script Script compiled toolchain Cross compiler location uboot uboot source code Execute./build.sh enter into graphical interface and select PC2 www.orangepi.org www.xunlong.tv...
Page 39
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...
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...
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd The following will be illustrating 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 ...
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 43
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 process, dependent on the host configuration www.orangepi.org...
Page 44
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ pack #Packaged into firmware $ 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:...
Page 45
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Write Android image on Windows with this tool: Insert the TF card with written image to OrangePi, turn on the computer then you could enter to Android system. www.orangepi.org...
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 47
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 48
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd coordinates, if so then set 1, and vice verso 0. ctp_revert_y_flag=xx Whether needed to flip the Y coordinates, if so then set 1, and vice verso 0. ctp_int_port=xx GPIO configuration of the interrupt...
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. Orange Pi development board*1, Card reader*1, TF card*1, power supply*1 Hardware: 1. Device Driver and Application Programming 1) Application Program (app.c)
Page 50
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2) Driver Program (OrangePi_misc.c) www.orangepi.org www.xunlong.tv...
Page 51
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd www.orangepi.org www.xunlong.tv...
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.4/drivers/misc/ www.orangepi.org www.xunlong.tv...
Page 53
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 54
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.4/output/lib/modules/3.4.41 There is a .ko module which generated after compiled of OrangePi_misc.c on */lichee/linux-3.4/output/lib/modules/3.4.39/ www.orangepi.org...
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Insert U disk (please note the SD card should have been written image) if the SD card system is mounted to the directory / dev / SDB, SD card will have two sub mount points, respectively are / dev / sdb1 and /dev/sdb2.
Page 56
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 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 $ ll /etc/environment shows that the file can only read, need to modify...
Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Compile the application with cross compiler $ arm-linux-gnueabihf-gcc app.c –o aq There will be an ap application generated in the directory, copy it to the development board file system(on the rootfs directory of...
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 59
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 60
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 61
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...
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 63
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 64
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 65
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 66
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...