8,367
edits
Changes
no edit summary
__TOC__
== '''Basic Features of Orange Pi PCIntroduction''' ==
<br>
=== '''What is Orange Pi PCZero Plus2?''' ===
<br>
<br>
=== '''What can I do with Orange Pi PCZero Plus2?''' ===
<br>
We can use it to build:<br>
<br>
* A computer
* A wireless network server
* Games
* Music playerand sounds* HD Video player* A Speaker* Android* Scratch* <nowiki>......<br/nowiki>
<br>
Pretty much anything else, because Orange Pi Pc Zero Plus2 is open source.<br>
<br>
=== '''Who’s Whom is it for?''' ===
<br>
<br>
=== '''Hardware specification of Orange Pi PC Hardware SpecificationZero Plus2''' ===
<br>
{| class="wikitable" style="width:800px;background:#ffffff;"
|-
|colspan=2| <div style="text-align:center;font-weight:700;">'''Hardware feature introduction'''</div>
|-
| CPU || Allwinner H3 ARM Quad-core 64bit Cortex-A7 Quad CoreA53
|-
| GPU|| Mali400MP2 Mali450 GPU @600MHz<br>Supports OpenGL ES 2.0
|-
| Memory (SDRAM)|| 1GB 512MB DDR3 (shared with GPU)GPU)
|-
| Onboard Storage|| TF card (Max. 32GB) /eMMC flash(8GB)
|-
| Onboard NetworkOn-board Wifi || 10AP6212, IEEE 802.11 b/100 Ethernet RJ45g/n,BT4.2
|-
| video input|| A CSI input connector Camera:<br>Supports 8-bit YUV422 CMOS sensor interface <br>Supports CCIR656 protocol for NTSC and PAL<br>Supports SM pixel camerasensor<br>Supports video capture solution up to 1080p@30fps
|-
| Audio InputVideo Outputs|| MICSupports HDMI output with HDCP <br>Supports HDMI CECSupports HDMI 30 function
|-
| Video OutputsPower Source|| HDMI, CVBSUSB OTG input can supply power
|-
| Audio outputsUSB 2.0 ports|| 3one USB 2.5 mm audio port and HDMI0 OTG
|-
| Power SourceLow-level peripherals || DC input26 Pins Header, MicroUSB compatible with Raspberry Pi B+13 Pins Header,with 2x USB, IR pin, AUDIO(OTGMIC, AV) cannot be used as power input
|-
| USB 2.0 ports|| 3*USB 2.0 HOST, 1*USB 2.0 OTG|-| Low-level peripherals || 40 GPIO(1x3) pin connector, compatible with Raspberry Pi|-| Debug serial port|| UART-TX,UART-RX,GNDground.
|-
| LED|| Power led & Status led
|-
|-
|colspan=2|<div style="text-align:center;font-weight:700;">'''Interface Definition'''</div>
|-
| Product Size|| 85mm×55mm46mm × 48mm
|-
| Weight|| 43g36g
|-
|colspan=2|<div style="text-align:center;">[[File:Orange-pi-small-logo.png|30px|]]range Pi™ is a trademark of the Shenzhen Xunlong Software CO., Limited</div>
|}
<br>
'''Top View:'''<br>
<div>[[File:Orange-pi-pczero-plus2-img1.png|500px|]]</div>
<br>
'''Bottom View:'''<br>
<div>[[File:Orange-pi-pczero-plus2-img2.png|500px|]]</div><br> === '''Interface instructions''' ===<br><div>[[File:Orange-pi-zero-plus2-img3.png|600px|]]</div><br><div>[[File:Orange-pi-zero-plus2-img4.png|600px|]]</div><br>=== '''GPIO Specifications''' ===<br>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.<div>[[File:Orange-pi-r1-img-3.png|800px]]</div><br> <table style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0" cellpadding="0"> <tr> <td>OrangePi_zeroplus2(H5)</td> <td></td> <td></td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P01</td> <td style="background-color: #5a5a5a;">VCC-3V3</td> <td></td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P02</td> <td style="background-color: #5a5a5a;">VCC-5V</td> <td></td> </tr> <tr> <td style="background-color: #b1a0c6;">CON3-P03</td> <td style="background-color: #b1a0c6;">TWI0-SDA</td> <td style="background-color: #b1a0c6;">PA12</td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P04</td> <td style="background-color: #5a5a5a;">VCC-5V</td> <td></td> </tr> <tr> <td style="background-color: #b1a0c6;">CON3-P05</td> <td style="background-color: #b1a0c6;">TWI0-SCK</td> <td style="background-color: #b1a0c6;">PA11</td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P06</td> <td style="background-color: #5a5a5a;">GND</td> <td></td> </tr> <tr> <td style="background-color: #938a53;">CON3-P07</td> <td style="background-color: #938a53;">PWM1</td> <td style="background-color: #938a53;">PA6</td> </tr> <tr> <td style="background-color: #d99694;">CON3-P08</td> <td style="background-color: #d99694;">UART2_TX</td> <td style="background-color: #d99694;">PA0</td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P09</td> <td style="background-color: #5a5a5a;">GND</td> <td></td> </tr> <tr> <td style="background-color: #d99694;">CON3-P10</td> <td style="background-color: #d99694;">UART2_RX</td> <td style="background-color: #d99694;">PA1</td> </tr> <tr> <td style="background-color: #c2d59a;">CON3-P11</td> <td style="background-color: #c2d59a;">S-TWI-SCK</td> <td style="background-color: #c2d59a;">PL0</td> </tr> <tr> <td style="background-color: #938a53;">CON3-P12</td> <td style="background-color: #938a53;">PD11</td> <td style="background-color: #938a53;">PD11</td> </tr> <tr> <td style="background-color: #c2d59a;">CON3-P13</td> <td style="background-color: #c2d59a;">S-TWI-SDA</td> <td style="background-color: #c2d59a;">PL1</td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P14</td> <td style="background-color: #5a5a5a;">GND</td> <td></td> </tr> <tr> <td style="background-color: #c2d59a;">CON3-P15</td> <td style="background-color: #c2d59a;">UART2_CTS</td> <td style="background-color: #c2d59a;">PA3</td> </tr> <tr> <td style="background-color: #f9c090;">CON3-P16</td> <td style="background-color: #f9c090;">TWI1-SDA</td> <td style="background-color: #f9c090;">PA19</td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P17</td> <td style="background-color: #5a5a5a;">VCC3V3-EXT</td> <td></td> </tr> <tr> <td style="background-color: #f9c090;">CON3-P18</td> <td style="background-color: #f9c090;">TWI1-SCK</td> <td style="background-color: #f9c090;">PA18</td> </tr> <tr> <td style="background-color: #92cddd;">CON3-P19</td> <td style="background-color: #92cddd;">SPI1_MOSI</td> <td style="background-color: #92cddd;">PA15</td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P20</td> <td style="background-color: #5a5a5a;">GND</td> <td></td> </tr> <tr> <td style="background-color: #92cddd;">CON3-P21</td> <td style="background-color: #92cddd;">SPI1_MISO</td> <td style="background-color: #92cddd;">PA16</td> </tr> <tr> <td style="background-color: #c2d59a;">CON3-P22</td> <td style="background-color: #c2d59a;">UART2_RTS</td> <td style="background-color: #c2d59a;">PA2</td> </tr> <tr> <td style="background-color: #92cddd;">CON3-P23</td> <td style="background-color: #92cddd;">SPI1_CLK</td> <td style="background-color: #92cddd;">PA14</td> </tr> <tr> <td style="background-color: #92cddd;">CON3-P24</td> <td style="background-color: #92cddd;">SPI1_CS</td> <td style="background-color: #92cddd;">PA13</td> </tr> <tr> <td style="background-color: #5a5a5a;">CON3-P25</td> <td style="background-color: #5a5a5a;">GND</td> <td></td> </tr> <tr> <td style="background-color: #92cddd;">CON3-P26</td> <td style="background-color: #92cddd;">PD14</td> <td style="background-color: #92cddd;">PD14</td> </tr> </table><br> === '''Specification of CSI Camera Connector''' ===<br>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.<div>[[File:Orange-pi-pc2-img6.png|800px]]</div>
<br>
<br>
<divtable style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0" cellpadding="0"> <tr> <td style="background-color: #808080;">CON1-P01</td> <td style="background-color: #808080;">NC</td> <td></td> </tr> <tr> <td style="background-color: #808080;">CON1-P02</td> <td style="background-color: #808080;">GND</td> <td></td> </tr> <tr> <td style="background-color: #33cccc;">CON1-P03</td> <td style="background-color: #33cccc;">TWI2-SDA</td> <td style="background-color: #33cccc;">PE13</td> </tr> <tr> <td style="background-color: #808080;">CON1-P04 </td> <td style="background-color: #808080;">VCC-CSI</td> <td></td> </tr> <tr> <td style="background-color: #33cccc;">CON1-P05 </td> <td style="background-color: #33cccc;">TWI2-SCK</td>[[File <td style="background-color:Orange#33cccc;">PE12</td> </tr> <tr> <td style="background-picolor: #33cccc;">CON1-pcP06 </td> <td style="background-img3.png|600px|]]color: #33cccc;">CSI-RESET#</td> <td style="background-color: #33cccc;">PE15</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P07 </td> <td style="background-color: #ff9900;">CSI-VSYNC</td> <td style="background-color: #ff9900;">PE3</td> </tr> <tr> <td style="background-color: #33cccc;">CON1-P08 </td> <td style="background-color: #33cccc;">CSI-STBY-EN</td> <td style="background-color: #33cccc;">PE15</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P09 </td> <td style="background-color: #ff9900;">CSI-HSYNC</td> <td style="background-color: #ff9900;">PE2</td> </tr> <tr> <td style="background-color: #808080;">CON1-P10 </td> <td style="background-color: #808080;">VDD1V8-CSI</td> <td></td> </tr> <tr> <td style="background-color: #808080;">CON1-P11 </td> <td style="background-color: #808080;">VCC-CSI</td> <td></td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P12 </td> <td style="background-color: #ff9900;">CSI-D7</td> <td style="background-color: #ff9900;">PE11</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P13 </td> <td style="background-color: #ff9900;">CSI-MCLK</td> <td style="background-color: #ff9900;">PE1</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P14 </td> <td style="background-color: #ff9900;">CSI-D6</td> <td style="background-color: #ff9900;">PE10</td> </tr> <tr> <td style="background-color: #808080;">CON1-P15 </td> <td style="background-color: #808080;">GND</td> <td></td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P16 </td> <td style="background-color: #ff9900;">CSI-D5</td> <td style="background-color: #ff9900;">PE9</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P17 </td> <td style="background-color: #ff9900;">CSI-PCLK</td> <td style="background-color: #ff9900;">PE0</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P18 </td> <td style="background-color: #ff9900;">CSI-D4</td> <td style="background-color: #ff9900;">PE8</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P19 </td> <td style="background-color: #ff9900;">CSI-D0</td> <td style="background-color: #ff9900;">PE4</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P20 </td> <td style="background-color: #ff9900;">CSI-D3</td> <td style="background-color: #ff9900;">PE7</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P21 </td> <td style="background-color: #ff9900;">CSI-D1</td> <td style="background-color: #ff9900;">PE5</td> </tr> <tr> <td style="background-color: #ff9900;">CON1-P22 </td> <td style="background-color: #ff9900;">CSI-D2</td> <td style="background-color: #ff9900;">PE6</td> </tr> <tr> <td style="background-color: #808080;">CON1-P23</td> <td style="background-color: #808080;">GND</td> <td></td> </tr> <tr> <td style="background-color: #808080;">CON1-P24</td> <td style="background-color: #808080;">AFVCC-CSI</td> <td></td> </tr> </divtable>
<br>
== '''Using Method Introduction to use the development board''' ==
<br>
<br>
=== '''Step 1)TF card, a high-speed card of class 10 or higher with a minimum capacity of 8GB, it is recommended to use SanDisk TF card, Orange Pi test is to use SanDisk TF card, other brands of TF card may have the problem of system failure<br><div style: Prepare Accessories Needed''' ==="padding-left:200px">[[File:Orange-pi-one-img4.png|250px]]</div>
<br>
<br>
<br>
<br>
<div style="display:flex;padding-left: 200px150px;"><div style="text-align:center;padding-top:40px;">[[File:Orange-pi-i96pc2-img5img10.png|250px200px200px|]]<br>TF card</div><div style="text-align:center;margin-left:50px;">[[File:Orange-pi-r1-img-4.png|80px|]]<br><div style="width:125px;">DC power adapter</div></div><div style="text-align:center;margin-left:50px;padding-top:55px;">[[File:Orange-pi-r1-img-5.png|120px|]]<br>Expansion Board
</div>
</div>
<br>
=== '''Step 2: Prepare a TF Card or EMMC Image''' ===
<br>
In order to use Orange Pi normally, you must install the operating system into TF card first.<br>
<br>
'''1)Write Linux into TF Card Based on Windows Platform'''<br>
<br>
a.Inserting the TF card into the computer, the capacity of the card must be bigger than the operating system, usually requires 8GB or bigger.<br>
b.Formatting the TF card.<br>
<div style="padding-left:20px;">
i Download tools for formatting TF card, such as TF Formatter, it could be downloaded from:<br>
https://www.sdcard.org/downloads/formatter_4/eula_windows/<br>
<br>
ii Unzip the downloaded files, and run setup.exe<br>
<br>
iii In the options settings select the "format" button for quick formatting. "Format size adjustment" select "(ON)"<br>
<br>
<div style="padding-left:180px;">[[File:Orange-pi-pc2-img12.png|400px|]]</div>
<br>
<br>
<br>
</div>
c.Download the operating system image file from the download page, the page address is as following:<br>
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br>
d.Unzip the downloaded file (in addition to the Android system, this method can be used to burn to write, the Android system need another burn, the following will introduce)<br>
e.Right click to download the file, select "Unzip file" to write image to TF card
<div style="padding-left:20px;">
i Download tools to write image,such as Win32 Diskimager, here is the download page: <br>
http://sourceforge.net/projects/win32diskimager/files/Archive/<br>
<br>
<br>
<br>
</div>
<br>
<br>
<br>
a.Download corresponding Android image and Phoenix Card writing tool.<div style="padding-left: 200px"br>[[File:Orange-pi-pc-plus-img5b.Formatting SD card.png|250px]]<br>c.Make sure the Disk is same as TF card, and start formatting SD card.<br>d.Write Android into TF card, please note the red mark, which is differentfrom writing into TF card.</divbr>
<br>
<br>
<br>
<br>
==='''Download the 6)Write Linux image and related information of the development boardinto EMMC'''===<br>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.<br><br>* Method 1:a. $ sudo OrangePi_FormatEMMC.sh Formatting EMMC<br><div >[[File:Orange-pi-zero-plus2-img9.png|600px|]]</div><br>$ sudo OrangePi_Install_OrangePi_2_EMMC.sh Writ image into EMMC<br><br><div >[[File:Orange-pi-zero-plus2-img10.png|600px|]]</div><br>Wait for writing finish and re-boot<br><br>* Method 2:$ sudo OrangePi_Settings<br><br><div >[[File:Orange-pi-zero-plus2-img11.png|600px|]]</div><br>Select the fourth one Storage Setting<br><br><div >[[File:Orange-pi-zero-plus2-img12.png|600px|]]</div><br>Select the first one, Format EMMC as Normal Storage First format EMMC<br>Select fourth one, Install Image into EMMC Install image into EMMC and re-boot<div >[[File:Orange-pi-zero-plus2-img13.png|600px|]]</div>
<br>
</div>
<br>
<div >[[File:Orange-pi-pczero-plusplus2-img6img16.png|800px400px|]]<br><div style="width:400px;text-align:center;">Orange Pi Zero Plus2 runs on Ubuntu system</div>
</div>
<br>
<br>
<br>
<br>
=== '''Step 4: Turn off your Orange Pi Correctly''' ===<br>* You can use the shutdown button on the interface to safety close the Orange Pi.* You can also close the system by entering commands in the shell:<br>'''sudo halt''' or '''sudo shutdown –h'''<br><br>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’ press.<br><br>=== '''Other configuration''' ===<br>'''1)Connect to the wired network'''<br><br>* Method 1:<br>a.Enter the following in the command line:<br>$ ifconfig<br>To check whether there is (wlan*)<br>b.After downloadingIf no, load the corresponding module according to the wlan model<br>$ insmod bcmdhd.ko<br>For example: For AP6212 is bcmdhd.ko<br>c.Enter command ifconfig, you should see wlan0(hypothesis it is wlan0)<br>d.Configure wired network, unzip first you need to know ssid and install directlypsk(account and password), enter corresponding wlan*, ssid, psk<br>$ sudo nano /etc/network/interfaces (add the following contents) <br>auto wlan0<br>iface wlan0 inet dhcp <br>wpa-ssid xxxx<br>wpa-psk xxxx<br>e.Reboot the computer and then open the softwarewired network will work.<br>$ sudo reboot<br><br>* Method 2:<br>a.Build wifi hotspot configuration file of wpa_supplication.conf for on/etc/network/ directory and add the following: <br>network={<br>ssid="wifi hot spot name" <br>psk="wifi hot spot password" <br>priority=1<br>}b.Connect wifi, here is the command: <br>ifconfig wlan0 up<br>sudo wpa_supplicant -i wlan0 -c /etc/network/wpa_supplication.conf & dhcpcd wlan0 &<br>c.Test the condition of wifi connection<br>Use iwconfig command, you will find the related information of wlan0, use ping command to test.<br>
<br>
</div>
<br>
</div>
<br>
<br>
<br>
<br>
'''1)Default Account Changing'''<div style="padding-left:200px">[[File:Orange-pi-3lts-selectlinuxversion.png|600px]]</divbr>
<br>
</div>
c.$ groupmod -n zhangsan orangepi Change group<brdiv style=" ">6)Download the Linux operating system image file compression package you want to burn from the [[File:Orange Pi data download page, and then use the decompression software to decompress it-pi-pc2-img31.png|400px|]]</div>d. In the decompressed file, the file ending with $ mv /home/ornagepi /home/zhangsan Change directory of original orangepi<div style=".imgpadding-left:80px;" is the operating system image file,the size is generally above 1GB>[[File:Orange-pi-pc2-img32.png|600px|]]<br/div>ae.The decompression command of the compressed package at the end of a.7z is as follows$ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory<div style="backgroundpadding-left:#f1f1f1;border: 1px solid #00080px;">test@test[[File:~$ 7z x image_filenameOrange-pi-pc2-img33.7zpng|600px|]]
</div>
</div>
After the modification of the above iterms, it can be used the new account Zhangsan to land.<br>
<br>
'''2)U Disk Automatic Mounted Configuration'''<br>
<br>
a.sudo apt-get install usbmount<br>
b.sudo vim /etc/udev/rules.d/automount.rules <br>
ACTION=="add",KERNEL=="sdb*", RUN+="/usr/bin/pmount --sync
--umask 000 %k"<br>
ACTION=="remove", KERNEL=="sdb*", RUN+="/usr/bin/pumount %k" ACTION=="add",KERNEL=="sdc*", RUN+="/usr/bin/pmount --sync
--umask 000 %k"<br>
ACTION=="remove", KERNEL=="sdc*", RUN+="/usr/bin/pumount %k"<br>
<br>
c.udevadm control –reload-rules <br>
It could refer to this:<br>
http://unix.stackexchange.com/questions/134797/how-to-automatically-mount-an-usb-device-on-plugin-time-on-an-already-running-sy<br>
<br>
'''3)System Source Configuration'''<br>
<br>
</div>
b.Edit source file<br>Replace the source file with your favorite source. Take an example of Ubuntu 16.04 on Zhonkeda source:<br>deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe<br>deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe<br>deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe<br>deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe<br>deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe<br>deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe<br>deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe<br>deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe<br>deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe<br>deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe<br>Note: xenial is the version of the code name in this source, if the other version of Ubuntu needs to replace the corresponding version code which can be found on the internet.<br><br>'''4)Remote desktop installation'''<br>There are a lot of software, such as VNG, XRDP, X2GO, etc. For X2GO, it has more functions, and desktop color restore is very good which does not need too much configuration. And XRDP is much more safety than VNC.<br>a.$sudo apt-get install tightvncserver Install VNC<div style>[[File:Orange-pi-pc2-img36.png|400px|]]</div><br>b.vncpassw Set the password: do not execute this command but executing vncserver directly. It will prompt you to enter the password twice, when prompted whether can be read only to select the N.<div>[[File:Orange-pi-pc2-img37.png|800px|]]</div><br>c.Open one or more of desktops by vncserver or vncserver:1(vncserver:2)… you can also transfer more parameters through the full command as below:<br>vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565<br>(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.)<br><br>'''5)NAS and DLAN Configuration'''<br>a.NAS:<br>There are many files could be reference from Internet, for example: http://www.geekfan.net/5003/, it detailed descriptions on the operation and the mounted of U disk is very useful.<br>b.DLNA:<br>Mainly through the minidlna software to achieve the sharing of media resources within the LAN, such as sharing video, music, etc.. The installation steps are as follows:<br>i. sudo apt-get minidlna<br>ii. Execute the following command to modify the configuration file: <br>sudo nano /etc/minidlna.conf<br>Note: you can also use other text editor to modify. <br>iii. Add the following:<br>media_dir=A,/nas, path: /DLNA/Music<br>media_dir=V,/nas, path: /DLNA/Video <br>media_dir=P,/nas, path: DLNA/Picture <br>db_dir=/nas, path: /DLNA/log <br>db_dir=/nas, path: /DLNA/db<br>ctrl +o and enter, ctrl +x to save and exit.<br>iv. Established above folders respectively, noted that path consistency and assigned to read and write permissions. In order for convenient, it could be Chmod 755, such as sudo Chmod 755 /nas path /DLNA/Music<br>v. Re-start minidlna to take effect the configuration: /etc/init.d/minidlna restart.<br>Transmit the corresponding file on the computer to the corresponding folder through samba.<br>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.<br><br>'''6)Thunder remote download'''<br>a.Go to the Thunder routing forum to download the required installation package first. The link for stable version:<br>http://luyou.xunlei.com/thread-12545-1-1.html. <br>Download Xware1.0.31_cubieboard zip file.<div >[[File:Orange-pi-pc2-img38.png|800px|]]</div><br>Note: If you want to try the latest version, you can download the latest test version: http://luyou.xunlei.com/thread-15167-1-1.htm.<br>b.Enter the directory after uploaded the unzip file to OrangePi. It is recommended to rename the file to xunlei<br>c.Installation method of version 1.0.31:<br>i $ cd /xxx/xunlei The xxx is the directory of installation xunlei file <br>ii $ chmod 755 portal<br>iii $ ./portal<div>[[File:Orange-pi-pc2-img39.png|800px|]]</div><br>iv You will get an activation code after booting like the following:<div>[[File:Orange-pi-pc2-img40.png|800px|]]</div><br>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.<div>[[File:Orange-pi-pc2-img41.png|800px|]]</div><br>vi Setting start up<br>$ sudo nano /etc/rc.loacl<br>add the following contents before exit 0 <br>cd /xx/xunlei<br>./portal &ctrl +o and enter, ctrl +x to save and exit.<br>d.Installation of version 3.0.32.253:<br>i $ cd /xxx/xunlei The xxx is the directory of installation file of xunlei<br>ii $ sudo nano thunder_mounts.cfg Modify the download path<div >[[File:Orange-pi-pc2-img42.png|400px|]]</div><br>iii chmod +x etm_monitor<br>iv Run ./etm_monitor, there will be an activation code page likeversion 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).<br>v Setting start up<br>sudo nano /etc/rc.loacl <br>add the following contents before exit 0 <br>cd /xx/xunlei<br>./etm_monitor &<br>ctrl +o and enter, ctrl +x to save and exit.<br>It could be remote downloading on computer, mobile phone or tablet by login yuancheng.xunlei.com<br><br>'''7)Modify the size of ext4 file system'''<br>After made the written image into SD card for booting, enter into rootfs partition’s expansion of file system. It could enhance the performance of SD card to avoid limited storage cause prblem.<br><br>* Method 1<br>Extend rootfs file partition of TF card on PC:Select the specified disk, right click and select the corresponding disk, select "change size"paddingand adjust it into your desired size, click "resize", close the dialog box and click "apply all operations", select the application to complete the expansion operation<br><br>* Method 2<br>Enter into the system and extend via shell Before partition<div >[[File:Orange-pi-pc2-leftimg43.png|400px|]]</div><br>Eneter into system and expend via resize_rootfs.sh<div >[[File:200px"Orange-pi-pc2-img44.png|400px|]]</div><br>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<div >[[File:Orange-pi-3ltspc2-balenaetcherimg45.png|600px400px|]]</div><br>a.Expand file system<br>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).<br>ii. Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition.<br>iii. Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).<br>iv. Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire.<br>v. Enter w to save the partition data.<br>vi. Use the following command to check the file system(make sure it is a right file system)<br>e2fsck -f /dev/sdb2<br>vii. Adjust the partition size <br>resize2fs /dev/sdb2<br>viii. It could mount a disk partition, you could check whether it has changed.<br><br>b.Shrink file system<br>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).<br>ii. Use the following command to check the file system(make sure it is a right file system)<br>e2fsck -f /dev/sdb2<br>iii. Modify the size of file system(Use resize2fs)<br>resize2fs /dev/sdb2 900M<br>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.<br>iv. Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition. You need to first delete the partition then build a new one because the fdisk could not modify the size dynamic(you need to calculate the size, it have to enough to contain the file system adjusted in last step).v. Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).<br>vi. Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire. Besides, if it is bootable partition you want to change, note that need to keep the bootable mark in case cannot boot.<br>The above illustration is using fdisk and resize2fs to modify partition and file system, you could also use gparted. Gparted has graphical interface and it could help you to re-size file system at the same time of re-sizing partition. Goarted is much easier to use and reduce the change to make mistake. For now our offial Lubuntu and Raspbian could not use it.<br><br>'''8)How to use gc2035 on Linux'''<br>a.Use find command to find the location of the following files, and load it according to the specified order<br>insmod videobuf-core.ko <br>insmod videobuf-dma-contig.ko <br>insmod uvcvideo.ko<br>insmod cci.ko <br>insmod vfe_os.ko<br>insmod vfe_subdev.ko <br>insmod gc2035.ko <br>insmod vfe_v4l2.ko<br>There should be generated video0 on /dev/ after loaded. After low-level driver install, then the Andoird could be used directory.<br>b. Use camera in Linux<br>i Load up driver<br>sudo modprobe gc2035 <br>sudo modprobe vfe_v4l2<br>ii. Install motion<br>sudo apt-get install motion<br>iii. Modify configuration <br>sudo nano /etc/motion/motion.conf <br>stream_localhost off<br>iv. Create folder for images saving <br>mkdir ~/motion<br>v. Modify permission <br>chmod 777 motion<br>vi. Continue modifying configuration <br>sudo nano /etc/default/motion <br>start_motion_daemon=yes<br>vii. Boot the server <br>Sudo /etc/init.d/motion start<br>Enter the following in browser: localhost:8081 <br>You could check image output from camera.<br>Besides, you could also refer to this link:<br>http://www.cnx-software.com/2015/09/26/how-to-use-orange-pi-camera-in-linux-with-motion/<br><br>'''9)eth0 and wlan0 static mac address setting'''<br>a.If the system do not use systemd, you could modify rc.local directory and add the following:<br>$ vim /etc/rc.local <br>MAC=00:e0:4c:a1:2b:d4<br>ifconfig wlan0 down<br>ifconfig wlan0 hw ether $MAC <br>ifconfig wlan0 up<br>dhclient &<br>After rebooting, you could use ifconfig to check whether mac address has changed.<br>b.If the system used systemd, you also need to add the following besides the above steps:<br>$ cd /etc/systemd/system/<br>$ vim change_mac_address.service (You could name the server, format just like the following)<br><br>[unit]<br>Description=Change OrangePi Wifi mac address<br><br>[Service] <br>ExecStart=/etc/rc.local RemainAfterExit=yes<br><br>[Install]<br>sWantedBy=multi-user.target<br><br>$ systemctl enable change_mac_address.service<br>Modify mac address of eth0 is same as modifying wlan0’s, just need to replace wlan0 into eth0.<br><br>'''10)Orange Pi Android root'''<br>There is defaulted with root permission on Android pre-installed, but lacking authorization management software. The following is how to add authorization management software.<br><br>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.<br><br>a.Open adb debug mode<br>Use U disk or card reader to install UsbModeSwitch.apk into Orange Pi 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. If PC failed to install, you could install PC version’s Peasecod to install the driver software.<br><br>b.After connected Orange PI and PC, open command mode of PC, enter related command of adb(you need to install adb debug command, which Peasecod has adb command ). Here is the command:<br>adb remount <br>adb shell<br>windows(win+r) command line enter into command mode, then enter into kingroot directory and execute the following steps:<br>adb shell<br>root@rabbit-p1:/ # mkdir /tmp <br>root@rabbit-p1:/ # cd /system/bin<br>root@rabbit-p1:/ # mount -o remount, rw /system<br>root@rabbit-p1:/system/bin # ln -s busybox-smp unzip <br>Logout adb shell Mode<br>root@rabbit-p1:/exit (Or Ctrl + C) <br>Unzip UPDATE-SuperSU-v2.46.zip<br>You will obtain META-INF/com/google/android/update-binary and put it into specific catalog.<br>adb push /path/UPDATE-SuperSU-v2.46.zip /data/local/tmp path is file’s path<br>adb push /path/ update-binary /data/local/tmp <br>adb shell<br>root@rabbit-p1:/ #cd /data/local/tmp <br>root@rabbit-p1:/ #sh update-binary 0 1<br>/data/local/tmp/UPDATE-SuperSU-v2.46.zip<br><nowiki>......</nowiki><br><nowiki>......</nowiki><br>After executed scripts, enter reboot command and reboot it, you could use the device authorization management software normally.<br>After rebooted, there might be no super administrator icon, you need to delete the desk configuration file and reboot the board.<br><br> == '''Linux Kernel Source Code Compilation''' ==<br>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 system is running, it can get the information of the system running by reading the binary file, which can greatly simplify the time of project development.<br>This manual describes how to use the binary file to speed up the development of the project.<br>Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1<div >[[File:Orange-pi-zero-plus2-img18.png|800px|]]</div><br>Note: In the following sections, * indicates wild-cards, you need to fill in the actual values according to their file storage path.<br><br>=== '''Download Linux Source Code''' ===<br>You could download the source code from the official website(Source code for H5 chip are the same): <br>http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br><br>Subsection and compress the file, then unzip it after finish downloaded:<div >[[File:Orange-pi-pc2-img49.png|600px|]]</div><br>buildroot: Project compilation script<br>brandy: gcc-linaro, boot and uboot source code and remaining open source cross compiler tool<br>linux-3.10: Kernel source code <br>tools: Tools of project compilation <br>build.sh: compilation script<br><br> === '''Compile Project Source Code''' ===<br>You need to compile the entire project while it is your first time to use the source code. You can use the following commands in the /lichee directory to complete the project:<br>* Enter into content of lichee, command<br>$ ll -a<br>Check if there is an executable permission on build.sh, if not, modify the permissions<br>$ chmod 755 build.sh<br>* If there is .buildconfig after commanded ll –a, delete it<br>$ rm –rf .buildconfig<div>[[File:Orange-pi-pc2-img50.png|800px|]]</div><br>* Use the following command to compile the entire project<br>$ ./build.sh config<div>[[File:Orange-pi-pc2-img51.png|800px|]]</div><br>At this point the system will prompt the choice of the chip, as shown below, for OrangePi, select sun50iw2p1<br>At this point, the system will be prompted to select the platform, as shown below, for OrangePi, select Android<br>At this point, the system will be prompted during the burning processchoice of the board, as shown below, for the OrangePi, select dolphin-p1<div style="padding >[[File:Orange-pi-pc2-leftimg52.png|400px|]]</div><br>Appear this interface indicates waiting for the compiler.<div >[[File:200px"Orange-pi-pc2-img53.png|400px|]]</div><br>Wait fifteen minutes or so, compile complete.<div >[[File:Orange-pi-3ltspc2-balenaetcher1img54.png|600px400px|]]</div>9)<br>=== '''Update the Kernel Image File and Replace Library''' ===<br>* After burningcompilation is finished, the following interface files will be displayedgenerated in the directory:libs: lichee/out/sun50iw2p1/android/common/lib/modules/3.10.65 <br>Download image from official website:<br>http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br><br>* Write the image:<br>$ sudo dd bs=4M if=*. img of=/dev/sdb<br><br><div>[[File:Orange-pi-plus-2e-img16.png|800px|]]</div><br>Pull out the card reader, and then insert it again.<br>At this time, the SD card is inserted into PC, view the SD card mount point (if you don't know how to get a mount point for the SD card, please refer to the diagram below).<div>[[File:Orange-pi-pc2-img57.png|800px|]]</div><br>The first boot partition<div>[[File:Orange-pi-pc2-img58.png|800px|]]</div><br>The second rootfs partition<div>[[File:Orange-pi-pc2-img59.png|800px|]]</div><br>Copy the kernel image file generated by the compiler to the first partition (boot partition)<br>Copy the lib library which generated after compilation to the second partition (rootfs partition)<br>'''We would suggest using compilation system on github of official website.'''<div>[[File:Orange-pi-pc2-img60.png|800px|]]</div><br>build.sh Execute script into the graphical interface of compilation <br>extenal Inside are patch and some configuration kernel file <br>output File generated<br>script Script compiled <br>toolchain Cross compiler location <br>uboot uboot source code<br><br>Execute./build.sh enter into graphical interface and select Zero Plus2<div >[[File:Orange-pi-pc2-img61.png|600px|]]</div><br>Enter password of root<div >[[File:Orange-pi-pc2-img62.png|600px|]]</div><br>Update Kernel directory and module<div >[[File:Orange-pi-pc2-img63.png|600px|]]</div><br>Select corresponding file directory and update uImage and modules<div >[[File:Orange-pi-pc2-img64.png|600px|]]</div><br> == '''Android Kernel Source Code Compilation''' ==<br>Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1<div >[[File:Orange-pi-zero-plus2-img18.png|800px|]]</div><br>Software<br>Linux host computer, which hard disk space at least 50G (to meet a fully compiled need)<br>Linux host computer needs: <br>Version 2.7.3 of Python;<br>Version 3.81-3.82 of GNU Make; <br>JDK 6;<br>Version 1.7 or higher version of Git.<br><br>=== '''Install JDK''' ===<br>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* $./jdk-6u31-linux-x64.bin <br>It will generate a folder:<div>[[File:Orange-pi-pc2-img66.png|800px|]]</div><br>* Input at terminal<br>Note that JAVA_HOME is the name of the current directory, you need to fill in according to your own storage directory.<div>[[File:Orange-pi-pc2-img67.png|800px|]]</div><br>$ export JAVA_HOME=*/jdk1.6.0_31<br>$ export PATH=$PATH:/$JAVA_HOME/bin<br>$ export CLASSPATH=.:$JAVA_HOME/lib<br>$ export JRE_HOME=$JAVA_HOME/jre<div>[[File:Orange-pi-pc2-img68.png|800px|]]</div><br>* Command line input Jav and press tab to see whether it can auto completion (Java), which indicates it can unplug successfully installed<br><br>=== Install Platform Supported Software ===<br>$ sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 tofrodos \python-markdown libxml2-utils xsltproc zlib1g-dev:i386<br>$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1/usr/lib/i386-linux-gnu/libGL.so<br><br>=== '''Download Android Source Package''' ===<br>http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br><br>Then you will obtain the following directories:<div>[[File:Orange-pi-pc2-img69.png|300px|]]</div><br> === '''Install Compiler Tool Chain''' ===<br>The compiler tool chain has been integrated in Android SDK. Tool chain is on: lichee/brandy/gcc-linaro/ of Android SDK(already exist)<br><br><div>[[File:Orange-pi-pc2-img70.png|800px|]]</div><br>=== '''Compile Lichee source Code''' ===<br>There are Android and Lichee after unzipped the package, enter the directory of Lichee:<br>$ cd lichee<br>$ ./build.sh lunch <br>Select sun50iw2p1<br>Print information of successful compilation<div >[[File:Orange-pi-pc2-img71.png|400px|]]</div><br>=== '''Compile Command of Android Code''' ===<br>Input the command:<br>$ cd android<br>$ source ./build/envsetup.sh<div>[[File:Orange-pi-pc2-img72.png|800px|]]</div><br>$ lunch dolphin_fvd_p1-eng # Select the scheme number<div >[[File:Orange-pi-pc2-img73.png|600px|]]</div><br>$ extract-bsp # Copy the kernel and the drive module<div >[[File:Orange-pi-pc2-img74.png|600px|]]</div><br>$ make The rear values of # is for the simultaneous compilation process, dependent on the host configuration<div >[[File:Orange-pi-pc2-img75.png|600px|]]</div><br>$ pack #Packaged into firmware<div>[[File:Orange-pi-pc2-img76.png|600px|]]</div><br>$ cd */lichee/tools/pack/<div>[[File:Orange-pi-pc2-img77.png|600px|]]</div><br>'''Write image:'''<br>Copy the generated image file i to the SD card, switch to the windows operating system. Programming software download website:<br>http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br><br>Download the compressed package, unzip and get the folder<div >[[File:Orange-pi-pc2-img81.png|200px|]]</div><br>Enter the folder, open the program to run as Administrator<div>[[File:Orange-pi-pc2-img79.png|600px|]]</div><br>Write Android image on Windows with this tool:<div>[[File:Orange-pi-pc2-img80.png|800px|]]</div><br>Insert the TF card from with written image to OrangePi, turn on the computer then you could enter to Android system.<br><br> == '''Use Project Configuration Files''' ==<br>=== '''sys_config.fex Introduction''' ===<br>'''Configure hardware: sys_config.fe'''<br><br>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 insert it I/O which based on the target version.<br>For OrangePi, the location of the project configuration document is: lichee/tools/pack/chips/sun8iw7p1/configs/dolphin-p1/sys_config.fex<br>Copy the file to the directory of /lichee, use command:<br>$ cd ./lichee<br>$ cp ./tools/pack/chips/sun8iw7p1/configs/dolphin-p1/sys_config.fex ./ <br>You could personalized configuration of sys_config.fex according tosysconfig1.fex_manul_linux_BSP_v0.4.pdf.<br>Direcotory of sysconfig1.fex_manul_linux_BSP_v0.4.pdf is/lichee/buildroot/docs.<br><br>=== '''Examples''' ===<br>'''1)Modify the output mode into tv'''<br>* tv-out out, the output type of tv0 is invalid, you need to set the development board output type of tv1 into pal.Modify defaulted enable display output configuration into tv <br>[tv0]<br>used = 1<br>tv_dac_used = 1<br>dac_src0 = 0<br>dac_type0= 0<br>interface= 1 <br>[tvout_para] <br>tvout_used= 1<br>tvout_channel_num= 1<br><br>[disp] <br>disp_init_enable= 1<br>disp_mode= 1<br>screen0_output_type= 2<br>screen0_output_mode= 11<br>screen1_output_type= 2<br>screen1_output_mode= 11<br>dev0_output_type = 4<br>dev0_output_mode = 4<br>dev0_screen_id = 0<br>dev0_do_hpd = 1<br>dev1_output_type = 2<br>dev1_output_mode = 11<br>Modify sys_confi and replace it when it generated OrangePiH5.dtb. If would be faster if use compilation system on githug. About compilation you could refer to startthe charter of Linux Compilation.<br><br>'''2)Loading tv.ko module automatically after booted'''<br>Enter /lib/ directory, enter command: <br>depmod -a<br>Add one more line on /etc/modules <br>tv<div br>It would be tv out after booted<br>* Capacitance touch panel (capacitor tp)<br>{| class="wikitable" style="paddingbackground:#fff;width:800px;"|-| Configuration Item|| Configuration Meaning|-| ctp_used=xx|| Whether turn on capacitance touch panel, if so set the value as 1, and vice verso 0.|-| ctp_name =xx|| Indicates the control scheme used in the specified scheme, for now there are: "ft5x_ts" or "Goodix-leftTS".|-| ctp_twi_id=xx|| Used for selecting i2c adapter, there are 0 and 2.|-| ctp_twi_addr =xx|| Indicates the device address of i2c, it is related to the specific hardware.|-| ctp_screen_max_x=xx|| Maximum coordinates of the X axis of the touch panel|-| ctp_screen_max_y=xx|| Maximum coordinates of the Y axis o the touch panel|-| ctp_revert_x_flag=xx|| Whether needed to flip the X 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 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 with interrupt signal common pin|}Configuration samples:200px<br><br>ctp_used = 1<br>ctp_name = "ft5x_ts"<br>ctp_twi_id = 2<br>ctp_twi_addr = 0x70 <br>ctp_screen_max_x = 800<br>ctp_screen_max_y = 480<br>ctp_revert_x_flag = 0<br>ctp_revert_y_flag = 0<br>ctp_int_port = port:PH21<6><default><br>ctp_wakeup = port:PB13<1><default><default><1><br>ctp_io_port = port:PH21<0><default><br><br>Note: If you want to support the new capacitive touch IC, you need to combine the configuration of the BSP A10 layer, which should be based on the original capacitive touch IC code, to make the appropriate changes. Specifically, 1) ctp_twi_id should be consistent with the hardware connection in sys_config; 2) In the drive part of the code: the use of twi from the device name + address should be consistent with the ctp_name and ctp_twi_addr in sys_config configuration. At the same time, the other sub configuration in sysconfig should also be properly configured, these configurations should be corresponding processing in the program.<br><br> == '''Orange Pi Driver development''' ==<br> 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. <br><br>Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1<div >[[File:Orange-pi-zero-plus2-img18.png|600px]]</div><br>=== '''Device driver and application programming''' ===<br>'''1)Application Program (app.c)'''<br><br><div>[[File:Orange-pi-i96-img50.png|600px]]</div><br>'''2)Driver Program (OrangePi_misc.c)'''<br><br><div>[[File:Orange-pi-3ltsi96-balenaetcher2img51.png|600px]]</div><br><div>[[File:Orange-pi-i96-img52.png|600px]]</div><br>
=== '''Method of flashing Android firmware to TF cardCompile device driver''' ===
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
=== '''How to use the debug serial portCross compiler Application Program''' ===<br>Here will take arm-linux-gnueabihf-gcc as an example. Check whether there is the cross compiler, if not, then download and install it.<br>$ arm-linux-gnueabihf-gcc -v<div>[[File:Orange-pi-i96-img56.png|800px]]</div><br>While compiling the application, you will fill that you need the cross compiler arm-linux-gnueabihf-gcc, download and install it.<div>[[File:Orange-pi-i96-img57.png|800px]]</div><br>Unzip the downloaded file and enter the the directory<div>[[File:Orange-pi-i96-img58.png|800px]]</div><br>Check the information after entering bin directory<div>[[File:Orange-pi-i96-img59.png|800px]]</div><br>pwd hows the path and export it into the whole project<div>[[File:Orange-pi-i96-img60.png|800px]]</div><br>$ ll /etc/environment shows that the file can only read, need to modify permissions <br>$ chmod 755 /etc/environment<br>Modify permission<div>[[File:Orange-pi-i96-img61.png|800px]]</div><br>Add the path to the whole environment variable<br><div>[[File:Orange-pi-i96-img62.png|800px]]</div><br>Compile the application with cross compiler<br><br>$ arm-linux-gnueabihf-gcc app.c –o aq<br>There will be an ap application generated in the directory, copy it to the development board file system(on the rootfs directory of /home/orangepi/)<br>$ cp aq /media/*/home/orangepi/<br><br>
<br>
=='''Using Debug tools on OrangePi ''' == <br>Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1<div >[[File:Orange-pi-zero-plus2-img18.png|800px]]</div><br>'''How TTL to use the debugging serial port USB cable'''<div >[[File:Orange-pi-i96-img67.png|800px]]</div><br>=== '''Operations on Ubuntu platformWindows''' ====1)If <br> In order to get more debugging information in the USB to TTL module is connected normallyproject development process of using OrangePi, OrangePi default support for serial information debugging. For developers, you can see simply get the corresponding device node name under /dev of serial port debugging information with the Ubuntu PCmaterials mentioned above. The host computer using different serial debugging tools are similar, remember this node namebasically can reference with the following manual for deployment. There are a lot of debugging tools for Windows platform, it will be the most commonly used when setting tool is putty. This section takes putty as an example to explain the serial port software laterdeployment.<br><br>'''1)Install USB driver on Windows'''<br><br>* Download and unzip the latest version of driver: <br> PL2303_Prolific_DriverInstaller_v130.zip<div style="background>[[File:#f1f1f1;borderOrange-pi-i96-img68.png|800px]]</div><br>* Choose application installation as Administrator<div>[[File:1px solid #000"Orange-pi-i96-img69.png|800px]]</div><br>test@test* Wait for installation completing <div>[[File:~$ Orange-pi-i96-img70.png|800px]]</div><br>'''2)Install putty on Windows'''ls <br><br>* Download putty installation package<div>[[File:Orange-pi-i96-img71.png|800px]]</devdiv><br>* Unzip and install it<div>[[File:Orange-pi-i96-img72.png|800px]]</ttyUSBdiv><br>*Open it after installed, shown as below:<br><div >[[File:Orange-pi-i96-img73.png|600px]]</div><br>'''3)Connect method'''<br>/dev/ttyUSB0<br>Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC<br>'''4)Equipment information acquisition'''<br>* Select control panel on Start menu<div >[[File:Orange-pi-i96-img75.png|400px]]</div>
<br>
<br>
<br>
<br>
<br>
'''6)First select the setting interface of the serial port<div style="padding-left:200px">[[File:Orange-pi-3lts-putty1.png|600px]]</div>7)Then set the parameters of the serial portStart debug'''<br><div style="padding-left:20px;">a. Set the Serial line to connect to to /dev/ttyUSB0 (modify to the corresponding node namePower Orange Pi on and boot it, generally /dev/ttyUSB0)<br>b. Set Speed (baud) to 115200 (baud rate of the serial port)<br>c. Set Flow control to None</div><div style="padding-left:200px">[[File:Orange-pi-3lts-putty2.png|600px]]</div>8)After setting the serial port setting interface, return to the Session interface<div style="padding-left:20px;">awill automatic print out debug log. First select the Connection type as Serial<br>b. Then click the Open button to connect to the serial port</div><div style="padding-left:200px ">[[File:Orange-pi-3ltsi96-putty3img80.png|600px]]</div>
<br>
<br>
'''1)There are many serial debugging tools that can be used under Windows, such as SecureCRT, MobaXterm, etc. The following shows how to use MobaXterm. This software is free and can be used without purchasing a serial number.<br>Install Kermit'''
<br>
<div style="padding-left:20px;">
</div>
<br>