8,367
edits
Changes
no edit summary
=== '''Hardware specification of Orange Pi Zero Plus2''' ===
<br>
{| class="wikitable" style="width:800px;background:#ffffff;"
|-
|colspan=2| <div style="text-align:center;font-weight:700;">'''Hardware feature introduction'''</div>
<div>[[File:Orange-pi-zero-plus2-img2.png|500px|]]</div>
<br>
=== '''Interface instructions''' ===
<br>
<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>
'''Orange Pi Zero Plus2-CSI'''
<br>
<table 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>
<td style="background-color: #33cccc;">PE12</td>
</tr>
<tr>
<td style="background-color: #33cccc;">CON1-P06 </td>
<td style="background-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>
</table>
<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-pc2-img10.png|200px200px|]]<br>TF card</div><div style="text-align:center;margin-left:50px;">[[File:Orange-pi-i96r1-img5img-4.png|250px80px|]]<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>
<br>
<br>
<div style="padding-left: 200px180px;">[[File:Orange-pi-pc2-img12.png|400px|]]</div><br><div style="padding-left:180px;">[[File:Orange-pi-pcpc2-plus-img4img13.png|250px400px|]]</div><br>iv Make sure the inserted TF card disk are in accordance with the chosen disk.<br><br>v Click the "Format" button.
</div>
c.Download the operating system image file from the download page, the page address is as following:<br>
http://www.orangepi.online/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>
ii Select the image file path that has been unzipped.<br>
<br>
<br>
<br>
</div>
<br>
<br>
<br>
b.Formatting the TF card.<br><br>i Run fdisk –l order to make sure TF disk.<br>ii Run umount /dev/sdxx to uninstall all partitions of TF Card. <br>iii Run sudo fdisk /dev/sdx order. Use o command to delete allpartitions of TF Card, and then us n order to add a new partition, finally usew command to save and exit.<br>iv Run sudo mkfs.vfat /dev/sdx1 command to format the TF card partition set up last step to FAT32 form(according to your TF card disk to replacex). Or you could skip this step since command in Linux will format TF card automatic.<br><br>c.Download the OS image from download page <br>http://www.orangepi.online/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br><br>d.Unzip and right click the downloaded file, select " Unzip file"<br><br>e.Write image to TF card<br><br>i Run sudo fdisk –l order to make sure the TF card disk<br>ii make sure the image file hash key is the same as download page mention(optional). It will output sha1sum [path]/[imagename], which should be same as the image paye "SHA-1"<br>iii Run umount /dev/sdxx order to uninstall all partitions in TF Card<br>iv Run sudo dd bs=4M if=[path]/[imagename] of=/dev/sdx to write down image file. Wait for the image to write. If it cannot work at 4M, then replace a 1M which takes more time. You can run sudo pkill –USR1 –n –x dd order to monitoring procedure.<br><br>'''3)Use PhoenixCard tool to write Android image into TF card'''<br>It is impossible for Android image to be written into TF card by usingdd command under Linux or using Win32 Diskimager under Windows. HerePhoenixCard tool is applicable for Android image writing.<br><br>a.Download the Android OS image and PhoenixCard tool. Download PhoenixCard from here:<br>https://drive.google.com/file/d/0B_VynIqhAcB7NTg2UkRDdHRWX2s/edit?usp=sharing<br>Download Android OS image from here: <br>http://www.orangepi.online/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-Plus-2.html<br>b.Format the TF card<br><div style= >[[File:Orange-pi-pc2-img15.png|400px|]]</div><br>c.Please make sure the inserted TF card is in accordance with the chosen TF card, click "restore" button for TF card formatting.<br><br><div >[[File:Orange-pi-pc2-img16.png|600px|]]</div><br>d.Click "OK"paddingbutton after successfully formatted the TF card to normal.<br><br>e.Burn the Android OS image into your TF card. Please pay attention to the following with red marks.<br><br><div >[[File:Orange-pi-leftpc2-img17.png|600px|]]</div><br>f.Click "Burn" button for writing to TF card and wait for it finish<br><br><div >[[File: 200pxOrange-pi-pc2-img18.png|600px|]]</div><br>g.Click "Exit"button after burn Android image to TF card successfully.<br><br>'''4)Write Armbian Image into TF Card'''<br><br>a.Insert TF card into computer, please note that the TF card capacity must bigger than the operating system image, usually need to be 8GB or bigger.<br>b.Download the OS image file from the download page: http://www.armbian.com/download/<br>c.Write the image into TF card.<br>i. Download image writing tool such as Rufus, the download page: https://rufus.akeo.ie/<br><br><div >[[File:Orange-pi-pcpc2-plusimg19.png|400px|]]</div><br>ii. Select the image file path that has been unzipped<br><br><div >[[File:Orange-pi-img5pc2-img20.png|250px600px|]]</div><br>iii. Click "start" button and wait for the image to write.<br><br><div >[[File:Orange-pi-pc2-img21.png|600px|]]</div><br>iv. After the image is written, click "close" button<br><br>'''5)Write Android image into EMMC'''<br><br>Steps for writing image into EMMC is almost the same with writing into TF card.<br><br>a.Download corresponding Android image and Phoenix Card writing tool.<br>b.Formatting SD card.<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.<br>
<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>
<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>
</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="padding>[[File:Orange-pi-pc2-leftimg36.png|400px|]]</div><br>b.vncpassw Set the password:200px"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-3ltspc2-balenaetcherimg37.png|600px800px|]]</div>8<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 writing speed 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 remaining time will assigned to read and write permissions. In order for convenient, it could be prompted during 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 burning processdirectory of installation xunlei file <br>ii $ chmod 755 portal<br>iii $ ./portal<div style="padding>[[File:Orange-pi-pc2-leftimg39.png|800px|]]</div><br>iv You will get an activation code after booting like the following:200px"<div>[[File:Orange-pi-3ltspc2-balenaetcher1img40.png|600px800px|]]</div>9<br>v Copy this activation code to http://yuancheng.xunlei.com (Which required to log in with account of Thunder)After burning. 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 interface 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 displayedan 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). At this time<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, you can unplug 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 from on PC:Select the specified disk, right click and select the computer corresponding disk, select "change size" and insert adjust it into your desired size, click "resize", close the dialog box and click "apply all operations", select the development board application to startcomplete the expansion operation<br><br>* Method 2<br>Enter into the system and extend via shell Before partition<div >[[File:Orange-pi-pc2-img43.png|400px|]]</div><br>Eneter into system and expend via resize_rootfs.sh<div style="padding >[[File: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 -left:200px"lh to check whether expending is successful<div >[[File:Orange-pi-3ltspc2-balenaetcher2img45.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>
<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.<span style="color:red;font-weight:700;"br>Android image can only be burned 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 using PhoenixCard software under Windows platform*1, but cannot be burned under Linux platformpower supply*1</spandiv >[[File:Orange-pi-zero-plus2-img18.png|800px|]]<br/div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
=== '''How to use the debug serial portCompile device driver''' ===<br>Copy the OrangePi_misc.c to the */lichee/linux-3.4/driver/misc directory:<br><div>[[File:Orange-pi-pc2-img83.png|800px]]</div><br>Enter to */lichee/linux-3.4/drivers/misc/<br><div>[[File:Orange-pi-pc2-img84.png|800px]]</div><br>Modify Makefile on currently file, shown as following:<div>[[File:Orange-pi-i96-img53.png|800px]]</div><br>There is Kconfig on the same sibling folders with Makefile. Each Kconfig respectively describes the the source directory file related kernel configuration menu. In the kernel configuration making menuconfig, it read from the Kconfig config menu and the user configuration saved to the config. In the kernel compile, the main Makefile by calling this.Config could know the user's configuration of the kernel.<br>Kconfig is corresponding to the kernel configuration menu. Add a new driver to the kernel source code, you can modify the Kconfig to increase the configuration menu for your drive, so you can choose whether the menuconfig driver was compiled or not.<div>[[File:Orange-pi-i96-img54.png|800px]]</div><br>Back to the source code directory:<br><div>[[File:Orange-pi-pc2-img85.png|800px]]</div><br>$ ./build.sh<br>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<br><div>[[File:Orange-pi-prime-img16.png|800px]]</div><br>There is a .ko module which generated after compiled of OrangePi_misc.c on */lichee/linux-3.4/output/lib/modules/3.4.39/<div>[[File:Orange-pi-plus-2e-img28.png|800px]]</div><br>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. Two partition of SD card will automatically mount to the PC /media/ directory, the first partition is the boot partition and the second partition is the rootfs partition.<div>[[File:Orange-pi-i96-img55.png|800px]]</div><br>Copy the OrangePi_misc.ko file to /media/*/lib/modules/3.4.39.$ cp OrangePi_misc.ko /media/*/lib/modules/3.4.39<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>
<br>
<div style="padding-left:20px;">
</div>
<br>