Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero Plus 2

46,918 bytes added, 14:28, 27 June 2022
no edit summary
<br>
<div>[[File:Orange-pi-zero-plus2-img4.png|600px|]]</div>
<br>
=== '''GPIO Specifications''' ===
<br>
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.
<div>[[File:Orange-pi-pc2-img5.png|800px]]</div>
<br>
<table style=" min-width: 800px;text-align: center;" border="1" bordercolor="#d8d8d8" cellspacing="0"
cellpadding="0">
<tr>
<td>OrangePi(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;">UART3_TX</td>
<td style="background-color: #d99694;">PA13</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;">UART3_RX</td>
<td style="background-color: #d99694;">PA14</td>
</tr>
<tr>
<td style="background-color: #c2d59a;">CON3-P11</td>
<td style="background-color: #c2d59a;">UART2_RX</td>
<td style="background-color: #c2d59a;">PA1</td>
</tr>
<tr>
<td style="background-color: #938a53;">CON3-P12</td>
<td style="background-color: #938a53;">PD14</td>
<td style="background-color: #938a53;">PD14</td>
</tr>
<tr>
<td style="background-color: #c2d59a;">CON3-P13</td>
<td style="background-color: #c2d59a;">UART2_TX</td>
<td style="background-color: #c2d59a;">PA2</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;">PC4</td>
<td style="background-color: #f9c090;">PC4</td>
</tr>
<tr>
<td style="background-color: #5a5a5a;">CON3-P17</td>
<td style="background-color: #5a5a5a;">VCC-3V3</td>
<td></td>
</tr>
<tr>
<td style="background-color: #f9c090;">CON3-P18</td>
<td style="background-color: #f9c090;">CAN_RX</td>
<td style="background-color: #f9c090;">PC7</td>
</tr>
<tr>
<td style="background-color: #92cddd;">CON3-P19</td>
<td style="background-color: #92cddd;">SPI0_MOSI</td>
<td style="background-color: #92cddd;">PC0</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;">SPI0_MISO</td>
<td style="background-color: #92cddd;">PC1</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;">SPI0_CLK</td>
<td style="background-color: #92cddd;">PC2</td>
</tr>
<tr>
<td style="background-color: #92cddd;">CON3-P24</td>
<td style="background-color: #92cddd;">SPI0_CS0</td>
<td style="background-color: #92cddd;">PC3</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;">PA21</td>
<td style="background-color: #92cddd;">PA21</td>
</tr>
<tr>
<td style="background-color: #528ed4;">CON3-P27</td>
<td style="background-color: #528ed4;">TWI1-SDA</td>
<td style="background-color: #528ed4;">PA19</td>
</tr>
<tr>
<td style="background-color: #938a53;">CON3-P28</td>
<td style="background-color: #938a53;">TWI1-SCK</td>
<td style="background-color: #938a53;">PA18</td>
</tr>
<tr>
<td style="background-color: #528ed4;">CON3-P29</td>
<td style="background-color: #528ed4;">PA7</td>
<td style="background-color: #528ed4;">PA7</td>
</tr>
<tr>
<td style="background-color: #5a5a5a;">CON3-P30</td>
<td style="background-color: #5a5a5a;">GND</td>
<td></td>
</tr>
<tr>
<td style="background-color: #528ed4;">CON3-P31</td>
<td style="background-color: #528ed4;">PA8</td>
<td style="background-color: #528ed4;">PA8</td>
</tr>
<tr>
<td style="background-color: #d99694;">CON3-P32</td>
<td style="background-color: #d99694;">UART1_RTS</td>
<td style="background-color: #d99694;">PG8</td>
</tr>
<tr>
<td style="background-color: #528ed4;">CON3-P33</td>
<td style="background-color: #528ed4;">PA9</td>
<td style="background-color: #528ed4;">PA9</td>
</tr>
<tr>
<td style="background-color: #5a5a5a;">CON3-P34</td>
<td style="background-color: #5a5a5a;">GND</td>
<td></td>
</tr>
<tr>
<td style="background-color: #528ed4;">CON3-P35</td>
<td style="background-color: #528ed4;">PA10</td>
<td style="background-color: #528ed4;">PA10</td>
</tr>
<tr>
<td style="background-color: #d99694;">CON3-P36</td>
<td style="background-color: #d99694;">UART1_CTS</td>
<td style="background-color: #d99694;">PG9</td>
</tr>
<tr>
<td style="background-color: #938a53;">CON3-P37</td>
<td style="background-color: #938a53;">PA20</td>
<td style="background-color: #938a53;">PA20</td>
</tr>
<tr>
<td style="background-color: #938a53;">CON3-P38</td>
<td style="background-color: #938a53;">UART1_TX</td>
<td style="background-color: #938a53;">PG6</td>
</tr>
<tr>
<td style="background-color: #5a5a5a;">CON3-P39</td>
<td style="background-color: #5a5a5a;">GND</td>
<td></td>
</tr>
<tr>
<td style="background-color: #938a53;">CON3-P40</td>
<td style="background-color: #938a53;">UART1_RX</td>
<td style="background-color: #938a53;">PG7</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 PC2 is camera connector.
<div>[[File:Orange-pi-pc2-img6.png|800px]]</div>
<br>
'''Orange Pi PC2-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''' ==
<br>
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.<br>
<br>
=== '''Step 1: Prepare Accessories Needed''' ===
<br>
You need at least some accessories like the following if it is your first time to use the Orange Pi.<br>
<br>
{| class="wikitable" style="width:800px;background:#fff;"
|-
! No. !! Items !! Requirements and Instructions
|-
| 1|| TF card|| 8GB min.; class 10. Branded TF cards would be reference which are much more reliable.
|-
| 2|| HDMI to HDMI cable or HDMI to DVI cable|| HDMI to HDMI cable is used to connect HD TV or HD monitor
|-
| 3|| AV video cable|| A standard AV video cable can be used to connect stimulated monitor if a HDMI monitor is unavailable.
|-
| 4|| Keyboard and mouse|| Any keyboard and mouse with USB port is applicable; Keyboard and mouse are
high-power, so a USB concentrator is required.
|-
| 5|| Ethernet cable/USB WiFi(Optional)|| Network is optional, It makes more convenient to mount and upgrade software in your Orange
Pi PC.
|-
| 6|| DC power adapter|| 5V/2V min. high qualified power adapter, OTG can not used a power supply.
|-
| 7|| Audio cable (Optional)|| You can select an audio cable with 3.5mm jack to feel stereo audio.
|}
<br>
<div style="display:flex;padding-left:100px;">
<div style="text-align:center;">
[[File:Orange-pi-pc2-img7.png|200px200px|]]<br>
HDMI to HDMI cable
</div>
<div style="text-align:center;margin-left:100px;padding-top:3px;">
[[File:Orange-pi-pc2-img8.png|200px200px|]]<br>
HDMI to DVI cable
</div>
<div style="text-align:center;margin-left:100px;padding-top:1px;">
[[File:Orange-pi-pc2-img9.png|200px200px|]]<br>
AV video cable
</div>
</div>
<br>
<div style="display:flex;padding-left:200px;">
<div style="text-align:center;">
[[File:Orange-pi-pc2-img10.png|200px200px|]]<br>
TF card
</div>
<div style="text-align:center;margin-left:100px;padding-top:15px;">
[[File:Orange-pi-pc2-img11.png|200px200px|]]<br>
DC power adapter
</div>
</div>
<br>
== = '''Step 2: Prepare a TF Card for Booting''Introduction ' ===<br>In order to use Orange Pi normally, you must install the development boardoperating 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><div style="padding-left:180px;">[[File:Orange-pi-pc2-img13.png|400px|]]</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.org/downloadresources<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><div style="padding-left:180px;">[[File:Orange-pi-pc2-img14.png|400px|]]</div><br>iii Click "Write" button and wait for the image to write. <br><br>iv After the image is written, click "Exit" button.</div><br>'''2)Write Linux into TF card based on Linux platform?'''<br>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.<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.org/`downloadresources<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.org/downloadresources/<br>b.Format the TF card<br><div style="padding-left:200px;">[[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 style="padding-left:200px;">[[File:Orange-pi-pc2-img16.png|600px|]]</div><br>d.Click "OK" button 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 style="padding-left:200px;">[[File:Orange-pi-pc2-img17.png|600px|]]</div>
<br>
=== '''Prepare the necessary accessories''' ===f.Click "Burn" button for writing to TF card and wait for it finish<br>
<br>
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="padding-left:200px;">[[File:Orange-pi-onepc2-img4img18.png|250px600px|]]</div>
<br>
2)TF card reader, used g.Click "Exit" button after burn Android image to read and write TF cardsuccessfully.<br><div style="padding-left:200px">[[File:Orange-pi-3-lts-tfcard.png|250px]]</div>
<br>
3'''4)Standard HDMI to HDMI cable, used to connect the development board to an HDMI monitor or TV for displayWrite Armbian Image into TF Card'''<br><div style="padding-left:200px">[[File:Orange-pi-3-lts-hdmicable.png|250px]]</div>
<br>
4)Power adapter, at least 5V/2A high-quality power adaptera.Insert TF card into computer, please note that the OTG interface of TF card capacity must bigger than the development board cannot operating system image, usually need to be used as a power input8GB 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 style="padding-left: 200px;">[[File:Orange-pi-pc2-img19.png|400px|]]</div><br>ii. Select the image file path that has been unzipped<br><br><div style="padding-left:200px;">[[File:Orange-pi-i96pc2-img5img20.png|250px600px|]]</div><br>iii. Click "start" button and wait for the image to write.<br><br><div style="padding-left:200px;">[[File:Orange-pi-pc2-img21.png|600px|]]</div><br>iv. After the image is written, click "close" button<br><br> === '''Step 3: Boot your Orange Pi''' ===<br>'''1)Hardware Connection Sketch Map'''<br><br><div style="padding-left:200px;">[[File:Orange-pi-pc2-img22.png|400px|]]<br><div style="width:400px;text-align:center;">Orange Pi PC2 runs on Android 4.4 system</div>
</div>
<br>
5)USB interface mouse and keyboard, as long as it is a standard USB interface mouse and keyboard, the mouse and keyboard can be used to control the <div style="padding-left:200px;">[[File:Orange-pi-pc2-img23.png|400px|]]<br><div style="width:400px;text-align:center;">Orange Pi development boardPC2 runs on Debian system<br/div></div>
<br>
6)IR remote control, mainly used to control Android <div style="padding-left:200px;">[[File:Orange-pi-pc2-img24.png|400px|]]<br><div style="width:400px;text-align:center;">Orange Pi PC2 runs on Ubuntu system<br/div></div>
<br>
<div style="padding-left: 200px;">[[File:Orange-pi-pcpc2-plus-img4img25.png|250px400px|]]
</div>
<br>
7'''2)100M Details of Booting Steps'''<br><br>a.Insert the TF card with written image in to the TF card slot.<br>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 Gigabit display.<br>c.Insert USB keyboard and mouse into the USB interface.<br>d.It is the network port in the middle of 3USB interfaces, which you can access Orange Pi to the wired network cable.<br>e.It is the power input interface on the right side for connecting a power adapter up to or bigger than 5V/2A. Avoid using smaller power GSM mobile phone charger, used it is not able to connect output 2A even if it marked "5V/2A ".<br><br>Note: Micro-USB(OTG)cannot use as power input which may cause the fail boot of the OrangePi. Only the power interface could input power.<br><br>The Orange Pi will boot in a few minutes If the development board above steps are successful. There will be graphical interface in he monitor. It may take a long time to start the Internetfirst time, please wait patiently. The next time will boot very fast.<br>
<br>
8)GC2035 or OV5640 camera kit, which can be connected to the CSI interface of the development board to display video images<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>If the Orange Pi has connect to wire cable, then the system would obtain the IP address automatically. If there is no wire cable connecting, then the system would fail at obtaining IP address which could cause the booting delay.<br>After connecting to wired network, it should be green LED lighting and yellow LED flashing. You need to make sure the image you wrote is correspondent since some boards are 100M Ethernet but some are 1000M Ethernet.<br>100M Ethernet is using internal phy, configuration just like the following:<br>2 indicates internal phy<div style="padding-left:50px200px;">[[File:Orange-pi-onepc2-img6img26.png|250px]][[File:Orange-pi-one-img7.png600px|250px]]
</div>
<br>
9)Micro USB interface data cable, when 1000M Ethernet is using the ADB debugging function of the Android system, you need to connect the development board to the computer through the Micro USB interface data cableexternal phy<div style="padding-left:200px;">[[File:Orange-pi-litepc2-img8img27.png|250px600px|]]</div>
<br>
10)AV video cableThe above configuration has been configured, if you want could refer to display video through the CVBS interface instead of the HDMI interface, then you need to connect the development board to the TV through the AV video cableit when using.<br>
<br>
'''2)Login via vnc and ssh'''<br><br>If there is no condition for connecting HDMI, you could enter the system via vnc or ssh remote login.<br>* Login via serial port and install ssh apt-get install ssh* Modify ssh configuration file /etc/ssh/sshd_config<br><div style="padding-left: 200px;">[[File:Orange-pi-pc-pluspc2-img5img28.png|250px400px|]]
</div>
<br>
11)USB to TTL module and DuPont cable. When using * Check the serial port debugging functionIP with ifconfig, USB to TTL module and DuPont cable are required to connect the development board and the computer<br>login via ssh of root user
<br>
<div style="padding-left:200px;">
[[File:Orange-pi-pc2-img29.png|600px|]]</div><br>'''3)HDMI or 3.5mm Sound Output'''<br><br>a.The sound was default to output via HDMI on image, it could check and change via alsamixer.<br>ls /etc/asound.conf<br>card indicates card number, device indicates device number.<br>aplay -l it could check the system to load the sound card number and details<br>cat /proc/asound/cards it also could check the sound card and details It could be used after use alsamixer to change the sound card.<br>alsactl store -f /var/lib/alsa/asound.state used for saving modified parameters<br>b.It needs to modify configuration on file system for output on 3.5mm of/etc/asound.conf, modify card1 into card0, or use amixer to modify. The default oneis configured, or you could use player on graphical interface to switch via sound channel selection.<br>c.How to use mic sound recording <br>arecord -d 5 -f cd -t wav 123.wav<br>After recording, use the following to play <br>aplay 123.wav<br><br>=== '''Universal Software Configuration''' ===<br>'''1)Default Account Changing'''<br><br>The default log in account is orangepi. In order to secure, it is recommended to modify the default orangepi accounts to your own account, for example Zhangsan. Steps are as follows:<br>a.Use root account to login Orange Pi(please note that do not login with the account of orangepi<br>b.$ usermod -l zhangsan orangepi Change orangepi account into Zhangsan<div style="padding-left:100px;">[[File:Orange-pi-img8pc2-img30.png|250px400px|]]</div>c.$ groupmod -n zhangsan orangepi Change group<brdiv style="padding-left:100px;">[[File:Orange-pi-pc2-img31.png|400px|]]</div>d.$ mv /home/ornagepi /home/zhangsan Change directory of original orangepi<div style="padding-left:80px;">[[File:Orange-pi-litepc2-img10img32.png|250px600px|]]
</div>
e.$ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory
<div style="padding-left:80px;">
[[File:Orange-pi-pc2-img33.png|600px|]]
</div>
f.$ cat /etc/passwd It should be shown as below:
<div>
[[File:Orange-pi-pc2-img34.png|800px|]]
</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>
Take Ubuntu as an example:<br>
a.Open the source file<br>
$ sudo vi /etc/apt/sources.list
<div>
[[File:Orange-pi-pc2-img35.png|800px|]]
</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>[[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 style="padding-left:200px;">[[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 style="padding-left:200px;">[[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 like
version 1.0.32. And then binding on the Thunder remote page (above steps 4, 5). There might be one or two errors while running, ignore it (selection type of shell and generation of INI file).<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" and 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 style="padding-left:200px;">[[File:Orange-pi-pc2-img43.png|400px|]]</div>
<br>
Eneter into system and expend via resize_rootfs.sh
<div style="padding-left:200px;">[[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 -lh to check whether expending is successful
<div style="padding-left:200px;">[[File:Orange-pi-pc2-img45.png|400px|]]</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>
12[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>'''11)WiringPi installation and usage'''<br>a. Install WiringPi<br>i Install compilation tools for source code compilation<br>$ sudo apt-get install gcc g++ make <br>ii Compile GPIO driver of H5<br>git clone https://github.com/kazukioishi/WiringOP.git -b h5 <br>cd WiringOP<br>chmod +x ./build <br>sudo ./build<br>iii GPIO print out information <br># gpio -v<br>gpio version: 2.20<br>Copyright (c) 2012-2014 Gordon Henderson<br>This is free software with ABSOLUTELY NO WARRANTY. For details type: gpio -warranty<br><br>Banana Pro Details:<br><br>Type: Banana Pro, Revision: 1.2, Memory: 1024MB, Maker: LeMaker <br>iv Display<br>gpio readall<div>[[File:Orange-pi-pc2-img46.png|800px|]]</div><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 style="padding-left:200px;">[[File:Orange-pi-pc2-img47.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: <br>http://www.orangepi.org/downloadresources/<div>[[File:Orange-pi-pc2-img48.png|800px|]]</div><br>Subsection and compress the file, then unzip it after finish downloaded:<div style="padding-left:200px;">[[File:Orange-pi-pc2-img49.png|600px|]]</div><br>buildroot: Project compilation script<br>brandy: gcc-linaro, boot and uboot source code and 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 the choice of the board, as shown below, for the OrangePi, select dolphin-p1<div style="padding-left:200px;">[[File:Orange-pi-pc2-img52.png|400px|]]</div><br>Appear this interface indicates waiting for the compiler.<div style="padding-left:200px;">[[File:Orange-pi-pc2-img53.png|400px|]]</div><br>Wait fifteen minutes or so, compile complete.<div style="padding-left:200px;">[[File:Orange-pi-pc2-img54.png|400px|]]</div><br>=== '''Update the Kernel Image File and Replace Library''' ===<br>* After compilation is finished, the following files will be generated 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/downloadresources/<div>[[File:Orange-pi-pc2-img55.png|800px|]]</div><br>* Write the image:<br>$ sudo dd bs=4M if=*.img of=/dev/sdb<br><br><div>[[File:Orange-pi-pc2-img56.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)A personal .<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 PC2<div style="padding-left:200px;">[[File:Orange-pi-pc2-img61.png|600px|]]</div><br>Enter password of root<div style="padding-left:200px;">[[File:Orange-pi-pc2-img62.png|600px|]]</div><br>Update Kernel directory and module<div style="padding-left:200px;">[[File:Orange-pi-pc2-img63.png|600px|]]</div><br>Select corresponding file directory and update uImage and modules<div style="padding-left:200px;">[[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 style="padding-left:200px;">[[File:Orange-pi-pc2-img65.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; 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 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>Download website: http://www.orangepi.org/downloadresources/ <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 style="padding-left:200px;">[[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 style="padding-left:200px;">[[File:Orange-pi-pc2-img73.png|600px|]]</div><br>$ extract-bsp # Copy the kernel and the drive module<div style="padding-left:200px;">[[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 style="padding-left:200px;">[[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/downloadresources/<div style="padding-left:200px;">[[File:Orange-pi-pc2-img78.png|800px|]]</div><br>Download the compressed package, unzip and get the folder<div style="padding-left:200px;">[[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 with Ubuntu 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 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 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 Windows operating systemsreplace it when it generated OrangePiH5.dtb. If would be faster if use compilation system on githug. About compilation you could refer to the 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<br>It would be tv out after booted<br>* Capacitance touch panel (capacitor tp)<br>{| class="wikitable" style="background:#fff;width:800px;"
|-
| 1Configuration Item|| Ubuntu14.04 PC|| Optional, used to compile Android source codeConfiguration Meaning
|-
| 2ctp_used=xx|| Ubuntu18Whether turn on capacitance touch panel, if so set the value as 1, and vice verso 0.04 PC|| Optional, used to compile Linux source code
|-
| 3ctp_name =xx|| Windows PCIndicates the control scheme used in the specified scheme, for now there are: "ft5x_ts" or "Goodix-TS".|-| 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 burn Android flip the Y coordinates, if so then set 1, and Linux imagesvice 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:<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>
==='''Download the image 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 related information of applications on the development board. <br><br>Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1<div style="padding-left:200px;">[[File:Orange-pi-pc2-img65.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-i96-img51.png|600px]]</div><br><div>[[File:Orange-pi-i96-img52.png|600px]]</div>
<br>
1)The download URL of the Chinese version is:<br>
http://www.orangepi.cn/downloadresourcescn/
2=== '''Compile 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.4/output/lib/modules/3.4.41<br><div>[[File:Orange-pi-pc2-img86.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-pc2-img87.png|800px]]</div><br>Insert U disk (please note the SD card should have been written image)The download URL 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 English version PC /media/ directory, the first partition isthe boot partition and the second partition is the rootfs partition.<div>[[File:Orange-pi-i96-img55.png|800px]]</div><br> http:Copy the OrangePi_misc.ko file to /media/*/lib/modules/www3.orangepi4.org39.$ cp OrangePi_misc.ko /media/downloadresources*/lib/modules/3.4.39<br><br>
3)The information mainly contains=== '''Corss-complile or compiled Application code''' ===<br>Check whether there is the cross compiler, if not, then download and install it.$ arm-linux-gnueabihf-gcc -v<div style="padding>[[File:Orange-pi-i96-left:20px;"img56.png|800px]]</div>a.Android source code: saved on Baidu Cloud Disk and Google Cloud Disk<br>b.Linux source code: saved on githubWhile compiling the application, you will fill that you need the link address iscross compiler arm-linux-gnueabihf-gcc, download and install it.<brdiv> https[[File://githubOrange-pi-i96-img57.compng|800px]]</orangepi-xunlongdiv>c. User manuals and schematic diagrams: chip-related data manuals will also be placed here<br>d. Official tools: mainly include Unzip the software that needs to be used during downloaded file and enter the use of the development boarddirectory<div>[[File:Orange-pi-i96-img58.png|800px]]<br/div>e. Android image: saved on Baidu Cloud Disk and Google Cloud Disk<br>fCheck the information after entering bin directory<div>[[File:Orange-pi-i96-img59. Ubuntu image: saved on Baidu Cloud Disk and Google Cloud Diskpng|800px]]<br/div>g. Debian image: saved on Baidu Cloud Disk and Google Cloud Disk<br>h. Armbian image, a image developed by the Armbian community. If you encounter any problems during use, please report to the armbian forum first. The maintainer of pwd hows the Armbian image path and other people who use export it into the Armbian image will assist in solving various problems. This is also a fastest way to solve the problem. whole project<div>[[File:Orange Pi is not responsible for maintaining this image-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<div>[[File:Orange-pi-pc-plusi96-img6img61.png|800px|]]</div>
<br>
=== '''Method of flashing Linux image Add the path to TF card based on Windows PC''' ===the whole environment variable<br><div>[[File:Orange-pi-i96-img62.png|800px]]</div>
<br>
1)First, prepare a TF card Compile the application with 8GB or larger capacity. The transmission speed of the TF card must be above class10. It is recommended to use a TF card of SanDisk and other brandscross compiler<br>
<br>
2)Then use $ arm-linux-gnueabihf-gcc app.c –o aq<br>There will be an ap application generated in the card reader directory, copy it to insert the TF card into development board file system(on the windows computerrootfs directory of /home/orangepi/)<br>$ cp aq /media/*/home/orangepi/<br>
<br>
3)Then format the TF card<br>
<div style="padding-left:20px;">
a.You can use the SD Card Formatter software to format the TF card, the download address is<br>
https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip
b=== '''Running driver and application''' ===<br>Running Applications on Development Board<br>Removed the SD card and inserted it into the development board and power on.<br>You need to switch to root users and load module driver module to the development board first.<br>$ insmod /lib/modules/orangepi.ko<div>[[File:Orange-pi-i96-img63.png|800px]]</div><br>$ lsmod To check whether it is loaded<div>[[File:Orange-pi-i96-img64.After downloadingpng|800px]]</div><br>$ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, unzip and install directlythe specific look at the driver code)<div>[[File:Orange-pi-i96-img65.png|800px]]</div><br>Executive application (note the use of the application, and then open check the softwarecode for specify)<br>$ ./aq /dev/orangepimisc
<br>
c.If the computer only has a TF card inserted, the TF card's drive letter will be displayed in the Select card column. If the computer has multiple USB storage devices inserted, you can select the drive letter corresponding to the TF card through the drop-down box<br>
<div style="padding-left:180px">[[File:Orange-pi-3lts-sdcardformatter.png|400px]]</div>
d.Then click Format, a warning box will pop up before formatting, and formatting will start after selecting "Yes (Y)"
<div style="padding-left:180px">[[File:Orange-pi-3lts-sdcardformatter1.png|400px]]</div>
e.After formatting the TF card, the message shown in the figure below will pop up, click OK<br>
<div style="padding-left:180px">[[File:Orange-pi-3lts-sdcardformatter2.png|400px]]</div>
</div>
4)Download the Linux operating system image file compression package you want to burn from the Orange Pi data download page, and then use the decompression software to decompress it. In the decompressed file, the file ending with ".img" is the operating system image file,the size is generally above 1GB.<br>
<br>
5)Use '''Win32Diskimager''' to burn Linux image to TF card<br>
<div style="padding-left:20px;">
a.The download page of Win32Diskimager is<br>
http://sourceforge.net/projects/win32diskimager/files/Archive/
b.Install directly after downloading, the interface of Win32Diskimager is shown below<br>
<p style="padding-left:20px;">
a)First select the path of the image file<br>
b)Then confirm that the drive letter of the TF card is the same as that displayed in the '''"Device"''' column<br>
c)Finally click '''"Write"''' to start burning
</p>
<div style="padding-left:180px">[[File:Orange-pi-3lts-selectimage.png|400px]]</div>
c.After the image writing is completed, click the "Exit" button to exit, and then you can pull out the TF card and insert it into the development board to start
</div>
=== '''Method of flashing Linux image to TF card based Using Debug tools on Ubuntu PCOrangePi ''' ===
<br>
Hardware: Orange Pi development board*1, Card reader*1)First, prepare a TF card with 8GB or larger capacity*1, power supply*1<div style="padding-left:200px;">[[File:Orange-pi-pc2-img65. The transmission speed of the TF card must be above class10. It is recommended to use a TF card of SanDisk and other brandspng|800px]]<br/div>
<br>
2)Then use a card reader '''TTL to insert the TF card into the computerUSB cable'''<brdiv style="padding-left:200px;">[[File:Orange-pi-i96-img67.png|800px]]</div>
<br>
3)Download balenaEtcher software, the download address is<br> https://www.balena.io/etcher/4)After entering the balenaEtcher download page, please select the Linux version of the software through the drop-down box to download<br>=== '''Operations on Windows''' ===
<br>
<div style="padding-left:200px">[[File:Orange-pi-3lts-selectlinuxversion 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. The host computer using different serial debugging tools are similar, basically can reference with the following manual for deployment. There are a lot of debugging tools for Windows platform, the most commonly used tool is putty. This section takes putty as an example to explain the deployment.png|600px]]</divbr>
<br>
5)After downloading, use '''unzip ''' to decompress. The decompressed '''balenaEtcher-1.5.109-x64.AppImage)Install USB driver on Windows''' is <br><br>* Download and unzip the software required for burninglatest version of driver: <br> PL2303_Prolific_DriverInstaller_v130.zip<div style="background:#f1f1f1;border: 1px solid #000;">test@test[[File:~$ unzip balenaOrange-etcherpi-electroni96-1img68.5.109-linux-x64.zip png|800px]]</div><br>Archive* Choose application installation as Administrator<div>[[File: balenaOrange-etcherpi-electroni96-1img69.5.109-linux-x64.zippng|800px]]</div><br>inflating* Wait for installation completing <div>[[File: balenaEtcherOrange-1.5.109pi-i96-x64img70.AppImagepng|800px]]</div><br>'''2)Install putty on Windows'''<br> test@test:~$ ls<br>balenaEtcher* Download putty installation package<div>[[File:Orange-1.5.109pi-i96-x64img71.AppImage balenapng|800px]]</div><br>* Unzip and install it<div>[[File:Orange-etcherpi-electroni96-1.5img72.109-linux-x64.zippng|800px]]</div>
<br>
6)Download the Linux operating system image file compression package you want to burn from the Orange Pi data download page, and then use the decompression software to decompress * Open it. In the decompressed file, the file ending with ".img" is the operating system image fileafter installed,the size is generally above 1GB.<br>a.The decompression command of the compressed package at the end of a.7z is as follows<div style="background:#f1f1f1;border: 1px solid #000;">test@test:~$ 7z x image_filename.7z</div>b.The decompression command for the compressed package at the end of tar.gz is shown as follows<div style="background:#f1f1f1;border: 1px solid #000;">test@testbelow:~$ tar -zxf image_filename.tar.gz</div>
<br>
7)Double-click balenaEtcher-1.5.109-x64.AppImage on the graphical interface of Ubuntu PC to open balenaEtcher. The opened interface is shown in the figure below<br><div style="padding-left:20px200px;">a.First select the path of the image file<br>b.Then select the device number of the TF card<br>c.Finally click Flash to start burning</div><div style="padding-left:200px">[[File:Orange-pi-3ltsi96-balenaetcherimg73.png|600px]]</div>8)The writing speed and remaining time will be prompted during the burning process<div style="padding-left:200px">[[File:Orange-pi-3lts-balenaetcher1.png|600px]]</div>9)After burning, the following interface will be displayed. At this time, you can unplug the TF card from the computer and insert it into the development board to start.<div style="padding-left:200px">[[File:Orange-pi-3lts-balenaetcher2.png|600px]]</div> === '''Method of flashing Android firmware to TF card''' ===
<br>
<span style="color:red;font-weight:700;">Android image can only be burned to TF card using PhoenixCard software under Windows platform, but cannot be burned under Linux platform</span>'''3)Connect method'''<br>
<br>
1)First prepare a TF card with a capacity of 8GB or more. The transmission speed of Use the TF card must be above class 10. It is recommended TTL to use a TF card from a brand such as SanDisk<br>the serial port cable, one end connected to OrangePi, the other end connected to PC
<br>
2'''4)Then use a card reader to insert the TF card into the computer<br>Equipment information acquisition'''
<br>
3)Download the Android 4.4 or Android 7.0 firmware and PhoenixCard programming tool from * Select control panel on Start menu<div style="padding-left:200px;">[[File:Orange Pi's data download page, please make sure that the version of the PhonenixCrad tool is PhoenixCard v4.1-pi-i96-img75.2png|400px]]<br/div>
<br>
4)Use the decompression software to decompress the downloaded Android firmware compressed package. In the decompressed file, the file ending with <div style="padding-left:200px;">[[File:Orange-pi-i96-img76.img" is the Android firmwarepng|600px]]<br/div>
<br>
5)Use * Click on the decompression software device manager to decompress PhoenixCard v4check the port number<div style="padding-left:200px;">[[File:Orange-pi-i96-img77.1.2.rar, this software does not need to be installed, just find PhoenixCard in the decompressed folder and open itpng|400px]]</div><div style="padding-left:200px;">[[File:Orange-pi-3ltsi96-phoenixcardimg78.png|600px400px]]</div>
<br>
6)After opening '''PhoenixCard''', if the TF card is recognized normally, the drive letter and capacity of the TF card will be displayed in the middle list.<span style="color:red;font-weight:700;"> Please make sure that the displayed drive letter is the same as the drive letter of the TF card you want to burn.</span> If There is no display, you can try to unplug the TF card<br><div style="padding-left:200px">[[File:Orange-pi-3lts-phoenixcard1.png|600px]]</div>75)After confirming the drive letter, first format the TF card, click the recovery card button in PhoenixCard, or use the Putty configuration'''SD Card Formatter''' mentioned above to format the TF card<br><div style="padding-left:200px">[[File:Orange-pi-3lts-phoenixcard2.png|600px]]</div>8)Then start to write the Android firmware to the TF card<br><div style="padding-left:20px;">a.First select the path of the Android '''firmware''' in the firmware column<br>b.Select '''boot card''' in the type of card to make<br>c.Then click the '''burn card''' button to start burning</div><div style="padding-left:200px">[[File:Orange-pi-3lts-phoenixcard3.png|600px]]</div>9) After burning, the display of PhoenixCard is as shown in the figure below. At this time, click the close button to exit PhoenixCard, and then you can pull out the TF card from the computer and insert it into the development board to start.<div style="padding-left:200px">[[File:Orange-pi-3ltsi96-phoenixcard4img79.png|600px400px]]</div>
<br>
=== ''' Start Serial port should set to the Orange Pi development board''' ===corresponding port number (COM5), the speed should set to 115200<br>
<br>
1)Insert the burned TF card into the TF card slot of the Orange Pi development board<br>2)The development board has an HDMI interface, and the development board can be connected to a TV or other HDMI display through an HDMI cable<br>3)Connect the USB mouse and keyboard to control the orange pi development board<br>4)The development board has an Ethernet port, which can be plugged into a network cable for Internet access<br>5)Connect a power adapter with 5V and at least 2A (3A is also possible)<br><div style="padding-left:20px;>a.Remember not to plug in the 12V power adapter, if the 12V power adapter is plugged in, it will burn out the development board<br>b.Many unstable phenomena during system power-on and startup are basically caused by power supply problems, so a reliable power adapter is very important</div>6)Then turn on the switch of the power adapter, if everything is normal, the HDMI display will be able to see the startup screen of the system at this time<br>7)If you want to view the output information of the system through the debug serial port, please use the serial cable to connect the development board to the computer. For the connection method of the serial port, please refer to the section on the use of the debug serial port<br> === '''How to use the 6)Start debug serial port''' ===<br> ==== '''Debug serial port connection instructions''' ====1)First, you need to prepare a USB to TTL module. This module can be bought in Power Orange Pi stores. If there are other similar USB to TTL moduleson and boot it, you can also insert the USB end of the USB to TTL module into the USB serial port of the computer<div style="padding-left:200px">[[File:Orange-pi-one-img9will automatic print out debug log.png|600px]]</div>2)The corresponding relationship between the debug serial port GND, TXD and RXD pins of the development board is shown in the figure below<div style="padding-left:200px100px;">[[File:Orange-pi-pci96-img4img80.png|600px]]</div>3)The GND, TXD and RXD pins of the USB to TTL module need to be connected to the debug serial port of the development board through a DuPont cable<br><div style="padding-left:20px">a. Connect the GND of the USB to TTL module to the GND of the development board<br>b. Connect the RXD of the USB to TTL module to the TXD of the development board<br>c. Connect the TXD of the USB to TTL module to the RXD of the development board</div>
<br>
4)The schematic diagram of connecting the USB to TTL module to the computer and the Orange Pi development board is shown below
<div style="padding-left:200px">[[File:Orange-pi-3lts-ttlmodule2.png|600px]]</div>
==== '''How to use the debugging serial port Operations on Ubuntu platformLinux''' ====1)If the USB to TTL module is connected normally, you can see the corresponding device node name under /dev of the Ubuntu PC, remember this node name, it will be used when setting the serial port software later<div style="background:#f1f1f1;border:1px solid #000">test@test:~$ '''ls /dev/ttyUSB*'''<br>/dev/ttyUSB0</div>
<br>
2)There are many Minicom and Kermit serial debugging tools that can be used under linuxfor Linux, such this section will take Kermit as putty, minicom, etcan example to have an illustrate. The following demonstrates how to use putty<br>
<br>
3)First install putty on the Ubuntu PC<div style="background:#f1f1f1;border:1px solid #000">test@test:~$ '''sudo apt update'''<br>test@test:~$ '''sudo apt -y install putty1)Install Kermit'''</div>
<br>
4)Then run putty, remember to add * Install the Kermit by execute command: $ sudo permissionsapt-get install ckermit<div style="background:#f1f1f1;border:1px solid #000">test@test[[File:~$ '''sudo putty'''Orange-pi-i96-img81.png|800px]]</div>
<br>
5)After executing the putty command, the following interface will pop up* Configurate Kermit $ sudo vi /etc/kermit/kermrc<div style="padding-left:200px">[[File:Orange-pi-3ltsi96-puttyimg82.png|600px800px]]</div>
<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 port<br>* Add lines:
<div style="padding-left:20px;">
a. Set the Serial set line to connect to to /dev/ttyUSB0 (modify to the corresponding node name, generally /dev/ttyUSB0)ttyUSB1<br>b. Set Speed (baud) to set speed 115200 (baud rate of the serial port)<br>c. Set Flow set carrier-watch off<br>set handshake none<br>set flow-control to Nonenone<br>robust<br>set file type bin<br>set file name lit<br>set rec pack 1000<br>set send pack 1000<br>set window 5
</div>
<div style="padding-left:200px;">[[File:Orange-pi-3ltsi96-putty2img83.png|600px]]</div>8<br>'''2)After setting Connect method for debug'''<br> Use the TTL to the serial port setting interfacecable, return one end connected to OrangePi, the other end connected to PC<br>'''3)Equipment information acquisition'''<br><br>$ ls /dev/ (Input command in the PC terminal to check the Session interfacedevice number of TTL to the serial cable)<div style="padding-left:20px100px;">[[File:Orange-pi-i96-img85.png|800px]]</div>a. First select the Connection type as Serial<br>b. Then click * It can be seen from the Open button to connect figure that TTL to the serial portcable is identified as ttyUSB0, configure the /ect/kermit/kermitc file, update the serial port information.<br> $ sudo vi /div>etc/kermit/kermitc* Set the value of setline into /dev/ttyUSB0<div style="padding-left:200px100px;">[[File:Orange-pi-3ltsi96-putty3img86.png|600px800px]]</div>
<br>
9)After starting the development board, you can see the Log information output by the system from the opened serial port terminal<div style="padding-left:200px">[[File:Orange-pi-3lts-putty4.png|600px]]</div> ==== '''How to use the debugging serial port on Windows platform4)Start debug''' ====
<br>
1)There are many serial debugging tools that can be used under Windows* Input command in the host computer terminal, such as SecureCRT, MobaXterm, etc. The following shows how to use MobaXterm. This software is free and can be used without purchasing a serial numberenter the Kermit mode: $ sudo kermit –c<div style="padding-left:100px;">[[File:Orange-pi-i96-img87.png|800px]]<br/div>
<br>
2)Download MobaXterm<br><div style="padding-left:20px;">a.Download * Power it on and boot Orange Pi, the serial port will automatic print debug log, the MobaXterm URL as follows</div> https:account and password ard root/orangepi and orangepi/mobaxterm.mobatek.net/orangepi<div style="padding-left:20px100px;">b.After entering the MobaXterm download page, click '''GET XOBATERM NOW!'''</div><div style="padding-left:200px">[[File:Orange-pi-3ltsi96-mobaxtermimg88.png|600px800px]]</div>
<br>
<div style="padding-left:20px;">c.Then choose to download the Home version</div><div style="padding-left:200px">[[File:Orange-pi-3lts-homeversion.png|600px]]</div><div style="padding-left:20px;">d.Then select the Portable version, after downloading, you don’t need to install it, just open it and you can use it</div><div style="padding-left:200px">[[File:Orange-pi-3lts-mobaxterm1.png|600px]]</div>3)After downloading, use the decompression software to decompress the downloaded compressed package, you can get the executable software of MobaXterm, and then double-click to open it<div style="padding-left:200px">[[File:Orange-pi-3lts-mobaxterm2.png|600px]]</div>4)After opening the software, the steps to set up the serial port connection are as follows<br><div style="padding-left:20px;">a. Open the session setting interface<br>b. Select the serial port type<br>c. Select the port number of the serial port (choose the corresponding port number according to the actual situation), if you can't see the port number, please use the <span style="color:#003aff">360 driver master</span> to scan and install the USB to TTL serial chip driver<br>d. Select the baud rate of the serial port to be 115200<br>e. Finally click the '''"OK"''' button to complete the setting</div><div style="padding-left:200px">[[File:Orange-pi-3lts-setupserialport.png|1000px]]</div>5)After clicking the '''"OK"''' button, you will enter the following interface, and you can see the output information of the serial port when you start the development board.<div style="padding-left:200px">[[File:Orange-pi-one-img11.png|1000px]]</div>For more information on using the Orange Pi PCPC2, please see the [http://localhost:8080/index.php?title=%E6%96%87%E4%BB%B6:Orange_Pi_PC_User_Manual.docx <span style="color:#ff003ared;">Orange Pi PC PC2 User Manual</span>]. (Click to download)