Difference between revisions of "Orange Pi Zero 3"
(→Supported linux image types and kernel versions) |
(→How to install Debian system) |
||
(350 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
== Hardware Features of Orange Pi Zero 3 == | == Hardware Features of Orange Pi Zero 3 == | ||
− | {| class="wikitable" style="width:800px;" | + | {| class="wikitable" style="width:800px;text-align: center;" |
|- | |- | ||
|colspan=2|<div style="text-align:center"><big>'''Introduction to hardware features'''</big></div> | |colspan=2|<div style="text-align:center"><big>'''Introduction to hardware features'''</big></div> | ||
Line 49: | Line 49: | ||
|- | |- | ||
| Onboard storage | | Onboard storage | ||
− | | | + | | micro SD card slot, 16MB SPI Flash |
|- | |- | ||
| Ethernet | | Ethernet | ||
Line 56: | Line 56: | ||
| WIFI+Bluetooth | | WIFI+Bluetooth | ||
| | | | ||
− | + | AW859A chip, support IEEE 802.11 a/b/g/n/ac, BT5.0 | |
|- | |- | ||
| Video Output | | Video Output | ||
| | | | ||
− | + | Micro HDMI 2.0a | |
− | + | TV CVBS output, support PAL/NTSC (via 13pin expansion board) | |
|- | |- | ||
| Audio output | | Audio output | ||
| | | | ||
− | + | Micro HDMI output | |
− | + | 3.5mm audio port (via 13pin expansion board) | |
|- | |- | ||
Line 76: | Line 76: | ||
|- | |- | ||
| USB 2.0 port | | USB 2.0 port | ||
− | | 3 USB 2.0 HOST (two of them are through 13pin expansion board) | + | | 3 * USB 2.0 HOST (two of them are through 13pin expansion board) |
|- | |- | ||
| 26pin connector | | 26pin connector | ||
Line 109: | Line 109: | ||
== Top view and bottom view of Orange Pi Zero 3 == | == Top view and bottom view of Orange Pi Zero 3 == | ||
− | <big>'''Top | + | <big>'''Top view:'''</big> |
− | [[File: | + | [[File:zero3-img3-1.png]] |
− | <big>'''Bottom | + | <big>'''Bottom view:'''</big> |
− | [[File: | + | [[File:zero3-img4.png]] |
<span id="interface-details-of-orange-pi-zero-3"></span> | <span id="interface-details-of-orange-pi-zero-3"></span> | ||
Line 121: | Line 121: | ||
== Interface details of Orange Pi Zero 3 == | == Interface details of Orange Pi Zero 3 == | ||
− | [[File: | + | [[File:zero3-img5.png]] |
− | [[File: | + | [[File:zero3-img6.png]] |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
Line 138: | Line 138: | ||
== Prepare the required accessories == | == Prepare the required accessories == | ||
− | # | + | # Micro SD card, a high-speed SanDisk card of class 10 or above with a minimum capacity of 8GB |
− | ::[[File: | + | ::[[File:zero3-img7.png]] |
::{| class="wikitable" style="background-color:#ffffdc;width:800px;" | ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
|- | |- | ||
| | | | ||
− | <big>'''Using other brands of | + | <big>'''Using other brands of micro SD cards (non-SanDisk micro SD cards), as shown in the picture below (including but not limited to these cards), some friends have reported that there will be problems during the system startup process, such as the system is stuck halfway through startup, Or the reboot command cannot be used normally, and it was finally resolved after changing the SanDisk micro SD card. So if you use a non-SanDisk micro SD card and find that there is a problem with the system startup or use, please replace the SanDisk micro SD card and then test.'''</big> |
− | [[File: | + | <p>[[File:zero3-img8.png|180px]][[File:zero3-img9.png|195px]][[File:zero3-img10.png|198px]][[File:zero3-img11-1.png|190px]]</p> |
− | '''Current feedback is that there are some | + | <p style="text-align: center;">'''Current feedback is that there are some micro SD cards that have problems starting on Orange Pi Zero 3'''</p> |
− | <big>'''In addition, the | + | <big>'''In addition, the micro SD card that can be used normally on other types of development boards does not guarantee that it can be started normally on Orange Pi Zero 3, please pay special attention to this point.'''</big> |
|} | |} | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li> | + | <li>micro SD card reader, used to read and write micro SD card</li> |
− | [[File: | + | [[File:zero3-img12.png]] |
</ol> | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li>Micro HDMI to HDMI cable, used to connect the development board to an HDMI monitor or TV for display</li> | <li>Micro HDMI to HDMI cable, used to connect the development board to an HDMI monitor or TV for display</li> | ||
− | [[File: | + | [[File:zero3-img13.png]] |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
Line 169: | Line 169: | ||
<big>'''Note, please do not use the relatively wide Micro HDMI adapter as shown in the figure below, because the distance between the Micro HDMI interface of the development board and the Type-C power interface is relatively small, it may cause that the two cannot be inserted into the development board at the same time. plate.'''</big> | <big>'''Note, please do not use the relatively wide Micro HDMI adapter as shown in the figure below, because the distance between the Micro HDMI interface of the development board and the Type-C power interface is relatively small, it may cause that the two cannot be inserted into the development board at the same time. plate.'''</big> | ||
− | [[File: | + | [[File:zero3-img14.png|center]] |
|} | |} | ||
</ol> | </ol> | ||
Line 175: | Line 175: | ||
<li>Power supply, if you have a 5V/2A or 5V/3A power head, you only need to prepare a USB-to-Type C interface data cable as shown in the picture on the left below, and you can also use a cable similar to the picture on the right below A 5V/2A or 5V/3A high-quality USB Typc C interface power adapter integrated with the power head.</li> | <li>Power supply, if you have a 5V/2A or 5V/3A power head, you only need to prepare a USB-to-Type C interface data cable as shown in the picture on the left below, and you can also use a cable similar to the picture on the right below A 5V/2A or 5V/3A high-quality USB Typc C interface power adapter integrated with the power head.</li> | ||
− | [[File: | + | [[File:zero3-img15.png]] [[File:zero3-img16.png]] |
</ol> | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
Line 182: | Line 182: | ||
<li>The physical object of the expansion board is as follows</li> | <li>The physical object of the expansion board is as follows</li> | ||
− | [[File: | + | [[File:zero3-img17-1.png]] |
</ol> | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
<li>The way to insert the expansion board into the development board is as follows, remember not to insert it backwards</li> | <li>The way to insert the expansion board into the development board is as follows, remember not to insert it backwards</li> | ||
− | [[File: | + | [[File:zero3-img18.png]] |
</ol> | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
Line 194: | Line 194: | ||
{| class="wikitable" style="width:800px;" | {| class="wikitable" style="width:800px;" | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 1 |
− | | style="text-align: | + | | style="text-align: center;"| Microphone (Mic) |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">No support, no support, no support! ! !</span><br /> |
<br /> | <br /> | ||
'''The 13pin expansion board is a general-purpose expansion board, which is suitable for various development boards of Orange Pi, but the 13pin interface of Orange Pi Zero3 has no Mic function, so although there is a Mic on the 13pin expansion board, it is on the Orange Pi Zero 3. Unusable, the 13pin expansion board is mainly used to expand functions other than Mic on Orange Pi Zero 3. | '''The 13pin expansion board is a general-purpose expansion board, which is suitable for various development boards of Orange Pi, but the 13pin interface of Orange Pi Zero3 has no Mic function, so although there is a Mic on the 13pin expansion board, it is on the Orange Pi Zero 3. Unusable, the 13pin expansion board is mainly used to expand functions other than Mic on Orange Pi Zero 3. | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 2 |
− | | style="text-align: | + | | style="text-align: center;"| Analog audio and video output interface |
− | | style="text-align: | + | | style="text-align: center;"| Supported, it can be used to connect headphones to play music, or connect to TV through AV cable to output analog audio and video signals '''(Android system only).''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 3 |
− | | style="text-align: | + | | style="text-align: center;"| USB 2.0 Host x 2 |
− | | style="text-align: | + | | style="text-align: center;"| Support, used to connect USB keyboard, mouse and USB storage device. |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 4 |
− | | style="text-align: | + | | style="text-align: center;"| Infrared receiving function |
− | | style="text-align: | + | | style="text-align: center;"| Support, Android system can be controlled by infrared remote control. |
|} | |} | ||
</ol> | </ol> | ||
Line 216: | Line 216: | ||
<li>The schematic diagram of the 13pin header of the Orange Pi Zero 3 development board is shown below</li> | <li>The schematic diagram of the 13pin header of the Orange Pi Zero 3 development board is shown below</li> | ||
− | [[File: | + | [[File:zero3-img19.png]] |
</ol> | </ol> | ||
</li></ol> | </li></ol> | ||
Line 223: | Line 223: | ||
<li><p>Infrared remote control, mainly used to control Android TV system</p></li> | <li><p>Infrared remote control, mainly used to control Android TV system</p></li> | ||
− | [[File: | + | [[File:zero3-img20.png]] |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
Line 235: | Line 235: | ||
<li><p>AV video cable, if you want to display video through the AV interface instead of the HDMI interface, then you need to connect the development board to the TV through the AV video cable</p></li> | <li><p>AV video cable, if you want to display video through the AV interface instead of the HDMI interface, then you need to connect the development board to the TV through the AV video cable</p></li> | ||
− | [[File: | + | [[File:zero3-img21.png]] |
</ol> | </ol> | ||
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
<li>Heat sink, if you are worried that the temperature of the development board is too high, you can add a heat sink, and the heat sink can be pasted on the H618 chip</li> | <li>Heat sink, if you are worried that the temperature of the development board is too high, you can add a heat sink, and the heat sink can be pasted on the H618 chip</li> | ||
− | [[File: | + | [[File:zero3-img22.png]] [[File:zero3-img23-1.png]] |
</ol> | </ol> | ||
<ol start="11" style="list-style-type: decimal;"> | <ol start="11" style="list-style-type: decimal;"> | ||
Line 251: | Line 251: | ||
|} | |} | ||
− | [[File: | + | [[File:zero3-img24-1.png]] |
</ol> | </ol> | ||
<ol start="12" style="list-style-type: decimal;"> | <ol start="12" style="list-style-type: decimal;"> | ||
Line 257: | Line 257: | ||
<li><p>USB to TTL module and DuPont line, when using the serial port debugging function, need USB to TTL module and DuPont line to connect the development board and computer</p></li> | <li><p>USB to TTL module and DuPont line, when using the serial port debugging function, need USB to TTL module and DuPont line to connect the development board and computer</p></li> | ||
− | [[File: | + | [[File:zero3-img25-1.png]] [[File:zero3-img26.png]] |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
Line 270: | Line 270: | ||
{| class="wikitable" style="width:800px;" | {| class="wikitable" style="width:800px;" | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 1 |
− | | style="text-align: | + | | style="text-align: center;"| Ubuntu22.04 PC |
− | | style="text-align: | + | | style="text-align: center;"| Optional, used to compile Android and Linux source code |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 2 |
− | | style="text-align: | + | | style="text-align: center;"| Windows PC |
− | | style="text-align: | + | | style="text-align: center;"| For burning Android and Linux images |
|} | |} | ||
</ol> | </ol> | ||
Line 294: | Line 294: | ||
<li><p>The information mainly includes</p> | <li><p>The information mainly includes</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''Android''' '''source code''' | + | <li><p>'''Android''' '''source code''': Save on Google Drive</p></li> |
− | <li><p>'''Linux''' '''source code''' | + | <li><p>'''Linux''' '''source code''':Save on Github</p></li> |
− | <li><p>'''Android''' '''source code''' | + | <li><p>'''Android''' '''source code''':Save on Google Drive</p></li> |
− | <li><p>'''Ubuntu''' '''source code''' | + | <li><p>'''Ubuntu''' '''source code''':Save on Google Drive</p></li> |
− | <li><p>'''Debian''' '''source code''' | + | <li><p>'''Debian''' '''source code''':Save on Google Drive</p></li> |
− | <li><p>'''User Manual and | + | <li><p>'''User Manual and Schematic:'''Chip-related data sheets will also be placed here</p></li> |
− | <li><p>'''Official | + | <li><p>'''Official tool:'''It mainly includes the software that needs to be used during the use of the development board</p></li></ol> |
</li></ol> | </li></ol> | ||
<span id="method-of-burning-linux-image-to-tf-card-based-on-windows-pc"></span> | <span id="method-of-burning-linux-image-to-tf-card-based-on-windows-pc"></span> | ||
− | == Method of burning Linux image to | + | == Method of burning Linux image to micro SD card based on Windows PC == |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
|- | |- | ||
| | | | ||
− | <big>'''Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the Orange Pi data download page.'''</big> | + | <big>'''Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html Orange Pi data download page].'''</big> |
|} | |} | ||
Line 316: | Line 316: | ||
=== How to use balenaEtcher to burn Linux image === | === How to use balenaEtcher to burn Linux image === | ||
− | # First prepare a | + | # First prepare a micro SD card with a capacity of 8GB or more. The transmission speed of the micro SD card must be '''class 10 or above'''. It is recommended to use a micro SD card of SanDisk and other brands |
− | # Then use the card reader to insert the | + | # Then use the card reader to insert the micro SD card into the computer |
− | # Download the Linux operating system image file compression package that you want to burn from the Orange Pi data download page, and then use the decompression software to decompress it. Among the decompressed files, the file ending with ".img" is the image file of the operating system. The size is generally more than 1GB | + | # Download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with ".img" is the image file of the operating system. The size is generally more than 1GB |
# Then download the burning software of Linux image——'''balenaEtcher,''' the download address is | # Then download the burning software of Linux image——'''balenaEtcher,''' the download address is | ||
Line 330: | Line 330: | ||
<li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li> | <li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li> | ||
− | [[File: | + | [[File:zero3-img27.png]] |
</ol> | </ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
<li>Then you can choose to download the Portable version of balenaEtcher software. The Portable version does not need to be installed, and you can use it by double-clicking to open it</li> | <li>Then you can choose to download the Portable version of balenaEtcher software. The Portable version does not need to be installed, and you can use it by double-clicking to open it</li> | ||
− | [[File: | + | [[File:zero3-img28.png]] |
</ol> | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
<li>If the downloaded version of balenaEtcher needs to be installed, please install it before using it. If you downloaded the Portable version of balenaEtcher, just double-click to open it. The opened balenaEtcher interface is shown in the figure below</li> | <li>If the downloaded version of balenaEtcher needs to be installed, please install it before using it. If you downloaded the Portable version of balenaEtcher, just double-click to open it. The opened balenaEtcher interface is shown in the figure below</li> | ||
− | [[File: | + | [[File:zero3-img29.png]] |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
Line 347: | Line 347: | ||
<big>'''When opening balenaEtcher, if the following error is prompted:'''</big> | <big>'''When opening balenaEtcher, if the following error is prompted:'''</big> | ||
− | [[File: | + | [[File:zero3-img30.png|center]] |
<big>'''Please select balenaEtcher, right-click, and select Run as administrator.'''</big> | <big>'''Please select balenaEtcher, right-click, and select Run as administrator.'''</big> | ||
− | [[File: | + | [[File:zero3-img31-1.png|center]] |
|} | |} | ||
</ol> | </ol> | ||
Line 358: | Line 358: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>First select the path of the Linux image file to be burned</p></li> | <li><p>First select the path of the Linux image file to be burned</p></li> | ||
− | <li><p>Then select the drive letter of the | + | <li><p>Then select the drive letter of the micro SD card</p></li> |
− | <li><p>Finally click Flash to start burning the Linux image to the | + | <li><p>Finally click Flash to start burning the Linux image to the micro SD card</p> |
− | [[File: | + | [[File:zero3-img32.png]] |
</li></ol> | </li></ol> | ||
</li> | </li> | ||
− | <li><p>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the | + | <li><p>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the micro SD card</p></li> |
− | [[File: | + | [[File:zero3-img33.png]] |
</ol> | </ol> | ||
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
− | <li>After burning the Linux image, balenaEtcher will also verify the image burned to the | + | <li>After burning the Linux image, balenaEtcher will also verify the image burned to the micro SD card by default to ensure that there is no problem in the burning process. As shown in the figure below, a green progress bar indicates that the image has been burnt, and balenaEtcher is verifying the burnt image.</li> |
− | [[File: | + | [[File:zero3-img34.png]] |
</ol> | </ol> | ||
<ol start="11" style="list-style-type: decimal;"> | <ol start="11" style="list-style-type: decimal;"> | ||
− | <li>After successful burning, the display interface of balenaEtcher is as shown in the figure below. If the green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the | + | <li>After successful burning, the display interface of balenaEtcher is as shown in the figure below. If the green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the micro SD card and insert it into the micro SD card slot of the development board. .</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img35.png]] |
</div></ol> | </div></ol> | ||
Line 385: | Line 385: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First prepare a | + | <li><p>First prepare a micro SD card with a capacity of 8GB or more. The transmission speed of the micro SD card must be '''class 10 or above'''. It is recommended to use a micro SD card of SanDisk and other brands</p></li> |
− | <li><p>Then use the card reader to insert the | + | <li><p>Then use the card reader to insert the micro SD card into the computer</p></li> |
− | <li><p>Then format the | + | <li><p>Then format the micro SD card</p> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>'''SD Card Formatter'''can be used to format the | + | <li>'''SD Card Formatter''' can be used to format the micro SD card. The download link is</li> |
{| class="wikitable" style="width:800px;" | {| class="wikitable" style="width:800px;" | ||
Line 399: | Line 399: | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
<li><p>After downloading, unzip and install directly, and then open the software</p></li> | <li><p>After downloading, unzip and install directly, and then open the software</p></li> | ||
− | <li><p>If only a | + | <li><p>If only a micro SD card is inserted into the computer, the drive letter of the micro SD card will be displayed in the " '''Select card''' " column. If multiple USB storage devices are inserted into the computer, you can select the corresponding drive letter of the micro SD card through the drop-down box</p></li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img36.png]] |
</div></ol> | </div></ol> | ||
Line 409: | Line 409: | ||
<li>Then click " '''Format''' ", a warning box will pop up before formatting, and formatting will start after selecting "Yes (Y)"</li> | <li>Then click " '''Format''' ", a warning box will pop up before formatting, and formatting will start after selecting "Yes (Y)"</li> | ||
− | [[File: | + | [[File:zero3-img37.png]] |
</ol> | </ol> | ||
<ol start="5" style="list-style-type: lower-alpha;"> | <ol start="5" style="list-style-type: lower-alpha;"> | ||
− | <li>After formatting the | + | <li>After formatting the micro SD card, the message shown in the figure below will pop up, click OK</li> |
− | [[File: | + | [[File:zero3-img38.png]] |
</ol> | </ol> | ||
</li></ol> | </li></ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li><p>Download the Linux operating system image file compression package that you want to burn from the Orange Pi data download page, and then use the decompression software to decompress it. Among the decompressed files, the file ending with ".img" is the image file of the operating system. The size is generally more than 1GB</p></li> | + | <li><p>Download the Linux operating system image file compression package that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with ".img" is the image file of the operating system. The size is generally more than 1GB</p></li> |
− | <li><p>Use Win32Diskimager to burn the Linux image to the | + | <li><p>Use Win32Diskimager to burn the Linux image to the micro SD card</p> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li>The download page of Win32Diskimager is</li> | <li>The download page of Win32Diskimager is</li> | ||
Line 433: | Line 433: | ||
<ol style="list-style-type: none;"> | <ol style="list-style-type: none;"> | ||
<li><p>a) First select the path of the image file</p></li> | <li><p>a) First select the path of the image file</p></li> | ||
− | <li><p>b) Then confirm that the drive letter of the | + | <li><p>b) Then confirm that the drive letter of the micro SD card is consistent with that displayed in the "'''Device'''" column</p></li> |
<li><p>c) Finally click "'''Write'''" to start burning</p></li> | <li><p>c) Finally click "'''Write'''" to start burning</p></li> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img39.png]] |
</div></ol> | </div></ol> | ||
</li></ol> | </li></ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li>After the image writing is completed, click the "'''Exit'''" button to exit, and then you can pull out the | + | <li>After the image writing is completed, click the "'''Exit'''" button to exit, and then you can pull out the micro SD card and insert it into the development board to start</li></ol> |
</li></ol> | </li></ol> | ||
<span id="method-of-burning-linux-image-to-tf-card-based-on-ubuntu-pc"></span> | <span id="method-of-burning-linux-image-to-tf-card-based-on-ubuntu-pc"></span> | ||
− | == Method of burning Linux image to | + | == Method of burning Linux image to micro SD card based on Ubuntu PC == |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
|- | |- | ||
| | | | ||
− | <big>'''Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the Orange Pi data download page, and the Ubuntu PC refers to the personal computer with the Ubuntu system installed.'''</big> | + | <big>'''Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html Orange Pi data download page], and the Ubuntu PC refers to the personal computer with the Ubuntu system installed.'''</big> |
|} | |} | ||
− | # First prepare a | + | # First prepare a micro SD card with a capacity of 8GB or more. The transmission speed of the micro SD card must be '''class 10 or above'''. It is recommended to use a micro SD card of SanDisk and other brands |
− | # Then use the card reader to insert the | + | # Then use the card reader to insert the micro SD card into the computer |
# Download the balenaEtcher software, the download address is | # Download the balenaEtcher software, the download address is | ||
Line 467: | Line 467: | ||
<li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li> | <li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li> | ||
− | [[File: | + | [[File:zero3-img27.png]] |
</ol> | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li>Then choose to download the Linux version of the software</li> | <li>Then choose to download the Linux version of the software</li> | ||
− | [[File: | + | [[File:zero3-img40.png]] |
</ol> | </ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
− | <li>Download the image file compression package of the Linux operating system that you want to burn from the '''Orange Pi data download page''', and then use the decompression software to decompress it. Among the decompressed files, the file ending with "'''.img'''" is the image file of the operating system. The size is generally above 1GB. The decompression command for the compressed package ending in 7z is as follows:</li> | + | <li>Download the image file compression package of the Linux operating system that you want to burn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with "'''.img'''" is the image file of the operating system. The size is generally above 1GB. The decompression command for the compressed package ending in 7z is as follows:</li> |
{| class="wikitable" style="width:800px;" | {| class="wikitable" style="width:800px;" | ||
Line 490: | Line 490: | ||
</ol> | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>After decompressing the image, you can first use the '''sha256sum -c *.sha''' command to calculate whether the checksum is correct. If the prompt is successful, it means that the downloaded image is correct, and you can safely burn it to the | + | <li>After decompressing the image, you can first use the '''sha256sum -c *.sha''' command to calculate whether the checksum is correct. If the prompt is successful, it means that the downloaded image is correct, and you can safely burn it to the micro SD card. '''If it prompts that the checksum does not match''', it means there is a problem with the downloaded image, please try to download again</li> |
{| class="wikitable" style="width:800px;" | {| class="wikitable" style="width:800px;" | ||
Line 503: | Line 503: | ||
<li>Then double-click '''balenaEtcher-1.14.3-x64.AppImage''' on the graphical interface of Ubuntu PC to open balenaEtcher (no installation required), and the interface after balenaEtcher is opened is displayed as shown in the figure below</li> | <li>Then double-click '''balenaEtcher-1.14.3-x64.AppImage''' on the graphical interface of Ubuntu PC to open balenaEtcher (no installation required), and the interface after balenaEtcher is opened is displayed as shown in the figure below</li> | ||
− | [[File: | + | [[File:zero3-img41.png]] |
</ol> | </ol> | ||
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
Line 509: | Line 509: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>First select the path of the Linux image file to be burned</p></li> | <li><p>First select the path of the Linux image file to be burned</p></li> | ||
− | <li><p>Then select the drive letter of the | + | <li><p>Then select the drive letter of the micro SD card</p></li> |
− | <li><p>Finally click Flash to start burning the Linux image to the | + | <li><p>Finally click Flash to start burning the Linux image to the micro SD card</p></li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img32.png]] |
</div></ol> | </div></ol> | ||
</li></ol> | </li></ol> | ||
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
− | <li>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the | + | <li>The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the micro SD card</li> |
− | [[File: | + | [[File:zero3-img42.png]] |
</ol> | </ol> | ||
<ol start="11" style="list-style-type: decimal;"> | <ol start="11" style="list-style-type: decimal;"> | ||
− | <li>After burning the Linux image, balenaEtcher will also verify the image burned into the | + | <li>After burning the Linux image, balenaEtcher will also verify the image burned into the micro SD card by default to ensure that there is no problem in the burning process. As shown in the figure below, a green progress bar indicates that the image has been burnt, and balenaEtcher is verifying the burnt image</li> |
− | [[File: | + | [[File:zero3-img43.png]] |
</ol> | </ol> | ||
<ol start="12" style="list-style-type: decimal;"> | <ol start="12" style="list-style-type: decimal;"> | ||
− | <li>After successful burning, the display interface of balenaEtcher is as shown in the figure below. If a green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the | + | <li>After successful burning, the display interface of balenaEtcher is as shown in the figure below. If a green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the micro SD card and insert it into the micro SD card slot of the development board for use</li> |
− | [[File: | + | [[File:zero3-img44.png]] |
</ol> | </ol> | ||
<span id="how-to-burn-android-image-to-tf-card"></span> | <span id="how-to-burn-android-image-to-tf-card"></span> | ||
− | == How to burn Android image to | + | == How to burn Android image to micro SD card == |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
|- | |- | ||
| | | | ||
− | <big>'''The Android image of the development board can only be burned into the | + | <big>'''The Android image of the development board can only be burned into the micro SD card under the Windows platform using the <span style="color:#FF0000">PhoenixCard</span> software, and the version of the PhoenixCard software must be <span style="color:#FF0000">PhonixCard-4.2.8</span>.''' |
'''Please do not use software for burning Linux images, such as Win32Diskimager or balenaEtcher, to burn Android images.''' | '''Please do not use software for burning Linux images, such as Win32Diskimager or balenaEtcher, to burn Android images.''' | ||
− | '''In addition, the PhoenixCard software does not have versions for Linux and Mac platforms, so it is impossible to burn Android images to | + | '''In addition, the PhoenixCard software does not have versions for Linux and Mac platforms, so it is impossible to burn Android images to micro SD cards under Linux and Mac platforms.'''</big> |
|} | |} | ||
# First, please make sure that the Windows system has installed '''Microsoft Visual C++ 2008 Redistrbutable - x86''' | # First, please make sure that the Windows system has installed '''Microsoft Visual C++ 2008 Redistrbutable - x86''' | ||
− | ::[[File: | + | ::[[File:zero3-img45.png]] |
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>If not installed '''Microsoft Visual C++ 2008 Redistrbutable - x86''', Using PhoenixCard to format | + | <li>If not installed '''Microsoft Visual C++ 2008 Redistrbutable - x86''', Using PhoenixCard to format micro SD card or burn Android image will prompt the following error</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img46.png]] |
</div></ol> | </div></ol> | ||
Line 562: | Line 562: | ||
<li>'''Microsoft Visual C++ 2008 Redistrbutable - x86''' the installation package can be downloaded from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''official tool'''] of Orange Pi Zero 3, or you can go to the [https://www.microsoft.com/zh-cn/download/details.aspx?id=26368 '''official website of Microsoft'''] to download</li> | <li>'''Microsoft Visual C++ 2008 Redistrbutable - x86''' the installation package can be downloaded from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''official tool'''] of Orange Pi Zero 3, or you can go to the [https://www.microsoft.com/zh-cn/download/details.aspx?id=26368 '''official website of Microsoft'''] to download</li> | ||
− | [[File: | + | [[File:zero3-img47.png]] [[File:zero3-img48.png]] |
</ol> | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li><p>Then prepare a | + | <li><p>Then prepare a micro SD card with 8GB or larger capacity. The transmission speed of the micro SD card must be '''class 10 or above'''. It is recommended to use a micro SD card of SanDisk and other brands</p></li> |
− | <li><p>Then use the card reader to insert the | + | <li><p>Then use the card reader to insert the micro SD card into the computer</p></li> |
<li><p>Download the Android image and PhoenixCard programming tool from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page''']. '''<span style="color:#FF0000">Please ensure that the version of the PhonenixCrad tool is PhonixCard-4.2.8.</span>''' Please do not use the PhonixCard software version lower than 4.2.8 to burn the Android image. There may be problems with the Android image flashed by this version of the PhonixCard tool</p></li> | <li><p>Download the Android image and PhoenixCard programming tool from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''Orange Pi data download page''']. '''<span style="color:#FF0000">Please ensure that the version of the PhonenixCrad tool is PhonixCard-4.2.8.</span>''' Please do not use the PhonixCard software version lower than 4.2.8 to burn the Android image. There may be problems with the Android image flashed by this version of the PhonixCard tool</p></li> | ||
− | [[File: | + | [[File:zero3-img49-1.png]] |
</ol> | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>Then use | + | <li>Then use decompression software to decompress '''PhonixCard4.2.8.zip''', this software does not need to be installed, just find PhoenixCard in the decompressed folder and open it</li> |
− | [[File: | + | [[File:zero3-img51.png]] |
</ol> | </ol> | ||
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
− | <li> | + | <li>After opening PhoenixCard, if the micro SD card is recognized normally, the drive letter and capacity of the micro SD card will be displayed in the middle list. '''<span style="color:#FF0000">Please make sure that the displayed drive letter is consistent with the drive letter of the micro SD card you want to burn</span>'''. If there is no display, you can try to unplug the micro SD card, or click the "'''Refresh Drive Letter'''" button in PhoenixCard</li> |
− | [[File: | + | [[File:zero3-img52-1.png]] |
</ol> | </ol> | ||
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
− | + | <li>After confirming the drive letter, format the micro SD card first, and click the "'''Recover Card'''" button in PhoenixCard (if the "'''Recover Card'''" button is gray and cannot be pressed, you can first click the "'''Refresh Drive Letter'''" button)</li> | |
− | |||
− | |||
− | |||
− | |||
− | <li>After confirming the drive letter, format the | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img53.png]] |
</div> | </div> | ||
Line 597: | Line 592: | ||
|- | |- | ||
| | | | ||
− | <big>'''If there is a problem with formatting, please try to unplug and insert the | + | <big>'''If there is a problem with formatting, please try to unplug and insert the micro SD card and then test again. If the problem still exists after re-plugging and inserting the micro SD card, you can restart the Windows computer or try another computer.'''</big> |
|} | |} | ||
</ol> | </ol> | ||
− | <ol start=" | + | <ol start="10" style="list-style-type: decimal;"> |
− | <li><p>Then start to write the Android image into the | + | <li><p>Then start to write the Android image into the micro SD card</p> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>First select the path of the Android image in the "'''Firmware'''" column</p></li> | <li><p>First select the path of the Android image in the "'''Firmware'''" column</p></li> | ||
Line 607: | Line 602: | ||
<li><p>Then click the "'''burn card'''" button to start burning</p></li> | <li><p>Then click the "'''burn card'''" button to start burning</p></li> | ||
− | [[File: | + | [[File:zero3-img54-1.png]] |
</ol> | </ol> | ||
</li></ol> | </li></ol> | ||
− | <ol start=" | + | <ol start="11" style="list-style-type: decimal;"> |
− | <li>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 | + | <li>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 micro SD card from the computer and insert it into the development board to start</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img55-1.png]] |
</div> | </div> | ||
Line 622: | Line 617: | ||
|- | |- | ||
| | | | ||
− | <big>'''After burning the Android system, the | + | <big>'''After burning the Android system, the micro SD card can only see a 128 MB partition in Windows, and the displayed partition is as shown in the figure below (some computers may pop up more than 20 disk partitions, but only the 128 MB partition can be opened. partition), please note that this is normal, please do not think that the micro SD card is burned out. The reason for this is that the Android system has a total of more than 20 partitions, but most of them cannot be recognized normally in the Windows system. At this point, please safely unplug the micro SD card and insert it into the development board to start it.'''</big> |
− | [[File: | + | [[File:zero3-img56.png|center]] |
− | <big>'''After the Android system starts, use the following command to see the twenty or so partitions in the | + | <big>'''After the Android system starts, use the following command to see the twenty or so partitions in the micro SD card:'''</big> |
− | [[File: | + | [[File:zero3-img57.png|center]] |
− | <big>'''Use the df -h command to see that the 16GB | + | <big>'''Use the df -h command to see that the 16GB micro SD card has about 11 GB of space available after burning the Android system (more than 20 partitions will not be mounted to the Android system, focus on these to the partition).'''</big> |
− | [[File: | + | [[File:zero3-img58.png|center]] |
|} | |} | ||
</ol> | </ol> | ||
Line 641: | Line 636: | ||
There is a 16MB SPI Flash on the development board, and its location is shown in the figure below: | There is a 16MB SPI Flash on the development board, and its location is shown in the figure below: | ||
− | [[File: | + | [[File:zero3-img59-1.png]] |
− | There is a tiny linux system programmed into SPI Flash by default, which is mainly used to prove that the development board can start normally. When you get the development board, you don't need to burn the system into the | + | There is a tiny linux system programmed into SPI Flash by default, which is mainly used to prove that the development board can start normally. When you get the development board, you don't need to burn the system into the micro SD card, you only need to connect the Type-C power supply to the development board to start the micro linux system in the SPI Flash. The main functions of this system are: |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
Line 651: | Line 646: | ||
− | <p>Due to the limited functions of the tiny linux system in SPI Flash, if you want to use all the functions of the development board normally, please burn the linux image or Android image to the | + | <p>Due to the limited functions of the tiny linux system in SPI Flash, if you want to use all the functions of the development board normally, please burn the linux image or Android image to the micro SD card, and then use it.</p> |
<span id="start-the-orange-pi-development-board"></span> | <span id="start-the-orange-pi-development-board"></span> | ||
Line 657: | Line 652: | ||
== Start the Orange Pi development board == | == Start the Orange Pi development board == | ||
− | # Insert the | + | # Insert the micro SD card with the burned image into the micro SD card slot of the Orange Pi development board |
# The development board has a Micro HDMI interface, and the development board can be connected to a TV or HDMI display through a Micro HDMI to HDMI cable | # The development board has a Micro HDMI interface, and the development board can be connected to a TV or HDMI display through a Micro HDMI to HDMI cable | ||
# If you have purchased a 13pin expansion board, you can plug the 13pin expansion board into the 13pin interface of the development board | # If you have purchased a 13pin expansion board, you can plug the 13pin expansion board into the 13pin interface of the development board | ||
Line 664: | Line 659: | ||
# Connect a high-quality power adapter with a 5V/2A (5V/3A is also available) USB Type C interface | # Connect a high-quality power adapter with a 5V/2A (5V/3A is also available) USB Type C interface | ||
− | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | + | ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |
|- | |- | ||
| | | | ||
Line 688: | Line 683: | ||
<div class="figure"> | <div class="figure"> | ||
− | ::[[File: | + | ::[[File:zero3-img60-1.png]] |
</div> | </div> | ||
Line 694: | Line 689: | ||
<li>The corresponding relationship between GND, TX and RX pins of the debugging serial port of the development board is shown in the figure below</li> | <li>The corresponding relationship between GND, TX and RX pins of the debugging serial port of the development board is shown in the figure below</li> | ||
− | [[File: | + | [[File:zero3-img61-1.png]] |
</ol> | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
Line 705: | Line 700: | ||
<li><p>The schematic diagram of connecting the USB to TTL module to the computer and the Orange Pi development board is as follows</p></li> | <li><p>The schematic diagram of connecting the USB to TTL module to the computer and the Orange Pi development board is as follows</p></li> | ||
− | [[File: | + | [[File:zero3-img62.png]] |
{| class="wikitable" style="background-color:#ffffdc;width:800px;" | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
Line 756: | Line 751: | ||
<li>After executing the putty command, the following interface will pop up</li> | <li>After executing the putty command, the following interface will pop up</li> | ||
− | [[File: | + | [[File:zero3-img63.png]] |
</ol> | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
Line 763: | Line 758: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img64.png]] |
</div></ol> | </div></ol> | ||
Line 775: | Line 770: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img65-1.png]] |
</div></ol> | </div></ol> | ||
Line 787: | Line 782: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img66.png]] |
</div></ol> | </div></ol> | ||
Line 794: | Line 789: | ||
<li>Then start the development board, and you can see the Log information output by the system from the opened serial port terminal</li> | <li>Then start the development board, and you can see the Log information output by the system from the opened serial port terminal</li> | ||
− | [[File: | + | [[File:zero3-img67.png]] |
</ol> | </ol> | ||
<span id="how-to-use-the-debugging-serial-port-on-windows-platform"></span> | <span id="how-to-use-the-debugging-serial-port-on-windows-platform"></span> | ||
Line 820: | Line 815: | ||
<li>After entering the MobaXterm download page, click '''GET XOBATERM NOW!'''</li> | <li>After entering the MobaXterm download page, click '''GET XOBATERM NOW!'''</li> | ||
− | [[File: | + | [[File:zero3-img68.png]] |
</ol> | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
<li>Then choose to download the Home version</li> | <li>Then choose to download the Home version</li> | ||
− | [[File: | + | [[File:zero3-img69.png]] |
</ol> | </ol> | ||
<ol start="4" style="list-style-type: lower-alpha;"> | <ol start="4" style="list-style-type: lower-alpha;"> | ||
Line 832: | Line 827: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img70.png]] |
</div></ol> | </div></ol> | ||
Line 839: | Line 834: | ||
<li>After downloading, use decompression software to decompress the downloaded compressed package, you can get the executable software of MobaXterm, and then double-click to open</li> | <li>After downloading, use decompression software to decompress the downloaded compressed package, you can get the executable software of MobaXterm, and then double-click to open</li> | ||
− | [[File: | + | [[File:zero3-img71.png]] |
</ol> | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
Line 852: | Line 847: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img72.png]] |
</div></ol> | </div></ol> | ||
Line 861: | Line 856: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img73.png]] |
</div></ol> | </div></ol> | ||
Line 878: | Line 873: | ||
<div class="figure"> | <div class="figure"> | ||
− | ::[[File: | + | ::[[File:zero3-img74.png]] |
</div> | </div> | ||
Line 892: | Line 887: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The USB A port of the power cord shown in the above figure needs to be plugged into the 5V/2A or 5V/3A power adapter connector ('''it is not recommended to plug into the USB port of the computer for power supply. If there are too many peripherals connected to the development board, use will be unstable''')</p></li> | <li><p>The USB A port of the power cord shown in the above figure needs to be plugged into the 5V/2A or 5V/3A power adapter connector ('''it is not recommended to plug into the USB port of the computer for power supply. If there are too many peripherals connected to the development board, use will be unstable''')</p></li> | ||
− | <li><p>The red DuPont | + | <li><p>The red DuPont wire needs to be plugged into the 5V pin of the 26pin or 13pin interface of the development board</p></li> |
<li><p>The black Dupont wire needs to be inserted into the GND pin of the 26pin or 13pin interface</p></li> | <li><p>The black Dupont wire needs to be inserted into the GND pin of the 26pin or 13pin interface</p></li> | ||
<li><p>The positions of the 5V pin and GND pin of the 26pin and 13pin interfaces in the development board are shown in the figure below'''<span style="color:#FF0000">, remember not to reverse the connection.</span>'''</p></li> | <li><p>The positions of the 5V pin and GND pin of the 26pin and 13pin interfaces in the development board are shown in the figure below'''<span style="color:#FF0000">, remember not to reverse the connection.</span>'''</p></li> | ||
− | [[File: | + | [[File:zero3-img24-1.png]] |
</ol> | </ol> | ||
</li></ol> | </li></ol> | ||
Line 905: | Line 900: | ||
# If you have purchased a 13pin expansion board for Orange Pi, insert the expansion board into the 13pin interface of the development board to expand 2 USB interfaces | # If you have purchased a 13pin expansion board for Orange Pi, insert the expansion board into the 13pin interface of the development board to expand 2 USB interfaces | ||
− | ::[[File: | + | ::[[File:zero3-img18.png]] |
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
<li><p>If there is no 13pin expansion board, you can use a 4pin 2.54mm DuPont to USB2.0 female cable to expand the USB interface. The specific method is as follows:</p> | <li><p>If there is no 13pin expansion board, you can use a 4pin 2.54mm DuPont to USB2.0 female cable to expand the USB interface. The specific method is as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>First, you need to prepare a 4pin 2.54mm Dupont to USB2.0 female cable (this cable can be bought on | + | <li>First, you need to prepare a 4pin 2.54mm Dupont to USB2.0 female cable (this cable can be bought on Amazon, please search and buy by yourself), as shown in the figure below:</li> |
− | [[File: | + | [[File:zero3-img75-1.png]] [[File:zero3-img76.png]] |
</ol> | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
<li>The schematic diagram of the 13pin interface is shown below</li> | <li>The schematic diagram of the 13pin interface is shown below</li> | ||
− | [[File: | + | [[File:zero3-img19.png]] [[File:zero3-img77.png]] |
</ol> | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
<li>The wiring of USB2 is as follows</li> | <li>The wiring of USB2 is as follows</li> | ||
− | [[File: | + | [[File:zero3-img78.png]] |
</ol> | </ol> | ||
<ol start="4" style="list-style-type: lower-alpha;"> | <ol start="4" style="list-style-type: lower-alpha;"> | ||
<li>The wiring of USB3 is as follows</li> | <li>The wiring of USB3 is as follows</li> | ||
− | [[File: | + | [[File:zero3-img79.png]] |
</ol> | </ol> | ||
<ol start="5" style="list-style-type: lower-alpha;"> | <ol start="5" style="list-style-type: lower-alpha;"> | ||
<li>If you need to connect two USB devices to the 13pin interface at the same time, you will find that the 5V and GND pins on the 13pin interface are not enough. At this time, one of the USB devices can use the 5V and GND pins in the 26pin interface. The location is as shown in the figure below Shown:</li> | <li>If you need to connect two USB devices to the 13pin interface at the same time, you will find that the 5V and GND pins on the 13pin interface are not enough. At this time, one of the USB devices can use the 5V and GND pins in the 26pin interface. The location is as shown in the figure below Shown:</li> | ||
− | [[File: | + | [[File:zero3-img24-1.png]] |
</ol> | </ol> | ||
</li></ol> | </li></ol> | ||
Line 944: | Line 939: | ||
{| class="wikitable" style="width:800px;" | {| class="wikitable" style="width:800px;" | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Linux image type''' |
− | | style="text-align: | + | | style="text-align: center;"| '''kernel version''' |
− | | style="text-align: | + | | style="text-align: center;"| '''server version''' |
− | | style="text-align: | + | | style="text-align: center;"| '''desktop version''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Ubuntu 20.04 - Focal''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux5.4''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Ubuntu 22.04 - Focal''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux5.4''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Debian 11 - Bullseye''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux5.4''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Ubuntu 22.04 - Jammy''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux6.1''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Debian 11 - Bullseye''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux6.1''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Debian 12 - Bookworm''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux6.1''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Support''' |
|} | |} | ||
− | After entering the download page of the corresponding development board on the Orange Pi data download page, you can see the following download options. In the description below, the Ubuntu image and the Debian image are generally referred to as the Linux image. | + | After entering the download page of the corresponding development board on [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''the Orange Pi data download page'''], you can see the following download options. In the description below, the Ubuntu image and the Debian image are generally referred to as the Linux image. |
− | [[File: | + | [[File:zero3-img80.png]] |
The naming rules of Linux images are as follows: | The naming rules of Linux images are as follows: | ||
Line 993: | Line 988: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''The model of the development board''' | + | <li><p>'''The model of the development board''':Both are '''orangepizero3'''. The model names of different development boards are generally different. Before burning the image, please make sure that the model name of the selected image matches the development board.</p></li> |
− | <li><p>'''Version number''' | + | <li><p>'''Version number''':For example, '''1.x.x''', this version number will increase with the update of the image function, and the last number of the version number of the Linux image on the development board is an even number.</p></li> |
− | <li><p>'''Types of Linux distributions''' | + | <li><p>'''Types of Linux distributions''': '''Ubuntu''' and '''Debian''' are currently supported. Since Ubuntu is derived from Debian, there is not much difference between the two systems in terms of usage. However, there are still some differences in the default configuration of some software and the use of commands. In addition, both Ubuntu and Debian have their own software warehouses supported by maintenance, and there are also some differences in the supported and installable software packages. These need to be experienced in person to have a deeper understanding. For more details, you can refer to the official documentation provided by Ubuntu and Debian.</p></li> |
− | <li><p>'''Release code name''' | + | <li><p>'''Release code name''': Used to distinguish between different versions of a specific Linux distribution such as Ubuntu or Debian. Among them, both '''focal''' and '''jammy''' are Ubuntu distributions, focal means Ubuntu20.04, and jammy means Ubuntu22.04. The biggest difference between different versions is that the software in the software warehouse maintained by the new version of Ubuntu system is much better than that of the old version of Ubuntu system. The ones in it should be new, such as Python and GCC compilation tool chains. '''bullseye''' is the specific version code of Debian, bullseye means Debian11, and bookworm means Debian12.</p></li> |
− | <li><p>'''Server or Desktop''' | + | <li><p>'''Server or Desktop''':It is used to indicate whether the system has a desktop environment. If it is server, it means that the system does not have a desktop environment. The storage space and resources occupied by the image are relatively small, and the command line is mainly used to operate and control the system. If it is '''desktop_xfce''', it means that the system is installed with the XFCE desktop environment by default. The storage space and resources occupied by the image are relatively large. You can connect the monitor, mouse and keyboard to operate the system through the interface. Of course, the desktop version of the system can also be operated through the command line like the server version of the system.</p></li> |
− | <li><p>'''Kernel version''' | + | <li><p>'''Kernel version''':Used to indicate the version number of the linux kernel, currently supports '''linux5.4''' and '''linux6.1.'''</p></li></ol> |
<span id="linux-kernel-driver-adaptation"></span> | <span id="linux-kernel-driver-adaptation"></span> | ||
Line 1,004: | Line 999: | ||
== Linux kernel driver adaptation == | == Linux kernel driver adaptation == | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Function''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux5.4''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux6.1''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''HDMI video''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''HDMI audio''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''USB2.0 x 3''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''micro SD card start''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Gigabit Ethernet''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Infrared receiver''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''WIFI''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Bluetooth''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''headphone audio''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''usb camera''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''LED light''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''26pin GPIO''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''26pin I2C''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''26pin SPI1''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''26pin UART''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''PWM''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Temperature Sensor''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''hardware watchdog''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''OK''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Mali GPU''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">NO</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">NO</span>''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Video codec''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">NO</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">NO</span>''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''TV-OUT''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">NO</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">NO</span>''' |
|} | |} | ||
<span id="the-format-of-linux-commands-in-this-manual"></span> | <span id="the-format-of-linux-commands-in-this-manual"></span> | ||
+ | |||
== The format of linux commands in this manual == | == The format of linux commands in this manual == | ||
# In this manual, all commands that need to be entered in the Linux system will be marked with the following box | # In this manual, all commands that need to be entered in the Linux system will be marked with the following box | ||
− | As shown below, the content in the yellow box indicates the content that needs special attention, except for the commands in it. | + | ::{| class="wikitable" style="width:800px;height: 50px;" |
+ | |- | ||
+ | | | ||
+ | |||
+ | |} | ||
+ | |||
+ | ::As shown below, the content in the yellow box indicates the content that needs special attention, except for the commands in it. | ||
+ | |||
+ | ::{| class="wikitable" style="background-color:#ffffdc;width:800px;height: 50px;" | ||
+ | |- | ||
+ | | | ||
+ | |} | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
<li><p>Description of the prompt type in front of the command</p> | <li><p>Description of the prompt type in front of the command</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>The prompt in front of the command refers to the content of the red part in the box below, which is not part of the linux command, so when entering the command in the linux system, please do not enter the content of the red font part.</li | + | <li>The prompt in front of the command refers to the content of the red part in the box below, which is not part of the linux command, so when entering the command in the linux system, please do not enter the content of the red font part.</li> |
− | |||
− | '''orangepi@orangepi:~$ sudo apt update''' | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | '''<span style="color:#FF0000">orangepi@orangepi:~$</span> sudo apt update''' | ||
− | '''root@orangepi:~#''' '''vim /boot/boot.cmd''' | + | '''<span style="color:#FF0000">root@orangepi:~#</span>''' '''vim /boot/boot.cmd''' |
− | '''test@test:~$ ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx | + | '''<span style="color:#FF0000">test@test:~$</span> ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx''' |
− | |||
− | |||
+ | '''<span style="color:#FF0000">root@test:~#</span> ls''' | ||
+ | |} | ||
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''root@orangepi:~$''' The prompt indicates that this command is entered in the '''linux system of the development board'''. The '''$''' at the end of the prompt indicates that the current user of the system is a normal user. When executing a privileged command, you need to add '''sudo'''</p></li> | + | <li><p>'''<span style="color:#FF0000">root@orangepi:~$</span>''' The prompt indicates that this command is entered in the '''linux system of the development board'''. The '''<span style="color:#FF0000">$</span>''' at the end of the prompt indicates that the current user of the system is a normal user. When executing a privileged command, you need to add '''sudo'''</p></li> |
− | <li><p>'''root@orangepi:~#''' The prompt indicates that this command is entered in the linux system of the development board, and the '''#''' at the end of the prompt indicates that the current user of the system is the root user, who can execute any desired command</p></li> | + | <li><p>'''<span style="color:#FF0000">root@orangepi:~#</span>''' The prompt indicates that this command is entered in the linux system of the development board, and the '''<span style="color:#FF0000">#</span>''' at the end of the prompt indicates that the current user of the system is the root user, who can execute any desired command</p></li> |
− | <li><p>'''test@test:~$''' The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the linux system of the development board. The $ at the end of the prompt indicates that the current user of the system is an ordinary user. When executing privileged commands, '''sudo''' needs to be added</p></li> | + | <li><p>'''<span style="color:#FF0000">test@test:~$</span>''' The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the linux system of the development board. The '''<span style="color:#FF0000">$</span>''' at the end of the prompt indicates that the current user of the system is an ordinary user. When executing privileged commands, '''sudo''' needs to be added</p></li> |
− | <li><p>'''root@test:~#''' The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the linux system of the development board. The '''#''' at the end of the prompt indicates that the current user of the system is the root user and can execute any command you want</p></li></ol> | + | <li><p>'''<span style="color:#FF0000">root@test:~#</span>''' The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the linux system of the development board. The '''<span style="color:#FF0000">#</span>''' at the end of the prompt indicates that the current user of the system is the root user and can execute any command you want</p></li></ol> |
− | + | </li></ol> | |
<!-- --> | <!-- --> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>What are the commands that need to be entered?</p> | <li><p>What are the commands that need to be entered?</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>As shown below, '''the black bold part''' is the command that needs to be input, and the content below the command is the output content (some commands have output, some may not), and this part of the content does not need to be input</li | + | <li>As shown below, '''the black bold part''' is the command that needs to be input, and the content below the command is the output content (some commands have output, some may not), and this part of the content does not need to be input</li> |
− | + | {| class="wikitable" style="width:800px;" | |
− | + | |- | |
+ | | | ||
root@orangepi:~# '''cat /boot/orangepiEnv.txt''' | root@orangepi:~# '''cat /boot/orangepiEnv.txt''' | ||
− | '''verbosity=7''' | + | '''<span style="color:#FF0000">verbosity=7</span>''' |
bootlogo=false | bootlogo=false | ||
− | '''console=serial''' | + | '''<span style="color:#FF0000">console=serial</span>''' |
− | + | |} | |
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li>As shown below, some commands cannot be written in one line and will be placed on the next line. As long as the black and bold parts are all commands that need to be input. When these commands are entered into one line, the last "\" of each line needs to be removed, this is not part of the command. In addition, there are spaces in different parts of the command, please | + | <li>As shown below, some commands cannot be written in one line and will be placed on the next line. As long as the black and bold parts are all commands that need to be input. When these commands are entered into one line, the last "\" of each line needs to be removed, this is not part of the command. In addition, there are spaces in different parts of the command, please don't miss it</li> |
− | + | {| class="wikitable" style="width:800px;" | |
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''echo \''' | orangepi@orangepi:~$ '''echo \''' | ||
Line 1,149: | Line 1,163: | ||
'''$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null''' | '''$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null''' | ||
+ | |} | ||
+ | </ol> | ||
+ | </li></ol> | ||
+ | <span id="linux-system-login-instructions"></span> | ||
− | |||
== Linux system login instructions == | == Linux system login instructions == | ||
Line 1,156: | Line 1,173: | ||
=== Linux system default login account and password === | === Linux system default login account and password === | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Account''' |
− | | style="text-align: | + | | style="text-align: center;"| '''password''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''root''' |
− | | style="text-align: | + | | style="text-align: center;"| '''orangepi''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''orangepi''' |
− | | style="text-align: | + | | style="text-align: center;"| '''orangepi''' |
|} | |} | ||
− | '''Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that when entering the password, <span style="color:#FF0000">the specific content of the entered password will not be displayed on the screen</span>, please do not think that there is any fault, just press Enter after inputting.'''</big> | ||
+ | |} | ||
− | '''When the wrong password is prompted, or there is a problem with the ssh connection, please note that as long as you are using the Linux image provided by Orange Pi, please do not suspect that the above password is wrong, but look for other reasons.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''When the wrong password is prompted, or there is a problem with the ssh connection, please note that as long as you are using the Linux image provided by Orange Pi, <span style="color:#FF0000">please do not suspect that the above password is wrong, but look for other reasons</span>.'''</big> | ||
+ | |} | ||
<span id="how-to-set-automatic-terminal-login-in-linux-system"></span> | <span id="how-to-set-automatic-terminal-login-in-linux-system"></span> | ||
+ | |||
=== How to set automatic terminal login in linux system === | === How to set automatic terminal login in linux system === | ||
− | # The Linux system automatically logs in to the terminal by default, and the default login user name is '''orangepi''' | + | # The Linux system automatically logs in to the terminal by default, and the default login user name is '''<span style="color:#FF0000">orangepi</span>''' |
− | [[File: | + | ::[[File:zero3-img81.png]] |
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>Use the following command to set the root user to automatically log in to the terminal</li | + | <li>Use the following command to set the root user to automatically log in to the terminal</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo auto_login_cli.sh root''' | orangepi@orangepi:~$ '''sudo auto_login_cli.sh root''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Use the following command to disable automatic login terminal</li | + | <li>Use the following command to disable automatic login terminal</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo auto_login_cli.sh -d''' | orangepi@orangepi:~$ '''sudo auto_login_cli.sh -d''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>Use the following command to set the orangepi user to automatically log in to the terminal again</li | + | <li>Use the following command to set the orangepi user to automatically log in to the terminal again</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo auto_login_cli.sh orangepi''' | orangepi@orangepi:~$ '''sudo auto_login_cli.sh orangepi''' | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="instructions-for-automatic-login-of-linux-desktop-version-system"></span> | ||
− | |||
=== Instructions for automatic login of linux desktop version system === | === Instructions for automatic login of linux desktop version system === | ||
Line 1,201: | Line 1,240: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | ::[[File:zero3-img82.png]] |
</div> | </div> | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>Run the following command to prohibit the desktop system from automatically logging into the desktop</li | + | <li>Run the following command to prohibit the desktop system from automatically logging into the desktop</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo disable_desktop_autologin.sh''' | orangepi@orangepi:~$ '''sudo disable_desktop_autologin.sh''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Then restart the system and a login dialog box will appear, at which point a '''password''' is required to enter the system</li | + | <li>Then restart the system and a login dialog box will appear, at which point a [[Orange Pi Zero 3#Linux system default login account and password|'''Linux system default login account and password''']] is required to enter the system</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img83.png]] |
− | </div> | + | </div></ol> |
<span id="the-setting-method-of-root-user-automatic-login-in-linux-desktop-version-system"></span> | <span id="the-setting-method-of-root-user-automatic-login-in-linux-desktop-version-system"></span> | ||
+ | |||
=== The setting method of root user automatic login in Linux desktop version system === | === The setting method of root user automatic login in Linux desktop version system === | ||
# Execute the following command to set the desktop system to automatically log in as the root user | # Execute the following command to set the desktop system to automatically log in as the root user | ||
+ | ::{| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo desktop_login.sh root''' | orangepi@orangepi:~$ '''sudo desktop_login.sh root''' | ||
+ | |} | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>Then restart the system, and the root user will automatically log in to the desktop</li | + | <li>Then restart the system, and the root user will automatically log in to the desktop</li> |
− | [[File: | + | [[File:zero3-img84.png]] |
− | '''Note that if you log in to the desktop system as the root user, you cannot use pulseaudio in the upper right corner to manage audio devices.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that if you log in to the desktop system as the root user, you cannot use pulseaudio in the upper right corner to manage audio devices.''' | ||
− | |||
+ | '''Also note that this is not a bug, since pulseaudio is not allowed to run as root.'''</big> | ||
+ | |} | ||
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Execute the following command to set the desktop system to log in automatically with the orangepi user again</li | + | <li>Execute the following command to set the desktop system to log in automatically with the orangepi user again</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo desktop_login.sh orangepi''' | orangepi@orangepi:~$ '''sudo desktop_login.sh orangepi''' | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="the-method-of-disabling-the-desktop-in-the-linux-desktop-version-system"></span> | ||
− | |||
=== The method of disabling the desktop in the Linux desktop version system === | === The method of disabling the desktop in the Linux desktop version system === | ||
− | # First enter the following command on the command line, '''Please remember to add sudo permission''' | + | # First enter the following command on the command line, '''<span style="color:#FF0000">Please remember to add sudo permission</span>''' |
+ | ::{| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo systemctl disable lightdm.service''' | orangepi@orangepi:~$ '''sudo systemctl disable lightdm.service''' | ||
+ | |} | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>Then restart the Linux system and you will find that the desktop will not be displayed</li | + | <li>Then restart the Linux system and you will find that the desktop will not be displayed</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo reboot''' | orangepi@orangepi:~$ '''sudo reboot''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>The command to reopen the desktop is as follows,'''Please remember to add sudo permission'''</li | + | <li>The command to reopen the desktop is as follows,'''<span style="color:#FF0000">Please remember to add sudo permission</span>'''</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo systemctl start lightdm.service''' | orangepi@orangepi:~$ '''sudo systemctl start lightdm.service''' | ||
orangepi@orangepi:~$ '''sudo systemctl enable lightdm.service''' | orangepi@orangepi:~$ '''sudo systemctl enable lightdm.service''' | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="onboard-led-light-test-instructions"></span> | ||
− | |||
== Onboard LED Light Test Instructions == | == Onboard LED Light Test Instructions == | ||
# There are two LED lights on the development board, one is green and the other is red. When the system starts, the default display of the LED lights is as follows: | # There are two LED lights on the development board, one is green and the other is red. When the system starts, the default display of the LED lights is as follows: | ||
− | {| class="wikitable" | + | ::{| class="wikitable" style="width:800px;text-align: center;" |
|- | |- | ||
| | | | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Green light''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Red light''' |
|- | |- | ||
| '''u-boot startup phase''' | | '''u-boot startup phase''' | ||
− | | style="text-align: | + | | style="text-align: center;"| '''off''' |
− | | style="text-align: | + | | style="text-align: center;"| '''on''' |
|- | |- | ||
| '''The kernel boots into the system''' | | '''The kernel boots into the system''' | ||
− | | style="text-align: | + | | style="text-align: center;"| '''flashing''' |
− | | style="text-align: | + | | style="text-align: center;"| '''off''' |
|- | |- | ||
| '''GPIO interface''' | | '''GPIO interface''' | ||
− | | style="text-align: | + | | style="text-align: center;"| '''PC13''' |
− | | style="text-align: | + | | style="text-align: center;"| '''PC12''' |
|} | |} | ||
− | '''The two LED lights on the development board are controlled by software.''' | + | ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The two LED lights on the development board are controlled by software.''' | ||
− | '''When you get the development board, you may find that even if the | + | '''When you get the development board, you may find that even if the micro SD card with the system programmed is not inserted into the development board, the two LED lights will be on after the development board is connected to the power supply. This is because the 16MB on the development board SPI Flash will burn a miniature linux system by default when leaving the factory. This system will light up the red light during the u-boot startup phase. After entering the kernel, it will turn off the red light and set the green light to flash.''' |
− | '''If the linux system in the SPI Flash is cleared, then the two LED lights on the development board will not light up after the power is turned on without inserting the | + | '''If the linux system in the SPI Flash is cleared, then the two LED lights on the development board will not light up after the power is turned on without inserting the micro SD card with the system programmed'''</big> |
+ | |} | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>The method of setting the green light on | + | <li>The method of setting the green light on/off and flashing is as follows:</li> |
− | '''Note that the following operations should be performed under the root user.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that the following operations should be performed under the root user.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>First enter the setting directory of the green light</li | + | <li>First enter the setting directory of the green light</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:~# '''cd /sys/class/leds/green_led''' | root@orangepi:~# '''cd /sys/class/leds/green_led''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li>The command to set the green light to stop flashing is as follows</li | + | <li>The command to set the green light to stop flashing is as follows</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:/sys/class/leds/green_led# '''echo none > trigger''' | root@orangepi:/sys/class/leds/green_led# '''echo none > trigger''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li>The command to set the green light to be on is as follows</li | + | <li>The command to set the green light to be on is as follows</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:/sys/class/leds/green_led# '''echo default-on > trigger''' | root@orangepi:/sys/class/leds/green_led# '''echo default-on > trigger''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="4" style="list-style-type: lower-alpha;"> | <ol start="4" style="list-style-type: lower-alpha;"> | ||
− | <li>The command to set the green light to flash is as follows</li | + | <li>The command to set the green light to flash is as follows</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:/sys/class/leds/green_led# '''echo heartbeat > trigger''' | root@orangepi:/sys/class/leds/green_led# '''echo heartbeat > trigger''' | ||
− | + | |} | |
+ | </ol> | ||
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>The method of setting the red light on | + | <li>The method of setting the red light on/off and flashing is as follows:</li> |
− | '''Note that the following operations should be performed under the root user.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that the following operations should be performed under the root user.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>First enter the setting directory of the red light</li | + | <li>First enter the setting directory of the red light</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:~# '''cd /sys/class/leds/red_led''' | root@orangepi:~# '''cd /sys/class/leds/red_led''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li>The command to set the red light to be on is as follows</li | + | <li>The command to set the red light to be on is as follows</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:/sys/class/leds/red_led# '''echo default-on > trigger''' | root@orangepi:/sys/class/leds/red_led# '''echo default-on > trigger''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li>The command to set the flashing red light is as follows</li | + | <li>The command to set the flashing red light is as follows</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:/sys/class/leds/red_led# '''echo heartbeat > trigger''' | root@orangepi:/sys/class/leds/red_led# '''echo heartbeat > trigger''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="4" style="list-style-type: lower-alpha;"> | <ol start="4" style="list-style-type: lower-alpha;"> | ||
− | <li>The command to set the red light to stop flashing is as follows</li | + | <li>The command to set the red light to stop flashing is as follows</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:/sys/class/leds/red_led# '''echo none > trigger''' | root@orangepi:/sys/class/leds/red_led# '''echo none > trigger''' | ||
− | + | |} | |
+ | </ol> | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
<li><p>If you do not need the LED light to flash after booting, you can use the following method to turn off the green light flashing</p> | <li><p>If you do not need the LED light to flash after booting, you can use the following method to turn off the green light flashing</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>First run '''orangepi-config''', common users remember to add '''sudo''' permission</li | + | <li>First run '''orangepi-config''', common users remember to add '''sudo''' permission</li> |
− | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo orangepi-config''' | orangepi@orangepi:~$ '''sudo orangepi-config''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li>Then select '''System'''</li> | + | <li>Then select '''System'''</li> |
− | |||
− | |||
+ | [[File:zero3-img85.png]] | ||
+ | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li>Then select '''Hardware'''</li> | + | <li>Then select '''Hardware'''</li> |
− | |||
− | |||
+ | [[File:zero3-img86.png]] | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: lower-alpha;"> | <ol start="4" style="list-style-type: lower-alpha;"> | ||
− | <li>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select '''disable-leds'''</li> | + | <li>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select '''disable-leds'''</li> |
− | |||
− | |||
+ | [[File:zero3-img87.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: lower-alpha;"> | <ol start="5" style="list-style-type: lower-alpha;"> | ||
− | <li>Then selec '''<Save>'''</li> | + | <li>Then selec '''<Save>'''</li> |
− | |||
− | |||
+ | [[File:zero3-img88.png]] | ||
+ | </ol> | ||
<ol start="6" style="list-style-type: lower-alpha;"> | <ol start="6" style="list-style-type: lower-alpha;"> | ||
− | <li>Then select '''<Back>'''</li> | + | <li>Then select '''<Back>'''</li> |
− | |||
− | |||
+ | [[File:zero3-img89.png]] | ||
+ | </ol> | ||
<ol start="7" style="list-style-type: lower-alpha;"> | <ol start="7" style="list-style-type: lower-alpha;"> | ||
− | <li>Then select '''<Reboot>'''to restart the system for the configuration to take effect</li> | + | <li>Then select '''<Reboot>''' to restart the system for the configuration to take effect</li> |
− | |||
− | |||
+ | [[File:zero3-img90.png]] | ||
+ | </ol> | ||
<ol start="8" style="list-style-type: lower-alpha;"> | <ol start="8" style="list-style-type: lower-alpha;"> | ||
<li>After restarting and fully entering the system, you can see that the two LED lights on the development board will not light up</li></ol> | <li>After restarting and fully entering the system, you can see that the two LED lights on the development board will not light up</li></ol> | ||
+ | </li></ol> | ||
+ | <span id="instructions-for-operating-the-rootfs-partition-capacity-of-the-linux-system-in-the-tf-card"></span> | ||
− | + | == Instructions for operating the rootfs partition capacity of the linux system in the micro SD card == | |
− | == Instructions for operating the rootfs partition capacity of the linux system in the | ||
<span id="the-first-startup-will-automatically-expand-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span> | <span id="the-first-startup-will-automatically-expand-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span> | ||
− | === The first startup will automatically expand the capacity of the rootfs partition in the | + | === The first startup will automatically expand the capacity of the rootfs partition in the micro SD card === |
− | + | <ol start="1" style="list-style-type: decimal;"> | |
+ | <li>After burning the Linux image of the development board into the micro SD card, you can check the capacity usage of the micro SD card on the '''<span style="color:#FF0000">Ubuntu computer</span>''', the steps are as follows: | ||
− | '''Note that this step does not affect the automatic expansion of the Linux system of the development board. Here I just want to explain how to check the capacity of the | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that this step does not affect the automatic expansion of the Linux system of the development board. Here I just want to explain how to check the capacity of the micro SD card after burning the Linux image on the micro SD card.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>First install the gparted software on the Ubuntu computer</li | + | <li>First install the gparted software on the Ubuntu computer</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo apt install -y gparted''' | test@test:~$ '''sudo apt install -y gparted''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li>Then open gparted</li | + | <li>Then open gparted</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo gparted''' | test@test:~$ '''sudo gparted''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li>After opening gparted, you can select the | + | <li>After opening gparted, you can select the micro SD card in the upper right corner, and then you can see the usage of the micro SD card capacity</li> |
− | |||
− | |||
+ | [[File:zero3-img91.png]] | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: lower-alpha;"> | <ol start="4" style="list-style-type: lower-alpha;"> | ||
− | <li>The figure above shows the situation of the | + | <li>The figure above shows the situation of the micro SD card after burning the Linux desktop version system. It can be seen that although the total capacity of the micro SD card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/ sdc1) actually allocated only 4.05GiB, leaving 10.79GiB unallocated</li></ol> |
− | + | </li></ol> | |
<!-- --> | <!-- --> | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li><p>Then you can insert the | + | <li><p>Then you can insert the micro SD card that has burned the Linux system into the development board to start. When the micro SD card starts the Linux system for the first time, it will call the '''orangepi-resize-filesystem''' script automatically through the systemd service '''orangepi-resize-filesystem.service''' The expansion of the rootfs partition, '''<span style="color:#FF0000">so there is no need to manually expand the capacity</span>'''</p></li> |
− | <li><p>After logging in to the system, you can use the '''df -h''' command to check the size of the rootfs. If it is consistent with the actual capacity of the | + | <li><p>After logging in to the system, you can use the '''df -h''' command to check the size of the rootfs. If it is consistent with the actual capacity of the micro SD card, it means that the automatic expansion is running correctly.</p> |
− | orangepi@orangepi:~$ '''df -h''' | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''df -h'''</p> | ||
+ | <span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br> | ||
+ | <span style="margin-right: 110px;">udev</span><span style="margin-right: 60px;">430M</span><span style="margin-right: 50px;">0</span><span style="margin-right: 70px;">430M </span><span style="margin-right: 90px;">0% /dev</span><br> | ||
+ | <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">100M </span><span style="margin-right: 30px;">5.6M </span><span style="margin-right: 70px;">95M </span><span style="margin-right: 90px;">6% /run</span><br> | ||
+ | <span style="margin-right: 25px;color:#FF0000">'''/dev/mmcblk0p1'''</span><span style="margin-right: 50px;color:#FF0000">'''15G'''</span><span style="margin-right: 35px;color:#FF0000">'''915M'''</span><span style="margin-right: 80px;color:#FF0000">'''14G'''</span><span style="margin-right: 90px;color:#FF0000">'''7% /'''</span><br> | ||
+ | <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">500M </span><span style="margin-right: 50px;">0</span><span style="margin-right: 50px;">500M </span><span style="margin-right: 90px;">0% /dev/shm</span><br> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | <ol start="4" style="list-style-type: decimal;"> | ||
+ | <li>After starting the Linux system for the first time, we can also remove the micro SD card from the development board and reinsert it into the '''<span style="color:#FF0000">Ubuntu computer</span>''', and then use gparted to check the status of the micro SD card again, as shown in the figure below, the rootfs partition (/dev/ The capacity of sdc1) has been expanded to 14.69GiB</li> | ||
− | + | [[File:zero3-img92.png]] | |
− | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | |
+ | |- | ||
+ | | | ||
+ | <big>'''It should be noted that the Linux system has only one partition in ext4 format, and does not use a separate BOOT partition to store files such as the kernel image, so there is no problem of expanding the BOOT partition.'''</big> | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="the-method-of-prohibiting-automatic-expansion-of-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span> | ||
− | + | === The method of prohibiting automatic expansion of the capacity of the rootfs partition in the micro SD card === | |
− | '''/ | + | # First burn the linux image of the development board to the micro SD card on the '''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available), '''<span style="color:#FF0000">and then re-plug and insert the micro SD card</span>''' |
+ | # Then the Ubuntu computer will automatically mount the partition of the micro SD card. If the automatic mounting is normal, use the ls command to see the following output | ||
− | + | ::{| class="wikitable" style="width:800px;" | |
− | + | |- | |
− | + | | | |
− | + | <p>test@test:~$ '''ls /media/test/opi_root/'''</p> | |
− | + | <p>bin boot dev etc home lib lost+found media mnt opt proc root run <br> sbin selinux srv sys tmp usr var</p> | |
− | + | |} | |
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | test@test:~$ '''ls /media/test/opi_root/''' | ||
− | |||
− | bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Then switch the current user to the root user on the Ubuntu computer</li | + | <li>Then switch the current user to the root user on the Ubuntu computer</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo -i''' | test@test:~$ '''sudo -i''' | ||
− | [sudo] | + | [sudo] password for test: |
− | |||
− | |||
+ | root@test:~'''<span style="color:#FF0000">#</span>''' | ||
+ | |} | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>Then enter the root directory of the linux system in the | + | <li>Then enter the root directory of the linux system in the micro SD card and create a new file named '''.no_rootfs_resize'''</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@test:~# '''cd /media/test/opi_root/''' | root@test:~# '''cd /media/test/opi_root/''' | ||
Line 1,461: | Line 1,609: | ||
'''.no_rootfs_resize''' | '''.no_rootfs_resize''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
− | <li><p>Then you can uninstall the | + | <li><p>Then you can uninstall the micro SD card, and then pull out the micro SD card and insert it into the development board to start. When the linux system starts, when the file'''.no_rootfs_resize''' is detected in the '''/root''' directory, the rootfs will not be automatically expanded.</p></li> |
− | <li><p>After entering the Linux system after prohibiting automatic expansion of rootfs, you can see that the total capacity of the rootfs partition is only 4GB (the image of the desktop version is tested here), which is much smaller than the actual capacity of the | + | <li><p>After entering the Linux system after prohibiting automatic expansion of rootfs, you can see that the total capacity of the rootfs partition is only 4GB (the image of the desktop version is tested here), which is much smaller than the actual capacity of the micro SD card, indicating that the automatic expansion of rootfs is prohibited.</p></li> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''df -h'''</p> | ||
+ | <span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br> | ||
+ | <span style="margin-right: 110px;">udev</span><span style="margin-right: 60px;">925M </span><span style="margin-right: 50px;">0</span><span style="margin-right: 70px;">925M </span><span style="margin-right: 90px;">0% /dev</span><br> | ||
+ | <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">199M </span><span style="margin-right: 30px;">3.2M </span><span style="margin-right: 70px;">196M </span><span style="margin-right: 90px;">2% /run</span><br> | ||
+ | <span style="margin-right: 25px;color:#FF0000">'''/dev/mmcblk0p1'''</span><span style="margin-right: 50px;color:#FF0000">'''4.0G '''</span><span style="margin-right: 35px;color:#FF0000">'''3.2G '''</span><span style="margin-right: 80px;color:#FF0000">'''686M '''</span><span style="margin-right: 90px;color:#FF0000">'''83% /'''</span><br> | ||
+ | |} | ||
+ | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>If you need to re-expand the capacity of the rootfs partition in the | + | <li>If you need to re-expand the capacity of the rootfs partition in the micro SD card, just execute the following command, and then restart the Linux system of the development board.</li> |
− | '''Note, please execute the following commands under the root user.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note, please execute the following commands under the root user.'''</big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:~# '''rm /root/.no_rootfs_resize''' | root@orangepi:~# '''rm /root/.no_rootfs_resize''' | ||
Line 1,486: | Line 1,642: | ||
root@orangepi:~# '''sudo reboot''' | root@orangepi:~# '''sudo reboot''' | ||
+ | |} | ||
− | After restarting, enter the Linux system of the development board again, and you can see that the rootfs partition has been expanded to the actual capacity of the | + | After restarting, enter the Linux system of the development board again, and you can see that the rootfs partition has been expanded to the actual capacity of the micro SD card |
− | root@orangepi:~ | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~$ '''df -h'''</p> | ||
+ | <span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br> | ||
+ | <span style="margin-right: 110px;">udev</span><span style="margin-right: 60px;">925M </span><span style="margin-right: 50px;">0</span><span style="margin-right: 70px;">925M </span><span style="margin-right: 90px;">0% /dev</span><br> | ||
+ | <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">199M </span><span style="margin-right: 30px;">3.2M </span><span style="margin-right: 70px;">196M </span><span style="margin-right: 90px;">2% /run</span><br> | ||
+ | <span style="margin-right: 25px;color:#FF0000">'''/dev/mmcblk0p1'''</span><span style="margin-right: 50px;color:#FF0000">'''15G'''</span><span style="margin-right: 35px;color:#FF0000">'''3.2G '''</span><span style="margin-right: 80px;color:#FF0000">'''12G '''</span><span style="margin-right: 90px;color:#FF0000">'''23% /'''</span><br> | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="the-method-of-manually-expanding-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span> | ||
− | + | === The method of manually expanding the capacity of the rootfs partition in the micro SD card === | |
− | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | |
− | + | |- | |
− | + | | | |
+ | <big>'''If the total capacity of the micro SD card is large, such as 128GB, you do not want the rootfs partition of the Linux system to use all the capacity of the micro SD card, but only want to allocate a part of the capacity, such as 16GB, to the Linux system, and then the remaining capacity of the micro SD card can be used for other use. Then you can use the content introduced in this section to manually expand the capacity of the rootfs partition in TF.'''</big> | ||
+ | |} | ||
− | '''/ | + | # First burn the linux image of the development board to the micro SD card on the '''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available), '''<span style="color:#FF0000">and then re-plug and insert the micro SD card</span>''' |
+ | # Then the Ubuntu computer will automatically mount the partition of the micro SD card. If the automatic mounting is normal, use the ls command to see the following output | ||
− | + | ::{| class="wikitable" style="width:800px;" | |
− | = | + | |- |
− | + | | | |
− | + | <p>test@test:~$ '''ls /media/test/opi_root/'''</p> | |
− | + | <p>bin boot dev etc home lib lost+found media mnt opt proc root run <br> sbin selinux srv sys tmp usr var</p> | |
− | + | |} | |
− | |||
− | |||
− | test@test:~$ '''ls /media/test/opi_root/''' | ||
− | |||
− | bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Then switch the current user to the root user on the Ubuntu computer</li | + | <li>Then switch the current user to the root user on the Ubuntu computer</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo -i''' | test@test:~$ '''sudo -i''' | ||
− | [sudo] | + | [sudo] password for test: |
− | |||
− | |||
+ | root@test:~'''<span style="color:#FF0000">#</span>''' | ||
+ | |} | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>Then enter the root directory of the linux system in the | + | <li>Then enter the root directory of the linux system in the micro SD card and create a new file named '''.no_rootfs_resize'''</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@test:~# '''cd /media/test/opi_root/''' | root@test:~# '''cd /media/test/opi_root/''' | ||
Line 1,532: | Line 1,704: | ||
'''.no_rootfs_resize''' | '''.no_rootfs_resize''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
− | <li>Then install the gparted software on the Ubuntu computer</li | + | <li>Then install the gparted software on the Ubuntu computer</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo apt install -y gparted''' | test@test:~$ '''sudo apt install -y gparted''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
− | <li>Then open gparted</li | + | <li>Then open gparted</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo gparted''' | test@test:~$ '''sudo gparted''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>After opening gparted, you can select the | + | <li>After opening gparted, you can select the micro SD card in the upper right corner, and then you can see the usage of the micro SD card capacity. The figure below shows the situation of the micro SD card after burning the Linux desktop version system. It can be seen that although the total capacity of the micro SD card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/sdc1) Only 4.05GiB were actually allocated, leaving 10.79GiB unallocated</li> |
− | |||
− | |||
+ | [[File:zero3-img91.png]] | ||
+ | </ol> | ||
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
− | <li>Then select the rootfs partition (/dev/sdc1)</li> | + | <li>Then select the rootfs partition (/dev/sdc1)</li> |
− | |||
− | |||
+ | [[File:zero3-img93.png]] | ||
+ | </ol> | ||
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
− | <li>Click the right mouse button again to see the operation options shown in the figure below. If the | + | <li>Click the right mouse button again to see the operation options shown in the figure below. If the micro SD card has been mounted, first you need to Umount the rootfs partition of the micro SD card</li> |
− | |||
− | |||
+ | [[File:zero3-img94.png]] | ||
+ | </ol> | ||
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
− | <li>Then select the rootfs partition again, click the right mouse button, and select '''Resize/Move''' to start expanding the size of the rootfs partition</li> | + | <li>Then select the rootfs partition again, click the right mouse button, and select '''Resize/Move''' to start expanding the size of the rootfs partition</li> |
− | |||
− | |||
+ | [[File:zero3-img95.png]] | ||
+ | </ol> | ||
<ol start="11" style="list-style-type: decimal;"> | <ol start="11" style="list-style-type: decimal;"> | ||
− | <li>After the '''Resize/Move''' option is turned on, the following setting interface will pop up</li> | + | <li>After the '''Resize/Move''' option is turned on, the following setting interface will pop up</li> |
− | |||
− | |||
+ | [[File:zero3-img96.png]] | ||
+ | </ol> | ||
<ol start="12" style="list-style-type: decimal;"> | <ol start="12" style="list-style-type: decimal;"> | ||
− | <li>Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New | + | <li>Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New size(MiB)'''</li> |
− | |||
− | |||
+ | [[File:zero3-img97.png]] | ||
+ | </ol> | ||
<ol start="13" style="list-style-type: decimal;"> | <ol start="13" style="list-style-type: decimal;"> | ||
− | <li>After setting the capacity, click '''Resize/Move''' in the lower right corner</li> | + | <li>After setting the capacity, click '''Resize/Move''' in the lower right corner</li> |
− | |||
− | |||
+ | [[File:zero3-img98.png]] | ||
+ | </ol> | ||
<ol start="14" style="list-style-type: decimal;"> | <ol start="14" style="list-style-type: decimal;"> | ||
− | <li> | + | <li>After confirming that it is correct, click the green button shown in the figure below '''<span style="color:green">√</span>'''</li> |
− | |||
− | |||
+ | [[File:zero3-img99.png]] | ||
+ | </ol> | ||
<ol start="15" style="list-style-type: decimal;"> | <ol start="15" style="list-style-type: decimal;"> | ||
− | <li> | + | <li>Then select '''Apply''', it will officially start to expand the capacity of the rootfs partition</li> |
− | |||
− | |||
+ | [[File:zero3-img100.png]] | ||
+ | </ol> | ||
<ol start="16" style="list-style-type: decimal;"> | <ol start="16" style="list-style-type: decimal;"> | ||
− | <li>After the expansion is completed, click '''Close''' to close</li> | + | <li>After the expansion is completed, click '''Close''' to close</li> |
− | |||
− | |||
+ | [[File:zero3-img101.png]] | ||
+ | </ol> | ||
<ol start="17" style="list-style-type: decimal;"> | <ol start="17" style="list-style-type: decimal;"> | ||
− | <li>Then you can pull out the | + | <li>Then you can pull out the micro SD card, insert it into the development board and start it up. After entering the Linux system of the development board, if you can see that the size of the rootfs partition is the same as the size set before, it means manual Expansion succeeded</li> |
− | root@orangepi:~# '''df -h''' | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~# '''df -h'''</p> | ||
+ | <span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br> | ||
+ | <span style="margin-right: 110px;">udev</span><span style="margin-right: 60px;">925M </span><span style="margin-right: 50px;">0</span><span style="margin-right: 70px;">925M </span><span style="margin-right: 90px;">0% /dev</span><br> | ||
+ | <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">199M </span><span style="margin-right: 30px;">3.2M </span><span style="margin-right: 70px;">196M </span><span style="margin-right: 90px;">2% /run</span><br> | ||
+ | <span style="margin-right: 25px;color:#FF0000">'''/dev/mmcblk0p1'''</span><span style="margin-right: 50px;color:#FF0000">'''7.7G '''</span><span style="margin-right: 35px;color:#FF0000">'''3.2G '''</span><span style="margin-right: 80px;color:#FF0000">'''4.4G '''</span><span style="margin-right: 90px;color:#FF0000">'''42% /'''</span><br> | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="how-to-reduce-the-capacity-of-the-rootfs-partition-in-the-tf-card"></span> | ||
− | + | === How to reduce the capacity of the rootfs partition in the micro SD card === | |
− | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | |
− | + | |- | |
− | + | | | |
− | + | <big>'''After configuring the application program or other development environment in the Linux system of the micro SD card, if you want to back up the Linux system in the micro SD card, you can use the method in this section to reduce the size of the rootfs partition first, and then start the backup.'''</big> | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | '''After configuring the application program or other development environment in the Linux system of the | ||
− | # First insert the | + | # First insert the micro SD card you want to operate in the '''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available) |
# Then install the gparted software on the Ubuntu computer | # Then install the gparted software on the Ubuntu computer | ||
+ | ::{| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo apt install -y gparted''' | test@test:~$ '''sudo apt install -y gparted''' | ||
+ | |} | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Then | + | <li>Then open gparted</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo gparted''' | test@test:~$ '''sudo gparted''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>After opening gparted, you can select the | + | <li>After opening gparted, you can select the micro SD card in the upper right corner, and then you can see the usage of the micro SD card capacity</li> |
− | |||
− | |||
+ | [[File:zero3-img102.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
− | <li>Then select the rootfs partition (/dev/sdc1)</li> | + | <li>Then select the rootfs partition (/dev/sdc1)</li> |
− | |||
− | |||
+ | [[File:zero3-img103.png]] | ||
+ | </ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
− | <li>Click the right mouse button again to see the operation options shown in the figure below. If the | + | <li>Click the right mouse button again to see the operation options shown in the figure below. If the micro SD card has been mounted, first you need to Umount the rootfs partition of the micro SD card</li> |
− | |||
− | |||
+ | [[File:zero3-img104.png]] | ||
+ | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>Then select the rootfs partition again, click the right mouse button, and select '''Resize/Move''' to start setting the size of the rootfs partition</li> | + | <li>Then select the rootfs partition again, click the right mouse button, and select '''Resize/Move''' to start setting the size of the rootfs partition</li> |
− | |||
− | |||
+ | [[File:zero3-img105.png]] | ||
+ | </ol> | ||
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
− | <li>After the'''Resize/Move''' option is turned on, the following setting interface will pop up</li> | + | <li>After the '''Resize/Move''' option is turned on, the following setting interface will pop up</li> |
− | |||
− | |||
+ | [[File:zero3-img106.png]] | ||
+ | </ol> | ||
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
− | <li>Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New | + | <li>Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New size(MiB)'''</li> |
− | |||
− | |||
+ | [[File:zero3-img97.png]] | ||
+ | </ol> | ||
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
− | <li>After setting the capacity, click'''Resize/Move''' in the lower right corner</li> | + | <li>After setting the capacity, click '''Resize/Move''' in the lower right corner</li> |
− | |||
− | |||
+ | [[File:zero3-img98.png]] | ||
+ | </ol> | ||
<ol start="11" style="list-style-type: decimal;"> | <ol start="11" style="list-style-type: decimal;"> | ||
− | <li>After confirming that it is correct, click the green button shown in the figure below'''√'''</li> | + | <li>After confirming that it is correct, click the green button shown in the figure below '''<span style="color:green">√</span>'''</li> |
− | |||
− | |||
+ | [[File:zero3-img99.png]] | ||
+ | </ol> | ||
<ol start="12" style="list-style-type: decimal;"> | <ol start="12" style="list-style-type: decimal;"> | ||
− | <li>Then select '''Apply''', and the expansion of the rootfs partition will officially start</li> | + | <li>Then select '''Apply''', and the expansion of the rootfs partition will officially start</li> |
− | |||
− | |||
+ | [[File:zero3-img100.png]] | ||
+ | </ol> | ||
<ol start="13" style="list-style-type: decimal;"> | <ol start="13" style="list-style-type: decimal;"> | ||
− | <li>After the expansion is completed, click '''Close''' to close</li> | + | <li>After the expansion is completed, click '''Close''' to close</li> |
− | |||
− | |||
+ | [[File:zero3-img101.png]] | ||
+ | </ol> | ||
<ol start="14" style="list-style-type: decimal;"> | <ol start="14" style="list-style-type: decimal;"> | ||
− | <li>Then you can pull out the | + | <li>Then you can pull out the micro SD card, insert it into the development board and start it up. After entering the Linux system of the development board, if you can use the '''df -h''' command to see that the size of the rootfs partition is the same as the size set before, it means that the size has been reduced. capacity success</li> |
− | root@orangepi:~# '''df -h''' | + | {| class="wikitable" style="width:800px;" |
− | + | |- | |
− | Filesystem Size Used Avail Use% Mounted on | + | | |
− | + | <p>root@orangepi:~# '''df -h'''</p> | |
− | udev 925M 0 925M 0% /dev | + | <span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail</span><span style="margin-right: 50px;">Use% Mounted on</span><br> |
− | + | <span style="margin-right: 110px;">udev</span><span style="margin-right: 60px;">925M </span><span style="margin-right: 50px;">0</span><span style="margin-right: 70px;">925M </span><span style="margin-right: 90px;">0% /dev</span><br> | |
− | tmpfs 199M 3.2M 196M 2% /run | + | <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">199M </span><span style="margin-right: 30px;">3.2M </span><span style="margin-right: 70px;">196M </span><span style="margin-right: 90px;">2% /run</span><br> |
+ | <span style="margin-right: 25px;color:#FF0000">'''/dev/mmcblk0p1'''</span><span style="margin-right: 50px;color:#FF0000">'''7.7G '''</span><span style="margin-right: 35px;color:#FF0000">'''3.2G '''</span><span style="margin-right: 80px;color:#FF0000">'''4.4G '''</span><span style="margin-right: 90px;color:#FF0000">'''42% /'''</span><br> | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="network-connection-test"></span> | ||
− | |||
− | |||
− | |||
== Network connection test == | == Network connection test == | ||
Line 1,694: | Line 1,889: | ||
<li><p>After the system starts, it will automatically assign an IP address to the Ethernet card through DHCP, without any other configuration</p></li> | <li><p>After the system starts, it will automatically assign an IP address to the Ethernet card through DHCP, without any other configuration</p></li> | ||
<li><p>The command to view the IP address in the Linux system of the development board is as follows:</p> | <li><p>The command to view the IP address in the Linux system of the development board is as follows:</p> | ||
− | <p>'''Please do not copy the following commands. For example, the network node name in debian12 is end0, and the following commands need to be changed to ip a s end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Please do not copy the following commands. For example, the network node name in debian12 is end0, and the following commands need to be changed to ip a s end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''ip a s eth0''' | orangepi@orangepi:~$ '''ip a s eth0''' | ||
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 | 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 | ||
− | link/ether 5e:ac:14:a5:93:b3 brd ff:ff:ff:ff:ff:ff | + | :link/ether 5e:ac:14:a5:93:b3 brd ff:ff:ff:ff:ff:ff |
+ | |||
+ | :inet '''<span style="color:#FF0000">192.168.1.16</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0 | ||
+ | |||
+ | ::valid_lft 259174sec preferred_lft 259174sec | ||
− | + | :inet6 240e:3b7:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute | |
− | valid_lft | + | ::valid_lft 259176sec preferred_lft 172776sec |
− | inet6 | + | :inet6 fe80::957d:bbbd:4928:3604/64 scope link noprefixroute |
− | valid_lft | + | ::valid_lft forever preferred_lft forever |
+ | |} | ||
− | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | |
+ | |- | ||
+ | | | ||
+ | <big>'''There are three ways to check the IP address after the development board starts:''' | ||
− | + | '''1. Connect the HDMI monitor, then log in to the system and use the ip a s eth0 command to view the IP address''' | |
− | ''' | + | '''2. Enter the ip a s eth0 command in the debugging serial terminal to view the IP address''' |
− | + | '''3. If there is no debugging serial port and no HDMI display, you can also check the IP address of the development board’s network port through the router’s management interface. However, in this method, some people often cannot see the IP address of the development board normally. If you can't see it, the debug method looks like this:''' | |
− | |||
− | |||
− | |||
<ol style="list-style-type: upper-alpha;"> | <ol style="list-style-type: upper-alpha;"> | ||
<li><p>'''First check whether the Linux system has started normally. If the green light of the development board is flashing, it is generally started normally. If only the red light is on, or the red and green lights are not on, it means that the system has not started normally;'''</p></li> | <li><p>'''First check whether the Linux system has started normally. If the green light of the development board is flashing, it is generally started normally. If only the red light is on, or the red and green lights are not on, it means that the system has not started normally;'''</p></li> | ||
Line 1,727: | Line 1,934: | ||
<li><p>'''If there is no router to replace, you can only connect to an HDMI display or use the debugging serial port to check the IP address.'''</p></li></ol> | <li><p>'''If there is no router to replace, you can only connect to an HDMI display or use the debugging serial port to check the IP address.'''</p></li></ol> | ||
− | |||
+ | '''In addition, it should be noted that the development board DHCP automatically assigns an IP address without any settings.'''</big> | ||
+ | |} | ||
+ | </li></ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
<li><p>The command to test the network connectivity is as follows, the ping command can be interrupted through the shortcut key of '''Ctrl+C'''</p> | <li><p>The command to test the network connectivity is as follows, the ping command can be interrupted through the shortcut key of '''Ctrl+C'''</p> | ||
− | <p>'''Please do not copy the following commands. For example, the network node name in debian12 is end0, and the following command needs to be changed to ping www.baidu.com -I end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Please do not copy the following commands. For example, the network node name in debian12 is end0, and the following command needs to be changed to ping www.baidu.com -I end0, I is capital i,.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''ping www.baidu.com -I eth0''' | orangepi@orangepi:~$ '''ping www.baidu.com -I eth0''' | ||
Line 1,752: | Line 1,968: | ||
rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms | rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms | ||
+ | |} | ||
+ | </li></ol> | ||
+ | <span id="wifi-connection-test"></span> | ||
− | |||
=== WIFI connection test === | === WIFI connection test === | ||
− | '''Please do not connect to WIFI by modifying the /etc/network/interfaces configuration file. There will be problems connecting to the WIFI network in this way.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Please do not connect to WIFI by modifying the /etc/network/interfaces configuration file. There will be problems connecting to the WIFI network in this way.'''</big> | ||
+ | |} | ||
<span id="the-server-image-connects-to-wifi-through-commands"></span> | <span id="the-server-image-connects-to-wifi-through-commands"></span> | ||
==== The server image connects to WIFI through commands ==== | ==== The server image connects to WIFI through commands ==== | ||
− | '''When the development board is not connected to Ethernet, not connected to HDMI display, but only connected to the serial port, it is recommended to use the commands demonstrated in this section to connect to the WIFI network. Because nmtui can only display characters in some serial port software (such as minicom), and cannot display the graphical interface normally. Of course, if the development board is connected to an Ethernet or HDMI display, you can also use the commands demonstrated in this section to connect to the WIFI network.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
− | + | |- | |
+ | | | ||
+ | <big>'''When the development board is not connected to Ethernet, not connected to HDMI display, but only connected to the serial port, it is recommended to use the commands demonstrated in this section to connect to the WIFI network. Because nmtui can only display characters in some serial port software (such as minicom), and cannot display the graphical interface normally. Of course, if the development board is connected to an Ethernet or HDMI display, you can also use the commands demonstrated in this section to connect to the WIFI network.'''</big> | ||
+ | |} | ||
+ | |||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First log in to the linux system, there are the following three ways</p> | <li><p>First log in to the linux system, there are the following three ways</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>If the development board is connected with a network cable, ''' | + | <li>If the development board is connected with a network cable, [[Orange Pi Zero 3#SSH remote login development board under Ubuntu|'''SSH remote login development board under Ubuntu''']]</li></ol> |
<!-- --> | <!-- --> | ||
− | <ol style="list-style-type: lower-alpha;"> | + | <ol start="2" style="list-style-type: lower-alpha;"> |
<li><p>If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the Linux system</p></li> | <li><p>If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the Linux system</p></li> | ||
<li><p>If the development board is connected to the HDMI display, you can log in to the linux system through the terminal displayed on the HDMI</p></li></ol> | <li><p>If the development board is connected to the HDMI display, you can log in to the linux system through the terminal displayed on the HDMI</p></li></ol> | ||
Line 1,775: | Line 2,001: | ||
<!-- --> | <!-- --> | ||
− | + | <ol start="2" style="list-style-type: decimal;"> | |
+ | <li>First use the '''nmcli dev wifi''' command to scan the surrounding WIFI hotspots | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''nmcli dev wifi''' | orangepi@orangepi:~$ '''nmcli dev wifi''' | ||
+ | |} | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img107.png]] |
</div> | </div> | ||
− | <ol start=" | + | </li></ol> |
+ | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Then use the '''nmcli''' command to connect to the scanned WIFI hotspot, where:</p> | <li><p>Then use the '''nmcli''' command to connect to the scanned WIFI hotspot, where:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>'''wifi_name''' Need to replace it with the name of the WIFI hotspot you want to connect to</p></li> | <li><p>'''wifi_name''' Need to replace it with the name of the WIFI hotspot you want to connect to</p></li> | ||
− | <li><p>'''wifi_passwd'''Need to change to the password of the WIFI hotspot you want to connect to</p></li | + | <li><p>'''wifi_passwd''' Need to change to the password of the WIFI hotspot you want to connect to</p></li> |
− | |||
− | orangepi@orangepi:~$ '''sudo nmcli dev wifi connect wifi_name password wifi_passwd''' | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | orangepi@orangepi:~$ '''sudo nmcli dev wifi connect <span style="color:#FF0000">wifi_name</span> password <span style="color:#FF0000">wifi_passwd</span>''' | ||
Device 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'. | Device 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'. | ||
− | + | |} | |
+ | </ol> | ||
+ | </li></ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>You can view the IP address of wifi through the '''ip addr show wlan0''' command</li | + | <li>You can view the IP address of wifi through the '''ip addr show wlan0''' command</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''ip a s wlan0''' | orangepi@orangepi:~$ '''ip a s wlan0''' | ||
11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 | 11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 | ||
− | link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff | + | :link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff |
− | inet '''192.168.1.11'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0 | + | :inet '''<span style="color:#FF0000">192.168.1.11</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0 |
− | valid_lft 259192sec preferred_lft 259192sec | + | ::valid_lft 259192sec preferred_lft 259192sec |
− | inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute | + | :inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute |
− | valid_lft 259192sec preferred_lft 172792sec | + | ::valid_lft 259192sec preferred_lft 172792sec |
− | inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute | + | :inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute |
− | |||
− | |||
+ | ::valid_lft forever preferred_lft forever | ||
+ | |} | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+'''</li | + | <li>Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0''' | orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0''' | ||
Line 1,840: | Line 2,083: | ||
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms | rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="the-server-image-connects-to-wifi-in-a-graphical-way"></span> | ||
− | |||
==== The server image connects to WIFI in a graphical way ==== | ==== The server image connects to WIFI in a graphical way ==== | ||
Line 1,847: | Line 2,092: | ||
<li><p>First log in to the linux system, there are the following three ways</p> | <li><p>First log in to the linux system, there are the following three ways</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>If the development board is connected with a network cable''', | + | <li><p>If the development board is connected with a network cable''', [[Orange Pi Zero 3#SSH remote login development board under Ubuntu|'''SSH remote login development board under Ubuntu''']]'''</p></li> |
<li><p>If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the linux system (please use MobaXterm for the serial port software, and the minicom cannot display the graphical interface)</p></li> | <li><p>If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the linux system (please use MobaXterm for the serial port software, and the minicom cannot display the graphical interface)</p></li> | ||
<li><p>If the development board is connected to the HDMI display, you can log in to the linux system through the HDMI display terminal</p></li></ol> | <li><p>If the development board is connected to the HDMI display, you can log in to the linux system through the HDMI display terminal</p></li></ol> | ||
</li> | </li> | ||
− | <li><p>Then enter the nmtui command in the command line to open the wifi connection interface</p | + | <li><p>Then enter the nmtui command in the command line to open the wifi connection interface</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo nmtui''' | orangepi@orangepi:~$ '''sudo nmtui''' | ||
− | + | |} | |
+ | </li></ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Enter the nmtui command to open the interface as shown below</li> | + | <li>Enter the nmtui command to open the interface as shown below</li> |
− | |||
− | |||
+ | [[File:zero3-img108.png]] | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>Select '''Activate a connect''' and press Enter</li> | + | <li>Select '''Activate a connect''' and press Enter</li> |
− | |||
− | |||
+ | [[File:zero3-img109.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
− | <li>Then you can see all the searched WIFI hotspots</li | + | <li>Then you can see all the searched WIFI hotspots</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img110.png]] |
− | </div> | + | </div></ol> |
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
− | <li>Select the WIFI hotspot you want to connect to, then use the Tab key to position the cursor on '''Activate''' and press Enter</li | + | <li>Select the WIFI hotspot you want to connect to, then use the Tab key to position the cursor on '''Activate''' and press Enter</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img111.png]] |
− | </div> | + | </div></ol> |
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>Then a dialog box for entering a password will pop up, enter the corresponding password in '''Password''' and press Enter to start connecting to WIFI</li | + | <li>Then a dialog box for entering a password will pop up, enter the corresponding password in '''Password''' and press Enter to start connecting to WIFI</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img112.png]] |
− | </div> | + | </div></ol> |
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
− | <li>After the WIFI connection is successful, a "*" will be displayed in front of the connected WIFI name</li | + | <li>After the WIFI connection is successful, a "*" will be displayed in front of the connected WIFI name</li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img113-2.png]] |
− | </div> | + | </div></ol> |
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
− | <li>You can view the IP address of wifi through the '''ip a s wlan0''' command</li | + | <li>You can view the IP address of wifi through the '''ip a s wlan0''' command</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''ip a s wlan0''' | orangepi@orangepi:~$ '''ip a s wlan0''' | ||
11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 | 11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 | ||
− | link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff | + | :link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff |
− | inet '''192.168.1.11'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0 | + | :inet '''<span style="color:#FF0000">192.168.1.11</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0 |
− | valid_lft 259069sec preferred_lft 259069sec | + | ::valid_lft 259069sec preferred_lft 259069sec |
− | inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute | + | :inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute |
− | valid_lft 259071sec preferred_lft 172671sec | + | ::valid_lft 259071sec preferred_lft 172671sec |
− | inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute | + | :inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute |
− | |||
− | |||
+ | ::valid_lft forever preferred_lft forever | ||
+ | |} | ||
+ | </ol> | ||
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
− | <li>Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</li | + | <li>Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0''' | orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0''' | ||
Line 1,942: | Line 2,198: | ||
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms | rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="test-method-of-desktop-image"></span> | ||
− | |||
==== Test method of desktop image ==== | ==== Test method of desktop image ==== | ||
# Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI) | # Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI) | ||
− | [[File: | + | ::[[File:zero3-img114.png]] |
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>Click '''More networks''' in the pop-up drop-down box to see all scanned WIFI hotspots, and then select the WIFI hotspot you want to connect to</li> | + | <li>Click '''More networks''' in the pop-up drop-down box to see all scanned WIFI hotspots, and then select the WIFI hotspot you want to connect to</li> |
− | |||
− | |||
+ | [[File:zero3-img115.png]] | ||
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Then enter the password of the WIFI hotspot, and then click '''Connect'''to start connecting to WIFI</li> | + | <li>Then enter the password of the WIFI hotspot, and then click '''Connect''' to start connecting to WIFI</li> |
− | |||
− | |||
+ | [[File:zero3-img116.png]] | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>After connecting to WIFI, you can open the browser to check whether you can access the Internet. The entrance of the browser is shown in the figure below</li> | + | <li>After connecting to WIFI, you can open the browser to check whether you can access the Internet. The entrance of the browser is shown in the figure below</li> |
− | |||
− | |||
+ | [[File:zero3-img117.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
− | <li>If you can open other web pages after opening the browser, it means that the WIFI connection is normal</li | + | <li>If you can open other web pages after opening the browser, it means that the WIFI connection is normal</li> |
− | [[File: | + | [[File:zero3-img118.png]] |
+ | </ol> | ||
+ | <span id="the-method-of-creating-wifi-hotspot-through-create_ap"></span> | ||
− | |||
=== The method of creating WIFI hotspot through create_ap === | === The method of creating WIFI hotspot through create_ap === | ||
− | '''create_ap is a script that helps quickly create WIFI hotspots on Linux, and supports bridge and NAT modes. It can automatically combine hostapd, dnsmasq and iptables to complete the setting of WIFI hotspots, avoiding complex configuration for users. The github address is as follows:''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''create_ap is a script that helps quickly create WIFI hotspots on Linux, and supports bridge and NAT modes. It can automatically combine hostapd, dnsmasq and iptables to complete the setting of WIFI hotspots, avoiding complex configuration for users. The github address is as follows:''' | ||
+ | |||
+ | [https://github.com/oblique/create_ap '''https://github.com/oblique/create_ap''']</big> | ||
+ | |} | ||
− | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | |
+ | |- | ||
+ | | | ||
+ | <big>'''The Linux image released by OPi has pre-installed the create_ap script. You can create a WIFI hotspot through the create_ap command. The basic command format of create_ap is as follows:''' | ||
− | |||
'''create_ap [options] <wifi-interface> [<interface-with-internet>] [<access-point-name> [<passphrase>]]''' | '''create_ap [options] <wifi-interface> [<interface-with-internet>] [<access-point-name> [<passphrase>]]''' | ||
− | |||
− | '''* wifi- | + | '''* options:''' '''You can use this parameter to specify the encryption method, the frequency band of the WIFI hotspot, the bandwidth mode, the network sharing method, etc. You can get the options through create_ap -h''' |
+ | |||
+ | '''* wifi-interface:The name of the wireless network card''' | ||
− | '''* interface-with- | + | '''* interface-with-internet:''' '''The name of the network card that can be connected to the Internet, generally eth0''' |
− | '''* access-point- | + | '''* access-point-name: hotspot name''' |
− | '''* | + | '''* passphrase:hotspot password'''</big> |
+ | |} | ||
<span id="create_ap-method-to-create-wifi-hotspot-in-nat-mode"></span> | <span id="create_ap-method-to-create-wifi-hotspot-in-nat-mode"></span> | ||
Line 1,996: | Line 2,265: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Enter the following command to create a WIFI hotspot named '''orangepi''' and password '''orangepi''' in NAT mode</p> | <li><p>Enter the following command to create a WIFI hotspot named '''orangepi''' and password '''orangepi''' in NAT mode</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt''' | ||
− | + | |} | |
+ | </li></ol> | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>If the following information is output, it means that the WIFI hotspot is created successfully</li | + | <li>If the following information is output, it means that the WIFI hotspot is created successfully</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt''' | ||
Line 2,028: | Line 2,308: | ||
wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86 | wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86 | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Take out the mobile phone at this time, you can find the WIFI hotspot named '''orangepi''' created by the development board in the searched WIFI list, and then you can click '''orangepi''' to connect to the hotspot, the password is set above '''orangepi'''</li> | + | <li>Take out the mobile phone at this time, you can find the WIFI hotspot named '''orangepi''' created by the development board in the searched WIFI list, and then you can click '''orangepi''' to connect to the hotspot, the password is set above '''orangepi'''</li> |
− | |||
− | |||
+ | [[File:zero3-img119-1.png]] | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>After the connection is successful, the display is as shown in the figure below</li> | + | <li>After the connection is successful, the display is as shown in the figure below</li> |
− | |||
− | |||
+ | [[File:zero3-img120-1.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>In NAT mode, the wireless device connected to the hotspot of the development board requests an IP address from the DHCP service of the development board, so there will be two different network segments, for example, the IP of the development board is 192.168.1.X</p> | <li><p>In NAT mode, the wireless device connected to the hotspot of the development board requests an IP address from the DHCP service of the development board, so there will be two different network segments, for example, the IP of the development board is 192.168.1.X</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo ifconfig eth0''' | orangepi@orangepi:~$ '''sudo ifconfig eth0''' | ||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | ||
− | inet '''192.168.1.150''' netmask 255.255.255.0 broadcast 192.168.1.255 | + | ::inet '''<span style="color:#FF0000">192.168.1.150</span>''' netmask 255.255.255.0 broadcast 192.168.1.255 |
− | inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20<link> | + | ::inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20<link> |
− | ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet) | + | ::ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet) |
− | RX packets 25370 bytes 2709590 (2.7 MB) | + | ::RX packets 25370 bytes 2709590 (2.7 MB) |
− | RX errors 0 dropped 50 overruns 0 frame 0 | + | ::RX errors 0 dropped 50 overruns 0 frame 0 |
− | TX packets 3798 bytes 1519493 (1.5 MB) | + | ::TX packets 3798 bytes 1519493 (1.5 MB) |
− | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | + | ::TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
− | device interrupt 83 | + | ::device interrupt 83 |
+ | |} | ||
By default, the DHCP service of the development board will assign an IP address of '''192.168.12.0/24''' to the device connected to the hotspot. At this time, click on the connected WIFI hotspot '''orangepi''', and then you can see that the IP address of the mobile phone is '''192.168.12.X''' | By default, the DHCP service of the development board will assign an IP address of '''192.168.12.0/24''' to the device connected to the hotspot. At this time, click on the connected WIFI hotspot '''orangepi''', and then you can see that the IP address of the mobile phone is '''192.168.12.X''' | ||
− | [[File: | + | [[File:zero3-img120-1.png]] |
− | |||
− | |||
+ | [[File:zero3-img121-2.png]] | ||
+ | </li></ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
− | <li>If you want to specify a different network segment for the connected device, you can specify it through the -g parameter, such as specifying the network segment of the access point AP through the -g parameter as 192.168.2.1</li | + | <li>If you want to specify a different network segment for the connected device, you can specify it through the -g parameter, such as specifying the network segment of the access point AP through the -g parameter as 192.168.2.1</li> |
− | '''Note that in the following commands, Debian12 needs to change eth0 to end0.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi -g 192.168.2.1 --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi -g 192.168.2.1 --no-virt''' | ||
+ | |} | ||
At this time, after connecting to the hotspot through the mobile phone, click on the connected WIFI hotspot '''orangepi''', and then you can see that the IP address of the mobile phone is '''192.168.2.X'''. | At this time, after connecting to the hotspot through the mobile phone, click on the connected WIFI hotspot '''orangepi''', and then you can see that the IP address of the mobile phone is '''192.168.2.X'''. | ||
− | [[File: | + | [[File:zero3-img120-1.png]] |
− | |||
− | |||
+ | [[File:zero3-img122-2.png]] | ||
+ | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
<li><p>If the '''--freq-band''' parameter is not specified, the hotspot created by default is in the 2.4G frequency band. If you want to create a hotspot in the 5G frequency band, you can specify the'''--freq-band 5''' parameter. The specific command is as follows</p> | <li><p>If the '''--freq-band''' parameter is not specified, the hotspot created by default is in the 2.4G frequency band. If you want to create a hotspot in the 5G frequency band, you can specify the'''--freq-band 5''' parameter. The specific command is as follows</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt''' | ||
− | + | |} | |
+ | </li></ol> | ||
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
<li><p>If you need to hide the SSID, you can specify the '''--hidden''' parameter, the specific command is as follows</p> | <li><p>If you need to hide the SSID, you can specify the '''--hidden''' parameter, the specific command is as follows</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --hidden --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --hidden --no-virt''' | ||
+ | |} | ||
At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot. | At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot. | ||
− | [[File: | + | [[File:zero3-img123-1.png]] |
+ | </li></ol> | ||
+ | <span id="create_ap-method-to-create-wifi-hotspot-in-bridge-mode"></span> | ||
− | |||
==== create_ap method to create WIFI hotspot in bridge mode ==== | ==== create_ap method to create WIFI hotspot in bridge mode ==== | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Enter the following command to create a WIFI hotspot named '''orangepi''' and password '''orangepi''' in bridge mode</p> | <li><p>Enter the following command to create a WIFI hotspot named '''orangepi''' and password '''orangepi''' in bridge mode</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt''' | ||
− | + | |} | |
+ | </li></ol> | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>If the following information is output, it means that the WIFI hotspot is created successfully</li | + | <li>If the following information is output, it means that the WIFI hotspot is created successfully</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt''' | ||
Line 2,137: | Line 2,462: | ||
wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86 | wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86 | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Take out the mobile phone at this time, and you can find the WIFI hotspot named orangepi created by the development board in the searched WIFI list, and then you can click '''orangepi''' to connect to the hotspot, and the password is the '''orangepi''' set above</li> | + | <li>Take out the mobile phone at this time, and you can find the WIFI hotspot named orangepi created by the development board in the searched WIFI list, and then you can click '''orangepi''' to connect to the hotspot, and the password is the '''orangepi''' set above</li> |
− | |||
− | |||
+ | [[File:zero3-img119-1.png]] | ||
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>After the connection is successful, the display is as shown in the figure below</li> | + | <li>After the connection is successful, the display is as shown in the figure below</li> |
− | |||
− | |||
+ | [[File:zero3-img120-1.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
− | <li>In bridge mode, the wireless device connected to the hotspot of the development board also requests an IP address from the DHCP service of the main router (the router connected to the development board), for example, the IP of the development board is '''192.168.1.X'''</li | + | <li>In bridge mode, the wireless device connected to the hotspot of the development board also requests an IP address from the DHCP service of the main router (the router connected to the development board), for example, the IP of the development board is '''192.168.1.X'''</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo ifconfig eth0''' | orangepi@orangepi:~$ '''sudo ifconfig eth0''' | ||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | ||
− | inet '''192.168.1.150''' netmask 255.255.255.0 broadcast 192.168.1.255 | + | ::inet '''<span style="color:#FF0000">192.168.1.150</span>''' netmask 255.255.255.0 broadcast 192.168.1.255 |
− | inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20<link> | + | ::inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20<link> |
− | ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet) | + | ::ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet) |
− | RX packets 25370 bytes 2709590 (2.7 MB) | + | ::RX packets 25370 bytes 2709590 (2.7 MB) |
− | RX errors 0 dropped 50 overruns 0 frame 0 | + | ::RX errors 0 dropped 50 overruns 0 frame 0 |
− | TX packets 3798 bytes 1519493 (1.5 MB) | + | ::TX packets 3798 bytes 1519493 (1.5 MB) |
− | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | + | ::TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
− | device interrupt 83 | + | ::device interrupt 83 |
+ | |} | ||
− | The IP of the device connected to the WIFI hotspot is also assigned by the main router, so the mobile phone connected to the WIFI hotspot and the development board are in the same network segment. At this time, click on the connected WIFI hotspot orangepi, and then you can see the IP address of the mobile phone | + | The IP of the device connected to the WIFI hotspot is also assigned by the main router, so the mobile phone connected to the WIFI hotspot and the development board are in the same network segment. At this time, click on the connected WIFI hotspot orangepi, and then you can see the IP address of the mobile phone also '''192.168.1.X'''. |
− | [[File: | + | [[File:zero3-img120-1.png]] |
− | |||
− | |||
+ | [[File:zero3-img124-1.png]] | ||
+ | </ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
<li><p>If the '''--freq-band''' y band. If you want to create a hotspot in the 5G frequency band, you can specify the '''--freq-band 5''' parameter. The specific command is as follows</p> | <li><p>If the '''--freq-band''' y band. If you want to create a hotspot in the 5G frequency band, you can specify the '''--freq-band 5''' parameter. The specific command is as follows</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt''' | ||
− | + | |} | |
+ | </li></ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
<li><p>If you need to hide the SSID, you can specify the '''--hidden''' parameter, the specific command is as follows</p> | <li><p>If you need to hide the SSID, you can specify the '''--hidden''' parameter, the specific command is as follows</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --hidden --no-virt''' | orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --hidden --no-virt''' | ||
+ | |} | ||
At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot. | At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot. | ||
− | [[File: | + | [[File:zero3-img123-1.png]] |
+ | </li></ol> | ||
+ | <span id="how-to-set-static-ip-address"></span> | ||
− | |||
=== How to set static IP address === | === How to set static IP address === | ||
− | '''Please do not set a static IP address by modifying the /etc/network/interfaces configuration file.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Please do not set a static IP address by modifying the /etc/network/interfaces configuration file.'''</big> | ||
+ | |} | ||
<span id="use-the-nmtui-command-to-set-a-static-ip-address"></span> | <span id="use-the-nmtui-command-to-set-a-static-ip-address"></span> | ||
Line 2,203: | Line 2,554: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First run the '''nmtui''' command</p> | <li><p>First run the '''nmtui''' command</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo nmtui'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo nmtui'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''Edit a connection''' and press Enter</p> | <li><p>Then select '''Edit a connection''' and press Enter</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img125.png]]</p></li> |
<li><p>Then select the network interface that needs to set a static IP address, for example, to set the static IP address of the '''Ethernet''' interface, select '''Wired connection 1'''.</p> | <li><p>Then select the network interface that needs to set a static IP address, for example, to set the static IP address of the '''Ethernet''' interface, select '''Wired connection 1'''.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img126.png]]</p></li> |
<li><p>Then select '''Edit''' with the '''Tab''' key and press the Enter key</p> | <li><p>Then select '''Edit''' with the '''Tab''' key and press the Enter key</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img127.png]]</p></li> |
<li><p>Then use the Tab key to move the cursor to the '''<Automatic>''' position shown in the figure below to configure IPv4</p> | <li><p>Then use the Tab key to move the cursor to the '''<Automatic>''' position shown in the figure below to configure IPv4</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img128.png]]</p></li> |
<li><p>Then press Enter, select '''Manual''' through the up and down arrow keys, and press Enter to confirm</p> | <li><p>Then press Enter, select '''Manual''' through the up and down arrow keys, and press Enter to confirm</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img129.png]]</p></li> |
<li><p>The display after selection is shown in the figure below</p> | <li><p>The display after selection is shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img130.png]]</p></li> |
− | <li><p> | + | <li><p>Then move the cursor to '''<Show>''' via the Tab key</p> |
− | <p>[[File: | + | <p>[[File:zero3-img131.png]]</p></li> |
<li><p>Then press Enter, the following setting interface will pop up after entering</p> | <li><p>Then press Enter, the following setting interface will pop up after entering</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img132.png]]</p></li> |
− | <li><p>Then you can set the IP address (Addresses), gateway (Gateway) and DNS server address in the position shown in the figure below (there are many other setting options in it, please explore by yourself), '''please set according to your specific needs, The values set in the image below are just an example'''</p> | + | <li><p>Then you can set the IP address (Addresses), gateway (Gateway) and DNS server address in the position shown in the figure below (there are many other setting options in it, please explore by yourself), '''<span style="color:#FF0000">please set according to your specific needs, The values set in the image below are just an example</span>'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img133.png]]</p></li> |
<li><p>After setting, move the cursor to '''<OK>''' in the lower right corner, and press Enter to confirm</p> | <li><p>After setting, move the cursor to '''<OK>''' in the lower right corner, and press Enter to confirm</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img134.png]]</p></li> |
<li><p>Then click '''<Back>''' to return to the previous selection interface</p> | <li><p>Then click '''<Back>''' to return to the previous selection interface</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img135.png]]</p></li> |
<li><p>Then select '''Activate a connection''', then move the cursor to '''<OK>''', and finally click Enter</p> | <li><p>Then select '''Activate a connection''', then move the cursor to '''<OK>''', and finally click Enter</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img136.png]]</p></li> |
<li><p>Then select the network interface that needs to be set, such as '''Wired connection 1''', then move the cursor to <Deactivate>, and press the Enter key to disable '''Wired connection 1'''</p> | <li><p>Then select the network interface that needs to be set, such as '''Wired connection 1''', then move the cursor to <Deactivate>, and press the Enter key to disable '''Wired connection 1'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img137.png]]</p></li> |
<li><p>Then please do not move the cursor, and then press the Enter key to re-enable '''Wired connection 1''', so that the static IP address set earlier will take effect</p> | <li><p>Then please do not move the cursor, and then press the Enter key to re-enable '''Wired connection 1''', so that the static IP address set earlier will take effect</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img138.png]]</p></li> |
<li><p>Then you can exit nmtui through the '''<Back>''' and '''Quit''' buttons</p> | <li><p>Then you can exit nmtui through the '''<Back>''' and '''Quit''' buttons</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img139.png]] [[File:zero3-img140.png]]</p></li> |
<li><p>Then through '''ip a s eth0''', you can see that the IP address of the network port has changed to the static IP address set earlier</p> | <li><p>Then through '''ip a s eth0''', you can see that the IP address of the network port has changed to the static IP address set earlier</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ip a s eth0'''</p> | <p>orangepi@orangepi:~$ '''ip a s eth0'''</p> | ||
<p>3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p> | <p>3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p> | ||
− | <p>link/ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff</p> | + | :<p>link/ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff</p> |
− | <p>inet '''192.168.1.177'''/24 brd 192.168.1.255 scope global noprefixroute eth0</p> | + | :<p>inet '''<span style="color:#FF0000">192.168.1.177</span>'''/24 brd 192.168.1.255 scope global noprefixroute eth0</p> |
− | <p>valid_lft forever preferred_lft forever</p> | + | ::<p>valid_lft forever preferred_lft forever</p> |
− | <p>inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute</p> | + | :<p>inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute</p> |
− | <p>valid_lft 259149sec preferred_lft 172749sec</p> | + | ::<p>valid_lft 259149sec preferred_lft 172749sec</p> |
− | <p>inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute</p> | + | :<p>inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute</p> |
− | <p>valid_lft forever preferred_lft forever</p></li> | + | ::<p>valid_lft forever preferred_lft forever</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then you can test the connectivity of the network to check whether the IP address is configured OK, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</p> | <li><p>Then you can test the connectivity of the network to check whether the IP address is configured OK, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</p> | ||
− | <p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that in the following commands, I is capital i, Debian12 needs to change eth0 to end0.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ping 192.168.1.177 -I eth0'''</p> | <p>orangepi@orangepi:~$ '''ping 192.168.1.177 -I eth0'''</p> | ||
<p>PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.</p> | <p>PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.</p> | ||
Line 2,257: | Line 2,629: | ||
<p>--- 192.168.1.47 ping statistics ---</p> | <p>--- 192.168.1.47 ping statistics ---</p> | ||
<p>5 packets transmitted, 5 received, 0% packet loss, time 4042ms</p> | <p>5 packets transmitted, 5 received, 0% packet loss, time 4042ms</p> | ||
− | <p>rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms</p></li></ol> | + | <p>rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="use-the-nmcli-command-to-set-a-static-ip-address"></span> | <span id="use-the-nmcli-command-to-set-a-static-ip-address"></span> | ||
+ | |||
==== Use the nmcli command to set a static IP address ==== | ==== Use the nmcli command to set a static IP address ==== | ||
Line 2,266: | Line 2,641: | ||
<li><p>Then you can view the name of the network device through the '''nmcli con show''' command, as shown below</p> | <li><p>Then you can view the name of the network device through the '''nmcli con show''' command, as shown below</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''orangepi''' is the name of the WIFI network interface (the name | + | <li><p>'''orangepi''' is the name of the WIFI network interface (the name is not necessarily the same)</p></li> |
<li><p>'''Wired connection 1''' is the name of the Ethernet interface</p> | <li><p>'''Wired connection 1''' is the name of the Ethernet interface</p> | ||
− | + | {| class="wikitable" style="width:800px;" | |
− | < | + | |- |
− | < | + | | |
− | < | + | orangepi@orangepi:~$ '''nmcli con show'''<br> |
+ | <span style="margin-right: 180px;">NAME</span><span style="margin-right: 260px;">UUID </span><span style="margin-right: 45px;">TYPE </span><span style="margin-right: 50px;">DEVICE</span><br> | ||
+ | <span style="margin-right: 125px;">'''orangepi'''</span><span style="margin-right: 70px;">cfc4f922-ae48-46f1-84e1-2f19e9ec5e2a</span><span style="margin-right: 50px;">wifi </span><span style="margin-right: 50px;">wlan0</span><br> | ||
+ | <span style="margin-right: 50px;">'''Wired connection 1'''</span><span style="margin-right: 50px;">9db058b7-7701-37b8-9411-efc2ae8bfa30</span><span style="margin-right: 30px;">ethernet </span><span style="margin-right: 50px;">eth0</span><br> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Then enter the following command, where</p> | <li><p>Then enter the following command, where</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''"Wired connection 1"''' means to set the static IP address of | + | <li><p>'''"Wired connection 1"''' means to set the static IP address of the Ethernet port. If you need to set the static IP address of the WIFI, please modify it to the corresponding name of the WIFI network interface (you can get it through the '''nmcli con show''' command)</p></li> |
− | <li><p>'''ipv4.addresses''' is followed by the static IP address to be | + | <li><p>'''ipv4.addresses''' is followed by the static IP address to be set, which can be modified to the value you want to set</p></li> |
<li><p>'''ipv4.gateway''' represents the address of the gateway</p> | <li><p>'''ipv4.gateway''' represents the address of the gateway</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo nmcli con mod "Wired connection 1" \< | + | {| class="wikitable" style="width:800px;" |
− | ipv4.addresses "192.168.1.110" \'''</p> | + | |- |
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo nmcli con mod "Wired connection 1" \</p> | ||
+ | <p>ipv4.addresses "192.168.1.110" \'''</p> | ||
<p>'''ipv4.gateway "192.168.1.1" \'''</p> | <p>'''ipv4.gateway "192.168.1.1" \'''</p> | ||
<p>'''ipv4.dns "8.8.8.8" \'''</p> | <p>'''ipv4.dns "8.8.8.8" \'''</p> | ||
− | <p>'''ipv4.method "manual"'''</p></li></ol> | + | <p>'''ipv4.method "manual"'''</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Then restart the linux system</p> | <li><p>Then restart the linux system</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo reboot'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo reboot'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then re-enter the linux system and use the '''ip addr show eth0''' command to see that the IP address has been set to the desired value</p> | <li><p>Then re-enter the linux system and use the '''ip addr show eth0''' command to see that the IP address has been set to the desired value</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ip addr show eth0'''</p> | <p>orangepi@orangepi:~$ '''ip addr show eth0'''</p> | ||
<p>3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p> | <p>3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</p> | ||
− | <p>link/ether 5e:ae:14:a5:91:b3 brd ff:ff:ff:ff:ff:ff</p> | + | :<p>link/ether 5e:ae:14:a5:91:b3 brd ff:ff:ff:ff:ff:ff</p> |
− | <p>inet '''192.168.1.110'''/32 brd 192.168.1.110 scope global noprefixroute eth0</p> | + | :<p>inet '''<span style="color:#FF0000">192.168.1.110</span>'''/32 brd 192.168.1.110 scope global noprefixroute eth0</p> |
− | <p>valid_lft forever preferred_lft forever</p> | + | ::<p>valid_lft forever preferred_lft forever</p> |
− | <p>inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute</p> | + | :<p>inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute</p> |
− | <p>valid_lft 259183sec preferred_lft 172783sec</p> | + | ::<p>valid_lft 259183sec preferred_lft 172783sec</p> |
− | <p>inet6 fe80::3312:861a:a589:d3c/64 scope link noprefixroute</p> | + | :<p>inet6 fe80::3312:861a:a589:d3c/64 scope link noprefixroute</p> |
− | <p>valid_lft forever preferred_lft forever</p></li></ol> | + | ::<p>valid_lft forever preferred_lft forever</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="the-method-of-setting-the-linux-system-to-automatically-connect-to-the-network-for-the-first-time"></span> | <span id="the-method-of-setting-the-linux-system-to-automatically-connect-to-the-network-for-the-first-time"></span> | ||
+ | |||
=== The method of setting the Linux system to automatically connect to the network for the first time === | === The method of setting the Linux system to automatically connect to the network for the first time === | ||
− | '''The development board has an Ethernet port. If you want to remotely log in to the Linux system of the development board through the Ethernet port, you only need to plug in a network cable that can access the Internet normally to the Ethernet port. Assign an IP address, and then we can obtain the IP address of the Ethernet port through the HDMI screen, serial port or view the background of the router, and then we can log in to the Linux system remotely.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The development board has an Ethernet port. If you want to remotely log in to the Linux system of the development board through the Ethernet port, you only need to plug in a network cable that can access the Internet normally to the Ethernet port. Assign an IP address, and then we can obtain the IP address of the Ethernet port through the HDMI screen, serial port or view the background of the router, and then we can log in to the Linux system remotely.''' | ||
'''The development board also has wireless WIFI. If you want to remotely log in to the Linux system of the development board through WIFI, you need to remotely log in to the Linux system through the IP address of the Ethernet port ssh and then connect to WIFI through commands, or through commands on the HDMI screen or serial port. Connect to WIFI.''' | '''The development board also has wireless WIFI. If you want to remotely log in to the Linux system of the development board through WIFI, you need to remotely log in to the Linux system through the IP address of the Ethernet port ssh and then connect to WIFI through commands, or through commands on the HDMI screen or serial port. Connect to WIFI.''' | ||
− | '''But if there is no HDMI screen and serial port module, although there is a network cable, the IP address of the development board cannot be checked through the background of the router. Or there is no HDMI screen, serial port module and network cable, and only WIFI can be connected, then you can use the method introduced in this section to automatically connect to WIFI and also set the static IP address of WIFI or automatically set the static IP address of the Ethernet port.''' | + | '''But if there is no HDMI screen and serial port module, although there is a network cable, the IP address of the development board cannot be checked through the background of the router. Or there is no HDMI screen, serial port module and network cable, and only WIFI can be connected, then you can use the method introduced in this section to automatically connect to WIFI and also set the static IP address of WIFI or automatically set the static IP address of the Ethernet port.'''</big> |
+ | |} | ||
− | '''To use the method in this section, you first need to prepare a Linux system machine. For example, a computer or a virtual machine with Ubuntu system installed.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''To use the method in this section, you first need to prepare a Linux system machine. For example, a computer or a virtual machine with Ubuntu system installed.''' | ||
− | '''Why do you need a Linux system machine, because the root file system of the development board Linux system burned in the | + | '''Why do you need a Linux system machine, because the root file system of the development board Linux system burned in the micro SD card is in ext4 format, and the Linux system machine can mount it normally, and then modify the configuration files in it.'''</big> |
+ | |} | ||
− | '''If you want to modify it in the Windows system, you can use the software Paragon ExtFS for Windows. Since this software needs to be paid, and there is no similar free software that is easy to use, I will not demonstrate it here.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''If you want to modify it in the Windows system, you can use the software Paragon ExtFS for Windows. Since this software needs to be paid, and there is no similar free software that is easy to use, I will not demonstrate it here.''' | ||
− | '''In addition, if you have any problems with Paragon ExtFS for Windows software, please solve it yourself, we will not answer questions.''' | + | '''In addition, if you have any problems with Paragon ExtFS for Windows software, please solve it yourself, we will not answer questions.'''</big> |
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First burn the Linux image of the development board you want to use into the | + | <li><p>First burn the Linux image of the development board you want to use into the micro SD card, and then use a card reader to insert the micro SD card that has burned the Linux image of the development board into a machine with a Linux system (such as a machine with an Ubuntu system installed computer, the following uses Ubuntu computer as an example to demonstrate)</p></li> |
− | <li><p>When the | + | <li><p>When the micro SD card is inserted into the Ubuntu computer, the Ubuntu computer will generally automatically mount the partition of the Linux root file system in the micro SD card. You can know from the following command that '''/media/test/opi_root''' is the Linux root file in the micro SD card The path where the system is mounted</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~$ '''df -h | grep "media"'''</p> | <p>test@test:~$ '''df -h | grep "media"'''</p> | ||
− | <p>/dev/sdd1 1.4G 1.2G 167M 88% '''/media/test/opi_root'''</p> | + | <p>/dev/sdd1 1.4G 1.2G 167M 88% '''<span style="color:#FF0000">/media/test/opi_root</span>'''</p> |
<p>test@test:~$ '''ls /media/test/opi_root'''</p> | <p>test@test:~$ '''ls /media/test/opi_root'''</p> | ||
− | <p>bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var</p></li> | + | <p>bin boot dev etc home lib lost+found media mnt opt proc root run <br> sbin selinux srv sys tmp usr var</p> |
− | <li><p>Then enter the '''/boot''' directory of the Linux system burned in the | + | |} |
− | <p>test@test:~$ '''cd /media/test/opi_root/boot/'''</p></li> | + | </li> |
+ | <li><p>Then enter the '''/boot''' directory of the Linux system burned in the micro SD card</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>test@test:~$ '''cd /media/test/opi_root/boot/'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then copy the '''orangepi_first_run.txt.template''' to '''orangepi_first_run.txt'''. Through the orangepi_first_run.txt configuration file, you can set the Linux system on the development board to automatically connect to a WIFI hotspot when it starts for the first time, and you can also set the WIFI or Ethernet port. static IP address</p> | <li><p>Then copy the '''orangepi_first_run.txt.template''' to '''orangepi_first_run.txt'''. Through the orangepi_first_run.txt configuration file, you can set the Linux system on the development board to automatically connect to a WIFI hotspot when it starts for the first time, and you can also set the WIFI or Ethernet port. static IP address</p> | ||
− | <p>test@test:/media/test/opi_root/boot$ '''sudo cp orangepi_first_run.txt.template orangepi_first_run.txt'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>test@test:/media/test/opi_root/boot$ '''sudo cp orangepi_first_run.txt.template orangepi_first_run.txt'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>You can open the orangepi_first_run.txt file with the following command, and then you can view and modify the contents</p> | <li><p>You can open the orangepi_first_run.txt file with the following command, and then you can view and modify the contents</p> | ||
− | <p>test@test:/media/test/opi_root/boot$ '''sudo vim orangepi_first_run.txt'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>test@test:/media/test/opi_root/boot$ '''sudo vim orangepi_first_run.txt'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Instructions for using variables in the orangepi_first_run.txt file</p> | <li><p>Instructions for using variables in the orangepi_first_run.txt file</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''FR_general_delete_this_file_after_completion''' variable is | + | <li><p>'''FR_general_delete_this_file_after_completion''' variable is used to set whether to delete the orangepi_first_run.txt file after the first startup. The default is 1, that is, delete. If it is set to 0, orangepi_first_run.txt will be renamed to orangepi_first_run.txt after the first startup .old, generally keep the default value</p></li> |
− | <li><p>'''FR_net_change_defaults''' variable is used to set whether to | + | <li><p>'''FR_net_change_defaults''' variable is used to set whether to change the default network settings, this must be set to 1, otherwise all network settings will not take effect</p></li> |
− | <li><p>'''FR_net_ethernet_enabled''' variable is used to control whether | + | <li><p>'''FR_net_ethernet_enabled''' variable is used to control whether to enable the configuration of the Ethernet port. If you need to set the static IP address of the Ethernet port, please set it to 1</p></li> |
− | <li><p>'''FR_net_wifi_enabled''' variable is used to control whether to | + | <li><p>'''FR_net_wifi_enabled''' variable is used to control whether to enable WIFI configuration. If you need to set the development board to automatically connect to WIFI hotspots, you must set it to 1. In addition, please note that if this variable is set to 1, the setting of the Ethernet port will be will fail. That is to say, the WIFI and Ethernet ports cannot be set at the same time (why, because it is not necessary...)</p></li> |
− | <li><p>'''FR_net_wifi_ssid''' variable is used to set the name of the | + | <li><p>'''FR_net_wifi_ssid''' variable is used to set the name of the WIFI hotspot you want to connect to</p></li> |
− | <li><p>'''FR_net_wifi_key''' variable is used to set the password of the | + | <li><p>'''FR_net_wifi_key''' variable is used to set the password of the WIFI hotspot you want to connect to</p></li> |
− | <li><p>'''FR_net_use_static''' variable is used to set whether to set the | + | <li><p>'''FR_net_use_static''' variable is used to set whether to set the static IP address of WIFI or Ethernet port</p></li> |
− | <li><p>'''FR_net_static_ip''' variable is used to set static IP address, | + | <li><p>'''FR_net_static_ip''' variable is used to set static IP address, please set according to your actual situation</p></li> |
− | <li><p>'''FR_net_static_gateway''' variable is used to set the gateway, | + | <li><p>'''FR_net_static_gateway''' variable is used to set the gateway, please set it according to your actual situation</p></li></ol> |
</li> | </li> | ||
<li><p>The following demonstrates several specific setting examples:</p> | <li><p>The following demonstrates several specific setting examples:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>For example, if you want the Linux system of the development | + | <li><p>For example, if you want the Linux system of the development board to automatically connect to the WIFI hotspot after the first startup, you can set it like this:</p> |
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>Set '''FR_net_change_defaults''' to '''1'''</p></li> | + | <li><p>a) Set '''FR_net_change_defaults''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_wifi_enabled''' to '''1'''</p></li> | + | <li><p>b) Set '''FR_net_wifi_enabled''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_wifi_ssid''' to the name of the WIFI hotspot you | + | <li><p>c) Set '''FR_net_wifi_ssid''' to the name of the WIFI hotspot you want to connect to</p></li> |
− | <li><p>Set '''FR_net_wifi_key''' to the password of the WIFI hotspot | + | <li><p>d) Set '''FR_net_wifi_key''' to the password of the WIFI hotspot you want to connect to</p></li></ol> |
</li> | </li> | ||
− | <li><p>For example, if you want the Linux system of the development | + | <li><p>For example, if you want the Linux system of the development board to automatically connect to the WIFI hotspot after the first startup, and set the IP address of the WIFI to a specific static IP address (so that when the Linux system is started, you can directly use the set static IP address to ssh remotely Log in to the development board without checking the IP address of the development board through the background of the router), you can set it like this:</p> |
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>Set '''FR_net_change_defaults''' to '''1'''</p></li> | + | <li><p>a) Set '''FR_net_change_defaults''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_wifi_enabled''' to '''1'''</p></li> | + | <li><p>b) Set '''FR_net_wifi_enabled''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_wifi_ssid''' to the name of the WIFI hotspot you | + | <li><p>c) Set '''FR_net_wifi_ssid''' to the name of the WIFI hotspot you want to connect to</p></li> |
− | <li><p>Set '''FR_net_wifi_key''' to the password of the WIFI hotspot | + | <li><p>d) Set '''FR_net_wifi_key''' to the password of the WIFI hotspot you want to connect to</p></li> |
− | <li><p>Set '''FR_net_use_static''' to '''1'''</p></li> | + | <li><p>e) Set '''FR_net_use_static''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_static_ip''' to the desired IP address</p></li> | + | <li><p>f) Set '''FR_net_static_ip''' to the desired IP address</p></li> |
− | <li><p>Set '''FR_net_static_gateway''' to the corresponding gateway | + | <li><p>g) Set '''FR_net_static_gateway''' to the corresponding gateway address</p></li></ol> |
</li> | </li> | ||
− | <li><p>For example, if you want to automatically set the IP address of | + | <li><p>For example, if you want to automatically set the IP address of the Ethernet port to the desired static IP address after the Linux system of the development board starts for the first time, you can set it like this:</p> |
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>Set '''FR_net_change_defaults''' to '''1'''</p></li> | + | <li><p>a) Set '''FR_net_change_defaults''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_ethernet_enabled''' to '''1'''</p></li> | + | <li><p>b) Set '''FR_net_ethernet_enabled''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_use_static''' to '''1'''</p></li> | + | <li><p>c) Set '''FR_net_use_static''' to '''1'''</p></li> |
− | <li><p>Set '''FR_net_static_ip''' to the desired IP address</p></li> | + | <li><p>d) Set '''FR_net_static_ip''' to the desired IP address</p></li> |
− | <li><p>Set '''FR_net_static_gateway''' to the corresponding gateway | + | <li><p>e) Set '''FR_net_static_gateway''' to the corresponding gateway address</p></li></ol> |
</li></ol> | </li></ol> | ||
</li> | </li> | ||
− | <li><p>After modifying the orangepi_first_run.txt file, you can exit the /boot directory of the development board Linux system in the | + | <li><p>After modifying the orangepi_first_run.txt file, you can exit the /boot directory of the development board Linux system in the micro SD card, uninstall the micro SD card, and then insert the micro SD card into the development board to start</p></li> |
− | <li><p>If you have not set a static IP address, you still need to check the IP address through the background of the router. If you have set a static IP address, you can ping the set static IP address on the computer. If you can ping, it means that the system has started normally, and The network has also been set correctly, and then you can use the set IP address ssh to remotely log in to the Linux system of the development board</p | + | <li><p>If you have not set a static IP address, you still need to check the IP address through the background of the router. If you have set a static IP address, you can ping the set static IP address on the computer. If you can ping, it means that the system has started normally, and The network has also been set correctly, and then you can use the set IP address ssh to remotely log in to the Linux system of the development board</p> |
− | '''After the Linux system of the development board is started for the first time, orangepi_first_run.txt will be deleted or renamed to orangepi_first_run.txt.old. At this time, the orangepi_first_run.txt configuration file will be reset, and then the Linux system of the development board will be restarted, orangepi_first_run. The configuration in txt will not take effect again, because this configuration will only be effective when the Linux system is started for the first time after burning, please pay special attention to this point.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''After the Linux system of the development board is started for the first time, orangepi_first_run.txt will be deleted or renamed to orangepi_first_run.txt.old. At this time, the orangepi_first_run.txt configuration file will be reset, and then the Linux system of the development board will be restarted, orangepi_first_run. The configuration in txt will not take effect again, because this configuration will only be effective when the Linux system is started for the first time after burning, please pay special attention to this point.'''</big> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | <span id="ssh-remote-login-development-board"></span> | ||
− | |||
== SSH remote login development board == | == SSH remote login development board == | ||
− | '''Linux systems enable ssh remote login by default and allow the root user to log in to the system. Before logging in with ssh, you first need to ensure that the Ethernet or wifi network is connected, and then use the ip addr command or check the router to obtain the IP address of the development board.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Linux systems enable ssh remote login by default and allow the root user to log in to the system. Before logging in with ssh, you first need to ensure that the Ethernet or wifi network is connected, and then use the ip addr command or check the router to obtain the IP address of the development board.'''</big> | ||
+ | |} | ||
<span id="ssh-remote-login-development-board-under-ubuntu"></span> | <span id="ssh-remote-login-development-board-under-ubuntu"></span> | ||
Line 2,383: | Line 2,820: | ||
# Then you can remotely log in to the linux system through the ssh command | # Then you can remotely log in to the linux system through the ssh command | ||
− | test@test:~$ '''ssh [mailto:root@192.168.1.36 orangepi@192.168.1.]xxx''' (Need to be replaced with the IP address of the development board) | + | ::{| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | test@test:~$ '''ssh [mailto:root@192.168.1.36 orangepi@192.168.1.]xxx''' (Need to be replaced with the IP address of the development board) | ||
− | orangepi@192.168.1.xx's password: (Enter the password here, the default password is orangepi) | + | orangepi@192.168.1.xx's password: (Enter the password here, the default password is orangepi) |
+ | |} | ||
− | '''Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.''' | + | ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that when entering the password, <span style="color:#FF0000">the specific content of the entered password will not be displayed on the screen</span>, please do not think that there is any fault, just press Enter after inputting.''' | ||
− | '''If you are prompted to refuse the connection, as long as you are using the image provided by Orange Pi, please do not suspect that the password orangepi is wrong, but find other reasons.''' | + | '''If you are prompted to refuse the connection, as long as you are using the image provided by Orange Pi, <span style="color:#FF0000">please do not suspect that the password orangepi is wrong</span>, but find other reasons.'''</big> |
+ | |} | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>After successfully logging in to the system, the display is as shown in the figure below</p> | <li><p>After successfully logging in to the system, the display is as shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img141.png]]</p> |
− | <p>'''If ssh fails to log in to the linux system normally, first check whether the IP address of the development board can be pinged. If the ping is ok, you can log in to the linux system through the serial port or HDMI display and then enter the following command on the development board and try again. Is it possible to connect:'''</p | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''If ssh fails to log in to the linux system normally, first check whether the IP address of the development board can be pinged. If the ping is ok, you can log in to the linux system through the serial port or HDMI display and then enter the following command on the development board and try again. Is it possible to connect:'''</p> | ||
root@orangepi:~# '''reset_ssh.sh''' | root@orangepi:~# '''reset_ssh.sh''' | ||
− | '''If it still doesn't work, try to reset the system.''' | + | '''If it still doesn't work, try to reset the system.'''</big> |
+ | |} | ||
+ | </li></ol> | ||
<span id="ssh-remote-login-development-board-under-windows"></span> | <span id="ssh-remote-login-development-board-under-windows"></span> | ||
+ | |||
=== SSH remote login development board under Windows === | === SSH remote login development board under Windows === | ||
Line 2,409: | Line 2,860: | ||
<li><p>Open '''Session'''</p></li> | <li><p>Open '''Session'''</p></li> | ||
<li><p>Then select '''SSH''' in '''Session Setting'''</p></li> | <li><p>Then select '''SSH''' in '''Session Setting'''</p></li> | ||
− | <li><p>Then enter the IP address of the development board in the | + | <li><p>Then enter the IP address of the development board in the '''Remote host'''</p></li> |
− | <li><p>Then enter the user name root or orangepi of the linux system in | + | <li><p>Then enter the user name root or orangepi of the linux system in '''Specify username'''</p></li> |
<li><p>Finally click '''OK'''</p> | <li><p>Finally click '''OK'''</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img142.png]] |
</div></li></ol> | </div></li></ol> | ||
</li> | </li> | ||
<li><p>Then you will be prompted to enter a password. The default passwords for root and orangepi users are orangepi</p> | <li><p>Then you will be prompted to enter a password. The default passwords for root and orangepi users are orangepi</p> | ||
− | <p>'''Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that when entering the password, <span style="color:#FF0000">the specific content of the entered password will not be displayed on the screen</span>, please do not think that there is any fault, just press Enter after inputting.'''</p></big> | ||
+ | |} | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img143.png]] |
</div></li> | </div></li> | ||
<li><p>The display after successfully logging in to the system is shown in the figure below</p> | <li><p>The display after successfully logging in to the system is shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img144.png]]</p></li></ol> |
<span id="hdmi-test"></span> | <span id="hdmi-test"></span> | ||
+ | |||
== HDMI test == | == HDMI test == | ||
Line 2,436: | Line 2,892: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Use a Micro HDMI to HDMI cable to connect the Orange Pi development board and HDMI display</p> | <li><p>Use a Micro HDMI to HDMI cable to connect the Orange Pi development board and HDMI display</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img13.png]]</p></li> |
− | <li><p>After starting the linux system, if the HDMI monitor has image output, it means that the HDMI interface is working normally</p | + | <li><p>After starting the linux system, if the HDMI monitor has image output, it means that the HDMI interface is working normally</p> |
− | '''Note that although many laptops have an HDMI interface, the HDMI interface of the notebook generally only has the output function, and does not have the function of HDMI | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that although many laptops have an HDMI interface, the HDMI interface of the notebook generally only has the output function, and does not have the function of HDMI IN, that is to say, the HDMI output of other devices cannot be displayed on the notebook screen.''' | ||
− | '''When you want to connect the HDMI of the development board to the HDMI port of the laptop, please make sure that your laptop supports the HDMI | + | '''When you want to connect the HDMI of the development board to the HDMI port of the laptop, please make sure that your laptop supports the HDMI IN function.'''</big> |
+ | |} | ||
− | '''When the HDMI is not displayed, please check whether the HDMI cable is plugged in tightly. After confirming that there is no problem with the connection, you can change a different screen and try to see if it is displayed.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''When the HDMI is not displayed, please check whether the HDMI cable is plugged in tightly. After confirming that there is no problem with the connection, you can change a different screen and try to see if it is displayed.'''</big> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | <span id="hdmi-to-vga-display-test"></span> | ||
− | |||
=== HDMI to VGA display test === | === HDMI to VGA display test === | ||
Line 2,452: | Line 2,917: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>HDMI to VGA converter</p> | <li><p>HDMI to VGA converter</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img145.png]]</p></li> |
− | <li><p>A VGA cable and a Micro HDMI male to HDMI female conversion | + | <li><p>A VGA cable and a Micro HDMI male to HDMI female conversion cable</p> |
− | <p>[[File: | + | <p>[[File:zero3-img146-1.png|300px]] [[File:zero3-img147.png|300px]]</p></li> |
<li><p>A monitor or TV that supports VGA interface</p></li></ol> | <li><p>A monitor or TV that supports VGA interface</p></li></ol> | ||
</li> | </li> | ||
<li><p>HDMI to VGA display test as shown below</p> | <li><p>HDMI to VGA display test as shown below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img148.png]]</p> |
− | <p>'''When using HDMI to VGA display, the development board and the Linux system of the development board do not need to make any settings, only the Micro HDMI interface of the development board can display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.'''</p></li></ol> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''When using HDMI to VGA display, the development board and the Linux system of the development board do not need to make any settings, only the Micro HDMI interface of the development board can display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.'''</p></big> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="how-to-set-hdmi-resolution-in-linux5.4-system"></span> | <span id="how-to-set-hdmi-resolution-in-linux5.4-system"></span> | ||
+ | |||
=== How to set HDMI resolution in Linux5.4 system === | === How to set HDMI resolution in Linux5.4 system === | ||
− | '''Note: This method is only applicable to systems with linux5.4 kernel.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note: This method is only applicable to systems with linux5.4 kernel.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>There is a disp_mode variable in '''/boot/orangepiEnv.txt''' of the linux system, which can be used to set the resolution of the HDMI output. The default resolution of the linux system is 1080p60</p> | <li><p>There is a disp_mode variable in '''/boot/orangepiEnv.txt''' of the linux system, which can be used to set the resolution of the HDMI output. The default resolution of the linux system is 1080p60</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | <p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | ||
<p>verbosity=1</p> | <p>verbosity=1</p> | ||
<p>console=both</p> | <p>console=both</p> | ||
− | <p>disp_mode='''1080p60'''</p> | + | <p>disp_mode='''<span style="color:#FF0000">1080p60</span>'''</p> |
<p>fb0_width=1920</p> | <p>fb0_width=1920</p> | ||
− | <p>fb0_height=1080</p></li> | + | <p>fb0_height=1080</p> |
− | <li><p>The values supported by the disp_mode variable are shown in the table below</p | + | |} |
− | + | </li> | |
− | {| class="wikitable" | + | <li><p>The values supported by the disp_mode variable are shown in the table below</p> |
+ | |||
+ | {| class="wikitable" style="width:800px;" | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Supported values for disp_mode''' |
− | | style="text-align: | + | | style="text-align: center;"| '''HDMI resolution''' |
− | | style="text-align: | + | | style="text-align: center;"| '''HDMI refresh rate''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''480i''' |
− | | style="text-align: | + | | style="text-align: center;"| '''720x480''' |
− | | style="text-align: | + | | style="text-align: center;"| '''60''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''576i''' |
− | | style="text-align: | + | | style="text-align: center;"| '''720x480''' |
− | | style="text-align: | + | | style="text-align: center;"| '''50''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''480p''' |
− | | style="text-align: | + | | style="text-align: center;"| '''720x480''' |
− | | style="text-align: | + | | style="text-align: center;"| '''60''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''576p''' |
− | | style="text-align: | + | | style="text-align: center;"| '''720x576''' |
− | | style="text-align: | + | | style="text-align: center;"| '''60''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''720p50''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1280x720''' |
− | | style="text-align: | + | | style="text-align: center;"| '''50''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''720p60''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1280x720''' |
− | | style="text-align: | + | | style="text-align: center;"| '''60''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''1080i50''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1920x1080''' |
− | | style="text-align: | + | | style="text-align: center;"| '''50''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''1080i60''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1920x1080''' |
− | | style="text-align: | + | | style="text-align: center;"| '''60''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''1080p24''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1920x1080''' |
− | | style="text-align: | + | | style="text-align: center;"| '''24''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''1080p50''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1920x1080''' |
− | | style="text-align: | + | | style="text-align: center;"| '''50''' |
+ | |- | ||
+ | | style="text-align: center;"| '''1080p60''' | ||
+ | | style="text-align: center;"| '''1920x1080''' | ||
+ | | style="text-align: center;"| '''60''' | ||
+ | |} | ||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
|- | |- | ||
− | | | + | | |
− | + | <big>'''Note: Linux systems currently do not support 4K resolution.'''</big> | |
− | |||
|} | |} | ||
− | + | </li></ol> | |
− | |||
− | |||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Change the value of the disp_mode variable to the desired output resolution, and then restart the system, HDMI will output the set resolution</p></li> | <li><p>Change the value of the disp_mode variable to the desired output resolution, and then restart the system, HDMI will output the set resolution</p></li> | ||
<li><p>The method of viewing the HDMI output resolution is as follows. If the displayed resolution is the same as the set resolution, it means that the setting of the development board is correct.</p> | <li><p>The method of viewing the HDMI output resolution is as follows. If the displayed resolution is the same as the set resolution, it means that the setting of the development board is correct.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo cat /sys/class/disp/disp/attr/sys'''</p> | <p>orangepi@orangepi:~$ '''sudo cat /sys/class/disp/disp/attr/sys'''</p> | ||
− | <p>[[File: | + | |} |
+ | <p>[[File:zero3-img149.png]]</p></li></ol> | ||
<span id="how-to-modify-the-framebuffer-width-and-height-of-linux5.4-system"></span> | <span id="how-to-modify-the-framebuffer-width-and-height-of-linux5.4-system"></span> | ||
+ | |||
=== How to Modify the Framebuffer Width and Height of Linux5.4 System === | === How to Modify the Framebuffer Width and Height of Linux5.4 System === | ||
− | '''Note: This method is only applicable to systems with linux5.4 kernel.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note: This method is only applicable to systems with linux5.4 kernel.'''</big> | ||
+ | |} | ||
There are two variables fb0_width and fb0_height in the '''/boot/orangepiEnv.txt''' of the linux system, which can be used to set the width and height of the Framebuffer. The default setting of the linux system is fb0_width=1920 and fb0_height=1080. | There are two variables fb0_width and fb0_height in the '''/boot/orangepiEnv.txt''' of the linux system, which can be used to set the width and height of the Framebuffer. The default setting of the linux system is fb0_width=1920 and fb0_height=1080. | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' | orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' | ||
Line 2,550: | Line 3,045: | ||
disp_mode=1080p60 | disp_mode=1080p60 | ||
− | '''fb0_width=1920''' | + | '''<span style="color:#FF0000">fb0_width=1920</span>''' |
− | '''fb0_height=1080''' | + | '''<span style="color:#FF0000">fb0_height=1080</span>''' |
+ | |} | ||
The '''reference''' values corresponding to different resolutions of fb0_width and fb0_height are as follows: | The '''reference''' values corresponding to different resolutions of fb0_width and fb0_height are as follows: | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''HDMI resolution''' |
− | | style="text-align: | + | | style="text-align: center;"| '''fb0_width''' |
− | | style="text-align: | + | | style="text-align: center;"| '''fb0_height''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''480p''' |
− | | style="text-align: | + | | style="text-align: center;"| '''720''' |
− | | style="text-align: | + | | style="text-align: center;"| '''480''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''576p''' |
− | | style="text-align: | + | | style="text-align: center;"| '''720''' |
− | | style="text-align: | + | | style="text-align: center;"| '''576''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''720p''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1280''' |
− | | style="text-align: | + | | style="text-align: center;"| '''720''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''1080p''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1920''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1080''' |
|} | |} | ||
Line 2,582: | Line 3,078: | ||
<span id="framebuffer-cursor-setting"></span> | <span id="framebuffer-cursor-setting"></span> | ||
+ | |||
=== Framebuffer Cursor Setting === | === Framebuffer Cursor Setting === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The softcursor used by Framebuffer, the method of setting the cursor to blink or not is as follows</p> | <li><p>The softcursor used by Framebuffer, the method of setting the cursor to blink or not is as follows</p> | ||
− | <p>root@orangepi:~# '''echo 1 > /sys/class/graphics/fbcon/cursor_blink #cursor blinking'''</p> | + | {| class="wikitable" style="width:800px;" |
− | <p>root@orangepi:~# '''echo 0 > /sys/class/graphics/fbcon/cursor_blink #cursor not blinking'''</p></li> | + | |- |
+ | | | ||
+ | <p>root@orangepi:~# '''echo <span style="color:#FF0000">1</span> > /sys/class/graphics/fbcon/cursor_blink #cursor blinking'''</p> | ||
+ | <p>root@orangepi:~# '''echo <span style="color:#FF0000">0</span> > /sys/class/graphics/fbcon/cursor_blink #cursor not blinking'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>If you need to hide the cursor, you can add '''vt.global_cursor_default=0''' in the '''extraargs''' variable of '''/boot/orangepiEnv.txt''' (the value of extraargs will be assigned to the '''bootargs''' environment variable and finally passed to the kernel) (if '''vt.global_cursor_default=1''', the cursor will be displayed) , and then restart the system to see that the cursor has disappeared</p> | <li><p>If you need to hide the cursor, you can add '''vt.global_cursor_default=0''' in the '''extraargs''' variable of '''/boot/orangepiEnv.txt''' (the value of extraargs will be assigned to the '''bootargs''' environment variable and finally passed to the kernel) (if '''vt.global_cursor_default=1''', the cursor will be displayed) , and then restart the system to see that the cursor has disappeared</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | <p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | ||
<p>verbosity=1</p> | <p>verbosity=1</p> | ||
Line 2,595: | Line 3,100: | ||
<p>fb0_width=1920</p> | <p>fb0_width=1920</p> | ||
<p>fb0_height=1080</p> | <p>fb0_height=1080</p> | ||
− | <p>'''extraargs=vt.global_cursor_default=0'''</p></li></ol> | + | <p>'''<span style="color:#FF0000">extraargs=vt.global_cursor_default=0</span>'''</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="how-to-use-bluetooth"></span> | <span id="how-to-use-bluetooth"></span> | ||
+ | |||
== How to use Bluetooth == | == How to use Bluetooth == | ||
Line 2,605: | Line 3,113: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Click the Bluetooth icon in the upper right corner of the desktop</p> | <li><p>Click the Bluetooth icon in the upper right corner of the desktop</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img150.png]]</p></li> |
<li><p>Then select the adapter</p> | <li><p>Then select the adapter</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img151.png]]</p></li> |
<li><p>If there is a prompt on the following interface, please select '''Yes'''</p> | <li><p>If there is a prompt on the following interface, please select '''Yes'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img152.png]]</p></li> |
<li><p>Then set the '''Visibility Setting''' to '''Always visible''' in the Bluetooth adapter setting interface, and then close it</p> | <li><p>Then set the '''Visibility Setting''' to '''Always visible''' in the Bluetooth adapter setting interface, and then close it</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img153.png]]</p></li> |
<li><p>Then open the configuration interface of the Bluetooth device</p> | <li><p>Then open the configuration interface of the Bluetooth device</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img154.png]]</p></li> |
<li><p>Click '''Search''' to start scanning the surrounding Bluetooth devices</p> | <li><p>Click '''Search''' to start scanning the surrounding Bluetooth devices</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img155.png]]</p></li> |
<li><p>Then select the Bluetooth device you want to connect to, and then click the right button of the mouse to pop up the operation interface for this Bluetooth device, select '''Pair''' to start pairing, and the demonstration here is to pair with an Android phone</p> | <li><p>Then select the Bluetooth device you want to connect to, and then click the right button of the mouse to pop up the operation interface for this Bluetooth device, select '''Pair''' to start pairing, and the demonstration here is to pair with an Android phone</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img156.png]]</p></li> |
<li><p>When pairing, a pairing confirmation box will pop up in the upper right corner of the desktop, just select '''Confirm''' to confirm, and the phone also needs to confirm at this time</p> | <li><p>When pairing, a pairing confirmation box will pop up in the upper right corner of the desktop, just select '''Confirm''' to confirm, and the phone also needs to confirm at this time</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img157.png]]</p></li> |
<li><p>After pairing with the mobile phone, you can select the paired Bluetooth device, then right click and select '''Send a File''' to start sending a picture to the mobile phone</p> | <li><p>After pairing with the mobile phone, you can select the paired Bluetooth device, then right click and select '''Send a File''' to start sending a picture to the mobile phone</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img158.png]]</p></li> |
<li><p>The interface for sending pictures is as follows</p> | <li><p>The interface for sending pictures is as follows</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img159.png]]</p></li></ol> |
<span id="how-to-use-the-server-image"></span> | <span id="how-to-use-the-server-image"></span> | ||
Line 2,630: | Line 3,138: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>After entering the system, you can first check whether there is a Bluetooth device node through the '''hciconfig''' command. If it exists, it means that the Bluetooth initialization is normal.</p> | <li><p>After entering the system, you can first check whether there is a Bluetooth device node through the '''hciconfig''' command. If it exists, it means that the Bluetooth initialization is normal.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt update && sudo apt install -y bluez'''</p> | <p>orangepi@orangepi:~$ '''sudo apt update && sudo apt install -y bluez'''</p> | ||
<p>orangepi@orangepi:~$ '''hciconfig -a'''</p> | <p>orangepi@orangepi:~$ '''hciconfig -a'''</p> | ||
<p>hci0: Type: Primary Bus: UART</p> | <p>hci0: Type: Primary Bus: UART</p> | ||
− | <p>BD Address: 3E:61:3D:19:0E:52 ACL MTU: 1021:8 SCO MTU: 240:3</p> | + | :<p>BD Address: 3E:61:3D:19:0E:52 ACL MTU: 1021:8 SCO MTU: 240:3</p> |
− | <p>UP RUNNING</p> | + | :<p>UP RUNNING</p> |
− | <p>RX bytes:925 acl:0 sco:0 events:72 errors:0</p> | + | :<p>RX bytes:925 acl:0 sco:0 events:72 errors:0</p> |
− | <p>TX bytes:5498 acl:0 sco:0 commands:72 errors:0</p> | + | :<p>TX bytes:5498 acl:0 sco:0 commands:72 errors:0</p> |
− | <p>Features: 0xbf 0xff 0x8d 0xfe 0xdb 0x3d 0x7b 0xc7</p> | + | :<p>Features: 0xbf 0xff 0x8d 0xfe 0xdb 0x3d 0x7b 0xc7</p> |
− | <p>Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3</p> | + | :<p>Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3</p> |
− | <p>Link policy: RSWITCH SNIFF</p> | + | :<p>Link policy: RSWITCH SNIFF</p> |
− | <p>Link mode: SLAVE ACCEPT</p> | + | :<p>Link mode: SLAVE ACCEPT</p> |
− | <p>Name: 'orangepi'</p> | + | :<p>Name: 'orangepi'</p> |
− | <p>Class: 0x3c0000</p> | + | :<p>Class: 0x3c0000</p> |
− | <p>Service Classes: Rendering, Capturing, Object Transfer, Audio</p> | + | :<p>Service Classes: Rendering, Capturing, Object Transfer, Audio</p> |
− | <p>Device Class: Miscellaneous,</p> | + | :<p>Device Class: Miscellaneous,</p> |
− | <p>HCI Version: 5.0 (0x9) Revision: 0x400</p> | + | :<p>HCI Version: 5.0 (0x9) Revision: 0x400</p> |
− | <p>LMP Version: 5.0 (0x9) Subversion: 0x400</p> | + | :<p>LMP Version: 5.0 (0x9) Subversion: 0x400</p> |
− | <p>Manufacturer: Spreadtrum Communications Shanghai Ltd (492)</p></li> | + | :<p>Manufacturer: Spreadtrum Communications Shanghai Ltd (492)</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Use '''bluetoothctl''' to scan bluetooth devices</p> | <li><p>Use '''bluetoothctl''' to scan bluetooth devices</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo bluetoothctl'''</p> | <p>orangepi@orangepi:~$ '''sudo bluetoothctl'''</p> | ||
<p>[NEW] Controller 10:11:12:13:14:15 orangepizero3 [default]</p> | <p>[NEW] Controller 10:11:12:13:14:15 orangepizero3 [default]</p> | ||
Line 2,668: | Line 3,184: | ||
<p>Discovery stopped</p> | <p>Discovery stopped</p> | ||
<p>[CHG] Controller 10:11:12:13:14:15 Discovering: no</p> | <p>[CHG] Controller 10:11:12:13:14:15 Discovering: no</p> | ||
− | <p>[CHG] Device DC:72:9B:4C:F4:CF RSSI is nil</p></li> | + | <p>[CHG] Device DC:72:9B:4C:F4:CF RSSI is nil</p> |
+ | |} | ||
+ | </li> | ||
<li><p>After scanning to the device you want to pair, you can pair it. You need to use the MAC address of the device for pairing</p> | <li><p>After scanning to the device you want to pair, you can pair it. You need to use the MAC address of the device for pairing</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>[bluetooth]# '''pair DC:72:9B:4C:F4:CF''' '''#Use the MAC address of the scanned Bluetooth device for pairing'''</p> | <p>[bluetooth]# '''pair DC:72:9B:4C:F4:CF''' '''#Use the MAC address of the scanned Bluetooth device for pairing'''</p> | ||
<p>Attempting to pair with DC:72:9B:4C:F4:CF</p> | <p>Attempting to pair with DC:72:9B:4C:F4:CF</p> | ||
Line 2,681: | Line 3,202: | ||
<p>'''Pairing successful #Prompt that the pairing is successful'''</p> | <p>'''Pairing successful #Prompt that the pairing is successful'''</p> | ||
<p>[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: no</p> | <p>[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: no</p> | ||
− | <p>[CHG] Device DC:72:9B:4C:F4:CF Connected: no</p></li> | + | <p>[CHG] Device DC:72:9B:4C:F4:CF Connected: no</p> |
+ | |} | ||
+ | </li> | ||
<li><p>After the pairing is successful, the Bluetooth interface of the mobile phone will be displayed as follows</p> | <li><p>After the pairing is successful, the Bluetooth interface of the mobile phone will be displayed as follows</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img160.png]]</p></li> |
<li><p>To connect a Bluetooth device, you need to install the '''pulseaudio-module-bluetooth''' package, and then start the '''pulseaudio''' service</p> | <li><p>To connect a Bluetooth device, you need to install the '''pulseaudio-module-bluetooth''' package, and then start the '''pulseaudio''' service</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo''' '''apt -y install pulseaudio-module-bluetooth'''</p> | <p>orangepi@orangepi:~$ '''sudo''' '''apt -y install pulseaudio-module-bluetooth'''</p> | ||
− | <p>orangepi@orangepi:~$ '''pulseaudio --start'''</p></li> | + | <p>orangepi@orangepi:~$ '''pulseaudio --start'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>How to connect to a Bluetooth device</p> | <li><p>How to connect to a Bluetooth device</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo bluetoothctl'''</p> | <p>orangepi@orangepi:~$ '''sudo bluetoothctl'''</p> | ||
<p>Agent registered</p> | <p>Agent registered</p> | ||
Line 2,699: | Line 3,230: | ||
<p>[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: yes</p> | <p>[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: yes</p> | ||
<p>[CHG] Controller 10:11:12:13:14:15 Discoverable: no</p> | <p>[CHG] Controller 10:11:12:13:14:15 Discoverable: no</p> | ||
− | <p>'''[orangepi]# #This prompt appears to indicate that the connection is successful'''</p></li> | + | <p>'''[orangepi]# #This prompt appears to indicate that the connection is successful'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>After connecting the bluetooth device, the bluetooth configuration interface of the Android mobile phone can see '''the prompt that the audio has been connected for calls and media'''</p> | <li><p>After connecting the bluetooth device, the bluetooth configuration interface of the Android mobile phone can see '''the prompt that the audio has been connected for calls and media'''</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img161.png]] |
</div></li></ol> | </div></li></ol> | ||
<span id="usb-interface-test"></span> | <span id="usb-interface-test"></span> | ||
+ | |||
== USB interface test == | == USB interface test == | ||
− | '''The USB interface can be connected to a USB hub to expand the number of USB interfaces.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The USB interface can be connected to a USB hub to expand the number of USB interfaces.'''</big> | ||
+ | |} | ||
<span id="connect-usb-mouse-or-keyboard-to-test"></span> | <span id="connect-usb-mouse-or-keyboard-to-test"></span> | ||
Line 2,725: | Line 3,263: | ||
# Execute the following command, if you can see the output of sdX, it means that the U disk is recognized successfully | # Execute the following command, if you can see the output of sdX, it means that the U disk is recognized successfully | ||
− | orangepi@orangepi:~$ '''cat /proc/partitions | grep "sd*"''' | + | ::{| class="wikitable" style="width:800px;" |
− | + | |- | |
− | major minor #blocks name | + | | |
− | + | orangepi@orangepi:~$ '''cat /proc/partitions | grep "sd*"'''<br> | |
− | 8 0 30044160 '''sda''' | + | <span style="margin-right: 30px;">major </span><span style="margin-right: 40px;">minor </span><span style="margin-right: 30px;">#blocks</span><span style="margin-right: 50px;">name</span><br> |
− | + | <span style="margin-right: 70px;">8</span><span style="margin-right: 60px;">0</span><span style="margin-right: 50px;">30044160 </span><span style="margin-right: 50px;color:#FF0000">'''sda'''</span><br> | |
− | 8 1 30043119 '''sda1''' | + | <span style="margin-right: 70px;">8</span><span style="margin-right: 60px;">1</span><span style="margin-right: 50px;">30043119 </span><span style="margin-right: 50px;color:#FF0000">'''sda1'''</span><br> |
+ | |} | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li>Use the mount command to mount the U disk to '''/mnt''', and then you can view the files in the U disk</li | + | <li>Use the mount command to mount the U disk to '''/mnt''', and then you can view the files in the U disk</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo mount /dev/sda1 /mnt/''' | orangepi@orangepi:~$ '''sudo mount /dev/sda1 /mnt/''' | ||
Line 2,741: | Line 3,283: | ||
test.txt | test.txt | ||
− | + | |} | |
+ | </ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>After mounting, you can view the capacity usage and mount point of the U disk through the '''df -h''' command</li | + | <li>After mounting, you can view the capacity usage and mount point of the U disk through the '''df -h''' command</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''df -h | grep "sd"''' | orangepi@orangepi:~$ '''df -h | grep "sd"''' | ||
− | /dev/sda1 29G 208K 29G 1% /mnt | + | /dev/sda1 29G 208K 29G 1% /mnt |
+ | |} | ||
+ | </ol> | ||
+ | <span id="usb-ethernet-card-test"></span> | ||
− | |||
=== USB Ethernet card test === | === USB Ethernet card test === | ||
# The usable USB Ethernet cards that '''have been tested''' so far are as follows. Among them, the RTL8153 USB Gigabit network card can be used normally when it is inserted into the USB 2.0 Host interface of the development board, but the speed cannot reach Gigabit. Please note that | # The usable USB Ethernet cards that '''have been tested''' so far are as follows. Among them, the RTL8153 USB Gigabit network card can be used normally when it is inserted into the USB 2.0 Host interface of the development board, but the speed cannot reach Gigabit. Please note that | ||
− | {| class="wikitable" | + | ::{| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| serial number |
− | | style="text-align: | + | | style="text-align: center;"| model |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 1 |
− | | style="text-align: | + | | style="text-align: center;"| RTL8152B USB 100M network card |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| 2 |
− | | style="text-align: | + | | style="text-align: center;"| RTL8153 USB Gigabit LAN |
|} | |} | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
<li><p>First insert the USB network card into the USB interface of the development board, and then insert the network cable into the USB network card to ensure that the network cable can access the Internet normally. If you can see the following log information through the '''dmesg''' command, it means that the USB network card is recognized normally.</p> | <li><p>First insert the USB network card into the USB interface of the development board, and then insert the network cable into the USB network card to ensure that the network cable can access the Internet normally. If you can see the following log information through the '''dmesg''' command, it means that the USB network card is recognized normally.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''dmesg | tail'''</p> | <p>orangepi@orangepi:~$ '''dmesg | tail'''</p> | ||
<p>[ 121.985016] usb 3-1: USB disconnect, device number 2</p> | <p>[ 121.985016] usb 3-1: USB disconnect, device number 2</p> | ||
Line 2,778: | Line 3,329: | ||
<p>[ 127.763031] IPv6: ADDRCONF(NETDEV_UP): enx00e04c362017: link is not ready</p> | <p>[ 127.763031] IPv6: ADDRCONF(NETDEV_UP): enx00e04c362017: link is not ready</p> | ||
<p>[ 129.892465] r8152 3-1:1.0 enx00e04c362017: carrier on</p> | <p>[ 129.892465] r8152 3-1:1.0 enx00e04c362017: carrier on</p> | ||
− | <p>[ 129.892583] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c362017: link becomes ready</p></li> | + | <p>[ 129.892583] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c362017: link becomes ready</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then you can see the device node of the USB network card and the automatically assigned IP address through the ifconfig command</p> | <li><p>Then you can see the device node of the USB network card and the automatically assigned IP address through the ifconfig command</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo ifconfig'''</p> | <p>orangepi@orangepi:~$ '''sudo ifconfig'''</p> | ||
<p>'''enx00e04c362017''': flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500</p> | <p>'''enx00e04c362017''': flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500</p> | ||
− | <p>inet '''192.168.1.177''' netmask 255.255.255.0 broadcast 192.168.1.255</p> | + | ::<p>inet '''192.168.1.177''' netmask 255.255.255.0 broadcast 192.168.1.255</p> |
− | <p>inet6 fe80::681f:d293:4bc5:e9fd prefixlen 64 scopeid 0x20<link></p> | + | ::<p>inet6 fe80::681f:d293:4bc5:e9fd prefixlen 64 scopeid 0x20<link></p> |
− | <p>ether 00:e0:4c:36:20:17 txqueuelen 1000 (Ethernet)</p> | + | ::<p>ether 00:e0:4c:36:20:17 txqueuelen 1000 (Ethernet)</p> |
− | <p>RX packets 1849 bytes 134590 (134.5 KB)</p> | + | ::<p>RX packets 1849 bytes 134590 (134.5 KB)</p> |
− | <p>RX errors 0 dropped 125 overruns 0 frame 0</p> | + | ::<p>RX errors 0 dropped 125 overruns 0 frame 0</p> |
− | <p>TX packets 33 bytes 2834 (2.8 KB)</p> | + | ::<p>TX packets 33 bytes 2834 (2.8 KB)</p> |
− | <p>TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</p></li> | + | ::<p>TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The command to test network connectivity is as follows</p> | <li><p>The command to test network connectivity is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ping www.baidu.com -I enx00e04c362017'''</p> | <p>orangepi@orangepi:~$ '''ping www.baidu.com -I enx00e04c362017'''</p> | ||
<p>PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.</p> | <p>PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.</p> | ||
Line 2,799: | Line 3,360: | ||
<p>--- www.a.shifen.com ping statistics ---</p> | <p>--- www.a.shifen.com ping statistics ---</p> | ||
<p>4 packets transmitted, 4 received, 0% packet loss, time 3002ms</p> | <p>4 packets transmitted, 4 received, 0% packet loss, time 3002ms</p> | ||
− | <p>rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms</p></li></ol> | + | <p>rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="usb-camera-test"></span> | <span id="usb-camera-test"></span> | ||
+ | |||
=== USB camera test === | === USB camera test === | ||
Line 2,807: | Line 3,371: | ||
<li><p>First insert the USB camera into the USB port of the Orange Pi development board</p></li> | <li><p>First insert the USB camera into the USB port of the Orange Pi development board</p></li> | ||
<li><p>Then through the lsmod command, you can see that the kernel has automatically loaded the following modules</p> | <li><p>Then through the lsmod command, you can see that the kernel has automatically loaded the following modules</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''lsmod'''</p> | <p>orangepi@orangepi:~$ '''lsmod'''</p> | ||
− | < | + | <span style="margin-right: 100px;">Module </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 45px;">Used by</span><br> |
− | < | + | <span style="margin-right: 80px;">uvcvideo </span><span style="margin-right: 70px;">106496 </span><span style="margin-right: 60px;">0</span><br> |
− | <li><p> | + | |} |
+ | </li> | ||
+ | <li><p>Through the v4l2-ctl command, you can see that the device node information of the USB camera is /dev/video0</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo''' '''apt install -y v4l-utils'''</p> | <p>orangepi@orangepi:~$ '''sudo''' '''apt install -y v4l-utils'''</p> | ||
<p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</p> | <p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</p> | ||
<p>USB 2.0 Camera (usb-sunxi-ehci-1):</p> | <p>USB 2.0 Camera (usb-sunxi-ehci-1):</p> | ||
− | <p>/dev/video0</p> | + | :<p>/dev/video0</p> |
− | <p>'''Note that the l in v4l2 is a lowercase letter l, not the number 1.'''</p> | + | |} |
− | <p>'''In addition, the serial number of the video is not necessarily video0, please refer to what you actually see.'''</p></li> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that the l in v4l2 is a lowercase letter l, not the number 1.'''</p> | ||
+ | <p>'''In addition, the serial number of the video is not necessarily video0, please refer to what you actually see.'''</p></big> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Use fswebcam to test the USB camera</p> | <li><p>Use fswebcam to test the USB camera</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>Install fswebcam</p> | <li><p>Install fswebcam</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo''' '''apt update'''</p> | <p>orangepi@orangepi:~$ '''sudo''' '''apt update'''</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo apt-get install -y fswebcam'''</p></li> | + | <p>orangepi@orangepi:~$ '''sudo apt-get install -y fswebcam'''</p> |
− | <li><p>After installing fswebcam, you can use the following command to | + | |} |
− | <ol style="list-style-type: | + | </li> |
− | <li><p>-d option is used to specify the device node of the USB | + | <li><p>After installing fswebcam, you can use the following command to take pictures</p> |
− | <li><p>--no-banner is used to remove the watermark of the photo</p></li> | + | <ol style="list-style-type: none;"> |
− | <li><p>-r option is used to specify the resolution of the photo</p></li> | + | <li><p>a) -d option is used to specify the device node of the USB camera</p></li> |
− | <li><p>-S option is used to set the number of previous frames to | + | <li><p>b) --no-banner is used to remove the watermark of the photo</p></li> |
− | <li><p>./image.jpg is used to set the name and path of the | + | <li><p>c) -r option is used to specify the resolution of the photo</p></li> |
+ | <li><p>d) -S option is used to set the number of previous frames to skip</p></li> | ||
+ | <li><p>e) ./image.jpg is used to set the name and path of the generated photo</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo''' '''fswebcam -d /dev/video0 \'''</p> | <p>orangepi@orangepi:~$ '''sudo''' '''fswebcam -d /dev/video0 \'''</p> | ||
− | <p>'''--no-banner -r 1280x720 -S 5 ./image.jpg'''</p></li></ol> | + | <p>'''--no-banner -r 1280x720 -S 5 ./image.jpg'''</p> |
+ | |} | ||
+ | </li></ol> | ||
+ | </li> | ||
+ | <li><p>In the server version of the linux system, you can use the scp command to transfer the taken pictures to the Ubuntu PC for mirror viewing after taking pictures</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''scp image.jpg [mailto:test@192.168.1.55:/home/test test@192.168.1.55:/home/test] (Modify the IP address and path according to the actual situation)'''</p> | ||
+ | |} | ||
</li> | </li> | ||
− | + | <li><p>In the desktop version of the linux system, you can directly view the captured pictures through the HDMI display</p></li></ol> | |
− | |||
− | <li><p>In the desktop version of the linux system, you can directly | ||
</li> | </li> | ||
<li><p>Use mjpg-streamer to test USB camera</p> | <li><p>Use mjpg-streamer to test USB camera</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>Download mjpg-streamer</p> | <li><p>Download mjpg-streamer</p> | ||
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>Github download address:</p> | + | <li><p>a) Github download address:</p> |
− | + | {| class="wikitable" style="width:800px;" | |
− | + | |- | |
− | <p>orangepi@orangepi:~$ '''git clone https:// | + | | |
+ | <p>orangepi@orangepi:~$ '''git clone https://github.com/jacksonliam/mjpg-streamer'''</p> | ||
+ | |} | ||
</li> | </li> | ||
− | <li><p>Install dependent packages</p> | + | <li><p>b) The image download address of Gitee is:</p> |
− | <ol style="list-style-type: | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Ubuntu system</p> | + | |- |
− | <p>orangepi@orangepi:~$ '''sudo apt-get install -y cmake libjpeg8-dev'''</p></li> | + | | |
− | <li><p>Debian system</p> | + | <p>orangepi@orangepi:~$ '''git clone https://gitee.com/leeboby/mjpg-streamer'''</p> |
− | <p>orangepi@orangepi:~$ '''sudo apt-get install -y cmake libjpeg62-turbo-dev'''</p></li></ol> | + | |} |
+ | </li></ol> | ||
+ | </li> | ||
+ | <li><p>Install dependent packages</p> | ||
+ | <ol style="list-style-type: none;"> | ||
+ | <li><p>a) Ubuntu system</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo apt-get install -y cmake libjpeg8-dev'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>b) Debian system</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo apt-get install -y cmake libjpeg62-turbo-dev'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Compile and install mjpg-streamer</p> | <li><p>Compile and install mjpg-streamer</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd mjpg-streamer/mjpg-streamer-experimental'''</p> | <p>orangepi@orangepi:~$ '''cd mjpg-streamer/mjpg-streamer-experimental'''</p> | ||
<p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''make -j4'''</p> | <p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''make -j4'''</p> | ||
− | <p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''sudo make install'''</p></li> | + | <p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''sudo make install'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then enter the following command to start mjpg_streamer</p> | <li><p>Then enter the following command to start mjpg_streamer</p> | ||
− | <p>'''Note that the serial number of the video is not necessarily video0, please refer to what you actually see.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that the serial number of the video is not necessarily video0, please refer to what you actually see.'''</p></big> | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''export LD_LIBRARY_PATH=.'''</p> | <p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''export LD_LIBRARY_PATH=.'''</p> | ||
<p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''sudo ./mjpg_streamer -i "./input_uvc.so -d \'''</p> | <p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''sudo ./mjpg_streamer -i "./input_uvc.so -d \'''</p> | ||
− | <p>'''/dev/video0 -u -f 30" -o "./output_http.so -w ./www"'''</p></li> | + | <p>'''/dev/video0 -u -f 30" -o "./output_http.so -w ./www"'''</p> |
− | <li><p>Then enter '''[the IP address of the development board: 8080]''' | + | |} |
+ | </li> | ||
+ | <li><p>Then enter '''[the IP address of the development board: 8080]''' in the browser of the Ubuntu PC or Windows PC or mobile phone on the same LAN as the development board to see the video output by the camera</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img162.png]] |
</div></li></ol> | </div></li></ol> | ||
Line 2,871: | Line 3,499: | ||
<span id="audio-test"></span> | <span id="audio-test"></span> | ||
+ | |||
== Audio Test == | == Audio Test == | ||
Line 2,883: | Line 3,512: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img163.png]] |
</div></li> | </div></li> | ||
<li><p>Through the '''aplay -l''' command, you can view the sound card devices supported by the Linux system</p> | <li><p>Through the '''aplay -l''' command, you can view the sound card devices supported by the Linux system</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The output of the linux5.4 system is as follows, where '''card 0: | + | <li><p>The output of the linux5.4 system is as follows, where '''card 0: audiocodec''' is the sound card device required for earphone playback</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~# '''aplay -l'''</p> | <p>root@orangepi:~# '''aplay -l'''</p> | ||
<p>**** List of PLAYBACK Hardware Devices ****</p> | <p>**** List of PLAYBACK Hardware Devices ****</p> | ||
<p>'''card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sun50iw9-codec-0 []'''</p> | <p>'''card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sun50iw9-codec-0 []'''</p> | ||
− | <p>'''Subdevices: 1/1'''</p> | + | :<p>'''Subdevices: 1/1'''</p> |
− | <p>'''Subdevice #0: subdevice #0'''</p></li> | + | :<p>'''Subdevice #0: subdevice #0'''</p> |
− | <li><p>The output of the linux6.1 system is as follows, where | + | |} |
+ | </li> | ||
+ | <li><p>The output of the linux6.1 system is as follows, where '''audiocodec''' is the sound card device required for earphone playback</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~# '''aplay -l'''</p> | <p>root@orangepi:~# '''aplay -l'''</p> | ||
<p>**** List of PLAYBACK Hardware Devices ****</p> | <p>**** List of PLAYBACK Hardware Devices ****</p> | ||
<p>'''card 0: audiocodec [audiocodec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]'''</p> | <p>'''card 0: audiocodec [audiocodec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]'''</p> | ||
− | <p>'''Subdevices: 1/1'''</p> | + | :<p>'''Subdevices: 1/1'''</p> |
− | <p>'''Subdevice #0: subdevice #0'''</p></li></ol> | + | :<p>'''Subdevice #0: subdevice #0'''</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Then use the '''aplay''' command to play the audio, and the headset can hear the sound</p> | <li><p>Then use the '''aplay''' command to play the audio, and the headset can hear the sound</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~# '''aplay -D hw:0,0 /usr/share/sounds/alsa/audio.wav'''</p> | <p>root@orangepi:~# '''aplay -D hw:0,0 /usr/share/sounds/alsa/audio.wav'''</p> | ||
− | <p>Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo</p>< | + | <p>Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo</p> |
− | + | |} | |
− | '''If there is noise in the earphone test, please pull out some earphones, do not insert all the earphones.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''If there is noise in the earphone test, please pull out some earphones, do not insert all the earphones.'''</big> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="hdmi-audio-playback-test"></span> | <span id="hdmi-audio-playback-test"></span> | ||
+ | |||
==== HDMI audio playback test ==== | ==== HDMI audio playback test ==== | ||
Line 2,913: | Line 3,561: | ||
<li><p>First use the Micro HDMI to HDMI cable to connect the Orange Pi development board to the TV (other HDMI monitors need to ensure that they can play audio)</p></li> | <li><p>First use the Micro HDMI to HDMI cable to connect the Orange Pi development board to the TV (other HDMI monitors need to ensure that they can play audio)</p></li> | ||
<li><p>HDMI audio playback does not require other settings, just use the '''aplay''' command to play directly</p> | <li><p>HDMI audio playback does not require other settings, just use the '''aplay''' command to play directly</p> | ||
− | <p>root@orangepi:~# '''aplay -D hw:2,0 /usr/share/sounds/alsa/audio.wav'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~# '''aplay -D hw:2,0 /usr/share/sounds/alsa/audio.wav'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="testing-audio-methods-on-desktop-systems"></span> | <span id="testing-audio-methods-on-desktop-systems"></span> | ||
+ | |||
=== Testing audio methods on desktop systems === | === Testing audio methods on desktop systems === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First open the file manager</p> | <li><p>First open the file manager</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img164.png]]</p></li> |
<li><p>Then find the following file (if there is no audio file in the system, you can upload an audio file to the system yourself)</p> | <li><p>Then find the following file (if there is no audio file in the system, you can upload an audio file to the system yourself)</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img165.png]] |
</div></li> | </div></li> | ||
<li><p>Then select the audio.wav file, right click and select open with vlc to start playing</p> | <li><p>Then select the audio.wav file, right click and select open with vlc to start playing</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img166.png]]</p></li> |
<li><p>How to switch between different audio devices such as HDMI playback and headphone playback</p> | <li><p>How to switch between different audio devices such as HDMI playback and headphone playback</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>First open the volume control interface</p> | <li><p>First open the volume control interface</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img167.png]]</p></li> |
− | <li><p>When playing audio, the audio device options that the playback | + | <li><p>When playing audio, the audio device options that the playback software can use will be displayed in '''Playback''', as shown in the figure below, where you can set which audio device to play to</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img168.png]] |
</div></li></ol> | </div></li></ol> | ||
Line 2,942: | Line 3,596: | ||
<span id="infrared-receiving-test"></span> | <span id="infrared-receiving-test"></span> | ||
+ | |||
== Infrared receiving test == | == Infrared receiving test == | ||
Line 2,948: | Line 3,603: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img163.png]] |
</div></li> | </div></li> | ||
− | <li><p>Install ir-keytable infrared testing software</p></li | + | <li><p>Install ir-keytable infrared testing software</p></li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo''' '''apt update''' | orangepi@orangepi:~$ '''sudo''' '''apt update''' | ||
orangepi@orangepi:~$ '''sudo''' '''apt-get install -y ir-keytable''' | orangepi@orangepi:~$ '''sudo''' '''apt-get install -y ir-keytable''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Then execute ir-keytable to view the information of the infrared device</p> | <li><p>Then execute ir-keytable to view the information of the infrared device</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>linux5.4 system output is as follows</li | + | <li>linux5.4 system output is as follows</li> |
− | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''ir-keytable''' | orangepi@orangepi:~$ '''ir-keytable''' | ||
Found /sys/class/rc/rc0/ (/dev/input/event1) with: | Found /sys/class/rc/rc0/ (/dev/input/event1) with: | ||
− | Driver: sunxi-rc-recv, table: rc_map_sunxi | + | ::Driver: sunxi-rc-recv, table: rc_map_sunxi |
− | lirc device: /dev/lirc0 | + | ::lirc device: /dev/lirc0 |
− | Supported protocols: lirc nec | + | ::Supported protocols: lirc nec |
− | Enabled protocols: lirc nec | + | ::Enabled protocols: lirc nec |
− | Name: sunxi_ir_recv | + | ::Name: sunxi_ir_recv |
− | bus: 25, vendor/product: 0001:0001, version: 0x0100 | + | ::bus: 25, vendor/product: 0001:0001, version: 0x0100 |
− | |||
− | |||
+ | ::Repeat delay = 500 ms, repeat period = 125 ms | ||
+ | |} | ||
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
<li><p>The output of the linux6.1 system is as follows</p> | <li><p>The output of the linux6.1 system is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ir-keytable'''</p> | <p>orangepi@orangepi:~$ '''ir-keytable'''</p> | ||
<p>Found /sys/class/rc/rc0/ with:</p> | <p>Found /sys/class/rc/rc0/ with:</p> | ||
− | <p>Name: sunxi-ir</p> | + | :<p>Name: sunxi-ir</p> |
− | <p>Driver: sunxi-ir</p> | + | :<p>Driver: sunxi-ir</p> |
− | <p>Default keymap: rc-empty</p> | + | :<p>Default keymap: rc-empty</p> |
− | <p>Input device: /dev/input/event5</p> | + | :<p>Input device: /dev/input/event5</p> |
− | <p>LIRC device: /dev/lirc0</p> | + | :<p>LIRC device: /dev/lirc0</p> |
− | <p>Attached BPF protocols: Operation not permitted</p> | + | :<p>Attached BPF protocols: Operation not permitted</p> |
− | <p>Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm</p> | + | :<p>Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm</p> |
− | <p>Enabled kernel protocols: lirc</p> | + | :<p>Enabled kernel protocols: lirc</p> |
− | <p>bus: 25, vendor/product: 0001:0001, version: 0x0100</p> | + | :<p>bus: 25, vendor/product: 0001:0001, version: 0x0100</p> |
− | <p>Repeat delay = 500 ms, repeat period = 125 ms</p></li></ol> | + | :<p>Repeat delay = 500 ms, repeat period = 125 ms</p> |
− | + | |} | |
+ | </li></ol> | ||
+ | </li></ol> | ||
<!-- --> | <!-- --> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li><p>Before testing the infrared receiving function, you need to prepare an infrared remote controller dedicated to Orange Pi, '''other remote controllers do not support it'''</p> | + | <li><p>Before testing the infrared receiving function, you need to prepare an infrared remote controller dedicated to Orange Pi, '''<span style="color:#FF0000">other remote controllers do not support it</span>'''</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img169.png]] |
</div></li> | </div></li> | ||
<li><p>Then enter the '''ir-keytable -t''' command in the terminal, and then use the infrared remote control to press the button against the infrared receiver of the Orange Pi development board to see the received key code in the terminal</p> | <li><p>Then enter the '''ir-keytable -t''' command in the terminal, and then use the infrared remote control to press the button against the infrared receiver of the Orange Pi development board to see the received key code in the terminal</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>linux5.4 system output is as follows</li | + | <li>linux5.4 system output is as follows</li> |
− | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo ir-keytable -t''' | orangepi@orangepi:~$ '''sudo ir-keytable -t''' | ||
Line 3,018: | Line 3,687: | ||
1598339152.914715: event type EV_MSC(0x04): scancode = 0xfb0410 | 1598339152.914715: event type EV_MSC(0x04): scancode = 0xfb0410 | ||
− | + | |} | |
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
<li><p>linux6.1 system output is as follows</p> | <li><p>linux6.1 system output is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo ir-keytable -c -p NEC -t'''</p> | <p>orangepi@orangepi:~$ '''sudo ir-keytable -c -p NEC -t'''</p> | ||
<p>Old keytable cleared</p> | <p>Old keytable cleared</p> | ||
Line 3,027: | Line 3,700: | ||
<p>202.063219: lirc protocol(nec): scancode = 0x45c</p> | <p>202.063219: lirc protocol(nec): scancode = 0x45c</p> | ||
<p>202.063249: event type EV_MSC(0x04): scancode = 0x45c</p> | <p>202.063249: event type EV_MSC(0x04): scancode = 0x45c</p> | ||
− | <p>202.063249: event type EV_SYN(0x00).</p></li></ol> | + | <p>202.063249: event type EV_SYN(0x00).</p> |
+ | |} | ||
+ | </li></ol> | ||
+ | </li></ol> | ||
+ | <span id="temperature-sensor"></span> | ||
− | |||
== Temperature sensor == | == Temperature sensor == | ||
− | + | <ol start="1" style="list-style-type: decimal;"> | |
− | + | <li>H618 has a total of 4 temperature sensors, the command to view the temperature is as follows: | |
− | |||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big>'''The displayed temperature value needs to be divided by 1000, the unit is Celsius.'''</big> | ||
+ | |} | ||
+ | </li> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>sensor0: CPU temperature sensor, the first command is used to view | + | <li>sensor0: CPU temperature sensor, the first command is used to view the type of temperature sensor, and the second command is used to view the value of the temperature sensor</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone0/type''' | orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone0/type''' | ||
Line 3,046: | Line 3,730: | ||
'''57734''' | '''57734''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li><p>sensor1: DDR temperature sensor, the first command is used to view | + | <li><p>sensor1: DDR temperature sensor, the first command is used to view the type of temperature sensor, and the second command is used to view the value of the temperature sensor</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/type'''</p> | <p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/type'''</p> | ||
<p>'''ddr'''_thermal_zone</p> | <p>'''ddr'''_thermal_zone</p> | ||
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/temp'''</p> | <p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/temp'''</p> | ||
− | <p>'''57410'''</p></li> | + | <p>'''57410'''</p> |
− | <li><p>sensor2: GPU temperature sensor, the first command is used to view | + | |} |
+ | </li> | ||
+ | <li><p>sensor2: GPU temperature sensor, the first command is used to view the type of temperature sensor, the second command is used to view the value of the temperature sensor</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/type'''</p> | <p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/type'''</p> | ||
<p>'''gpu'''_thermal_zone</p> | <p>'''gpu'''_thermal_zone</p> | ||
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/temp'''</p> | <p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/temp'''</p> | ||
− | <p>'''59273'''</p></li> | + | <p>'''59273'''</p> |
− | <li><p>sensor3: VE temperature sensor, the first command is used to view | + | |} |
+ | </li> | ||
+ | <li><p>sensor3: VE temperature sensor, the first command is used to view the type of temperature sensor, and the second command is used to view the value of the temperature sensor</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/type'''</p> | <p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/type'''</p> | ||
<p>'''ve'''_thermal_zone</p> | <p>'''ve'''_thermal_zone</p> | ||
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/temp'''</p> | <p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/temp'''</p> | ||
− | <p>'''58949'''</p></li></ol> | + | <p>'''58949'''</p> |
− | + | |} | |
+ | </li></ol> | ||
+ | </ol> | ||
<!-- --> | <!-- --> | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>The system with Linux6.1 kernel can also use the '''sensors''' command to view the current temperature of the system</li | + | <li>The system with Linux6.1 kernel can also use the '''sensors''' command to view the current temperature of the system</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sensors''' | orangepi@orangepi:~$ '''sensors''' | ||
Line 3,074: | Line 3,777: | ||
Adapter: Virtual device | Adapter: Virtual device | ||
− | temp1: +'''47.4°C''' (crit = +110.0°C) | + | temp1: +'''<span style="color:#FF0000">47.4°C</span>''' (crit = +110.0°C) |
+ | |||
gpu_thermal-virtual-0 | gpu_thermal-virtual-0 | ||
Line 3,080: | Line 3,784: | ||
Adapter: Virtual device | Adapter: Virtual device | ||
− | temp1: +'''48.7°C''' (crit = +110.0°C) | + | temp1: +'''<span style="color:#FF0000">48.7°C</span>''' (crit = +110.0°C) |
+ | |||
ddr_thermal-virtual-0 | ddr_thermal-virtual-0 | ||
Line 3,086: | Line 3,791: | ||
Adapter: Virtual device | Adapter: Virtual device | ||
− | temp1: +'''47.8°C''' (crit = +110.0°C) | + | temp1: +'''<span style="color:#FF0000">47.8°C</span>''' (crit = +110.0°C) |
+ | |||
ve_thermal-virtual-0 | ve_thermal-virtual-0 | ||
Line 3,092: | Line 3,798: | ||
Adapter: Virtual device | Adapter: Virtual device | ||
− | temp1: +'''47.2°C''' (crit = +110.0°C) | + | temp1: +'''<span style="color:#FF0000">47.2°C</span>''' (crit = +110.0°C) |
+ | |} | ||
+ | </ol> | ||
<span id="pin-description-of-the-pin-expansion-board-interface"></span> | <span id="pin-description-of-the-pin-expansion-board-interface"></span> | ||
+ | |||
== 13 Pin Description of the Pin Expansion Board Interface == | == 13 Pin Description of the Pin Expansion Board Interface == | ||
Line 3,101: | Line 3,810: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img170.png]] |
</div></li> | </div></li> | ||
<li><p>The schematic diagram of the 13pin interface of the development board is as follows</p> | <li><p>The schematic diagram of the 13pin interface of the development board is as follows</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img19.png]]</p></li> |
<li><p>The function description of the 13 pin expansion board interface pins of the development board is as follows</p> | <li><p>The function description of the 13 pin expansion board interface pins of the development board is as follows</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>When the 13pin pin is connected to the expansion board, it can | + | <li><p>When the 13pin pin is connected to the expansion board, it can be provided additionally</p> |
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>2个USB 2.0 Host</p></li> | + | <li><p>a) 2个USB 2.0 Host</p></li> |
− | <li><p>Audio output of the left and right audio channels of the | + | <li><p>b) Audio output of the left and right audio channels of the earphones</p></li> |
− | <li><p>TV-OUT video output</p></li> | + | <li><p>c) TV-OUT video output</p></li> |
− | <li><p>Infrared receiving function</p></li> | + | <li><p>d) Infrared receiving function</p></li> |
− | <li><p>After the expansion board is connected, pins 10, 11 and 12 | + | <li><p>e) After the expansion board is connected, pins 10, 11 and 12 of the 13pin interface cannot be used</p></li> |
− | <li><p>'''In addition, it should be noted that the MIC on the 13pin expansion board cannot be used on the Orange Pi Zero 3'''</p></li></ol> | + | <li><p>f) '''In addition, it should be noted that the MIC on the 13pin expansion board cannot be used on the Orange Pi Zero 3'''</p></li></ol> |
</li> | </li> | ||
− | <li><p>When pin 13 is not connected to the expansion board, pins 10, | + | <li><p>When pin 13 is not connected to the expansion board, pins 10, 11, 12 and 13 can be used as ordinary GPIO ports</p></li> |
− | |||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''GPIO serial number''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Function''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Pin''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''5V''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''GND''' |
− | | style="text-align: | + | | style="text-align: center;"| '''2''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''USB2-DM''' |
− | | style="text-align: | + | | style="text-align: center;"| '''3''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''USB2-DP''' |
− | | style="text-align: | + | | style="text-align: center;"| '''4''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''USB3-DM''' |
− | | style="text-align: | + | | style="text-align: center;"| '''5''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''USB3-DP''' |
− | | style="text-align: | + | | style="text-align: center;"| '''6''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''LINEOUTR''' |
− | | style="text-align: | + | | style="text-align: center;"| '''7''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''LINEOUTL''' |
− | | style="text-align: | + | | style="text-align: center;"| '''8''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''TV-OUT''' |
− | | style="text-align: | + | | style="text-align: center;"| '''9''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">65</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">PC1</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">10</span>''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">272</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">PI16</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">11</span>''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">262</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">PI6</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">12</span>''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">234</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''IR-RX/<span style="color:#FF0000">PH10</span>''' |
− | | style="text-align: | + | | style="text-align: center;"| '''<span style="color:#FF0000">13</span>''' |
|} | |} | ||
+ | </ol> | ||
+ | </li></ol> | ||
+ | <span id="pin-interface-pin-description"></span> | ||
− | |||
== 26 Pin Interface Pin Description == | == 26 Pin Interface Pin Description == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>For the order of the 26-pin interface pins on the Orange Pi Zero 3 development board, please refer to the silkscreen diagram on the development board</p> | <li><p>For the order of the 26-pin interface pins on the Orange Pi Zero 3 development board, please refer to the silkscreen diagram on the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img171-2.png]]</p></li> |
− | <li><p>The functions of the 26 pin interface pins on the development board are shown in the table below</p | + | <li><p>The functions of the 26 pin interface pins on the development board are shown in the table below</p> |
− | {| class="wikitable" | + | <div style="display: flex;"> |
+ | {| class="wikitable" style="width:380px;margin-right: 20px;" | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''GPIO S/N''' |
− | | style="text-align: | + | | style="text-align: center;"| '''GPIO''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Function''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Pin''' |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| |
− | | style="text-align: | + | | style="text-align: center;"| '''3.3V''' |
− | | style="text-align: | + | | style="text-align: center;"| '''1''' |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''229''' |
− | | style="text-align: | + | | style="text-align: center;"| '''PH5''' |
− | | style="text-align: | + | | style="text-align: center;"| '''TWI3-SDA''' |
− | | style="text-align: | + | | style="text-align: center;"| '''3''' |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''228''' |
− | | style="text-align: | + | | style="text-align: center;"| '''PH4''' |
− | | style="text-align: | + | | style="text-align: center;"| '''TWI3-SCK''' |
− | | style="text-align: | + | | style="text-align: center;"| '''5''' |
− | | | + | |- |
− | | style="text-align: | + | | style="text-align: center;"| '''73''' |
− | | style="text-align: | + | | style="text-align: center;"| '''PC9''' |
− | | style="text-align: | + | | style="text-align: center;"| '''PC9''' |
− | | style="text-align: | + | | style="text-align: center;"| '''7''' |
+ | |- | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| '''GND''' | ||
+ | | style="text-align: center;"| '''9''' | ||
+ | |- | ||
+ | | style="text-align: center;"| '''70''' | ||
+ | | style="text-align: center;"| '''PC6''' | ||
+ | | style="text-align: center;"| '''PC6''' | ||
+ | | style="text-align: center;"| '''11''' | ||
+ | |- | ||
+ | | style="text-align: center;"| '''69''' | ||
+ | | style="text-align: center;"| '''PC5''' | ||
+ | | style="text-align: center;"| '''PC5''' | ||
+ | | style="text-align: center;"| '''13''' | ||
+ | |- | ||
+ | | style="text-align: center;"| '''72''' | ||
+ | | style="text-align: center;"| '''PC8''' | ||
+ | | style="text-align: center;"| '''PC8''' | ||
+ | | style="text-align: center;"| '''15''' | ||
+ | |- | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| '''3.3V''' | ||
+ | | style="text-align: center;"| '''17''' | ||
+ | |- | ||
+ | | style="text-align: center;"| '''231''' | ||
+ | | style="text-align: center;"| '''PH7''' | ||
+ | | style="text-align: center;"| '''SPI1_MOSI''' | ||
+ | | style="text-align: center;"| '''19''' | ||
+ | |- | ||
+ | | style="text-align: center;"| '''232''' | ||
+ | | style="text-align: center;"| '''PH8''' | ||
+ | | style="text-align: center;"| '''SPI1_MISO''' | ||
+ | | style="text-align: center;"| '''21''' | ||
+ | |- | ||
+ | | style="text-align: center;"| '''230''' | ||
+ | | style="text-align: center;"| '''PH6''' | ||
+ | | style="text-align: center;"| '''SPI1_CLK''' | ||
+ | | style="text-align: center;"| '''23''' | ||
+ | |- | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| '''GND''' | ||
+ | | style="text-align: center;"| '''25''' | ||
+ | |} | ||
+ | {| class="wikitable" style="width:380px;" | ||
+ | |- | ||
+ | | style="text-align: center;"| '''Pin''' | ||
+ | | style="text-align: center;"| '''Function''' | ||
+ | | style="text-align: center;"| '''GPIO''' | ||
+ | | style="text-align: center;"| '''GPIO S/N''' | ||
+ | |- | ||
+ | | style="text-align: center;"| '''2''' | ||
+ | | style="text-align: center;"| '''5V''' | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| | ||
+ | |- | ||
+ | | style="text-align: center;"| '''4''' | ||
+ | | style="text-align: center;"| '''5V''' | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| | ||
+ | |- | ||
+ | | style="text-align: center;"| '''6''' | ||
+ | | style="text-align: center;"| '''GND''' | ||
+ | | style="text-align: center;"| | ||
+ | | style="text-align: center;"| | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''8''' |
− | + | | style="text-align: center;"| '''UART5_TX''' | |
− | + | | style="text-align: center;"| '''PH2''' | |
− | + | | style="text-align: center;"| '''226''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''10''' |
− | + | | style="text-align: center;"| '''UART5_RX''' | |
− | + | | style="text-align: center;"| '''PH3''' | |
− | + | | style="text-align: center;"| '''227''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''12''' |
− | + | | style="text-align: center;"| '''PC11''' | |
− | + | | style="text-align: center;"| '''PC11''' | |
− | + | | style="text-align: center;"| '''75''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''14''' |
− | + | | style="text-align: center;"| '''GND''' | |
− | + | | style="text-align: center;"| | |
− | + | | style="text-align: center;"| | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''16''' |
− | + | | style="text-align: center;"| '''PC15''' | |
− | + | | style="text-align: center;"| '''PC15''' | |
− | + | | style="text-align: center;"| '''79''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''18''' |
− | + | | style="text-align: center;"| '''PC14''' | |
− | + | | style="text-align: center;"| '''PC14''' | |
− | + | | style="text-align: center;"| '''78''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''20''' |
− | + | | style="text-align: center;"| '''GND''' | |
− | + | | style="text-align: center;"| | |
− | + | | style="text-align: center;"| | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''22''' |
− | + | | style="text-align: center;"| '''PC7''' | |
− | + | | style="text-align: center;"| '''PC7''' | |
− | + | | style="text-align: center;"| '''71''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''24''' |
− | + | | style="text-align: center;"| '''SPI1_CS''' | |
− | + | | style="text-align: center;"| '''PH9''' | |
− | + | | style="text-align: center;"| '''233''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''26''' |
− | + | | style="text-align: center;"| '''PC10''' | |
− | + | | style="text-align: center;"| '''PC10''' | |
− | + | | style="text-align: center;"| '''74''' | |
− | |||
− | |||
− | | style="text-align: | ||
− | | style="text-align: | ||
− | | style="text-align: | ||
|} | |} | ||
− | + | </div> | |
+ | </li></ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
− | <li> | + | <li>There are a total of 17 GPIO ports in the 26pin interface, and the voltage of all GPIO ports is '''<span style="color:#FF0000">3.3v</span>'''</li></ol> |
<span id="how-to-install-wiringop"></span> | <span id="how-to-install-wiringop"></span> | ||
+ | |||
== How to install wiringOP == | == How to install wiringOP == | ||
− | '''Note that wiringOP has been pre-installed in the linux image released by Orange Pi. Unless the code of wiringOP is updated, there is no need to re-download, compile and install, just use it directly.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that wiringOP has been pre-installed in the linux image released by Orange Pi. Unless the code of wiringOP is updated, there is no need to re-download, compile and install, just use it directly.''' | ||
+ | |||
'''The storage path of the compiled wiringOP deb package in orangepi-build is:''' | '''The storage path of the compiled wiringOP deb package in orangepi-build is:''' | ||
− | '''orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb''' | + | '''<span style="color:blue">orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb</span>''' |
− | |||
− | + | '''After entering the system, you can run the gpio readall command. If you can see the following output, it means that wiringOP has been pre-installed and can be used normally.'''</big> | |
− | '''wiringOP is currently mainly adapted to the functions of setting GPIO port input and output, setting GPIO port output high and low levels, and setting up and down pull-down resistors. Functions such as hardware PWM are not available.''' | + | [[File:zero3-img172.png|780px|center]] |
+ | |||
+ | <big>'''wiringOP is currently mainly adapted to the functions of setting GPIO port input and output, setting GPIO port output high and low levels, and setting up and down pull-down resistors. Functions such as hardware PWM are not available.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Download the code of wiringOP</p> | <li><p>Download the code of wiringOP</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo apt install -y git'''</p> | <p>orangepi@orangepi:~$ '''sudo apt install -y git'''</p> | ||
<p>orangepi@orangepi:~$ '''git clone https://github.com/orangepi-xunlong/wiringOP.git -b next'''</p> | <p>orangepi@orangepi:~$ '''git clone https://github.com/orangepi-xunlong/wiringOP.git -b next'''</p> | ||
− | <p>'''Note that the source code needs to download the code of the wiringOP next branch, please don't miss the -b next parameter.'''</p> | + | |} |
− | <p>'''If you have problems downloading the code from GitHub, you can directly use the wiringOP source code that comes with the Linux image, and the storage location is: /usr/src/wiringOP.'''</p></li> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that the source code needs to download the code of the wiringOP next branch, please don't miss the -b next parameter.'''</p> | ||
+ | <p>'''If you have problems downloading the code from GitHub, you can directly use the wiringOP source code that comes with the Linux image, and the storage location is: /usr/src/wiringOP.'''</p></big> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Compile and install wiringOP</p> | <li><p>Compile and install wiringOP</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd wiringOP'''</p> | <p>orangepi@orangepi:~$ '''cd wiringOP'''</p> | ||
<p>orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''</p> | <p>orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''</p> | ||
− | <p>orangepi@orangepi:~/wiringOP$ '''sudo ./build'''</p></li> | + | <p>orangepi@orangepi:~/wiringOP$ '''sudo ./build'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Test the output of the gpio readall command as follows</p> | <li><p>Test the output of the gpio readall command as follows</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>There is a one-to-one correspondence between pins 1 to 26 and 26 | + | <li><p>There is a one-to-one correspondence between pins 1 to 26 and 26 Pins on the development board</p></li> |
<li><p>Pin 27 corresponds to pin 10 of 13pin on the development board</p></li> | <li><p>Pin 27 corresponds to pin 10 of 13pin on the development board</p></li> | ||
<li><p>Pin 29 corresponds to pin 11 of 13pin on the development board</p></li> | <li><p>Pin 29 corresponds to pin 11 of 13pin on the development board</p></li> | ||
<li><p>Pin 31 corresponds to pin 12 of 13pin on the development board</p></li> | <li><p>Pin 31 corresponds to pin 12 of 13pin on the development board</p></li> | ||
<li><p>Pin 33 corresponds to pin 13 of 13pin on the development board</p></li> | <li><p>Pin 33 corresponds to pin 13 of 13pin on the development board</p></li> | ||
− | <li><p>'''Pins 28, 30, 32, and 34 are empty, please ignore them'''</p> | + | <li><p>'''<span style="color:#FF0000">Pins 28, 30, 32, and 34 are empty, please ignore them</span>'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img172.png]]</p></li></ol> |
</li></ol> | </li></ol> | ||
<span id="pin-interface-gpio-i2c-uart-spi-and-pwm-test"></span> | <span id="pin-interface-gpio-i2c-uart-spi-and-pwm-test"></span> | ||
+ | |||
== 26pin interface GPIO, I2C, UART, SPI and PWM test == | == 26pin interface GPIO, I2C, UART, SPI and PWM test == | ||
Line 3,378: | Line 4,114: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The following takes pin 7—corresponding to GPIO as PC9—corresponding to wPi number 2—as an example to demonstrate how to set the high and low levels of the GPIO port</p> | <li><p>The following takes pin 7—corresponding to GPIO as PC9—corresponding to wPi number 2—as an example to demonstrate how to set the high and low levels of the GPIO port</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img173.png]]</p></li> |
<li><p>First set the GPIO port to output mode, where the third parameter requires the serial number of the wPi corresponding to the input pin</p> | <li><p>First set the GPIO port to output mode, where the third parameter requires the serial number of the wPi corresponding to the input pin</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio mode 2 out'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2</span> out'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then set the GPIO port to output a low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully</p> | <li><p>Then set the GPIO port to output a low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio write 2 0'''</p> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio write 2 <span style="color:#FF0000">0</span>'''</p> | ||
+ | |} | ||
<p>Use gpio readall to see that the value (V) of pin 7 has changed to 0</p> | <p>Use gpio readall to see that the value (V) of pin 7 has changed to 0</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img174.png]]</p></li> |
<li><p>Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.</p> | <li><p>Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio write 2 1'''</p> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio write 2 <span style="color:#FF0000">1</span>'''</p> | ||
+ | |} | ||
<p>Use gpio readall to see that the value (V) of pin 7 has changed to 1</p> | <p>Use gpio readall to see that the value (V) of pin 7 has changed to 1</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img175.png]]</p></li> |
<li><p>The setting method of other pins is similar, just modify the serial number of wPi to the corresponding serial number of the pin</p></li></ol> | <li><p>The setting method of other pins is similar, just modify the serial number of wPi to the corresponding serial number of the pin</p></li></ol> | ||
<span id="how-to-set-the-pull-down-resistance-of-pin-gpio-port"></span> | <span id="how-to-set-the-pull-down-resistance-of-pin-gpio-port"></span> | ||
− | === | + | |
+ | === How to set pull-up and pull-down resistors on 26 pin GPIO ports === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The following takes pin 7—the corresponding GPIO is PC9—the corresponding wPi number is 2—as an example to demonstrate how to set the pull-up and pull-down resistors of the GPIO port</p> | <li><p>The following takes pin 7—the corresponding GPIO is PC9—the corresponding wPi number is 2—as an example to demonstrate how to set the pull-up and pull-down resistors of the GPIO port</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img173.png]]</p></li> |
<li><p>First, you need to set the GPIO port to the input mode, and the third parameter needs to be the serial number of the wPi corresponding to the input pin</p> | <li><p>First, you need to set the GPIO port to the input mode, and the third parameter needs to be the serial number of the wPi corresponding to the input pin</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio mode 2 in'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2</span> in'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After setting to input mode, execute the following command to set the GPIO port to pull-up mode</p> | <li><p>After setting to input mode, execute the following command to set the GPIO port to pull-up mode</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio mode 2 up'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2</span> up'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then enter the following command to read the level of the GPIO port, if the level is 1, it means that the pull-up mode is set successfully</p> | <li><p>Then enter the following command to read the level of the GPIO port, if the level is 1, it means that the pull-up mode is set successfully</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio read 2'''</p> | + | {| class="wikitable" style="width:800px;" |
− | <p>'''1'''</p></li> | + | |- |
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio read <span style="color:#FF0000">2</span>'''</p> | ||
+ | <p>'''1'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then execute the following command to set the GPIO port to pull-down mode</p> | <li><p>Then execute the following command to set the GPIO port to pull-down mode</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio mode 2 down'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2</span> down'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then enter the following command to read the level of the GPIO port, if the level is 0, the pull-down mode is set successfully</p> | <li><p>Then enter the following command to read the level of the GPIO port, if the level is 0, the pull-down mode is set successfully</p> | ||
− | <p>root@orangepi:~/wiringOP# '''gpio read 2'''</p> | + | {| class="wikitable" style="width:800px;" |
− | <p>'''0'''</p></li></ol> | + | |- |
+ | | | ||
+ | <p>root@orangepi:~/wiringOP# '''gpio read <span style="color:#FF0000">2</span>'''</p> | ||
+ | <p>'''0'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="pin-spi-test"></span> | <span id="pin-spi-test"></span> | ||
+ | |||
=== 26pin SPI test === | === 26pin SPI test === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>According to the schematic diagram of the 26pin interface, the available spi is spi1</p> | <li><p>According to the schematic diagram of the 26pin interface, the available spi is spi1</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img176.png]]</p></li> |
<li><p>The spi1 is disabled by default in the Linux system and needs to be manually enabled before it can be used. The steps to open are as follows:</p> | <li><p>The spi1 is disabled by default in the Linux system and needs to be manually enabled before it can be used. The steps to open are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First run '''orangepi-config''', normal users remember to add | + | <li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p> |
− | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''System'''</p> | <li><p>Then select '''System'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img85.png]]</p></li> |
<li><p>Then select '''Hardware'''</p> | <li><p>Then select '''Hardware'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img86.png]]</p></li> |
− | <li><p> | + | <li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select '''spi1-cs1-spidev'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img177.png]]</p></li> |
<li><p>Then select '''<Save>''' to save</p> | <li><p>Then select '''<Save>''' to save</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img88.png]]</p></li> |
<li><p>Then select '''<Back>'''</p> | <li><p>Then select '''<Back>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img89.png]]</p></li> |
− | <li><p>Then select '''<Reboot>''' to restart the system to make the | + | <li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p> |
− | <p>[[File: | + | <p>[[File:zero3-img90.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>Then check whether there is a '''spidev1.1''' device node in the Linux system. If it exists, it means that the configuration of SPI1 has taken effect</p> | <li><p>Then check whether there is a '''spidev1.1''' device node in the Linux system. If it exists, it means that the configuration of SPI1 has taken effect</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ls /dev/spidev1*'''</p> | <p>orangepi@orangepi:~$ '''ls /dev/spidev1*'''</p> | ||
− | <p>/dev/spidev1.1</p></li> | + | <p>/dev/spidev1.1</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Do not short-circuit the mosi and miso pins of SPI1 first, the output result of running spidev_test is as follows, you can see that the data of TX and RX are inconsistent</p> | <li><p>Do not short-circuit the mosi and miso pins of SPI1 first, the output result of running spidev_test is as follows, you can see that the data of TX and RX are inconsistent</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev1.1'''</p> | <p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev1.1'''</p> | ||
<p>spi mode: 0x0</p> | <p>spi mode: 0x0</p> | ||
<p>bits per word: 8</p> | <p>bits per word: 8</p> | ||
<p>max speed: 500000 Hz (500 KHz)</p> | <p>max speed: 500000 Hz (500 KHz)</p> | ||
− | <p>TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p> | + | <p>TX | FF FF FF FF FF FF '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p> |
− | <p>RX | FF FF FF FF FF FF '''FF FF FF FF FF FF''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ............................….</p></li> | + | <p>RX | FF FF FF FF FF FF '''<span style="color:#FF0000">FF FF FF FF FF FF</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ............................….</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then short the two pins of mosi (the 19th pin in the 26pin interface) and miso (the 21st pin in the 26pin interface) of SPI1, and then run the output of spidev_test as follows, you can see the sending and receiving same data</p> | <li><p>Then short the two pins of mosi (the 19th pin in the 26pin interface) and miso (the 21st pin in the 26pin interface) of SPI1, and then run the output of spidev_test as follows, you can see the sending and receiving same data</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev1.1'''</p> | <p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev1.1'''</p> | ||
<p>spi mode: 0x0</p> | <p>spi mode: 0x0</p> | ||
<p>bits per word: 8</p> | <p>bits per word: 8</p> | ||
<p>max speed: 500000 Hz (500 KHz)</p> | <p>max speed: 500000 Hz (500 KHz)</p> | ||
− | <p>TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p> | + | <p>TX | FF FF FF FF FF FF '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p> |
− | <p>RX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p></li></ol> | + | <p>RX | FF FF FF FF FF FF '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="pin-i2c-test"></span> | <span id="pin-i2c-test"></span> | ||
+ | |||
=== 26pin I2C test === | === 26pin I2C test === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>According to the schematic diagram of 26pin, the available i2c is i2c3</p> | <li><p>According to the schematic diagram of 26pin, the available i2c is i2c3</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img178.png]]</p></li> |
<li><p>i2c3 is disabled by default in the Linux system, and it needs to be manually enabled before it can be used. The steps to open are as follows:</p> | <li><p>i2c3 is disabled by default in the Linux system, and it needs to be manually enabled before it can be used. The steps to open are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First run '''orangepi-config''', normal users remember to add | + | <li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p> |
− | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''System'''</p> | <li><p>Then select '''System'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img85.png]]</p></li> |
<li><p>Then select '''Hardware'''</p> | <li><p>Then select '''Hardware'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img86.png]]</p></li> |
− | <li><p> | + | <li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select '''ph-i2c3'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img179.png]]</p></li> |
<li><p>Then select '''<Save>''' to save</p> | <li><p>Then select '''<Save>''' to save</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img88.png]]</p></li> |
<li><p>Then select '''<Back>'''</p> | <li><p>Then select '''<Back>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img89.png]]</p></li> |
− | <li><p>Then select '''<Reboot>''' to restart the system to make the | + | <li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p> |
− | <p>[[File: | + | <p>[[File:zero3-img90.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>After starting the linux system, first confirm that there is an i2c3 device node under /dev</p> | <li><p>After starting the linux system, first confirm that there is an i2c3 device node under /dev</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ls /dev/i2c-3'''</p> | <p>orangepi@orangepi:~$ '''ls /dev/i2c-3'''</p> | ||
− | <p>'''/dev/i2c-3'''</p></li> | + | <p>'''/dev/i2c-3'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then start testing i2c, first install i2c-tools</p> | <li><p>Then start testing i2c, first install i2c-tools</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo apt-get install -y i2c-tools'''</p></li> | + | <p>orangepi@orangepi:~$ '''sudo apt-get install -y i2c-tools'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then connect an i2c device to the i2c3 pin of the 26pin connector</p> | <li><p>Then connect an i2c device to the i2c3 pin of the 26pin connector</p> | ||
− | <p>'''Please select the 5V and 3.3V pins according to the specific i2c device, and the voltage value required by different i2c devices may be different.'''</p></ | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Please select the 5V and 3.3V pins according to the specific i2c device, and the voltage value required by different i2c devices may be different.'''</p></big> | ||
+ | |} | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''sda pin''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Corresponding to pin 3 in 26pin''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''sck pin''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Corresponding to pin 5 in 26pin''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''5v pin''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Corresponding to pin 2 in 26pin''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''3.3v pin''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Corresponding to pin 1 in 26pin''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''gnd pin''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Corresponding to pin 6 in 26pin''' |
|} | |} | ||
− | + | </li></ol> | |
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
<li><p>Then use the '''i2cdetect -y 3''' command, if the address of the connected i2c device can be detected, it means that i2c can be used normally</p> | <li><p>Then use the '''i2cdetect -y 3''' command, if the address of the connected i2c device can be detected, it means that i2c can be used normally</p> | ||
− | <p>'''Different i2c device addresses are different, the address 0x50 in the figure below is just an example. Please refer to what you actually see.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Different i2c device addresses are different, the address 0x50 in the figure below is just an example. Please refer to what you actually see.'''</p></big> | ||
+ | |} | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img180.png]] |
</div></li></ol> | </div></li></ol> | ||
<span id="pin-uart-test"></span> | <span id="pin-uart-test"></span> | ||
+ | |||
=== 26pin UART test === | === 26pin UART test === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>According to the schematic diagram of the 26pin interface, the available uart is uart5</p> | <li><p>According to the schematic diagram of the 26pin interface, the available uart is uart5</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img181.png]]</p></li> |
− | <li><p> | + | <li><p>Uart5 is disabled by default in the Linux system, and it needs to be opened manually to use it. The steps to open are as follows:</p> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First run '''orangepi-config''', normal users remember to add | + | <li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p> |
− | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Then select '''System'''</p> | + | |- |
− | <p>[[File: | + | | |
− | <li><p>Then select '''Hardware'''</p> | + | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p> |
− | <p>[[File: | + | |} |
− | <li><p>Then use the arrow keys on the keyboard to navigate to the | + | </li> |
− | <p>[[File: | + | <li><p>Then select '''System'''</p> |
+ | <p>[[File:zero3-img85.png]]</p></li> | ||
+ | <li><p>Then select '''Hardware'''</p> | ||
+ | <p>[[File:zero3-img86.png]]</p></li> | ||
+ | <li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select '''ph-uart5'''</p> | ||
+ | <p>[[File:zero3-img182.png]]</p></li> | ||
<li><p>Then select '''<Save>''' to save</p> | <li><p>Then select '''<Save>''' to save</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img88.png]]</p></li> |
<li><p>Then select '''<Back>'''</p> | <li><p>Then select '''<Back>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img89.png]]</p></li> |
− | <li><p>Then select '''<Reboot>''' to restart the system to make the | + | <li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p> |
− | <p>[[File: | + | <p>[[File:zero3-img90.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>After entering the linux system, first confirm whether there is a uart5 device node under '''/dev'''</p> | <li><p>After entering the linux system, first confirm whether there is a uart5 device node under '''/dev'''</p> | ||
− | <p>'''Note that the linux5.4 system is /dev/ttyAS5.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that the linux5.4 system is /dev/ttyAS5.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ls /dev/ttyS5'''</p> | <p>orangepi@orangepi:~$ '''ls /dev/ttyS5'''</p> | ||
− | <p>/dev/ttyS5</p></li> | + | <p>/dev/ttyS5</p> |
− | <li><p>Then start to test the uart5 interface, first use the DuPont line to short the rx and tx of the uart5 interface to be tested</p></li | + | |} |
+ | </li> | ||
+ | <li><p>Then start to test the uart5 interface, first use the DuPont line to short the rx and tx of the uart5 interface to be tested</p></li> | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;text-align: center;" |
|- | |- | ||
| | | | ||
− | | style="text-align: | + | | style="text-align: center;"| uart5 |
|- | |- | ||
| tx pin | | tx pin | ||
− | | style="text-align: | + | | style="text-align: center;"| Corresponding to pin 8 of 26pin |
|- | |- | ||
| rx pin | | rx pin | ||
− | | style="text-align: | + | | style="text-align: center;"| Corresponding to pin 10 of 26pin |
|} | |} | ||
− | + | </ol> | |
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>Use the '''gpio''' command in wiringOP to test the loopback function of the serial port as shown below. If you can see the following print, it means that the serial port communication is normal</p> | <li><p>Use the '''gpio''' command in wiringOP to test the loopback function of the serial port as shown below. If you can see the following print, it means that the serial port communication is normal</p> | ||
− | <p>orangepi@orangepi:~$ '''gpio serial /dev/ttyS5 # linux-6.1 test command'''</p> | + | {| class="wikitable" style="width:800px;" |
− | <p>orangepi@orangepi:~$ '''gpio serial /dev/ttyAS5 # linux-5.4 test command'''</p> | + | |- |
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''gpio serial /dev/ttyS5 # linux-6.1 test command'''</p> | ||
+ | <p>orangepi@orangepi:~$ '''gpio serial /dev/ttyAS5 # linux-5.4 test command'''</p> | ||
+ | |||
+ | |||
<p>Out: 0: -> 0</p> | <p>Out: 0: -> 0</p> | ||
<p>Out: 1: -> 1</p> | <p>Out: 1: -> 1</p> | ||
<p>Out: 2: -> 2</p> | <p>Out: 2: -> 2</p> | ||
− | <p>Out: 3: -> 3^C</p></li></ol> | + | <p>Out: 3: -> 3^C</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="pwm-test-method"></span> | <span id="pwm-test-method"></span> | ||
+ | |||
=== PWM test method === | === PWM test method === | ||
− | '''The development board can use up to 4 channels of PWM, and the positions of their pins are shown in the figure below:''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The development board can use up to 4 channels of PWM, and the positions of their pins are shown in the figure below:'''</big> | ||
− | [[File: | + | [[File:zero3-img183-1.png|center]] |
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>In the Linux system, the pwm is closed by default, and it needs to be opened manually to use it. The steps to open are as follows:</p> | <li><p>In the Linux system, the pwm is closed by default, and it needs to be opened manually to use it. The steps to open are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First run '''orangepi-config''', normal users remember to add | + | <li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p> |
− | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''System'''</p> | <li><p>Then select '''System'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img85.png]]</p></li> |
<li><p>Then select '''Hardware'''</p> | <li><p>Then select '''Hardware'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img86.png]]</p></li> |
− | <li><p>Then use the arrow keys on the keyboard to navigate to the | + | <li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select the configuration corresponding to pwm</p> |
− | <p>'''Since the RX and TX pins of UART5 in the PWM1, PWM2 and 26pin interfaces are multiplexed, please make sure that the UART5 configuration is not selected (do not check ph-uart5) when turning on PWM1 and PWM2 (you need to select ph-pwm12).'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
− | <p>'''PWM3, PWM4 and the TX and RX pins in the debug serial port are multiplexed, so when using PWM3 and PWM4 (need to select ph-pwm34), please turn off the configuration of UART0 (need to select disable-uart0), after turning off UART0 The debug serial port cannot be used.'''</p> | + | |- |
− | <p>[[File: | + | | |
+ | <big><p>'''Since the RX and TX pins of UART5 in the PWM1, PWM2 and 26pin interfaces are multiplexed, please make sure that the UART5 configuration is not selected (do not check ph-uart5) when turning on PWM1 and PWM2 (you need to select ph-pwm12).'''</p> | ||
+ | <p>'''PWM3, PWM4 and the TX and RX pins in the debug serial port are multiplexed, so when using PWM3 and PWM4 (need to select ph-pwm34), please turn off the configuration of UART0 (need to select disable-uart0), after turning off UART0 The debug serial port cannot be used.'''</p></big> | ||
+ | |} | ||
+ | <p>[[File:zero3-img184.png]]</p></li> | ||
<li><p>Then select '''<Save>''' to save</p> | <li><p>Then select '''<Save>''' to save</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img88.png]]</p></li> |
<li><p>Then select '''<Back>'''</p> | <li><p>Then select '''<Back>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img89.png]]</p></li> |
− | <li><p>Then select '''<Reboot>''' to restart the system to make the | + | <li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p> |
− | <p>[[File: | + | <p>[[File:zero3-img90.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>After restarting, the PWM test can be started</p> | <li><p>After restarting, the PWM test can be started</p> | ||
− | <p>'''Please execute the following commands under the root user.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Please execute the following commands under the root user.'''</p></big> | ||
+ | |} | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>Enter the following command on the command line to make pwm1 | + | <li><p>Enter the following command on the command line to make pwm1 output a 50Hz square wave</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/export'''</p> | <p>root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/export'''</p> | ||
<p>root@orangepi:~# '''echo 20000000 > /sys/class/pwm/pwmchip0/pwm1/period'''</p> | <p>root@orangepi:~# '''echo 20000000 > /sys/class/pwm/pwmchip0/pwm1/period'''</p> | ||
<p>root@orangepi:~# '''echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle'''</p> | <p>root@orangepi:~# '''echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle'''</p> | ||
− | <p>root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable'''</p></li> | + | <p>root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable'''</p> |
− | <li><p>Enter the following command on the command line to make pwm2 | + | |} |
− | + | </li> | |
− | + | <li><p>Enter the following command on the command line to make pwm2 output a 50Hz square wave</p></li> | |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:~# '''echo 2 > /sys/class/pwm/pwmchip0/export''' | root@orangepi:~# '''echo 2 > /sys/class/pwm/pwmchip0/export''' | ||
Line 3,605: | Line 4,471: | ||
root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm2/enable''' | root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm2/enable''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li>Enter the following command on the command line to make pwm3 output | + | <li>Enter the following command on the command line to make pwm3 output a 50Hz square wave</li> |
− | + | {| class="wikitable" style="width:800px;" | |
+ | |- | ||
+ | | | ||
root@orangepi:~# '''echo 3 > /sys/class/pwm/pwmchip0/export''' | root@orangepi:~# '''echo 3 > /sys/class/pwm/pwmchip0/export''' | ||
Line 3,616: | Line 4,485: | ||
root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm3/enable''' | root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm3/enable''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="4" style="list-style-type: lower-alpha;"> | <ol start="4" style="list-style-type: lower-alpha;"> | ||
− | <li>Enter the following command on the command line to make pwm4 output | + | <li>Enter the following command on the command line to make pwm4 output a 50Hz square wave</li> |
− | + | {| class="wikitable" style="width:800px;" | |
+ | |- | ||
+ | | | ||
root@orangepi:~# '''echo 4 > /sys/class/pwm/pwmchip0/export''' | root@orangepi:~# '''echo 4 > /sys/class/pwm/pwmchip0/export''' | ||
Line 3,627: | Line 4,499: | ||
root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm4/enable''' | root@orangepi:~# '''echo 1 > /sys/class/pwm/pwmchip0/pwm4/enable''' | ||
+ | |} | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img185.png]] |
− | </div> | + | </div></ol> |
+ | </li></ol> | ||
<span id="how-to-install-and-use-wiringop-python"></span> | <span id="how-to-install-and-use-wiringop-python"></span> | ||
+ | |||
== How to install and use wiringOP-Python == | == How to install and use wiringOP-Python == | ||
− | '''wiringOP-Python is the Python language version of wiringOP, which is used to operate the hardware resources of the development board, such as GPIO, I2C, SPI and UART, in the Python program.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''wiringOP-Python is the Python language version of wiringOP, which is used to operate the hardware resources of the development board, such as GPIO, I2C, SPI and UART, in the Python program.''' | ||
− | '''In addition, please note that all the following commands are operated under the root user.''' | + | '''In addition, please note that all the following commands are operated under the <span style="color:#FF0000">root</span> user.'''</big> |
+ | |} | ||
<span id="how-to-install-wiringop-python"></span> | <span id="how-to-install-wiringop-python"></span> | ||
Line 3,645: | Line 4,524: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First install the dependency package</p> | <li><p>First install the dependency package</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~# '''sudo apt-get update'''</p> | <p>root@orangepi:~# '''sudo apt-get update'''</p> | ||
− | <p>root@orangepi:~# '''sudo apt-get -y install git swig python3-dev python3-setuptools'''</p></li> | + | <p>root@orangepi:~# '''sudo apt-get -y install git swig python3-dev python3-setuptools'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then use the following command to download the source code of wiringOP-Python</p> | <li><p>Then use the following command to download the source code of wiringOP-Python</p> | ||
− | <p>'''Note that the following git clone --recursive command will automatically download the source code of wiringOP, because wiringOP-Python depends on wiringOP. Please make sure that the download process does not report errors due to network problems.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
− | <p>'''If you have problems downloading the code from GitHub, you can directly use the wiringOP-Python source code that comes with the Linux image, and the storage location is: /usr/src/wiringOP-Python'''</p> | + | |- |
+ | | | ||
+ | <big><p>'''Note that the following git clone --recursive command will automatically download the source code of wiringOP, because wiringOP-Python depends on wiringOP. Please make sure that the download process does not report errors due to network problems.'''</p> | ||
+ | |||
+ | |||
+ | <p>'''If you have problems downloading the code from GitHub, you can directly use the wiringOP-Python source code that comes with the Linux image, and the storage location is: /usr/src/wiringOP-Python'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~# '''git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next'''</p> | <p>root@orangepi:~# '''git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next'''</p> | ||
<p>root@orangepi:~# '''cd wiringOP-Python'''</p> | <p>root@orangepi:~# '''cd wiringOP-Python'''</p> | ||
− | <p>root@orangepi:~/wiringOP-Python# '''git submodule update --init --remote'''</p></li> | + | <p>root@orangepi:~/wiringOP-Python# '''git submodule update --init --remote'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then use the following command to compile wiringOP-Python and install it into the Linux system of the development board</p> | <li><p>Then use the following command to compile wiringOP-Python and install it into the Linux system of the development board</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~# '''cd wiringOP-Python'''</p> | <p>root@orangepi:~# '''cd wiringOP-Python'''</p> | ||
<p>root@orangepi:~/wiringOP-Python# '''python3 generate-bindings.py > bindings.i'''</p> | <p>root@orangepi:~/wiringOP-Python# '''python3 generate-bindings.py > bindings.i'''</p> | ||
− | <p>root@orangepi:~/wiringOP-Python# '''sudo python3 setup.py install'''</p></li> | + | <p>root@orangepi:~/wiringOP-Python# '''sudo python3 setup.py install'''</p> |
− | <li><p>Then enter the following command, if there is help information output, it means that wiringOP-Python is installed successfully, press the '''q''' key to exit the help information interface</p></li | + | |} |
+ | </li> | ||
+ | <li><p>Then enter the following command, if there is help information output, it means that wiringOP-Python is installed successfully, press the '''q''' key to exit the help information interface</p></li> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; help(wiringpi)"''' | root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; help(wiringpi)"''' | ||
Help on module wiringpi: | Help on module wiringpi: | ||
+ | |||
NAME | NAME | ||
− | wiringpi | + | :wiringpi |
+ | |||
DESCRIPTION | DESCRIPTION | ||
− | # This file was automatically generated by SWIG (http://www.swig.org). | + | : # This file was automatically generated by SWIG (http://www.swig.org). |
− | # Version 4.0.2 | + | : # Version 4.0.2 |
− | # | + | : # |
− | # Do not make changes to this file unless you know what you are doing--modify | + | : # Do not make changes to this file unless you know what you are doing--modify |
− | |||
− | |||
+ | : # the SWIG interface file instead. | ||
+ | |} | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>The steps to test whether wiringOP-Python is successfully installed under the python command line are as follows:</p> | <li><p>The steps to test whether wiringOP-Python is successfully installed under the python command line are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>First use the python3 command to enter the command line mode of | + | <li>First use the python3 command to enter the command line mode of python3</li> |
− | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
root@orangepi:~# '''python3''' | root@orangepi:~# '''python3''' | ||
+ | |} | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
<li>Then import the python module of wiringpi</li></ol> | <li>Then import the python module of wiringpi</li></ol> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
>>> '''import wiringpi;''' | >>> '''import wiringpi;''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li>Finally, enter the following command to view the help information of | + | <li>Finally, enter the following command to view the help information of wiringOP-Python, and press the q key to exit the help information interface</li> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
>>> '''help(wiringpi)''' | >>> '''help(wiringpi)''' | ||
Help on module wiringpi: | Help on module wiringpi: | ||
+ | |||
NAME | NAME | ||
− | wiringpi | + | :wiringpi |
+ | |||
DESCRIPTION | DESCRIPTION | ||
− | # This file was automatically generated by SWIG (http://www.swig.org). | + | : # This file was automatically generated by SWIG (http://www.swig.org). |
+ | |||
+ | : # Version 4.0.2 | ||
− | # | + | : # |
− | # | + | : # Do not make changes to this file unless you know what you are doing--modify |
− | # | + | : # the SWIG interface file instead. |
− | |||
CLASSES | CLASSES | ||
− | builtins.object | + | :builtins.object |
+ | |||
+ | ::GPIO | ||
− | + | ::I2C | |
− | + | ::Serial | |
− | + | ::nes | |
− | |||
− | class GPIO(builtins.object) | + | :class GPIO(builtins.object) |
− | | GPIO(pinmode=0) | + | :| GPIO(pinmode=0) |
+ | |||
+ | :| | ||
− | |||
>>> | >>> | ||
+ | |} | ||
+ | </ol> | ||
+ | </li></ol> | ||
+ | <span id="pin-gpio-port-test-1"></span> | ||
− | |||
=== 26pin GPIO port test === | === 26pin GPIO port test === | ||
− | '''wiringOP-Python is the same as wiringOP, you can also determine which GPIO pin to operate by specifying the wPi number, because there is no command to check the wPi number in wiringOP-Python, so you can only check the board wPi number and physical Correspondence between pins.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
− | + | |- | |
− | [[File: | + | | |
+ | <big>'''wiringOP-Python is the same as wiringOP, you can also determine which GPIO pin to operate by specifying the wPi number, because there is no command to check the wPi number in wiringOP-Python, so you can only check the board wPi number and physical Correspondence between pins.'''</big> | ||
+ | [[File:zero3-img172.png]] | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The following takes pin 7—the corresponding GPIO is PC9—the corresponding wPi number is 2—as an example to demonstrate how to set the high and low levels of the GPIO port</p> | <li><p>The following takes pin 7—the corresponding GPIO is PC9—the corresponding wPi number is 2—as an example to demonstrate how to set the high and low levels of the GPIO port</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img173.png]]</p></li> |
<li><p>The steps to test directly with the command are as follows:</p> | <li><p>The steps to test directly with the command are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First set the GPIO port to output mode, where the first | + | <li><p>First set the GPIO port to output mode, where the first parameter of the '''pinMode''' function is the serial number of the wPi corresponding to the pin, and the second parameter is the GPIO mode</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; \'''</p> | <p>root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; \'''</p> | ||
<p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \'''</p> | <p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \'''</p> | ||
− | <p>'''wiringpi.pinMode(2, GPIO.OUTPUT) ; "'''</p></li> | + | <p>'''wiringpi.pinMode(<span style="color:#FF0000">2, GPIO.OUTPUT</span>) ; "'''</p> |
− | <li><p>Then set the GPIO port to output low level. After setting, you | + | |} |
+ | </li> | ||
+ | <li><p>Then set the GPIO port to output low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; \'''</p> | <p>root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; \'''</p> | ||
<p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p> | <p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p> | ||
− | <p>'''wiringpi.digitalWrite(2, GPIO.LOW)"'''</p></li> | + | <p>'''wiringpi.digitalWrite(2, <span style="color:#FF0000">GPIO.LOW</span>)"'''</p> |
− | <li><p>Then set the GPIO port to output a high level. After setting, | + | |} |
− | <p>root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; \'''</p> | + | </li> |
− | <p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p> | + | <li><p>Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.</p> |
− | <p>'''wiringpi.digitalWrite(2, GPIO.HIGH)"'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP-Python# '''python3 -c "import wiringpi; \'''</p> | ||
+ | <p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p> | ||
+ | <p>'''wiringpi.digitalWrite(2, <span style="color:#FF0000">GPIO.HIGH</span>)"'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>The steps to test in the command line of python3 are as follows:</p> | <li><p>The steps to test in the command line of python3 are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First use the python3 command to enter the command line mode of | + | <li><p>First use the python3 command to enter the command line mode of python3</p> |
− | <p>root@orangepi:~# '''python3'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~# '''python3'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then import the python module of wiringpi</p> | <li><p>Then import the python module of wiringpi</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>>>> '''import wiringpi'''</p> | <p>>>> '''import wiringpi'''</p> | ||
− | <p>>>> '''from wiringpi import GPIO'''</p></li> | + | <p>>>> '''from wiringpi import GPIO'''</p> |
− | <li><p>Then set the GPIO port to output mode, where the first parameter | + | |} |
+ | </li> | ||
+ | <li><p>Then set the GPIO port to output mode, where the first parameter of the '''pinMode''' function is the serial number of the wPi corresponding to the pin, and the second parameter is the GPIO mode</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>>>> '''wiringpi.wiringPiSetup()'''</p> | <p>>>> '''wiringpi.wiringPiSetup()'''</p> | ||
<p>0</p> | <p>0</p> | ||
− | <p>>>> '''wiringpi.pinMode(2, GPIO.OUTPUT)'''</p></li> | + | <p>>>> '''wiringpi.pinMode(<span style="color:#FF0000">2, GPIO.OUTPUT</span>)'''</p> |
− | <li><p>Then set the GPIO port to output low level. After setting, you | + | |} |
− | <p>>>> '''wiringpi.digitalWrite(2, GPIO.LOW)'''</p></li> | + | </li> |
− | <li><p>Then set the GPIO port to output a high level. After setting, | + | <li><p>Then set the GPIO port to output low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully.</p> |
− | <p>>>> '''wiringpi.digitalWrite(2, GPIO.HIGH)'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>>>> '''wiringpi.digitalWrite(2, <span style="color:#FF0000">GPIO.LOW</span>)'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>>>> '''wiringpi.digitalWrite(2, <span style="color:#FF0000">GPIO.HIGH</span>)'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>The method of wiringOP-Python to set GPIO high and low levels in python code can refer to the '''blink.py''' test program in the examples below. The '''blink.py''' test program will set the voltage of all GPIO ports in the 26 pins of the development board to change continuously.</p> | <li><p>The method of wiringOP-Python to set GPIO high and low levels in python code can refer to the '''blink.py''' test program in the examples below. The '''blink.py''' test program will set the voltage of all GPIO ports in the 26 pins of the development board to change continuously.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | ||
<p>root@orangepi:~/wiringOP-Python/examples# '''ls blink.py'''</p> | <p>root@orangepi:~/wiringOP-Python/examples# '''ls blink.py'''</p> | ||
<p>'''blink.py'''</p> | <p>'''blink.py'''</p> | ||
− | <p>root@orangepi:~/wiringOP-Python/examples'''# python3 blink.py'''</p></li></ol> | + | <p>root@orangepi:~/wiringOP-Python/examples'''# python3 blink.py'''</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="pin-spi-test-1"></span> | <span id="pin-spi-test-1"></span> | ||
+ | |||
=== 26pin SPI test === | === 26pin SPI test === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>According to the schematic diagram of the 26pin interface, the available spi is spi1</p> | <li><p>According to the schematic diagram of the 26pin interface, the available spi is spi1</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img176.png]]</p></li> |
<li><p>The spi1 is disabled by default in the Linux system and needs to be manually enabled before it can be used. The steps to open are as follows:</p> | <li><p>The spi1 is disabled by default in the Linux system and needs to be manually enabled before it can be used. The steps to open are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First run '''orangepi-config''', normal users remember to add | + | <li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p> |
− | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''System'''</p> | <li><p>Then select '''System'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img85.png]]</p></li> |
<li><p>Then select '''Hardware'''</p> | <li><p>Then select '''Hardware'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img86.png]]</p></li> |
− | <li><p>Then use the arrow keys on the keyboard to navigate to the | + | <li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select '''spi1-cs1-spidev'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img177.png]]</p></li> |
<li><p>Then select '''<Save>''' to save</p> | <li><p>Then select '''<Save>''' to save</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img88.png]]</p></li> |
<li><p>Then select '''<Back>'''然后选择'''<Back>'''</p> | <li><p>Then select '''<Back>'''然后选择'''<Back>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img89.png]]</p></li> |
− | <li><p>Then select '''<Reboot>''' to restart the system to make the | + | <li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p> |
− | <p>[[File: | + | <p>[[File:zero3-img90.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>Then check whether there is a '''spidev1.1''' device node in the Linux system. If it exists, it means that the configuration of SPI1 has taken effect</p> | <li><p>Then check whether there is a '''spidev1.1''' device node in the Linux system. If it exists, it means that the configuration of SPI1 has taken effect</p> | ||
− | <p>orangepi@orangepi:~$ '''ls /dev/spidev1*'''</p> | + | {| class="wikitable" style="width:800px;" |
− | <p>/dev/spidev1.1</p></li> | + | |- |
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''ls /dev/spidev1*'''</p> | ||
+ | <p>/dev/spidev1.1</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then you can use the '''spidev_test.py''' program in the examples to test the loopback function of the SPI. The '''spidev_test.py''' program needs to specify the following two parameters:</p> | <li><p>Then you can use the '''spidev_test.py''' program in the examples to test the loopback function of the SPI. The '''spidev_test.py''' program needs to specify the following two parameters:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>'''--channel''': Specify the channel number of SPI</p></li> | <li><p>'''--channel''': Specify the channel number of SPI</p></li> | ||
− | <li><p>'''--port''': | + | <li><p>'''--port''': Specify the port number of SPI</p></li></ol> |
</li> | </li> | ||
<li><p>Do not short-circuit the mosi and miso pins of SPI1, the output result of running spidev_test.py is as follows, you can see that the data of TX and RX are inconsistent</p> | <li><p>Do not short-circuit the mosi and miso pins of SPI1, the output result of running spidev_test.py is as follows, you can see that the data of TX and RX are inconsistent</p> | ||
− | <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p | + | </li> |
+ | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | ||
root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \''' | root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \''' | ||
Line 3,826: | Line 4,814: | ||
Opening device /dev/spidev1.1 | Opening device /dev/spidev1.1 | ||
− | TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......… | + | TX | FF FF FF FF FF FF '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| |
− | |||
− | |||
+ | RX | FF FF FF FF FF FF '''<span style="color:#FF0000">FF FF FF FF FF FF</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |.............….| | ||
+ | |} | ||
+ | </ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
<li><p>Then use the Dupont wire to short-circuit the two pins of txd (pin 19 in the 26pin interface) and rxd (pin 21 in the 26pin interface) of SPI1 and then run the output of spidev_test.py as follows, you can see The data sent and received are the same, indicating that the SPI1 loopback test is normal</p> | <li><p>Then use the Dupont wire to short-circuit the two pins of txd (pin 19 in the 26pin interface) and rxd (pin 21 in the 26pin interface) of SPI1 and then run the output of spidev_test.py as follows, you can see The data sent and received are the same, indicating that the SPI1 loopback test is normal</p> | ||
− | <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p | + | </li> |
+ | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | ||
root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \''' | root@orangepi:~/wiringOP-Python/examples# '''python3 spidev_test.py \''' | ||
Line 3,844: | Line 4,838: | ||
Opening device /dev/spidev1.1 | Opening device /dev/spidev1.1 | ||
− | TX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| | + | TX | FF FF FF FF FF FF '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| |
− | RX | FF FF FF FF FF FF '''40 00 00 00 00 95''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| | + | RX | FF FF FF FF FF FF '''<span style="color:#FF0000">40 00 00 00 00 95</span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| |
+ | |} | ||
+ | </ol> | ||
+ | <span id="pin-i2c-test-1"></span> | ||
− | |||
=== 26pin I2C test === | === 26pin I2C test === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>According to the schematic diagram of 26pin, the available i2c is i2c3</p> | <li><p>According to the schematic diagram of 26pin, the available i2c is i2c3</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img178.png]]</p></li> |
<li><p>i2c3 is disabled by default in the Linux system, and it needs to be manually enabled before it can be used. The steps to open are as follows:</p> | <li><p>i2c3 is disabled by default in the Linux system, and it needs to be manually enabled before it can be used. The steps to open are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First run '''orangepi-config''', normal users remember to add | + | <li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p> |
− | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''System'''</p> | <li><p>Then select '''System'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img85.png]]</p></li> |
<li><p>Then select '''Hardware'''</p> | <li><p>Then select '''Hardware'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img86.png]]</p></li> |
− | <li><p> | + | <li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select '''ph-i2c3'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img179.png]]</p></li> |
<li><p>Then select '''<Save>''' to save</p> | <li><p>Then select '''<Save>''' to save</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img88.png]]</p></li> |
<li><p>Then select '''<Back>'''</p> | <li><p>Then select '''<Back>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img89.png]]</p></li> |
− | <li><p>Then select '''<Reboot>''' to restart the system to make the | + | <li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p> |
− | <p>[[File: | + | <p>[[File:zero3-img90.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>After starting the linux system, first confirm that there is an i2c3 device node under /dev</p> | <li><p>After starting the linux system, first confirm that there is an i2c3 device node under /dev</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ls /dev/i2c-3'''</p> | <p>orangepi@orangepi:~$ '''ls /dev/i2c-3'''</p> | ||
− | <p>'''/dev/i2c-3'''</p></li> | + | <p>'''/dev/i2c-3'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then start testing i2c, first install i2c-tools</p> | <li><p>Then start testing i2c, first install i2c-tools</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo''' '''apt-get install -y i2c-tools'''</p></li> | + | <p>orangepi@orangepi:~$ '''sudo''' '''apt-get install -y i2c-tools'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then connect an i2c device to the i2c3 pin of the 26pin connector, here we take the DS1307 RTC module as an example</p> | <li><p>Then connect an i2c device to the i2c3 pin of the 26pin connector, here we take the DS1307 RTC module as an example</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img186.png]]</p> |
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Pins of the RTC module''' |
− | | style="text-align: | + | | style="text-align: center;"| '''The pin corresponding to the 26pin of the development board''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''5V''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Pin 2''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''GND''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Pin 6''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''SDA''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Pin 3''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''SCL''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Pin 5''' |
|} | |} | ||
− | + | </li></ol> | |
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
− | <li>Then use the '''i2cdetect -y 3''' command, if the address of the connected i2c device can be detected, it means that the i2c device is connected correctly</li> | + | <li>Then use the '''i2cdetect -y 3''' command, if the address of the connected i2c device can be detected, it means that the i2c device is connected correctly</li> |
− | |||
− | |||
+ | [[File:zero3-img187.png]] | ||
+ | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
<li><p>Then you can run the '''ds1307.py''' test program in the '''examples''' to read the RTC time</p> | <li><p>Then you can run the '''ds1307.py''' test program in the '''examples''' to read the RTC time</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | ||
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 ds1307.py --device \'''</p> | <p>root@orangepi:~/wiringOP-Python/examples# '''python3 ds1307.py --device \'''</p> | ||
Line 3,912: | Line 4,926: | ||
<p>Thu 2022-06-16 04:35:48</p> | <p>Thu 2022-06-16 04:35:48</p> | ||
<p>^C</p> | <p>^C</p> | ||
− | <p>exit</p></li></ol> | + | <p>exit</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="pin-uart-test-1"></span> | <span id="pin-uart-test-1"></span> | ||
+ | |||
=== 26pin UART test === | === 26pin UART test === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>According to the schematic diagram of the 26pin interface, the available uart is uart5</p> | <li><p>According to the schematic diagram of the 26pin interface, the available uart is uart5</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img181.png]]</p></li> |
<li><p>uart5 is disabled by default in the Linux system, and it needs to be opened manually to use it. The steps to open are as follows:</p> | <li><p>uart5 is disabled by default in the Linux system, and it needs to be opened manually to use it. The steps to open are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First run '''orangepi-config''', normal users remember to add | + | <li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p> |
− | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''System'''</p> | <li><p>Then select '''System'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img85.png]]</p></li> |
<li><p>Then select '''Hardware'''</p> | <li><p>Then select '''Hardware'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img86.png]]</p></li> |
− | <li><p> | + | <li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select '''ph-uart5'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img182.png]]</p></li> |
<li><p>Then select '''<Save>''' to save</p> | <li><p>Then select '''<Save>''' to save</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img88.png]]</p></li> |
<li><p>Then select '''<Back>'''</p> | <li><p>Then select '''<Back>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img89.png]]</p></li> |
− | <li><p>Then select '''<Reboot>''' to restart the system to make the | + | <li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p> |
− | <p>[[File: | + | <p>[[File:zero3-img90.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>After entering the linux system, first confirm whether there is a uart5 device node under '''/dev'''</p> | <li><p>After entering the linux system, first confirm whether there is a uart5 device node under '''/dev'''</p> | ||
− | <p>'''Note that the linux5.4 system is /dev/ttyAS5.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that the linux5.4 system is /dev/ttyAS5.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ls /dev/ttyS5'''</p> | <p>orangepi@orangepi:~$ '''ls /dev/ttyS5'''</p> | ||
− | <p>/dev/ttyS5</p></li> | + | <p>/dev/ttyS5</p> |
− | <li><p>Then start to test the uart5 interface, first use the DuPont line to short the rx and tx of the uart5 interface to be tested</p | + | |} |
+ | </li> | ||
+ | <li><p>Then start to test the uart5 interface, first use the DuPont line to short the rx and tx of the uart5 interface to be tested</p> | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;text-align: center;" |
|- | |- | ||
| | | | ||
− | | style="text-align: | + | | style="text-align: center;"| '''uart5''' |
|- | |- | ||
| '''tx pin''' | | '''tx pin''' | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Corresponding to pin 8 in 26pin''' |
|- | |- | ||
| '''rx pin''' | | '''rx pin''' | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Corresponding to pin 10 in 26pin''' |
|} | |} | ||
− | + | </li></ol> | |
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>Finally, you can run the '''serialTest.py''' program in the examples to test the loopback function of the serial port. If you can see the following print, it means that the loopback test of the serial port is normal</p> | <li><p>Finally, you can run the '''serialTest.py''' program in the examples to test the loopback function of the serial port. If you can see the following print, it means that the loopback test of the serial port is normal</p> | ||
+ | {| class="wikitable" style="width:800px;text-align: center;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> | ||
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device "/dev/ttyS5" # linux6.1使用'''</p> | <p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device "/dev/ttyS5" # linux6.1使用'''</p> | ||
Line 3,965: | Line 4,999: | ||
<p>Out: 3: -> 3</p> | <p>Out: 3: -> 3</p> | ||
<p>Out: 4:^C</p> | <p>Out: 4:^C</p> | ||
− | <p>exit</p></li></ol> | + | <p>exit</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="hardware-watchdog-test"></span> | <span id="hardware-watchdog-test"></span> | ||
+ | |||
== Hardware Watchdog Test == | == Hardware Watchdog Test == | ||
− | The watchdog_test program is pre-installed in the linux system released by Orange PI, which can be tested directly. | + | The watchdog_test program is pre-installed in the linux system released by Orange PI, which can be tested directly. |
− | The method of running the watchdog_test program is shown | + | The method of running the watchdog_test program is shown below: |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The second parameter 10 indicates the counting of the door dog. If the dog is not fed in this time, the system will restart</p></li> | <li><p>The second parameter 10 indicates the counting of the door dog. If the dog is not fed in this time, the system will restart</p></li> | ||
<li><p>We can feed the dog by pressing any key (except ESC) on the keyboard. After the dog is fed, the program will print a line of Keep Alive to indicate that the dog is successful.</p> | <li><p>We can feed the dog by pressing any key (except ESC) on the keyboard. After the dog is fed, the program will print a line of Keep Alive to indicate that the dog is successful.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo watchdog_test 10'''</p> | <p>orangepi@orangepi:~$ '''sudo watchdog_test 10'''</p> | ||
<p>open success</p> | <p>open success</p> | ||
Line 3,988: | Line 5,028: | ||
<p>keep alive</p> | <p>keep alive</p> | ||
<p>keep alive</p> | <p>keep alive</p> | ||
− | <p>keep alive</p></li></ol> | + | <p>keep alive</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="check-the-chipid-of-the-h618-chip"></span> | <span id="check-the-chipid-of-the-h618-chip"></span> | ||
+ | |||
== Check the chipid of the H618 chip == | == Check the chipid of the H618 chip == | ||
The command of the H618 chip Chipid is shown below. The chipid of each chip is different, so you can use Chipid to distinguish multiple development boards. | The command of the H618 chip Chipid is shown below. The chipid of each chip is different, so you can use Chipid to distinguish multiple development boards. | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''cat /sys/class/sunxi_info/sys_info | grep "chipid"''' | orangepi@orangepi:~$ '''cat /sys/class/sunxi_info/sys_info | grep "chipid"''' | ||
sunxi_chipid : 338020004c0048080147478824681ed1 | sunxi_chipid : 338020004c0048080147478824681ed1 | ||
+ | |} | ||
<span id="python-related-instructions"></span> | <span id="python-related-instructions"></span> | ||
+ | |||
== Python related instructions == | == Python related instructions == | ||
Line 4,005: | Line 5,053: | ||
=== Python source code compilation and installation method === | === Python source code compilation and installation method === | ||
− | '''If the Python version in the Ubuntu or Debian system software warehouse does not meet the requirements of development, if you want to use the latest version of Python, you can use the following method to download the source code package of Python to compile and install the latest version of Python.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''If the Python version in the Ubuntu or Debian system software warehouse does not meet the requirements of development, if you want to use the latest version of Python, you can use the following method to download the source code package of Python to compile and install the latest version of Python.''' | ||
− | '''The following demonstration is the latest version of the compilation and installation of Python3.9. If you want to compile and install other versions of Python, the method is the same (need to download the source code corresponding to the Python you want to install).''' | + | '''The following demonstration is the latest version of the compilation and installation of Python3.9. If you want to compile and install other versions of Python, the method is the same (need to download the source code corresponding to the Python you want to install).'''</big> |
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First install the dependency package required to compile Python</p> | <li><p>First install the dependency package required to compile Python</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo apt-get install -y build-essential zlib1g-dev \'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get install -y build-essential zlib1g-dev \'''</p> | ||
<p>'''libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev \'''</p> | <p>'''libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev \'''</p> | ||
− | <p>'''libreadline-dev libffi-dev curl libbz2-dev'''</p></li> | + | <p>'''libreadline-dev libffi-dev curl libbz2-dev'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then download the latest version of the Python3.9 source code and decompress it</p> | <li><p>Then download the latest version of the Python3.9 source code and decompress it</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''wget \'''</p> | <p>orangepi@orangepi:~$ '''wget \'''</p> | ||
<p>[https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz '''https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz''']</p> | <p>[https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz '''https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz''']</p> | ||
− | <p>orangepi@orangepi:~$ '''tar xvf Python-3.9.10.tgz'''</p></li> | + | <p>orangepi@orangepi:~$ '''tar xvf Python-3.9.10.tgz'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then run the configuration command</p> | <li><p>Then run the configuration command</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd Python-3.9.10'''</p> | <p>orangepi@orangepi:~$ '''cd Python-3.9.10'''</p> | ||
− | <p>orangepi@orangepi:~$ '''./configure --enable-optimizations'''</p></li> | + | <p>orangepi@orangepi:~$ '''./configure --enable-optimizations'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then compile and install python3.9, the compilation time takes about half an hour</p> | <li><p>Then compile and install python3.9, the compilation time takes about half an hour</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''make -j4'''</p> | <p>orangepi@orangepi:~$ '''make -j4'''</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo make altinstall'''</p></li> | + | <p>orangepi@orangepi:~$ '''sudo make altinstall'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>After installation, you can use the following command to view the Python version number just installed</p> | <li><p>After installation, you can use the following command to view the Python version number just installed</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3.9 --version'''</p> | <p>orangepi@orangepi:~$ '''python3.9 --version'''</p> | ||
− | <p>'''Python 3.9.10'''</p></li> | + | <p>'''Python 3.9.10'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then update pip</p> | <li><p>Then update pip</p> | ||
− | <p>orangepi@orangepi:~$ '''/usr/local/bin/python3.9 -m pip install --upgrade pip'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''/usr/local/bin/python3.9 -m pip install --upgrade pip'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="python-to-replace-the-pip-source-method"></span> | <span id="python-to-replace-the-pip-source-method"></span> | ||
+ | |||
=== Python to replace the pip source method === | === Python to replace the pip source method === | ||
− | '''The Linux system PIP's default source is the official source of Python, but the source of the official Python official visits is very slow, and the Python software packaging failure is often caused by network reasons. So when installing the Python library with PIP, remember to replace the pip source''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The Linux system PIP's default source is the official source of Python, but the source of the official Python official visits is very slow, and the Python software packaging failure is often caused by network reasons. So when installing the Python library with PIP, remember to replace the pip source'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First install '''python3-pip'''</p> | <li><p>First install '''python3-pip'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo apt-get install -y python3-pip'''</p></li> | + | <p>orangepi@orangepi:~$ '''sudo apt-get install -y python3-pip'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Method of permanent replacement of pip source under Linux</p> | <li><p>Method of permanent replacement of pip source under Linux</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>Create a new'''~/.pip''' directory first, then add the | + | <li><p>Create a new'''~/.pip''' directory first, then add the '''pip.conf''' configuration file, and set the source of the pip as Tsinghua source</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''mkdir -p ~/.pip'''</p> | <p>orangepi@orangepi:~$ '''mkdir -p ~/.pip'''</p> | ||
<p>orangepi@orangepi:~$ '''cat <<EOF > ~/.pip/pip.conf'''</p> | <p>orangepi@orangepi:~$ '''cat <<EOF > ~/.pip/pip.conf'''</p> | ||
Line 4,049: | Line 5,144: | ||
<p>'''index-url = https://pypi.tuna.tsinghua.edu.cn/simple'''</p> | <p>'''index-url = https://pypi.tuna.tsinghua.edu.cn/simple'''</p> | ||
<p>'''trusted-host = pypi.tuna.tsinghua.edu.cn'''</p> | <p>'''trusted-host = pypi.tuna.tsinghua.edu.cn'''</p> | ||
− | <p>'''EOF'''</p></li> | + | <p>'''EOF'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then install the Python library with pip3, it will be fast</p></li></ol> | <li><p>Then install the Python library with pip3, it will be fast</p></li></ol> | ||
</li> | </li> | ||
<li><p>The method of temporarily replacing the pip source under Linux, the '''<packagename>''' needs to be replaced with a specific package name</p> | <li><p>The method of temporarily replacing the pip source under Linux, the '''<packagename>''' needs to be replaced with a specific package name</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''pip3 install <packagename> -i \'''</p> | <p>orangepi@orangepi:~$ '''pip3 install <packagename> -i \'''</p> | ||
− | <p>'''https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn'''</p></li></ol> | + | <p>'''https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn'''</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="the-method-of-installing-the-docker"></span> | <span id="the-method-of-installing-the-docker"></span> | ||
+ | |||
== The Method Of Installing The Docker == | == The Method Of Installing The Docker == | ||
− | Orange Pi's Linux image has been pre-installed with Docker, but the Docker service has not been opened by default. Use | + | Orange Pi's Linux image has been pre-installed with Docker, but the Docker service has not been opened by default. Use '''enable_docker.sh''' script to enable the docker service, and then you can start using the docker command, and the docker service will be automatically activated at the next start of the system. |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''enable_docker.sh''' | orangepi@orangepi:~$ '''enable_docker.sh''' | ||
+ | |} | ||
− | You can use the following command to test the docker,If you can run '''hello-world''' to indicate that docker can be used normally. | + | You can use the following command to test the docker,If you can run '''hello-world''' to indicate that docker can be used normally.. |
− | orangepi@orangepi:~$ '''docker run hello-world''' | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | orangepi@orangepi:~$ '''docker run hello-world''' | ||
Unable to find image 'hello-world:latest' locally | Unable to find image 'hello-world:latest' locally | ||
Line 4,077: | Line 5,187: | ||
Status: Downloaded newer image for hello-world:latest | Status: Downloaded newer image for hello-world:latest | ||
− | |||
− | '''This message shows that your installation appears to be working correctly.''' | + | '''<span style="color:#FF0000">Hello from Docker!</span>''' |
+ | |||
+ | '''<span style="color:#FF0000">This message shows that your installation appears to be working correctly.</span>''' | ||
'''.….''' | '''.….''' | ||
+ | |} | ||
− | When using the docker command, if it prompts '''permission denied''', please add the current user to the docker user group, so that the docker command can be run without | + | When using the docker command, if it prompts '''permission denied''', please add the current user to the docker user group, so that the docker command can be run without sudo. |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''sudo usermod -aG docker $USER''' | orangepi@orangepi:~$ '''sudo usermod -aG docker $USER''' | ||
+ | |} | ||
− | '''Note: You need to log out of the system and log in again to take effect, and restarting the system is also OK.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note: You need to log out of the system and log in again to take effect, and restarting the system is also OK.'''</big> | ||
+ | |} | ||
<span id="how-to-install-home-assistant"></span> | <span id="how-to-install-home-assistant"></span> | ||
+ | |||
== How to install Home Assistant == | == How to install Home Assistant == | ||
− | '''Note that only the method of installing Home Assistant in Ubuntu or Debian system will be provided here. For detailed usage of Home Assistant, please refer to official documents or corresponding | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that only the method of installing Home Assistant in Ubuntu or Debian system will be provided here. For detailed usage of Home Assistant, please refer to official documents or corresponding books.'''</big> | ||
+ | |} | ||
<span id="install-via-docker"></span> | <span id="install-via-docker"></span> | ||
Line 4,098: | Line 5,223: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First of all, please install docker and make sure that docker can run normally. | + | <li><p>First of all, please install docker and make sure that docker can run normally. The Method Of Installing The Docker, please refer to the instructions in the section on [[Orange Pi Zero 3#The Method Of Installing The Docker|'''how to install Docker''']].</p></li> |
<li><p>Then you can search for the docker image of Home Assistant</p> | <li><p>Then you can search for the docker image of Home Assistant</p> | ||
− | <p>orangepi@orangepi:~$ '''docker search homeassistant'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''docker search homeassistant'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then use the following command to download the docker image of Home Assistant to the local. The size of the image is about 1GB, and the download time will be relatively long. Please wait patiently for the download to complete</p> | <li><p>Then use the following command to download the docker image of Home Assistant to the local. The size of the image is about 1GB, and the download time will be relatively long. Please wait patiently for the download to complete</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''docker pull homeassistant/home-assistant'''</p> | <p>orangepi@orangepi:~$ '''docker pull homeassistant/home-assistant'''</p> | ||
<p>Using default tag: latest</p> | <p>Using default tag: latest</p> | ||
Line 4,112: | Line 5,245: | ||
<p>Digest: sha256:81d381f5008c082a37da97d8b08dd8b358dae7ecf49e62ce3ef1eeaefc4381bb</p> | <p>Digest: sha256:81d381f5008c082a37da97d8b08dd8b358dae7ecf49e62ce3ef1eeaefc4381bb</p> | ||
<p>Status: Downloaded newer image for homeassistant/home-assistant:latest</p> | <p>Status: Downloaded newer image for homeassistant/home-assistant:latest</p> | ||
− | <p>docker.io/homeassistant/home-assistant:latest</p></li> | + | <p>docker.io/homeassistant/home-assistant:latest</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then you can use the following command to view the docker image of Home Assistant just downloaded</p> | <li><p>Then you can use the following command to view the docker image of Home Assistant just downloaded</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''docker images homeassistant/home-assistant'''</p> | <p>orangepi@orangepi:~$ '''docker images homeassistant/home-assistant'''</p> | ||
− | <p>REPOSITORY TAG IMAGE ID CREATED SIZE</p> | + | <p>REPOSITORY TAG IMAGE ID CREATED SIZE</p> |
− | <p>homeassistant/home-assistant latest bfa0ab9e1cf5 2 months ago '''1.17GB'''</p></li> | + | <p>homeassistant/home-assistant latest bfa0ab9e1cf5 2 months ago '''<span style="color:#FF0000">1.17GB</span>'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Now you can run the docker container of Home Assistant</p> | <li><p>Now you can run the docker container of Home Assistant</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''docker run -d \'''</p> | <p>orangepi@orangepi:~$ '''docker run -d \'''</p> | ||
− | <p>'''--name homeassistant \'''</p> | + | :<p>'''--name homeassistant \'''</p> |
− | <p>'''--privileged \'''</p> | + | :<p>'''--privileged \'''</p> |
− | <p>'''--restart=unless-stopped \'''</p> | + | :<p>'''--restart=unless-stopped \'''</p> |
− | <p>'''-e TZ=Asia/Shanghai \'''</p> | + | :<p>'''-e TZ=Asia/Shanghai \'''</p> |
− | <p>'''-v /home/orangepi/home-assistant:/config \'''</p> | + | :<p>'''-v /home/orangepi/home-assistant:/config \'''</p> |
− | <p>'''--network=host \'''</p> | + | :<p>'''--network=host \'''</p> |
− | <p>'''homeassistant/home-assistant:latest'''</p></li> | + | :<p>'''homeassistant/home-assistant:latest'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then enter【IP address of the development board: 8123】in the browser to see the Home Assistant interface</p> | <li><p>Then enter【IP address of the development board: 8123】in the browser to see the Home Assistant interface</p> | ||
− | <p>'''It takes a while for the Home Assistant container to start. If the following interface is not displayed normally, please wait for a few seconds and then refresh. If the following interface is not displayed normally after waiting for more than one minute, it means that there is a problem with the installation of Home Assistant. At this time, you need to check whether there is a problem with the previous installation and setting | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
− | <p>[[File: | + | |- |
+ | | | ||
+ | <big><p>'''It takes a while for the Home Assistant container to start. If the following interface is not displayed normally, please wait for a few seconds and then refresh. If the following interface is not displayed normally after waiting for more than one minute, it means that there is a problem with the installation of Home Assistant. At this time, you need to check whether there is a problem with the previous installation and setting process.'''</p></big> | ||
+ | |} | ||
+ | <p>[[File:zero3-img188-1.png]]</p></li> | ||
<li><p>Then enter '''your name''', '''user name''' and '''password''' and click '''Create Account'''</p> | <li><p>Then enter '''your name''', '''user name''' and '''password''' and click '''Create Account'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img189-1.png]]</p></li> |
<li><p>Then follow the interface prompts to set according to your preferences, and then click Next</p> | <li><p>Then follow the interface prompts to set according to your preferences, and then click Next</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img190-1.png]]</p></li> |
<li><p>Then click Next</p> | <li><p>Then click Next</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img191-1.png]]</p></li> |
<li><p>Then click Finish</p> | <li><p>Then click Finish</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img192-1.png]]</p></li> |
<li><p>The final main interface displayed by Home Assistant is shown in the figure below</p> | <li><p>The final main interface displayed by Home Assistant is shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img193-1.png]]</p></li> |
<li><p>How to stop the Home Assistant container</p> | <li><p>How to stop the Home Assistant container</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The command to view the docker container is as follows</p> | <li><p>The command to view the docker container is as follows</p> | ||
− | <p>orangepi@orangepi:~$ '''docker ps -a'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''docker ps -a'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The command to stop the Home Assistant container is as follows</p> | <li><p>The command to stop the Home Assistant container is as follows</p> | ||
− | <p>orangepi@orangepi:~$ '''docker stop homeassistant'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''docker stop homeassistant'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The command to delete the Home Assistant container is as follows</p> | <li><p>The command to delete the Home Assistant container is as follows</p> | ||
− | <p>orangepi@orangepi:~$ '''docker rm homeassistant'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''docker rm homeassistant'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="install-via-python"></span> | <span id="install-via-python"></span> | ||
+ | |||
=== Install via python === | === Install via python === | ||
− | '''Before installation, please replace the source of pip with a domestic source to speed up the installation of the Python package. For the configuration method, see the instructions in the section on how to replace the pip source with Python. | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Before installation, please replace the source of pip with a domestic source to speed up the installation of the Python package. For the configuration method, see the instructions in the section on [[Orange Pi Zero 3#Python to replace the pip source method|'''how to replace the pip source with Python''']].'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First install the dependency package</p> | <li><p>First install the dependency package</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo apt-get install -y python3 python3-dev python3-venv \'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get install -y python3 python3-dev python3-venv \'''</p> | ||
<p>'''python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \'''</p> | <p>'''python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \'''</p> | ||
<p>'''libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata'''</p> | <p>'''libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata'''</p> | ||
− | <p>'''If it is debian12, please use the following | + | |} |
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big><p>'''If it is debian12, please use the following command:'''</p></big> | ||
+ | |||
+ | |||
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo apt-get install -y python3 python3-dev python3-venv \'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get install -y python3 python3-dev python3-venv \'''</p> | ||
<p>'''python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \'''</p> | <p>'''python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \'''</p> | ||
− | <p>'''libopenjp2-7 libturbojpeg0-dev tzdata'''</p></li> | + | <p>'''libopenjp2-7 libturbojpeg0-dev tzdata'''</p> |
− | <li><p>Then you need to compile and install Python3.9. For the method, please refer to the section on '''how to compile and install Python source code'''</p> | + | |} |
− | <p>'''The default Python version of Debian Bullseye is Python3.9, so there is no need to compile and | + | </li> |
− | <p>'''The default Python version of Ubuntu Jammy is Python3.10, so there is no need to compile and | + | <li><p>Then you need to compile and install Python3.9. For the method, please refer to the section on [[Orange Pi Zero 3#Python source code compilation and installation method|'''how to compile and install Python source code''']]</p> |
− | <p>'''The default Python version of Debian Bookworm is Python3.11, so there is no need to compile and | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''The default Python version of Debian Bullseye is Python3.9, so there is no need to compile and install.'''</p> | ||
+ | <p>'''The default Python version of Ubuntu Jammy is Python3.10, so there is no need to compile and install.'''</p> | ||
+ | <p>'''The default Python version of Debian Bookworm is Python3.11, so there is no need to compile and install.'''</p></big> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then create a Python virtual environment</p> | <li><p>Then create a Python virtual environment</p> | ||
− | <p>'''Debian Bookworm is python3.11, please remember to replace the corresponding | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''Debian Bookworm is python3.11, please remember to replace the corresponding command.'''</p></big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo mkdir /srv/homeassistant'''</p> | <p>orangepi@orangepi:~$ '''sudo mkdir /srv/homeassistant'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo chown orangepi:orangepi /srv/homeassistant'''</p> | <p>orangepi@orangepi:~$ '''sudo chown orangepi:orangepi /srv/homeassistant'''</p> | ||
Line 4,176: | Line 5,368: | ||
<p>orangepi@orangepi:~$ '''python3.9 -m venv .'''</p> | <p>orangepi@orangepi:~$ '''python3.9 -m venv .'''</p> | ||
<p>orangepi@orangepi:~$ '''source bin/activate'''</p> | <p>orangepi@orangepi:~$ '''source bin/activate'''</p> | ||
− | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$</p></li> | + | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then install the required Python package</p> | <li><p>Then install the required Python package</p> | ||
− | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$ '''python3 -m pip install wheel'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$ '''python3 -m pip install wheel'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then you can install Home Assistant Core</p> | <li><p>Then you can install Home Assistant Core</p> | ||
− | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$ '''pip3 install homeassistant'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Then enter the following command to run Home Assistant Core</p> | + | |- |
− | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$ '''hass'''</p></li> | + | | |
− | <li><p>Then enter '''[IP address of the development board: 8123]''' in the browser to see the interface of Home Assistant</p> | + | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$ '''pip3 install homeassistant'''</p> |
− | <p>'''When running the hass command for the first time, you will download and install and cache some necessary libraries and dependencies to run. This process may take a few minutes. Note that at this time, the interface of Home Assistant cannot be seen in the browser. Please wait for a while before | + | |} |
− | <p>[[File: | + | </li> |
+ | <li><p>Then enter the following command to run Home Assistant Core</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>(homeassistant) orangepi@orangepi:/srv/homeassistant$ '''hass'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Then enter '''[IP address of the development board: 8123]''' in the browser to see the interface of Home Assistant</p> | ||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big><p>'''When running the hass command for the first time, you will download and install and cache some necessary libraries and dependencies to run. This process may take a few minutes. Note that at this time, the interface of Home Assistant cannot be seen in the browser. Please wait for a while before refreshing.'''</p></big> | ||
+ | |} | ||
+ | <p>[[File:zero3-img194-1.png]]</p></li></ol> | ||
<span id="opencv-installation-method"></span> | <span id="opencv-installation-method"></span> | ||
+ | |||
== OpenCV installation method == | == OpenCV installation method == | ||
Line 4,195: | Line 5,409: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The installation command is shown below</p> | <li><p>The installation command is shown below</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo apt-get install -y libopencv-dev python3-opencv'''</p></li> | + | <p>orangepi@orangepi:~$ '''sudo apt-get install -y libopencv-dev python3-opencv'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then use the following command to print the output of the version number of OpenCV, indicating that the installation of OpenCV is successful</p> | <li><p>Then use the following command to print the output of the version number of OpenCV, indicating that the installation of OpenCV is successful</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The version of OpenCV in ubuntu22.04 is shown | + | <li><p>The version of OpenCV in ubuntu22.04 is shown below:</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | <p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | ||
− | <p>'''4.5.4'''</p></li> | + | <p>'''4.5.4'''</p> |
− | <li><p>The version of OpenCV in Ubuntu 20.04 is shown | + | |} |
+ | </li> | ||
+ | <li><p>The version of OpenCV in Ubuntu 20.04 is shown below:</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | <p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | ||
− | <p>'''4.2.0'''</p></li> | + | <p>'''4.2.0'''</p> |
− | <li><p>The version of OpenCV in Debian11 is shown | + | |} |
+ | </li> | ||
+ | <li><p>The version of OpenCV in Debian11 is shown below:</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | <p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | ||
− | <p>'''4.5.1'''</p></li> | + | <p>'''4.5.1'''</p> |
− | <li><p>The version of OpenCV in Debian12 is shown | + | |} |
+ | </li> | ||
+ | <li><p>The version of OpenCV in Debian12 is shown below:</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | <p>orangepi@orangepi:~$ '''python3 -c "import cv2; print(cv2.__version__)"'''</p> | ||
− | <p>'''4.6.0'''</p></li></ol> | + | <p>'''4.6.0'''</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="the-installation-method-of-the-aapanel-linux-panel"></span> | <span id="the-installation-method-of-the-aapanel-linux-panel"></span> | ||
+ | |||
== The installation method of the aapanel Linux panel == | == The installation method of the aapanel Linux panel == | ||
− | '''aapanel Linux panel is a server management software that improves operation and maintenance efficiency. It supports more than 100 server management functions such as one -click LAMP/LNMP/cluster/monitoring/website/FTP/database/Java ( | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''aapanel Linux panel is a server management software that improves operation and maintenance efficiency. It supports more than 100 server management functions such as one -click LAMP/LNMP/cluster/monitoring/website/FTP/database/Java (excerpted from [https://www.bt.cn/new/index.html Baota official website])'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First of all, you need to expand the'''/tmp''' memory. After setting, you need to <span class="mark">'''restart the linux system of the development board,'''and the command is shown below</span> | + | <li><p>First of all, you need to expand the'''/tmp''' memory. After setting, you need to <span class="mark">'''<span style="color:#FF0000">restart the linux system of the development board,</span>'''and the command is shown below</span>:</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo sed -i 's/nosuid/&,size=2G/' /etc/fstab'''</p> | <p>orangepi@orangepi:~$ '''sudo sed -i 's/nosuid/&,size=2G/' /etc/fstab'''</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo reboot'''</p></li> | + | <p>orangepi@orangepi:~$ '''sudo reboot'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>After restarting, you can see that the size of the'''/tmp''' space has become 2G</p> | <li><p>After restarting, you can see that the size of the'''/tmp''' space has become 2G</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''df -h | grep "/tmp"'''</p> | <p>orangepi@orangepi:~$ '''df -h | grep "/tmp"'''</p> | ||
− | <p>tmpfs 2.0G 12K '''2.0G''' 1% /tmp</p></li> | + | <p>tmpfs 2.0G 12K '''<span style="color:#FF0000">2.0G</span>''' 1% /tmp</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then enter the following command in the Linux system to start the installation of the aapanel</p> | <li><p>Then enter the following command in the Linux system to start the installation of the aapanel</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo install_bt_panel.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Then the aapanel installation program reminds whether to install the '''Bt-Panel''' to the'''/www''' folder, and enter Y at this time</p> | + | |- |
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo install_bt_panel.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Then the aapanel installation program reminds whether to install the '''Bt-Panel''' to the '''/www''' folder, and enter Y at this time</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>+----------------------------------------------------------------------</p> | <p>+----------------------------------------------------------------------</p> | ||
<p>| Bt-WebPanel FOR CentOS/Ubuntu/Debian</p> | <p>| Bt-WebPanel FOR CentOS/Ubuntu/Debian</p> | ||
Line 4,235: | Line 5,497: | ||
<p>| The WebPanel URL will be http://SERVER_IP:8888 when installed.</p> | <p>| The WebPanel URL will be http://SERVER_IP:8888 when installed.</p> | ||
<p>+----------------------------------------------------------------------</p> | <p>+----------------------------------------------------------------------</p> | ||
− | <p>Do you want to install Bt-Panel to the /www directory now?(y/n): '''y'''</p></li> | + | <p>Do you want to install Bt-Panel to the /www directory now?(y/n): '''<span style="color:#FF0000">y</span>'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then you have to wait patiently. When you see the printing information below the terminal output, it means that the pagoda has been installed. The entire installation process takes about 34 minutes. There may be some differences according to the difference in network speed</p> | <li><p>Then you have to wait patiently. When you see the printing information below the terminal output, it means that the pagoda has been installed. The entire installation process takes about 34 minutes. There may be some differences according to the difference in network speed</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img195.png]]</p></li> |
<li><p>At this time, enter the '''panel address''' displayed above in the browser to open the login interface of the aapanel Linux panel, and then enter the '''username''' and '''password''' displayed in the corresponding position to log in to the aapanel<br /> | <li><p>At this time, enter the '''panel address''' displayed above in the browser to open the login interface of the aapanel Linux panel, and then enter the '''username''' and '''password''' displayed in the corresponding position to log in to the aapanel<br /> | ||
− | [[File: | + | [[File:zero3-img196.png|1200px]]</p></li> |
<li><p>After successfully logging in to the aapanel, the following welcome interface will pop up. First, please take the intermediate user notice to read to the bottom, and then you can choose "I have agreed and read" User Agreement ", and then click" Enter the panel " You can enter the aapanel</p> | <li><p>After successfully logging in to the aapanel, the following welcome interface will pop up. First, please take the intermediate user notice to read to the bottom, and then you can choose "I have agreed and read" User Agreement ", and then click" Enter the panel " You can enter the aapanel</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img197.png|1200px]]</p></li> |
− | <li><p>After entering the aapanel, you will first prompt that you need to bind the account of the aapanel official website. If you do n’t have an account, you can go to the aapanel | + | <li><p>After entering the aapanel, you will first prompt that you need to bind the account of the aapanel official website. If you do n’t have an account, you can go to the aapanel's official website ('''https://www.bt.cn''') to register one</p> |
− | <p>[[File: | + | <p>[[File:zero3-img198.png|1200px]]</p></li> |
<li><p>The final display interface is shown in the figure below. You can intuitively see some status information of the development board Linux system, such as load state, CPU usage, memory usage and storage space usage</p> | <li><p>The final display interface is shown in the figure below. You can intuitively see some status information of the development board Linux system, such as load state, CPU usage, memory usage and storage space usage</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img199.png|1200px]]</p></li> |
<li><p>For more functions of the aapanel, please refer to the following information to explore by yourself</p> | <li><p>For more functions of the aapanel, please refer to the following information to explore by yourself</p> | ||
− | <p>Use | + | {| class="wikitable" style="width:800px;" |
− | <p>Forum | + | |- |
− | <p>GitHub | + | | |
+ | <p>Use manual: [http://docs.bt.cn '''http://docs.bt.cn''']</p> | ||
+ | <p>Forum website: [https://www.bt.cn/bbs '''https://www.bt.cn/bbs''']</p> | ||
+ | <p>GitHub Link: '''https://github.com/aaPanel/BaoTa'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="face_recognition-the-installation-and-testing-method-of-the-face-recognition-library"></span> | <span id="face_recognition-the-installation-and-testing-method-of-the-face-recognition-library"></span> | ||
− | |||
− | '''Note that the contents of this section are tested in the Linux system of the desktop version, so please make sure that the system used by the development board is a desktop version | + | == "face_recognition" The installation and testing method of the face recognition library == |
+ | |||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big>'''Note that the contents of this section are tested in the Linux system of the <span style="color:#FF0000">desktop version</span>, so please make sure that the system used by the development board is a desktop version system.''' | ||
+ | |||
+ | '''In addition, the installation test below is performed under <span style="color:#FF0000">OrangePi</span> users. Please keep the environment consistent.''' | ||
− | |||
− | '''Debian12 is currently not adapted.''' | + | '''Debian12 is currently not adapted.'''</big> |
+ | |} | ||
− | '''The address of the source code warehouse of Face_recognition | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The address of the source code warehouse of Face_recognition is:''' | ||
[https://github.com/ageitgey/face_recognition '''https://github.com/ageitgey/face_recognition'''] | [https://github.com/ageitgey/face_recognition '''https://github.com/ageitgey/face_recognition'''] | ||
− | '''Face_recognition Chinese version of the explanation document | + | '''Face_recognition Chinese version of the explanation document is:''' |
− | '''https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md''' | + | '''https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md'''</big> |
+ | |} | ||
<span id="the-method-of-using-script-to-automatically-install-face_recognition"></span> | <span id="the-method-of-using-script-to-automatically-install-face_recognition"></span> | ||
Line 4,273: | Line 5,552: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First open a terminal on the desktop''', then download face_recognition_install.sh'''</p> | <li><p>First open a terminal on the desktop''', then download face_recognition_install.sh'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~/Desktop$ '''wget \'''</p> | <p>orangepi@orangepi:~/Desktop$ '''wget \'''</p> | ||
− | <p>'''https://gitee.com/leeboby/face_recognition_install/raw/master/face_recognition_install.sh'''</p></li> | + | <p>'''https://gitee.com/leeboby/face_recognition_install/raw/master/face_recognition_install.sh'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then execute the following command to start the installation '''face_recognition'''</p> | <li><p>Then execute the following command to start the installation '''face_recognition'''</p> | ||
− | <p>orangepi@orangepi:~/Desktop$ '''bash face_recognition_install.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~/Desktop$ '''bash face_recognition_install.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After face_recognition is installed, it will automatically download the source code of face_recognition, and then automatically run some examples in face_recognition. If you can finally see the following pictures popping up on the desktop, it means that the face_recognition installation test is successful.</p> | <li><p>After face_recognition is installed, it will automatically download the source code of face_recognition, and then automatically run some examples in face_recognition. If you can finally see the following pictures popping up on the desktop, it means that the face_recognition installation test is successful.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img200.png]]</p></li></ol> |
<span id="manually-install-face_recognition"></span> | <span id="manually-install-face_recognition"></span> | ||
+ | |||
=== Manually install face_recognition === | === Manually install face_recognition === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First create a new '''~/.pip''' directory, then add the '''pip.conf''' configuration file, and set the mirror source of pip to Tsinghua source in it, the commands to be executed are as | + | <li><p>First create a new '''~/.pip''' directory, then add the '''pip.conf''' configuration file, and set the mirror source of pip to Tsinghua source in it, the commands to be executed are as follows:</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''mkdir -p ~/.pip'''</p> | <p>orangepi@orangepi:~$ '''mkdir -p ~/.pip'''</p> | ||
<p>orangepi@orangepi:~$ '''cat <<EOF > ~/.pip/pip.conf'''</p> | <p>orangepi@orangepi:~$ '''cat <<EOF > ~/.pip/pip.conf'''</p> | ||
Line 4,291: | Line 5,584: | ||
<p>'''index-url = https://pypi.tuna.tsinghua.edu.cn/simple'''</p> | <p>'''index-url = https://pypi.tuna.tsinghua.edu.cn/simple'''</p> | ||
<p>'''trusted-host = pypi.tuna.tsinghua.edu.cn'''</p> | <p>'''trusted-host = pypi.tuna.tsinghua.edu.cn'''</p> | ||
− | <p>'''EOF'''</p></li> | + | <p>'''EOF'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then install dependencies</p> | <li><p>Then install dependencies</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo apt install -y python3-pip libopencv-dev \'''</p> | <p>orangepi@orangepi:~$ '''sudo apt install -y python3-pip libopencv-dev \'''</p> | ||
<p>'''python3-opencv imagemagick python3-scipy python3-setuptools python3-wheel \'''</p> | <p>'''python3-opencv imagemagick python3-scipy python3-setuptools python3-wheel \'''</p> | ||
− | <p>'''python3-dev cmake python3-testresources'''</p></li> | + | <p>'''python3-dev cmake python3-testresources'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then update pip3</p> | <li><p>Then update pip3</p> | ||
− | <p>orangepi@orangepi:~$ '''python3 -m pip install -U pip setuptools wheel'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Before installing '''face_recognition''', you first need to install the '''dlib''' library. Since the compilation and installation of the dlib library on the development board is relatively slow, I saved a compiled dlib whl file on '''gitee''', and you can install it directly after downloading. The download address of the dlib whl file is as | + | |- |
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''python3 -m pip install -U pip setuptools wheel'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Before installing '''face_recognition''', you first need to install the '''dlib''' library. Since the compilation and installation of the dlib library on the development board is relatively slow, I saved a compiled dlib whl file on '''gitee''', and you can install it directly after downloading. The download address of the dlib whl file is as follows:</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>'''https://gitee.com/leeboby/python_whl'''</p> | <p>'''https://gitee.com/leeboby/python_whl'''</p> | ||
+ | |} | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First download the python_whl warehouse to the Linux system of | + | <li><p>First download the python_whl warehouse to the Linux system of the development board</p> |
− | <p>orangepi@orangepi:~$ '''git clone --depth=1 https://gitee.com/leeboby/python_whl'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>In the python_whl folder, you can see that there are multiple | + | |- |
− | + | | | |
+ | <p>orangepi@orangepi:~$ '''git clone --depth=1 https://gitee.com/leeboby/python_whl'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>In the python_whl folder, you can see that there are multiple versions of dlib installation packages. The Linux systems corresponding to different versions of dlib are as follows:</p> | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Ubuntu20.04''' |
− | | style="text-align: | + | | style="text-align: center;"| '''dlib-19.24.0-cp38-cp38-linux_aarch64.whl''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Ubuntu22.04''' |
− | | style="text-align: | + | | style="text-align: center;"| '''dlib-19.24.0-cp310-cp310-linux_aarch64.whl''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Debian11''' |
− | | style="text-align: | + | | style="text-align: center;"| '''dlib-19.24.0-cp39-cp39-linux_aarch64.whl''' |
|} | |} | ||
− | + | </li></ol> | |
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
<li><p>Then you can start installing dlib, the command is as follows</p> | <li><p>Then you can start installing dlib, the command is as follows</p> | ||
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>Ubuntu20.04</p> | + | <li><p>a) Ubuntu20.04</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd python_whl'''</p> | <p>orangepi@orangepi:~$ '''cd python_whl'''</p> | ||
− | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install dlib-19.24.0-cp38-cp38-linux_aarch64.whl'''</p></li> | + | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install dlib-19.24.0-cp38-cp38-linux_aarch64.whl'''</p> |
− | <li><p>Ubuntu22.04</p> | + | |} |
+ | </li> | ||
+ | <li><p>b) Ubuntu22.04</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd python_whl'''</p> | <p>orangepi@orangepi:~$ '''cd python_whl'''</p> | ||
− | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install dlib-19.24.0-cp310-cp310-linux_aarch64.whl'''</p></li> | + | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install dlib-19.24.0-cp310-cp310-linux_aarch64.whl'''</p> |
− | <li><p>Debian11</p> | + | |} |
+ | </li> | ||
+ | <li><p>c) Debian11</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd python_whl'''</p> | <p>orangepi@orangepi:~$ '''cd python_whl'''</p> | ||
− | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install dlib-19.24.0-cp39-cp39-linux_aarch64.whl'''</p></li></ol> | + | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install dlib-19.24.0-cp39-cp39-linux_aarch64.whl'''</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
− | <li><p>After installation, if the version number of dlib can be printed | + | <li><p>After installation, if the version number of dlib can be printed normally by using the following command, it means that dlib is installed correctly</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~/python_whl$ '''python3 -c "import dlib; print(dlib.__version__)"'''</p> | <p>orangepi@orangepi:~/python_whl$ '''python3 -c "import dlib; print(dlib.__version__)"'''</p> | ||
− | <p>'''19.24.0'''</p></li></ol> | + | <p>'''19.24.0'''</p> |
− | + | |} | |
+ | </li></ol> | ||
+ | </li></ol> | ||
<!-- --> | <!-- --> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>Then install '''face_recognition_models-0.3.0-py2.py3-none-any.whl'''</p> | <li><p>Then install '''face_recognition_models-0.3.0-py2.py3-none-any.whl'''</p> | ||
− | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install face_recognition_models-0.3.0-py2.py3-none-any.whl'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~/python_whl$ '''python3 -m pip install face_recognition_models-0.3.0-py2.py3-none-any.whl'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then install '''face_recognition'''</p> | <li><p>Then install '''face_recognition'''</p> | ||
− | <p>orangepi@orangepi:~$ '''python3 -m pip install face_recognition'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Then you need to '''reopen a terminal''' to find and run the two commands '''face_detection''' and '''face_recognition'''</p> | + | |- |
− | <ol style="list-style-type: | + | | |
− | <li><p>The face_recognition command is used to recognize whose face is | + | <p>orangepi@orangepi:~$ '''python3 -m pip install face_recognition'''</p> |
− | <li><p>The face_detection command is used to locate the face in a | + | |} |
+ | </li> | ||
+ | <li><p>Then you need to '''<span style="color:#FF0000">reopen a terminal</span>''' to find and run the two commands '''face_detection''' and '''face_recognition'''</p> | ||
+ | <ol style="list-style-type: none;"> | ||
+ | <li><p>a. The face_recognition command is used to recognize whose face is in a single image or a folder of images.</p></li> | ||
+ | <li><p>b. The face_detection command is used to locate the face in a single picture or a picture folder</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''which face_detection'''</p> | <p>orangepi@orangepi:~$ '''which face_detection'''</p> | ||
<p>/usr/local/bin/face_detection</p> | <p>/usr/local/bin/face_detection</p> | ||
<p>orangepi@orangepi:~$ '''which face_recognition'''</p> | <p>orangepi@orangepi:~$ '''which face_recognition'''</p> | ||
− | <p>/usr/local/bin/face_recognition</p | + | <p>/usr/local/bin/face_recognition</p> |
− | + | |} | |
− | If you can't find the above two commands after reopening the terminal, please try to manually import environment variables, and then test again | + | <li>If you can't find the above two commands after reopening the terminal, please try to manually import environment variables, and then test again |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''export PATH=/home/orangepi/.local/bin:$PATH''' | orangepi@orangepi:~$ '''export PATH=/home/orangepi/.local/bin:$PATH''' | ||
+ | |} | ||
+ | </li> | ||
+ | </li></ol> | ||
+ | </li></ol> | ||
+ | <span id="the-test-method-of-face_recognition"></span> | ||
− | |||
=== The test method of face_recognition === | === The test method of face_recognition === | ||
− | '''Note that the following operations are demonstrated on the desktop, so please connect the HDMI monitor first, or use NoMachine/VNC to remotely log in to the Linux desktop to | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that the following operations are demonstrated on the desktop, so please connect the HDMI monitor first, or use NoMachine/VNC to remotely log in to the Linux desktop to test.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>There are some sample codes in the source code of '''face_recognition''', which we can use directly for testing. The download address of the source code of face_recognition is as | + | <li><p>There are some sample codes in the source code of '''face_recognition''', which we can use directly for testing. The download address of the source code of face_recognition is as follows:</p> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>GitHub official download address</p> | <li><p>GitHub official download address</p> | ||
− | <p>orangepi@orangepi:~$ '''git clone https://github.com/ageitgey/face_recognition.git'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''git clone https://github.com/ageitgey/face_recognition.git'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Gitee image download address</p> | <li><p>Gitee image download address</p> | ||
− | <p>orangepi@orangepi:~$ '''git clone [https://github.com/ageitgey/face_recognition https://gitee.com/leeboby/face_recognition.git]'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''git clone [https://github.com/ageitgey/face_recognition https://gitee.com/leeboby/face_recognition.git]'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>The path to the face_recognition sample code is as follows</p> | <li><p>The path to the face_recognition sample code is as follows</p> | ||
− | <p>'''face_recognition/examples'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>'''face_recognition/examples'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The Chinese description document link of face_recognition is as follows, please read it carefully before using face_recognition</p> | <li><p>The Chinese description document link of face_recognition is as follows, please read it carefully before using face_recognition</p> | ||
− | <p>[https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md '''https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md''']</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>'''find_faces_in_picture.py''' is used to locate the position of the face in the picture, the test steps are as follows</p> | + | |- |
− | <ol style="list-style-type: lower-alpha;"> | + | | |
− | <li><p>Open a terminal on the desktop, then enter the | + | <p>[https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md '''https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md''']</p> |
+ | |} | ||
+ | </li> | ||
+ | <li><p>'''find_faces_in_picture.py''' is used to locate the position of the face in the picture, the test steps are as follows</p> | ||
+ | <ol style="list-style-type: lower-alpha;"> | ||
+ | <li><p>Open a terminal on the desktop, then enter the '''face_recognition/examples''' directory, and then execute the following command</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''python3 find_faces_in_picture.py'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 find_faces_in_picture.py'''</p> | ||
<p>'''I found 1 face(s) in this photograph.'''</p> | <p>'''I found 1 face(s) in this photograph.'''</p> | ||
− | <p>'''A face is located at pixel location Top: 241, Left: 419, Bottom: 562, Right: 740'''</p></li> | + | <p>'''A face is located at pixel location Top: 241, Left: 419, Bottom: 562, Right: 740'''</p> |
− | <li><p>Wait for a while and the following picture will pop up, which is | + | |} |
− | <p>[[File: | + | </li> |
+ | <li><p>Wait for a while and the following picture will pop up, which is the face located in the test picture</p> | ||
+ | <p>[[File:zero3-img201.png]]</p></li></ol> | ||
</li> | </li> | ||
<li><p>'''find_facial_features_in_picture.py''' is used to identify the key points of the face in a single picture, and the test steps are as follows</p> | <li><p>'''find_facial_features_in_picture.py''' is used to identify the key points of the face in a single picture, and the test steps are as follows</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>Open a terminal on the desktop, then enter the | + | <li><p>Open a terminal on the desktop, then enter the '''face_recognition/examples''' directory, and then execute the following command</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
− | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 find_facial_features_in_picture.py'''</p></li> | + | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 find_facial_features_in_picture.py'''</p> |
− | <li><p>After waiting for a while, the following picture will pop up, | + | |} |
− | <p>[[File: | + | </li> |
+ | <li><p>After waiting for a while, the following picture will pop up, and you can see that the outline of the face is marked</p> | ||
+ | <p>[[File:zero3-img202.png]]</p></li></ol> | ||
</li> | </li> | ||
<li><p>'''identify_and_draw_boxes_on_faces.py''' is used to identify faces and mark them with boxes. The test steps are as follows</p> | <li><p>'''identify_and_draw_boxes_on_faces.py''' is used to identify faces and mark them with boxes. The test steps are as follows</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>Open a terminal on the desktop, then enter the | + | <li><p>Open a terminal on the desktop, then enter the '''face_recognition/examples''' directory, and then execute the following command</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
− | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 identify_and_draw_boxes_on_faces.py'''</p></li> | + | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 identify_and_draw_boxes_on_faces.py'''</p> |
− | <li><p>After waiting for a while, the following picture will pop up. | + | |} |
− | <p>[[File: | + | </li> |
+ | <li><p>After waiting for a while, the following picture will pop up. You can see that the faces in the picture are marked with boxes, and the names of the characters are displayed correctly</p> | ||
+ | <p>[[File:zero3-img203.png]]</p></li></ol> | ||
</li> | </li> | ||
<li><p>'''face_distance.py''' is used to compare whether two faces belong to the same person at different precisions. First open a terminal, then enter the '''face_recognition/examples''' directory, and then execute the following command to see the output of the test</p> | <li><p>'''face_distance.py''' is used to compare whether two faces belong to the same person at different precisions. First open a terminal, then enter the '''face_recognition/examples''' directory, and then execute the following command to see the output of the test</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''python3 face_distance.py'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 face_distance.py'''</p> | ||
Line 4,405: | Line 5,800: | ||
<p>'''- With a normal cutoff of 0.6, would the test image match the known image? True'''</p> | <p>'''- With a normal cutoff of 0.6, would the test image match the known image? True'''</p> | ||
<p>'''- With a very strict cutoff of 0.5, would the test image match the known image? True'''</p> | <p>'''- With a very strict cutoff of 0.5, would the test image match the known image? True'''</p> | ||
+ | |||
+ | |||
<p>'''The test image has a distance of 0.82 from known image #1'''</p> | <p>'''The test image has a distance of 0.82 from known image #1'''</p> | ||
<p>'''- With a normal cutoff of 0.6, would the test image match the known image? False'''</p> | <p>'''- With a normal cutoff of 0.6, would the test image match the known image? False'''</p> | ||
− | <p>'''- With a very strict cutoff of 0.5, would the test image match the known image? False'''</p></li> | + | <p>'''- With a very strict cutoff of 0.5, would the test image match the known image? False'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>'''recognize_faces_in_pictures.py''' is used to identify who the face in the unknown picture is. First open a terminal, then enter the '''face_recognition/examples''' directory, and then execute the following command, and you can see the test results after waiting for a while</p> | <li><p>'''recognize_faces_in_pictures.py''' is used to identify who the face in the unknown picture is. First open a terminal, then enter the '''face_recognition/examples''' directory, and then execute the following command, and you can see the test results after waiting for a while</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''python3 recognize_faces_in_pictures.py'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 recognize_faces_in_pictures.py'''</p> | ||
<p>'''Is the unknown face a picture of Biden? False'''</p> | <p>'''Is the unknown face a picture of Biden? False'''</p> | ||
<p>'''Is the unknown face a picture of Obama? True'''</p> | <p>'''Is the unknown face a picture of Obama? True'''</p> | ||
− | <p>'''Is the unknown face a new person that we've never seen before? False'''</p></li> | + | <p>'''Is the unknown face a new person that we've never seen before? False'''</p> |
− | <li><p>'''facerec_from_webcam_faster.py''' is used to recognize the face in the USB camera, the test steps are as | + | |} |
+ | </li> | ||
+ | <li><p>'''facerec_from_webcam_faster.py''' is used to recognize the face in the USB camera, the test steps are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First, please insert the USB camera into the USB interface of | + | <li><p>First, please insert the USB camera into the USB interface of the development board, and then use the '''v4l2-ctl''' ('''<span style="color:#FF0000">note that l in v4l2 is a lowercase letter l, not the number 1</span>''') command to check the serial number of the device node of the USB camera</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo apt update'''</p> | <p>orangepi@orangepi:~$ '''sudo apt update'''</p> | ||
<p>orangepi@orangepi:~$ '''sudo apt install -y v4l-utils'''</p> | <p>orangepi@orangepi:~$ '''sudo apt install -y v4l-utils'''</p> | ||
<p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</p> | <p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</p> | ||
<p>cedrus (platform:cedrus):</p> | <p>cedrus (platform:cedrus):</p> | ||
− | <p>/dev/video0</p> | + | ::<p>/dev/video0</p> |
+ | |||
<p>USB2.0 UVC PC Camera: USB2.0 UV (usb-5311000.usb-1):</p> | <p>USB2.0 UVC PC Camera: USB2.0 UV (usb-5311000.usb-1):</p> | ||
− | <p>'''/dev/video1'''</p> | + | ::<p>'''<span style="color:#FF0000">/dev/video1</span>'''</p> |
− | <p>/dev/video2</p></li> | + | ::<p>/dev/video2</p> |
− | <li><p>Then open a terminal on the desktop, enter the | + | |} |
+ | </li> | ||
+ | <li><p>Then open a terminal on the desktop, enter the '''face_recognition/examples''' directory, and first modify the device serial number of the camera used in '''facerec_from_webcam_faster.py.''' For example, through the '''v4l2-ctl --list-devices''' command above, you can see that the USB camera is '''/dev/video1''', then modify the '''0''' in '''cv2.VideoCapture(0)''' to '''<span style="color:#FF0000">1</span>'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''vim facerec_from_webcam_faster.py'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''vim facerec_from_webcam_faster.py'''</p> | ||
− | <p>'''video_capture = cv2.VideoCapture( | + | <p>'''video_capture = cv2.VideoCapture(<span style="color:#FF0000">1</span>)'''</p> |
− | + | |} | |
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</li> | </li> | ||
− | <li><p>'''web_service_example.py''' is a very simple case of using a web service to upload a picture to run face recognition. The backend server will identify whether the picture is Obama, and output the recognition result as a json key-value pair. The test steps are as | + | <li><p>Then execute the following command to run '''facerec_from_webcam_faster.py'''</p> |
− | <ol style="list-style-type: lower-alpha;"> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Open a terminal on the desktop, then enter the | + | |- |
− | <p>orangepi@orangepi:~$ '''python3 -m pip install flask'''</p> | + | | |
+ | <p>orangepi@orangepi:~/face_recognition/examples$ '''python3 facerec_from_webcam_faster.py'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Wait for a while and the camera display screen will pop up</p> | ||
+ | <p>[[File:zero3-img204.png]]</p></li> | ||
+ | <li><p>At this point, you can point the camera at yourself. When the camera detects a face, it will frame the detected face with a square. '''Note that when detecting a face, the image displayed by the camera will be relatively slow, please do not move too fast'''</p></li> | ||
+ | <li><p>You can also open a picture of Obama, and then use the camera to point at the opened picture. You can see that not only the face can be marked, but also the name of the detected face can be displayed correctly. '''Note that when detecting a face, the image displayed by the camera will be relatively slow, please do not move too fast'''</p> | ||
+ | <p>[[File:zero3-img205.png]]</p></li></ol> | ||
+ | </li> | ||
+ | <li><p>'''web_service_example.py''' is a very simple case of using a web service to upload a picture to run face recognition. The backend server will identify whether the picture is Obama, and output the recognition result as a json key-value pair. The test steps are as follows:</p> | ||
+ | <ol style="list-style-type: lower-alpha;"> | ||
+ | <li><p>Open a terminal on the desktop, then enter the '''face_recognition/examples''' directory, and then execute the following command ('''<span style="color:#FF0000">if face_recognition is automatically installed using a script, then there is no need to install flask</span>''')</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''python3 -m pip install flask'''</p> | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>root@orangepi:~/face_recognition/examples$ '''python3 web_service_example.py'''</p> | <p>root@orangepi:~/face_recognition/examples$ '''python3 web_service_example.py'''</p> | ||
<p>* Serving Flask app 'web_service_example' (lazy loading)</p> | <p>* Serving Flask app 'web_service_example' (lazy loading)</p> | ||
<p>* Environment: production</p> | <p>* Environment: production</p> | ||
− | <p>WARNING: This is a development server. Do not use it in a production deployment.</p> | + | :<p>WARNING: This is a development server. Do not use it in a production deployment.</p> |
− | <p>Use a production WSGI server instead.</p> | + | :<p>Use a production WSGI server instead.</p> |
<p>* Debug mode: on</p> | <p>* Debug mode: on</p> | ||
<p>* Running on all addresses (0.0.0.0)</p> | <p>* Running on all addresses (0.0.0.0)</p> | ||
− | <p>WARNING: This is a development server. Do not use it in a production deployment.</p> | + | :<p>WARNING: This is a development server. Do not use it in a production deployment.</p> |
<p>* Running on http://127.0.0.1:5001</p> | <p>* Running on http://127.0.0.1:5001</p> | ||
<p>* Running on http://192.168.1.79:5001 (Press CTRL+C to quit)</p> | <p>* Running on http://192.168.1.79:5001 (Press CTRL+C to quit)</p> | ||
<p>* Restarting with stat</p> | <p>* Restarting with stat</p> | ||
<p>* Debugger is active!</p> | <p>* Debugger is active!</p> | ||
− | <p>* Debugger PIN: 500-161-390</p></li> | + | <p>* Debugger PIN: 500-161-390</p> |
− | <li><p>Then open another terminal and run the following command to | + | |} |
+ | </li> | ||
+ | <li><p>Then open another terminal and run the following command to return the result of image recognition (note that the execution path of the following command is '''face_recognition/examples''')</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''curl -XPOST -F \'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''curl -XPOST -F \'''</p> | ||
<p>'''"file=@obama2.jpg" http://127.0.0.1:5001'''</p> | <p>'''"file=@obama2.jpg" http://127.0.0.1:5001'''</p> | ||
<p>'''{'''</p> | <p>'''{'''</p> | ||
− | <p>'''"face_found_in_image": true,'''</p> | + | :<p>'''"face_found_in_image": true,'''</p> |
− | <p>'''"is_picture_of_obama": true'''</p> | + | :<p>'''"is_picture_of_obama": true'''</p> |
− | <p>'''}'''</p></li> | + | <p>'''}'''</p> |
− | <li><p>We can also copy the picture | + | |} |
+ | </li> | ||
+ | <li><p>We can also copy the picture '''face_recognition/examples/obama2.jpg''' to other Linux computers. Of course, we can also prepare a picture named '''obama2.jpg''' by ourselves, and then use the following command on the Linux computer to remotely Use the service running on the development board to recognize faces ('''note that the IP address in the command needs to be replaced with the IP address of the development board, and the file name after file needs to be replaced with the name of the picture you want to test''').</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~$ '''curl -XPOST -F "file=@obama2.jpg" http://192.168.1.79:5001'''</p> | <p>test@test:~$ '''curl -XPOST -F "file=@obama2.jpg" http://192.168.1.79:5001'''</p> | ||
<p>'''{'''</p> | <p>'''{'''</p> | ||
− | <p>'''"face_found_in_image": true,'''</p> | + | :<p>'''"face_found_in_image": true,'''</p> |
− | <p>'''"is_picture_of_obama": true'''</p> | + | :<p>'''"is_picture_of_obama": true'''</p> |
− | <p>'''}'''</p></li> | + | <p>'''}'''</p> |
− | <li><p>The method to test using the browser is as | + | |} |
− | <ol style="list-style-type: | + | </li> |
− | <li><p>First open the browser, then enter the '''<span class="mark">IP address of the | + | <li><p>The method to test using the browser is as follows:</p> |
− | <p>[[File: | + | <ol style="list-style-type: none;"> |
− | <li><p>Then copy obama2.jpg to the desktop</p> | + | <li><p>a) First open the browser, then enter the '''<span class="mark">IP address of the development board: 5001</span>''' in the address bar of the browser, and then you can see the following page</p> |
− | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2.jpg /home/orangepi/Desktop/'''</p></li> | + | <p>[[File:zero3-img206.png]]</p></li> |
− | <li><p>Then select the picture you just copied in your browser</p> | + | <li><p>b) Then copy obama2.jpg to the desktop</p> |
− | <p>[[File: | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Then click '''Upload''' to upload the picture you just | + | |- |
− | <p>[[File: | + | | |
− | <li><p>After waiting for a while, the detection result will be | + | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2.jpg /home/orangepi/Desktop/'''</p> |
− | <p>[[File: | + | |} |
+ | </li> | ||
+ | <li><p>c) Then select the picture you just copied in your browser</p> | ||
+ | <p>[[File:zero3-img207.png]]</p></li> | ||
+ | <li><p>d) Then click '''Upload''' to upload the picture you just selected for face recognition</p> | ||
+ | <p>[[File:zero3-img208.png]]</p></li> | ||
+ | <li><p>e) After waiting for a while, the detection result will be displayed</p> | ||
+ | <p>[[File:zero3-img209.png]]</p></li></ol> | ||
</li></ol> | </li></ol> | ||
</li> | </li> | ||
<li><p>'''face_detection''' command test example</p> | <li><p>'''face_detection''' command test example</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The face_detection command-line tool can locate the face | + | <li><p>The face_detection command-line tool can locate the face position (output pixel coordinates) in a single picture or a picture folder. Use '''face_detection --help''' to view the help information of the face_detection command</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''face_detection --help'''</p> | <p>orangepi@orangepi:~$ '''face_detection --help'''</p> | ||
<p>Usage: face_detection [OPTIONS] IMAGE_TO_CHECK</p> | <p>Usage: face_detection [OPTIONS] IMAGE_TO_CHECK</p> | ||
+ | |||
+ | |||
<p>Options:</p> | <p>Options:</p> | ||
− | <p>--cpus INTEGER number of CPU cores to use in parallel. -1 means "use all in | + | :<p>--cpus INTEGER number of CPU cores to use in parallel. -1 means "use all in system"</p> |
− | + | ||
− | <p>--model TEXT Which face detection model to use. Options are "hog" or | + | |
− | + | :<p>--model TEXT Which face detection model to use. Options are "hog" or "cnn".</p> | |
− | <p>--help Show this message and exit.</p></li> | + | |
− | <li><p>An example of detecting a single image is shown | + | |
+ | :<p>--help Show this message and exit.</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>An example of detecting a single image is shown below:</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''face_detection obama2.jpg'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''face_detection obama2.jpg'''</p> | ||
− | <p>obama2.jpg,302,474,611,164</p></li> | + | <p>obama2.jpg,302,474,611,164</p> |
− | <li><p>An example of using multiple cores to detect multiple images in | + | |} |
− | <ol style="list-style-type: | + | </li> |
− | <li><p>First enter the '''face_recognition/examples''' folder</p></li> | + | <li><p>An example of using multiple cores to detect multiple images in parallel is shown below:</p> |
− | <li><p>Then create a new test folder</p></li> | + | <ol style="list-style-type: none;"> |
− | <li><p>Then copy the jpg images to the test folder</p></li> | + | <li><p>a) First enter the '''face_recognition/examples''' folder</p></li> |
− | <li><p>Then use all cpus to run '''face_detection''' in parallel to | + | <li><p>b) Then create a new test folder</p></li> |
− | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | + | <li><p>c) Then copy the jpg images to the test folder</p></li> |
+ | <li><p>d) Then use all cpus to run '''face_detection''' in parallel to check the pictures in the test folder, where '''--cpus -1''' means to use all cpus</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''mkdir test'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''mkdir test'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''cp *.jpg test'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp *.jpg test'''</p> | ||
Line 4,516: | Line 5,973: | ||
<p>test/obama-720p.jpg,94,751,273,572</p> | <p>test/obama-720p.jpg,94,751,273,572</p> | ||
<p>test/obama-1080p.jpg,136,1140,394,882</p> | <p>test/obama-1080p.jpg,136,1140,394,882</p> | ||
− | <p>test/biden.jpg,233,749,542,439</p></li></ol> | + | <p>test/biden.jpg,233,749,542,439</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
</li> | </li> | ||
<li><p>'''face_recognition''' command test example</p> | <li><p>'''face_recognition''' command test example</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''face_recognition''' command-line tool can recognize whose face | + | <li><p>'''face_recognition''' command-line tool can recognize whose face is in a single picture or a picture folder. Use '''face_recognition --help''' to view the help information of the face_recognition command</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''face_recognition --help'''</p> | <p>orangepi@orangepi:~$ '''face_recognition --help'''</p> | ||
<p>Usage: face_recognition [OPTIONS] KNOWN_PEOPLE_FOLDER IMAGE_TO_CHECK</p> | <p>Usage: face_recognition [OPTIONS] KNOWN_PEOPLE_FOLDER IMAGE_TO_CHECK</p> | ||
<p>Options:</p> | <p>Options:</p> | ||
− | <p>--cpus INTEGER number of CPU cores to use in parallel (can speed | + | :<p>--cpus INTEGER number of CPU cores to use in parallel (can speed up processing lots of images). -1 means "use all in system"</p> |
− | + | ||
− | + | ||
− | <p>--tolerance FLOAT Tolerance for face comparisons. Default is 0.6. | + | :<p>--tolerance FLOAT Tolerance for face comparisons. Default is 0.6. Lower this if you get multiple matches for the same person.</p> |
− | + | ||
− | + | ||
− | <p>--show-distance BOOLEAN Output face distance. Useful for tweaking tolerance | + | :<p>--show-distance BOOLEAN Output face distance. Useful for tweaking tolerance setting.</p> |
− | + | ||
− | <p>--help Show this message and exit.</p></li> | + | |
− | <li><p>First create a new face picture folder '''known_people''' with a | + | :<p>--help Show this message and exit.</p> |
+ | |} | ||
+ | </li> | ||
+ | <li><p>First create a new face picture folder '''known_people''' with a known name, then copy two pictures to '''known_people''', and then copy '''obama2.jpg''' to '''unknown.jpg''', which is the picture we want to identify</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''mkdir known_people'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''mkdir known_people'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''cp biden.jpg obama.jpg known_people'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp biden.jpg obama.jpg known_people'''</p> | ||
− | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2.jpg unkown.jpg'''</p></li> | + | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2.jpg unkown.jpg'''</p> |
− | <li><p>Then you can use the following command to identify the name of | + | |} |
+ | </li> | ||
+ | <li><p>Then you can use the following command to identify the name of the person in the '''unknown.jpg''' picture, and you can see that the unknown.jpg picture is recognized as obama</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p> | ||
<p>'''unkown.jpg'''</p> | <p>'''unkown.jpg'''</p> | ||
− | <p>unkown.jpg,obama</p></li> | + | <p>unkown.jpg,obama</p> |
− | <li><p>If we identify an irrelevant image, unknown_person will be | + | |} |
+ | </li> | ||
+ | <li><p>If we identify an irrelevant image, unknown_person will be displayed</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>root@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p> | <p>root@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p> | ||
<p>'''alex-lacamoire.png'''</p> | <p>'''alex-lacamoire.png'''</p> | ||
− | <p>alex-lacamoire.png,unknown_person</p></li> | + | <p>alex-lacamoire.png,unknown_person</p> |
− | <li><p>We can also create a new test folder and put multiple pictures | + | |} |
+ | </li> | ||
+ | <li><p>We can also create a new test folder and put multiple pictures in it, and then we can use all the CPUs to recognize all the pictures in parallel</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''mkdir test'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''mkdir test'''</p> | ||
<p>orangepi@orangepi:~/face_recognition/examples$ '''cp *.jpg *.png test'''</p> | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp *.jpg *.png test'''</p> | ||
Line 4,564: | Line 6,047: | ||
<p>test/obama-480p.jpg,obama</p> | <p>test/obama-480p.jpg,obama</p> | ||
<p>test/biden.jpg,biden</p> | <p>test/biden.jpg,biden</p> | ||
− | <p>test/obama-1080p.jpg,obama</p></li></ol> | + | <p>test/obama-1080p.jpg,obama</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="setting-chinese-environment-and-installing-chinese-input-method"></span> | <span id="setting-chinese-environment-and-installing-chinese-input-method"></span> | ||
+ | |||
== Setting Chinese environment and installing Chinese input method == | == Setting Chinese environment and installing Chinese input method == | ||
− | '''Note, please make sure that the Linux system used by the development board is a desktop system before installing the Chinese input | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note, please make sure that the Linux system used by the development board is a desktop system before installing the Chinese input method.'''</big> | ||
+ | |} | ||
<span id="how-to-install-debian-system"></span> | <span id="how-to-install-debian-system"></span> | ||
Line 4,579: | Line 6,069: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>Enter the following command to start configuring the '''locale'''</p> | <li><p>Enter the following command to start configuring the '''locale'''</p> | ||
− | + | {| class="wikitable" style="width:800px;" | |
− | + | |- | |
− | + | | | |
− | |||
− | |||
− | |||
<p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p> | <p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p> | ||
− | <p>Generating locales (this might take a while)...</p> | + | |} |
− | <p>en_US.UTF-8... done</p> | + | </li> |
− | <p>zh_CN.UTF-8... done</p> | + | <li><p>Then select '''zh_CN.UTF-8 UTF-8''' in the pop-up interface (move up and down through the up and down direction keys on the keyboard, select through the space bar, and finally move the cursor to '''<OK>''' through the Tab key, and then press Enter.)</p> |
− | <p>Generation complete.</p></li></ol> | + | <p>[[File:zero3-img210.png|1200px]]</p></li> |
+ | <li><p>Then set the default '''locale''' to '''zh_CN.UTF-8'''</p> | ||
+ | <p>[[File:zero3-img211.png|1200px]]</p></li> | ||
+ | <li><p>After exiting the interface, the '''locale''' setting will start, and the output displayed on the command line is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p> | ||
+ | <p>Generating locales (this might take a while)...</p> | ||
+ | :<p>en_US.UTF-8... done</p> | ||
+ | :<p>zh_CN.UTF-8... done</p> | ||
+ | <p>Generation complete.</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Then open the '''Input Method'''</p> | <li><p>Then open the '''Input Method'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img212.png]]</p></li> |
+ | <li><p>Then choose '''OK'''</p> | ||
+ | <p>[[File:zero3-img213.png]]</p></li> | ||
+ | <li><p>Then choose '''Yes'''</p> | ||
+ | <p>[[File:zero3-img214.png]]</p></li> | ||
+ | <li><p>Then choose '''fcitx'''</p> | ||
+ | <p>[[File:zero3-img215.png]]</p></li> | ||
<li><p>Then choose '''OK'''</p> | <li><p>Then choose '''OK'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img216.png]]</p></li> |
− | <li><p> | + | <li><p>'''<span style="color:#FF0000">Then restart the Linux system to make the configuration take effect</span>'''</p></li> |
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<li><p>Then open '''Fcitx configuration'''</p> | <li><p>Then open '''Fcitx configuration'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img217.png]]</p></li> |
<li><p>Then click the + sign in the position shown in the figure below</p> | <li><p>Then click the + sign in the position shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img218.png]]</p></li> |
<li><p>Then search '''Google Pinyin''' and click '''OK'''</p> | <li><p>Then search '''Google Pinyin''' and click '''OK'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img219-1.png]]</p></li> |
<li><p>Then bring '''Google Pinyin''' to the front</p> | <li><p>Then bring '''Google Pinyin''' to the front</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img220.png]]</p> |
− | <p>[[File: | + | <p>[[File:zero3-img221.png]]</p></li> |
<li><p>Then open the '''Geany''' editor to test the Chinese input method</p> | <li><p>Then open the '''Geany''' editor to test the Chinese input method</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img222.png]]</p></li> |
<li><p>The Chinese input method test is as follows</p> | <li><p>The Chinese input method test is as follows</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img223.png]]</p></li> |
<li><p>The Chinese and English input methods can be switched through the '''Ctrl+Space''' shortcut key</p></li> | <li><p>The Chinese and English input methods can be switched through the '''Ctrl+Space''' shortcut key</p></li> | ||
<li><p>If the entire system needs to be displayed in Chinese, you can set the variables in '''/etc/default/locale''' to '''zh_CN.UTF-8'''</p> | <li><p>If the entire system needs to be displayed in Chinese, you can set the variables in '''/etc/default/locale''' to '''zh_CN.UTF-8'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo vim /etc/default/locale'''</p> | <p>orangepi@orangepi:~$ '''sudo vim /etc/default/locale'''</p> | ||
<p># File generated by update-locale</p> | <p># File generated by update-locale</p> | ||
− | <p>LC_MESSAGES='''zh_CN.UTF-8'''</p> | + | <p>LC_MESSAGES='''<span style="color:#FF0000">zh_CN.UTF-8</span>'''</p> |
− | <p>LANG='''zh_CN.UTF-8'''</p> | + | <p>LANG='''<span style="color:#FF0000">zh_CN.UTF-8</span>'''</p> |
− | <p>LANGUAGE='''zh_CN.UTF-8'''</p></li> | + | <p>LANGUAGE='''<span style="color:#FF0000">zh_CN.UTF-8</span>'''</p> |
− | <li><p>Then '''restart the system''' and you can see that the system is displayed in Chinese</p> | + | |} |
− | <p>[[File: | + | </li> |
+ | <li><p>Then '''<span style="color:#FF0000">restart the system</span>''' and you can see that the system is displayed in Chinese</p> | ||
+ | <p>[[File:zero3-img224.png]]</p></li></ol> | ||
<span id="how-to-install-ubuntu-20.04-system"></span> | <span id="how-to-install-ubuntu-20.04-system"></span> | ||
+ | |||
=== How to install Ubuntu 20.04 system === | === How to install Ubuntu 20.04 system === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First open '''Language Support'''</p> | <li><p>First open '''Language Support'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img225.png]]</p></li> |
<li><p>Then find the <span class="mark">'''Chinese (China''')</span> option</p> | <li><p>Then find the <span class="mark">'''Chinese (China''')</span> option</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img226.png]]</p></li> |
− | <li><p>Then please use the left mouse button to select '''<span class="mark">Chinese (China)</span>''' and hold it down, then drag it up to the initial position, the display after dragging is as shown in the figure | + | <li><p>Then please use the left mouse button to select '''<span class="mark">Chinese (China)</span>''' and hold it down, then drag it up to the initial position, the display after dragging is as shown in the figure below:</p> |
− | <p>[[File: | + | <p>[[File:zero3-img227.png]]</p> |
− | |||
− | |||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big>'''Note that this step is not easy to drag, please be patient and try a few more times.'''</big> | ||
+ | |} | ||
+ | </li></ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
<li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire system</p> | <li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire system</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img228.png]]</p></li> |
<li><p>Then set'''Keyboard input method system''' to '''fcitx'''</p> | <li><p>Then set'''Keyboard input method system''' to '''fcitx'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img229.png]]</p></li> |
− | <li><p>'''Then restart the Linux system to make the configuration take effect'''</p></li> | + | <li><p>'''<span style="color:#FF0000">Then restart the Linux system to make the configuration take effect</span>'''</p></li> |
<li><p>After re-entering the system, '''<span class="mark">please choose not to ask me again</span>''' in the following interface, and then please decide whether the standard folder should also be updated to Chinese according to your preferences</p> | <li><p>After re-entering the system, '''<span class="mark">please choose not to ask me again</span>''' in the following interface, and then please decide whether the standard folder should also be updated to Chinese according to your preferences</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img230.png]]</p></li> |
<li><p>Then you can see that the desktop is displayed in Chinese</p> | <li><p>Then you can see that the desktop is displayed in Chinese</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img231.png]]</p></li> |
<li><p>Then we can open '''Geany''' to test the Chinese input method, as shown in the figure below</p> | <li><p>Then we can open '''Geany''' to test the Chinese input method, as shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img232.png]]</p></li> |
<li><p>After opening '''Geany''', the default is English input method, we can switch to Chinese input method through '''Ctrl+Space''' shortcut key, and then we can input Chinese</p> | <li><p>After opening '''Geany''', the default is English input method, we can switch to Chinese input method through '''Ctrl+Space''' shortcut key, and then we can input Chinese</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img233.png]]</p></li></ol> |
<span id="how-to-install-ubuntu-22.04-system"></span> | <span id="how-to-install-ubuntu-22.04-system"></span> | ||
+ | |||
=== How to install Ubuntu 22.04 system === | === How to install Ubuntu 22.04 system === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First open '''Language Support'''</p> | <li><p>First open '''Language Support'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img225.png]]</p></li> |
<li><p>Then find the '''<span class="mark">Chinese (China)</span>''' option</p> | <li><p>Then find the '''<span class="mark">Chinese (China)</span>''' option</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img234.png]]</p></li> |
− | <li><p>Then please use the left mouse button to select '''<span class="mark">Chinese (China)</span>''' and hold it down, then drag it up to the initial position, the display after dragging is as shown in the figure | + | <li><p>Then please use the left mouse button to select '''<span class="mark">Chinese (China)</span>''' and hold it down, then drag it up to the initial position, the display after dragging is as shown in the figure below:</p> |
− | <p>[[File: | + | <p>[[File:zero3-img235.png]]</p> |
− | |||
− | |||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big>'''Note that this step is not easy to drag, please be patient and try a few more times.'''</big> | ||
+ | |} | ||
+ | </li></ol> | ||
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
<li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire system</p> | <li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire system</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img236.png]]</p></li> |
− | <li><p>'''Then restart the Linux system to make the configuration take effect'''</p></li> | + | <li><p>'''<span style="color:#FF0000">Then restart the Linux system to make the configuration take effect</span>'''</p></li> |
<li><p>After re-entering the system, please choose '''<span class="mark">not to ask me again</span>''' in the following interface, and then please decide whether the standard folder should also be updated to Chinese according to your preferences</p> | <li><p>After re-entering the system, please choose '''<span class="mark">not to ask me again</span>''' in the following interface, and then please decide whether the standard folder should also be updated to Chinese according to your preferences</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img230.png]]</p></li> |
<li><p>Then you can see that the desktop is displayed in Chinese</p> | <li><p>Then you can see that the desktop is displayed in Chinese</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img231.png]]</p></li> |
<li><p>Then open the Fcitx5 configuration program</p> | <li><p>Then open the Fcitx5 configuration program</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img237.png]]</p></li> |
<li><p>Then choose to use Pinyin input method</p> | <li><p>Then choose to use Pinyin input method</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img238.png]] |
</div></li> | </div></li> | ||
<li><p>The interface after selection is as shown below, and then click OK</p> | <li><p>The interface after selection is as shown below, and then click OK</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img239.png]]</p></li> |
<li><p>Then we can open '''Geany''' to test the Chinese input method, the opening method is shown in the figure below</p> | <li><p>Then we can open '''Geany''' to test the Chinese input method, the opening method is shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img232.png]]</p></li> |
<li><p>After opening '''Geany''', the default is English input method, we can switch to Chinese input method through '''Ctrl+Space''' shortcut key, and then we can input Chinese</p> | <li><p>After opening '''Geany''', the default is English input method, we can switch to Chinese input method through '''Ctrl+Space''' shortcut key, and then we can input Chinese</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img240.png]]</p></li></ol> |
<span id="how-to-remotely-log-in-to-the-desktop-of-linux-system"></span> | <span id="how-to-remotely-log-in-to-the-desktop-of-linux-system"></span> | ||
+ | |||
== How to Remotely Log In to the Desktop of Linux System == | == How to Remotely Log In to the Desktop of Linux System == | ||
Line 4,695: | Line 6,211: | ||
=== Remote login using NoMachine === | === Remote login using NoMachine === | ||
− | '''Make sure the Ubuntu or Debian system installed on the development board is a desktop system version. In addition, NoMachine also provides detailed documents. It is strongly recommended to read this document to be familiar with the use of NoMachine. The document link is shown | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Make sure the Ubuntu or Debian system installed on the development board is a <span style="color:#FF0000">desktop system version</span>. In addition, NoMachine also provides detailed documents. It is strongly recommended to read this document to be familiar with the use of NoMachine. The document link is shown below:''' | ||
− | '''https://knowledgebase.nomachine.com/DT10R00166''' | + | '''https://knowledgebase.nomachine.com/DT10R00166'''</big> |
+ | |} | ||
− | '''NoMachine supports Windows, Mac, Linux, iOS and Android platforms, so we can remotely log in and control the Orange Pi development board through NoMachine on a variety of devices. The following demonstrates how to remotely log in to the Linux system desktop of the Orange Pi development board through NoMachine in Windows. For installation methods on other platforms, please refer to the official documentation of NoMachine''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''NoMachine supports Windows, Mac, Linux, iOS and Android platforms, so we can remotely log in and control the Orange Pi development board through NoMachine on a variety of devices. The following demonstrates how to remotely log in to the Linux system desktop of the Orange Pi development board through NoMachine in Windows. For installation methods on other platforms, please refer to the official documentation of NoMachine'''</big> | ||
+ | |} | ||
− | '''Before operation, please make sure that the Windows computer and the development board are in the same LAN, and can log in to the Ubuntu or Debian system of the development board through ssh''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Before operation, please make sure that the Windows computer and the development board are in the same LAN, and can log in to the Ubuntu or Debian system of the development board through ssh'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First download the installation package of the NoMachine software Linux '''arm64''' deb version, and then install it into the Linux system of the development board</p> | + | <li><p>First download the installation package of the NoMachine software Linux '''<span style="color:#FF0000">arm64</span>''' deb version, and then install it into the Linux system of the development board</p> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>Since H618 is a SOC of the ARMV8 architecture, the system we use | + | <li>Since H618 is a SOC of the ARMV8 architecture, the system we use is Ubuntu or Debian, so you need to download the '''NoMachine for ARM ARMv8 DEB''' installation package. The download link is shown below:</li> |
− | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that this download link may change, please look for the deb package of the Armv8/Arm64 version.'''</big> | ||
+ | |} | ||
− | + | {| class="wikitable" style="width:800px;" | |
− | + | |- | |
− | + | | | |
− | + | '''https://downloads.nomachine.com/download/?id=118&distro=ARM''' | |
− | + | |} | |
+ | [[File:zero3-img241.png]] | ||
+ | </ol> | ||
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
− | <li><p>In addition, the installation package of '''NoMachine''' can also be | + | <li><p>In addition, the installation package of '''NoMachine''' can also be downloaded in the '''official tool'''</p> |
− | <p>[[File: | + | <p>[[File:zero3-img242.png]]</p> |
<p>First enter the '''<span class="mark">remote login software-NoMachine</span>''' folder</p> | <p>First enter the '''<span class="mark">remote login software-NoMachine</span>''' folder</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img243.png]]</p> |
<p>Then download the arm64 version of the deb installation package</p> | <p>Then download the arm64 version of the deb installation package</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img244.png]]</p></li> |
− | <li><p>Then upload the downloaded '''nomachine_x.x.x_x_arm64.deb''' to the | + | <li><p>Then upload the downloaded '''nomachine_x.x.x_x_arm64.deb''' to the Linux system of the development board</p></li> |
− | <li><p>Then use the following command to install '''NoMachine''' in the Linux | + | <li><p>Then use the following command to install '''NoMachine''' in the Linux system of the development board</p> |
− | <p>orangepi@orangepi:~$ '''sudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
− | + | |- | |
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | </li></ol> | ||
<!-- --> | <!-- --> | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li>Then download the installation package of the Windows version of the NoMachine software, the download address is as follows</li | + | <li>Then download the installation package of the Windows version of the NoMachine software, the download address is as follows</li> |
− | '''Note that this download link may | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that this download link may change.'''</big> | ||
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
'''https://downloads.nomachine.com/download/?id=9''' | '''https://downloads.nomachine.com/download/?id=9''' | ||
+ | |} | ||
− | [[File: | + | [[File:zero3-img245.png]] |
− | + | </ol> | |
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Then install NoMachine in Windows, '''please restart the computer after installation'''</p></li> | <li><p>Then install NoMachine in Windows, '''please restart the computer after installation'''</p></li> | ||
<li><p>Then open '''NoMachine''' in Window</p> | <li><p>Then open '''NoMachine''' in Window</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img246.png]]</p></li> |
<li><p>After Nomachine starts, it will automatically scan other devices installed in the local area network. After entering the main interface of Nomachine, you can see that the development board is already in the connected device list, and then click the location shown in the red box below. Start log in to the linux system desktop of the development board</p> | <li><p>After Nomachine starts, it will automatically scan other devices installed in the local area network. After entering the main interface of Nomachine, you can see that the development board is already in the connected device list, and then click the location shown in the red box below. Start log in to the linux system desktop of the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img247.png]]</p></li> |
<li><p>Then click '''OK'''</p> | <li><p>Then click '''OK'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img248.png]]</p></li> |
<li><p>Then enter the username and password of the linux system in the corresponding position in the figure below, and then click '''<span class="mark">OK</span>''' to start logging in</p> | <li><p>Then enter the username and password of the linux system in the corresponding position in the figure below, and then click '''<span class="mark">OK</span>''' to start logging in</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img249.png]] |
</div></li> | </div></li> | ||
<li><p>Then click OK in the next interface</p></li> | <li><p>Then click OK in the next interface</p></li> | ||
<li><p>Finally, you can see the desktop of the development board Linux system</p> | <li><p>Finally, you can see the desktop of the development board Linux system</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img250.png]]</p></li></ol> |
<span id="log-in-remotely-using-vnc"></span> | <span id="log-in-remotely-using-vnc"></span> | ||
+ | |||
=== Log in remotely using VNC === | === Log in remotely using VNC === | ||
− | '''Before operation, please make sure that the Windows computer and the development board are in the same local area network, and can log in to the Ubuntu or Debian system of the development board normally with ssh.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Before operation, please make sure that the Windows computer and the development board are in the same local area network, and can log in to the Ubuntu or Debian system of the development board normally with ssh.''' | ||
+ | |||
− | '''Ubuntu20.04 has many problems testing VNC, please do not use this method''' | + | '''<span style="color:#FF0000">Ubuntu20.04 has many problems testing VNC, please do not use this method</span>'''</big> |
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First run the '''set_vnc.sh''' script to set up vnc, remember to '''add sudo permission'''</p> | + | <li><p>First run the '''set_vnc.sh''' script to set up vnc, remember to '''<span style="color:#FF0000">add sudo permission</span>'''</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo set_vnc.sh'''</p> | <p>orangepi@orangepi:~$ '''sudo set_vnc.sh'''</p> | ||
<p>You will require a password to access your desktops.</p> | <p>You will require a password to access your desktops.</p> | ||
− | <p>Password: '''#Set the vnc password here, 8 -bit characters'''</p> | + | <p>Password: '''<span style="color:#FF0000">#Set the vnc password here, 8 -bit characters</span>'''</p> |
− | <p>Verify: '''#Set the vnc password here, 8 characters'''</p> | + | <p>Verify: '''<span style="color:#FF0000">#Set the vnc password here, 8 characters</span>'''</p> |
− | <p>Would you like to enter a view-only password (y/n)? '''n'''</p> | + | <p>Would you like to enter a view-only password (y/n)? '''<span style="color:#FF0000">n</span>'''</p> |
<p>xauth: file /root/.Xauthority does not exist</p> | <p>xauth: file /root/.Xauthority does not exist</p> | ||
+ | |||
+ | |||
<p>New 'X' desktop is orangepi:1</p> | <p>New 'X' desktop is orangepi:1</p> | ||
+ | |||
+ | |||
<p>Creating default startup script /root/.vnc/xstartup</p> | <p>Creating default startup script /root/.vnc/xstartup</p> | ||
<p>Starting applications specified in /root/.vnc/xstartup</p> | <p>Starting applications specified in /root/.vnc/xstartup</p> | ||
<p>Log file is /root/.vnc/orangepi:1.log</p> | <p>Log file is /root/.vnc/orangepi:1.log</p> | ||
+ | |||
+ | |||
<p>Killing Xtightvnc process ID 3047</p> | <p>Killing Xtightvnc process ID 3047</p> | ||
+ | |||
+ | |||
<p>New 'X' desktop is orangepi:1</p> | <p>New 'X' desktop is orangepi:1</p> | ||
+ | |||
+ | |||
<p>Starting applications specified in /root/.vnc/xstartup</p> | <p>Starting applications specified in /root/.vnc/xstartup</p> | ||
− | <p>Log file is /root/.vnc/orangepi:1.log</p></li> | + | <p>Log file is /root/.vnc/orangepi:1.log</p> |
− | <li><p>The steps to use the MobaXterm software to connect to the desktop of the Linux system of the development board are as | + | |} |
+ | </li> | ||
+ | <li><p>The steps to use the MobaXterm software to connect to the desktop of the Linux system of the development board are as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li>First click on Session, then select VNC, then fill in the IP | + | <li>First click on Session, then select VNC, then fill in the IP address and port of the development board, and finally click OK to confirm</li> |
− | |||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img251.png]] |
− | </div> | + | </div></ol> |
<ol start="2" style="list-style-type: lower-alpha;"> | <ol start="2" style="list-style-type: lower-alpha;"> | ||
<li><p>Then enter the VNC password set earlier</p> | <li><p>Then enter the VNC password set earlier</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img252.png]]</p></li> |
− | <li><p>After successful login, the interface is displayed as shown in the | + | <li><p>After successful login, the interface is displayed as shown in the figure below, and then you can remotely operate the desktop of the development board linux system</p></li> |
− | [[File: | + | [[File:zero3-img253.png]] |
+ | </ol> | ||
+ | </li></ol> | ||
+ | <span id="how-to-install-qt"></span> | ||
− | |||
== How to install QT == | == How to install QT == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Use the script below to install QT5 and QT Creator</p> | <li><p>Use the script below to install QT5 and QT Creator</p> | ||
− | <p>orangepi@orangepi:~$ '''install_qt.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After installation, the version number of QT will be automatically printed</p> | <li><p>After installation, the version number of QT will be automatically printed</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The qt version that comes with Ubuntu 20.04 is '''5.12.8'''</p> | <li><p>The qt version that comes with Ubuntu 20.04 is '''5.12.8'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | <p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | ||
<p>......</p> | <p>......</p> | ||
<p>QMake version 3.1</p> | <p>QMake version 3.1</p> | ||
− | <p>Using Qt version '''5.12.8''' in /usr/lib/aarch64-linux-gnu</p></li> | + | <p>Using Qt version '''<span style="color:#FF0000">5.12.8</span>''' in /usr/lib/aarch64-linux-gnu</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The QT version that comes with Ubuntu 22.04 is '''5.15.3'''</p> | <li><p>The QT version that comes with Ubuntu 22.04 is '''5.15.3'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | <p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | ||
<p>......</p> | <p>......</p> | ||
<p>QMake version 3.1</p> | <p>QMake version 3.1</p> | ||
− | <p>Using Qt version '''5.15.3''' in /usr/lib/aarch64-linux-gnu</p></li> | + | <p>Using Qt version '''<span style="color:#FF0000">5.15.3</span>''' in /usr/lib/aarch64-linux-gnu</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The QT version that comes with Debian11 is '''5.15.2'''</p> | <li><p>The QT version that comes with Debian11 is '''5.15.2'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | <p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | ||
<p>......</p> | <p>......</p> | ||
<p>QMake version 3.1</p> | <p>QMake version 3.1</p> | ||
− | <p>Using Qt version '''5.15.2''' in /usr/lib/aarch64-linux-gnu</p></li> | + | <p>Using Qt version '''<span style="color:#FF0000">5.15.2</span>''' in /usr/lib/aarch64-linux-gnu</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The QT version that comes with Debian12 is '''5.15.8'''</p> | <li><p>The QT version that comes with Debian12 is '''5.15.8'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | <p>orangepi@orangepi:~$ '''install_qt.sh'''</p> | ||
<p>......</p> | <p>......</p> | ||
<p>QMake version 3.1</p> | <p>QMake version 3.1</p> | ||
− | <p>Using Qt version '''5.15.8''' in /usr/lib/aarch64-linux-gnu</p></li></ol> | + | <p>Using Qt version '''<span style="color:#FF0000">5.15.8</span>''' in /usr/lib/aarch64-linux-gnu</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Then you can see the QT Creator startup icon in '''Applications'''</p> | <li><p>Then you can see the QT Creator startup icon in '''Applications'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img254.png]]</p> |
<p>You can also use the following command to open QT Creator</p> | <p>You can also use the following command to open QT Creator</p> | ||
− | <p>orangepi@orangepi:~$ '''qtcreator'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''qtcreator'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The interface after QT Creator is opened is as follows</p> | <li><p>The interface after QT Creator is opened is as follows</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img255.png]]</p></li> |
<li><p>The version of QT Creator is as follows</p> | <li><p>The version of QT Creator is as follows</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The default version of QT Creator in '''Ubuntu20.04''' is as | + | <li><p>The default version of QT Creator in '''Ubuntu20.04''' is as follows</p> |
− | <p>[[File: | + | <p>[[File:zero3-img256.png]]</p></li> |
− | <li><p>The default version of QT Creator in '''Ubuntu22.04''' is as | + | <li><p>The default version of QT Creator in '''Ubuntu22.04''' is as follows</p> |
− | <p>[[File: | + | <p>[[File:zero3-img257.png]]</p></li> |
<li><p>The default version of QT Creator in '''Debian11''' is as follows</p> | <li><p>The default version of QT Creator in '''Debian11''' is as follows</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img258.png]]</p></li> |
<li><p>The default version of QT Creator in '''Debian12''' is as follows</p> | <li><p>The default version of QT Creator in '''Debian12''' is as follows</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img259.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>Then set up QT</p> | <li><p>Then set up QT</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>First open '''Help'''->'''About Plugins.…'''</p> | <li><p>First open '''Help'''->'''About Plugins.…'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img260.png]]</p></li> |
<li><p>Then remove the tick of '''ClangCodeModel'''</p> | <li><p>Then remove the tick of '''ClangCodeModel'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img261.png]]</p></li> |
− | <li><p>'''After setting, you need to restart QT Creator'''</p></li> | + | <li><p>'''<span style="color:#FF0000">After setting, you need to restart QT Creator</span>'''</p></li> |
− | <li><p>Then make sure the GCC compiler used by QT Creator, if the | + | <li><p>Then make sure the GCC compiler used by QT Creator, if the default is Clang, please modify it to GCC</p> |
− | <p>'''Debian12 please skip this step.'''</p> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
− | <p>[[File: | + | |- |
− | <p>[[File: | + | | |
+ | <big><p>'''Debian12 please skip this step.'''</p></big> | ||
+ | |} | ||
+ | <p>[[File:zero3-img262.png]]</p> | ||
+ | <p>[[File:zero3-img263.png]]</p></li></ol> | ||
</li> | </li> | ||
<li><p>Then you can open a sample code</p> | <li><p>Then you can open a sample code</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img264.png]]</p></li> |
<li><p>After clicking the sample code, the corresponding instruction document will be opened automatically, you can read the instructions carefully</p> | <li><p>After clicking the sample code, the corresponding instruction document will be opened automatically, you can read the instructions carefully</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img265.png]]</p></li> |
<li><p>Then click '''Configure Project'''</p> | <li><p>Then click '''Configure Project'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img266.png]]</p></li> |
<li><p>Then click the green triangle in the lower left corner to compile and run the sample code</p> | <li><p>Then click the green triangle in the lower left corner to compile and run the sample code</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img267.png]]</p></li> |
<li><p>After waiting for a period of time, the interface shown in the figure below will pop up, which means that QT can compile and run normally</p> | <li><p>After waiting for a period of time, the interface shown in the figure below will pop up, which means that QT can compile and run normally</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img268.png]]</p></li> |
<li><p>References</p> | <li><p>References</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>[https://wiki.qt.io/Install_Qt_5_on_Ubuntu '''https://wiki.qt.io/Install_Qt_5_on_Ubuntu''']</p> | <p>[https://wiki.qt.io/Install_Qt_5_on_Ubuntu '''https://wiki.qt.io/Install_Qt_5_on_Ubuntu''']</p> | ||
<p>[https://download.qt.io/archive/qtcreator '''https://download.qt.io/archive/qtcreator''']</p> | <p>[https://download.qt.io/archive/qtcreator '''https://download.qt.io/archive/qtcreator''']</p> | ||
− | <p>[https://download.qt.io/archive/qt '''https://download.qt.io/archive/qt''']</p></li></ol> | + | <p>[https://download.qt.io/archive/qt '''https://download.qt.io/archive/qt''']</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="how-to-install-ros"></span> | <span id="how-to-install-ros"></span> | ||
+ | |||
== How to install ROS == | == How to install ROS == | ||
Line 4,875: | Line 6,484: | ||
# The currently active version of ROS 1 is shown below, and the recommended version is '''Noetic Ninjemys''' | # The currently active version of ROS 1 is shown below, and the recommended version is '''Noetic Ninjemys''' | ||
− | [[File: | + | :[[File:zero3-img269.png]] |
− | [[File: | + | :[[File:zero3-img270.png]] |
+ | ::{| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
[http://docs.ros.org/ '''http://docs.ros.org'''] | [http://docs.ros.org/ '''http://docs.ros.org'''] | ||
'''https://wiki.ros.org/Distributions''' | '''https://wiki.ros.org/Distributions''' | ||
+ | |} | ||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
− | <li><p>ROS 1 '''Noetic Ninjemys''' official installation documentation link is as | + | <li><p>ROS 1 '''Noetic Ninjemys''' official installation documentation link is as follows:</p> |
− | <p>[http://wiki.ros.org/noetic/Installation/Ubuntu '''http://wiki.ros.org/noetic/Installation/Ubuntu''']</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>In the ROS '''Noetic Ninjemys''' official installation document, Ubuntu recommends using Ubuntu20.04, so please make sure that the system used by the development board is the '''Ubuntu20.04 desktop system'''</p> | + | |- |
+ | | | ||
+ | <p>[http://wiki.ros.org/noetic/Installation/Ubuntu '''http://wiki.ros.org/noetic/Installation/Ubuntu''']</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>In the ROS '''Noetic Ninjemys''' official installation document, Ubuntu recommends using Ubuntu20.04, so please make sure that the system used by the development board is the '''<span style="color:#FF0000">Ubuntu20.04 desktop system</span>'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>[http://wiki.ros.org/noetic/Installation '''http://wiki.ros.org/noetic/Installation''']</p> | <p>[http://wiki.ros.org/noetic/Installation '''http://wiki.ros.org/noetic/Installation''']</p> | ||
− | <p>[[File: | + | |} |
+ | <p>[[File:zero3-img271.png]]</p></li> | ||
<li><p>Then use the script below to install ros1</p> | <li><p>Then use the script below to install ros1</p> | ||
− | <p>orangepi@orangepi:~$ '''install_ros.sh ros1'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Before using the ROS tool, you first need to initialize rosdep, and then you can quickly install some system dependencies and some core components in ROS when compiling the source code</p>< | + | |- |
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''install_ros.sh ros1'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Before using the ROS tool, you first need to initialize rosdep, and then you can quickly install some system dependencies and some core components in ROS when compiling the source code</p> | ||
+ | |||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big>'''<span style="color:#FF0000">Note that running the following command needs to ensure that the development board can access github normally, otherwise an error will be reported due to network problems</span>''' | ||
− | |||
− | '''The install_ros.sh script will try to modify /etc/hosts and run the following commands automatically. However, this method cannot guarantee that github can be accessed normally every time. If install_ros.sh prompts the following error after installing ros1, please find other ways to allow the linux system of the development board to access github normally, and then manually run the following | + | '''The install_ros.sh script will try to modify /etc/hosts and run the following commands automatically. However, this method cannot guarantee that github can be accessed normally every time. If install_ros.sh prompts the following error after installing ros1, please find other ways to allow the linux system of the development board to access github normally, and then manually run the following command.''' |
+ | |||
'''https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml''' | '''https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml''' | ||
Line 4,901: | Line 6,533: | ||
'''Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml''' | '''Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml''' | ||
− | '''ERROR: error loading sources list:''' | + | '''<span style="color:#FF0000">ERROR: error loading sources list:</span>''' |
− | '''The read operation timed out''' | + | ::'''<span style="color:#FF0000">The read operation timed out</span>'''</big> |
+ | |} | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
orangepi@orangepi:~$ '''source /opt/ros/noetic/setup.bash''' | orangepi@orangepi:~$ '''source /opt/ros/noetic/setup.bash''' | ||
Line 4,913: | Line 6,549: | ||
Recommended: please run | Recommended: please run | ||
− | rosdep update | + | |
+ | ::rosdep update | ||
orangepi@orangepi:~$ '''rosdep update''' | orangepi@orangepi:~$ '''rosdep update''' | ||
Line 4,966: | Line 6,603: | ||
updated cache in /home/orangepi/.ros/rosdep/sources.cache | updated cache in /home/orangepi/.ros/rosdep/sources.cache | ||
− | + | |} | |
+ | </li></ol> | ||
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
<li><p>Then open a command line terminal window on the '''desktop''', and use the '''<span class="mark">test_ros.sh</span>''' script to start a small turtle routine to test whether ROS can be used normally</p> | <li><p>Then open a command line terminal window on the '''desktop''', and use the '''<span class="mark">test_ros.sh</span>''' script to start a small turtle routine to test whether ROS can be used normally</p> | ||
− | <p>orangepi@orangepi:~$ '''test_ros.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''test_ros.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After running the '''test_ros.sh''' script, a little turtle as shown in the figure below will pop up</p> | <li><p>After running the '''test_ros.sh''' script, a little turtle as shown in the figure below will pop up</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img272.png]]</p></li> |
− | <li><p>Then please keep the terminal window you just opened on top</p></li | + | <li><p>Then please keep the terminal window you just opened on top</p></li> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img273.png]] |
− | </div> | + | </div></ol> |
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
<li><p>At this time, press the direction keys on the keyboard to control the little turtle to move up, down, left, and right</p> | <li><p>At this time, press the direction keys on the keyboard to control the little turtle to move up, down, left, and right</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img274.png]]</p></li></ol> |
<span id="how-to-install-ros-2-galactic-on-ubuntu-20.04"></span> | <span id="how-to-install-ros-2-galactic-on-ubuntu-20.04"></span> | ||
+ | |||
=== How to install ROS 2 Galactic on Ubuntu 20.04 === | === How to install ROS 2 Galactic on Ubuntu 20.04 === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The currently active version of ROS 2 is shown below, and the recommended version is '''Galactic Geochelone'''</p> | <li><p>The currently active version of ROS 2 is shown below, and the recommended version is '''Galactic Geochelone'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img275.png]]</p> |
− | <p>[[File: | + | <p>[[File:zero3-img276.png]]</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>[http://docs.ros.org/ '''http://docs.ros.org''']</p> | <p>[http://docs.ros.org/ '''http://docs.ros.org''']</p> | ||
− | <p>'''http://docs.ros.org/en/galactic/Releases.html'''</p></li> | + | <p>'''http://docs.ros.org/en/galactic/Releases.html'''</p> |
− | <li><p>The link to the official ROS 2 '''Galactic Geochelone''' installation documentation is as | + | |} |
+ | </li> | ||
+ | <li><p>The link to the official ROS 2 '''Galactic Geochelone''' installation documentation is as follows:</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>'''docs.ros.org/en/galactic/Installation.html'''</p> | <p>'''docs.ros.org/en/galactic/Installation.html'''</p> | ||
− | <p>'''http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html'''</p></li> | + | <p>'''http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html'''</p> |
− | <li><p>In the official ROS 2 '''Galactic Geochelone''' installation document, Ubuntu Linux recommends using Ubuntu 20.04, so please make sure that the system used by the development board is the '''Ubuntu 20.04 desktop system'''. There are several ways to install ROS 2. The following demonstrates how to install ROS 2 '''<span class="mark">Galactic Geochelone</span>''' through '''<span class="mark">Debian packages</span>'''.</p></li> | + | |} |
+ | </li> | ||
+ | <li><p>In the official ROS 2 '''Galactic Geochelone''' installation document, Ubuntu Linux recommends using Ubuntu 20.04, so please make sure that the system used by the development board is the '''<span style="color:#FF0000">Ubuntu 20.04 desktop system</span>'''. There are several ways to install ROS 2. The following demonstrates how to install ROS 2 '''<span class="mark">Galactic Geochelone</span>''' through '''<span class="mark">Debian packages</span>'''.</p></li> | ||
<li><p>Ros2 can be installed using the '''install_ros.sh''' script</p> | <li><p>Ros2 can be installed using the '''install_ros.sh''' script</p> | ||
− | <p>orangepi@orangepi:~$ '''install_ros.sh ros2'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''install_ros.sh ros2'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The '''install_ros.sh''' script will automatically run the '''ros2 -h''' command after installing ros2. If you can see the following print, it means that the ros2 installation is complete</p> | <li><p>The '''install_ros.sh''' script will automatically run the '''ros2 -h''' command after installing ros2. If you can see the following print, it means that the ros2 installation is complete</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...</p> | <p>usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...</p> | ||
+ | |||
+ | |||
<p>ros2 is an extensible command-line tool for ROS 2.</p> | <p>ros2 is an extensible command-line tool for ROS 2.</p> | ||
+ | |||
+ | |||
<p>optional arguments:</p> | <p>optional arguments:</p> | ||
− | <p>-h, --help show this help message and exit</p> | + | :<p>-h, --help show this help message and exit</p> |
+ | |||
+ | |||
<p>Commands:</p> | <p>Commands:</p> | ||
− | <p>action Various action related sub-commands</p> | + | :<p>action Various action related sub-commands</p> |
− | <p>bag Various rosbag related sub-commands</p> | + | :<p>bag Various rosbag related sub-commands</p> |
− | <p>component Various component related sub-commands</p> | + | :<p>component Various component related sub-commands</p> |
− | <p>daemon Various daemon related sub-commands</p> | + | :<p>daemon Various daemon related sub-commands</p> |
− | <p>doctor Check ROS setup and other potential issues</p> | + | :<p>doctor Check ROS setup and other potential issues</p> |
− | <p>interface Show information about ROS interfaces</p> | + | :<p>interface Show information about ROS interfaces</p> |
− | <p>launch Run a launch file</p> | + | :<p>launch Run a launch file</p> |
− | <p>lifecycle Various lifecycle related sub-commands</p> | + | :<p>lifecycle Various lifecycle related sub-commands</p> |
− | <p>multicast Various multicast related sub-commands</p> | + | :<p>multicast Various multicast related sub-commands</p> |
− | <p>node Various node related sub-commands</p> | + | :<p>node Various node related sub-commands</p> |
− | <p>param Various param related sub-commands</p> | + | :<p>param Various param related sub-commands</p> |
− | <p>pkg Various package related sub-commands</p> | + | :<p>pkg Various package related sub-commands</p> |
− | <p>run Run a package specific executable</p> | + | :<p>run Run a package specific executable</p> |
− | <p>security Various security related sub-commands</p> | + | :<p>security Various security related sub-commands</p> |
− | <p>service Various service related sub-commands</p> | + | :<p>service Various service related sub-commands</p> |
− | <p>topic Various topic related sub-commands</p> | + | :<p>topic Various topic related sub-commands</p> |
− | <p>wtf Use `wtf` as alias to `doctor`</p> | + | :<p>wtf Use `wtf` as alias to `doctor`</p> |
− | <p>Call `ros2 <command> -h` for more detailed usage.</p></li> | + | |
+ | |||
+ | :<p>Call `ros2 <command> -h` for more detailed usage.</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then you can use the '''test_ros.sh''' script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally</p> | <li><p>Then you can use the '''test_ros.sh''' script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''test_ros.sh'''</p> | <p>orangepi@orangepi:~$ '''test_ros.sh'''</p> | ||
<p>[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'</p> | <p>[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'</p> | ||
Line 5,029: | Line 6,704: | ||
<p>[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]</p> | <p>[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]</p> | ||
<p>[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'</p> | <p>[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'</p> | ||
− | <p>[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]</p></li> | + | <p>[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Run the following command to open rviz2</p> | <li><p>Run the following command to open rviz2</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''source /opt/ros/galactic/setup.bash'''</p> | <p>orangepi@orangepi:~$ '''source /opt/ros/galactic/setup.bash'''</p> | ||
<p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p> | <p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p> | ||
− | <p>[[File: | + | |} |
+ | <p>[[File:zero3-img277.png]]</p></li> | ||
<li><p>For how to use ROS, please refer to the documentation of ROS 2</p> | <li><p>For how to use ROS, please refer to the documentation of ROS 2</p> | ||
− | <p>[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/galactic/Tutorials.html''']</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/galactic/Tutorials.html''']</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="how-to-install-ros-2-humble-on-ubuntu-22.04"></span> | <span id="how-to-install-ros-2-humble-on-ubuntu-22.04"></span> | ||
+ | |||
=== How to install ROS 2 Humble on Ubuntu 22.04 === | === How to install ROS 2 Humble on Ubuntu 22.04 === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Ros2 can be installed using the '''install_ros.sh''' script</p> | <li><p>Ros2 can be installed using the '''install_ros.sh''' script</p> | ||
− | <p>orangepi@orangepi:~$ '''install_ros.sh ros2'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''install_ros.sh ros2'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The '''install_ros.sh''' script will automatically run the '''ros2 -h''' command after installing ros2. If you can see the following print, it means that the ros2 installation is complete</p> | <li><p>The '''install_ros.sh''' script will automatically run the '''ros2 -h''' command after installing ros2. If you can see the following print, it means that the ros2 installation is complete</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...</p> | <p>usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...</p> | ||
+ | |||
+ | |||
<p>ros2 is an extensible command-line tool for ROS 2.</p> | <p>ros2 is an extensible command-line tool for ROS 2.</p> | ||
+ | |||
+ | |||
<p>optional arguments:</p> | <p>optional arguments:</p> | ||
− | <p>-h, --help show this help message and exit</p> | + | :<p>-h, --help show this help message and exit</p> |
+ | |||
+ | |||
<p>Commands:</p> | <p>Commands:</p> | ||
− | <p>action Various action related sub-commands</p> | + | :<p>action Various action related sub-commands</p> |
− | <p>bag Various rosbag related sub-commands</p> | + | :<p>bag Various rosbag related sub-commands</p> |
− | <p>component Various component related sub-commands</p> | + | :<p>component Various component related sub-commands</p> |
− | <p>daemon Various daemon related sub-commands</p> | + | :<p>daemon Various daemon related sub-commands</p> |
− | <p>doctor Check ROS setup and other potential issues</p> | + | :<p>doctor Check ROS setup and other potential issues</p> |
− | <p>interface Show information about ROS interfaces</p> | + | :<p>interface Show information about ROS interfaces</p> |
− | <p>launch Run a launch file</p> | + | :<p>launch Run a launch file</p> |
− | <p>lifecycle Various lifecycle related sub-commands</p> | + | :<p>lifecycle Various lifecycle related sub-commands</p> |
− | <p>multicast Various multicast related sub-commands</p> | + | :<p>multicast Various multicast related sub-commands</p> |
− | <p>node Various node related sub-commands</p> | + | :<p>node Various node related sub-commands</p> |
− | <p>param Various param related sub-commands</p> | + | :<p>param Various param related sub-commands</p> |
− | <p>pkg Various package related sub-commands</p> | + | :<p>pkg Various package related sub-commands</p> |
− | <p>run Run a package specific executable</p> | + | :<p>run Run a package specific executable</p> |
− | <p>security Various security related sub-commands</p> | + | :<p>security Various security related sub-commands</p> |
− | <p>service Various service related sub-commands</p> | + | :<p>service Various service related sub-commands</p> |
− | <p>topic Various topic related sub-commands</p> | + | :<p>topic Various topic related sub-commands</p> |
− | <p>wtf Use `wtf` as alias to `doctor`</p> | + | :<p>wtf Use `wtf` as alias to `doctor`</p> |
− | <p>Call `ros2 <command> -h` for more detailed usage.</p></li> | + | |
− | <li><p>Then you can use the '''test_ros.sh''' script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally</p> | + | |
+ | :<p>Call `ros2 <command> -h` for more detailed usage.</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Then you can use the '''test_ros.sh''' script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''test_ros.sh'''</p> | <p>orangepi@orangepi:~$ '''test_ros.sh'''</p> | ||
<p>[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'</p> | <p>[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'</p> | ||
Line 5,074: | Line 6,782: | ||
<p>[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]</p> | <p>[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]</p> | ||
<p>[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'</p> | <p>[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'</p> | ||
− | <p>[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]</p></li> | + | <p>[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Run the following command to open rviz2</p> | <li><p>Run the following command to open rviz2</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''source /opt/ros/humble/setup.bash'''</p> | <p>orangepi@orangepi:~$ '''source /opt/ros/humble/setup.bash'''</p> | ||
<p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p> | <p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p> | ||
− | <p>[[File: | + | |} |
+ | <p>[[File:zero3-img278.png]]</p></li> | ||
<li><p>Reference documents</p> | <li><p>Reference documents</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>'''http://docs.ros.org/en/humble/index.html'''</p> | <p>'''http://docs.ros.org/en/humble/index.html'''</p> | ||
− | <p> | + | <p>'''http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html'''</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="how-to-install-the-kernel-header-file"></span> | <span id="how-to-install-the-kernel-header-file"></span> | ||
+ | |||
== How to install the kernel header file == | == How to install the kernel header file == | ||
− | '''The Debian 11 system with the Linux6.1 kernel will report a GCC error when compiling the kernel module. So if you want to compile the kernel module, please use Debian12 or Ubuntu22.04''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The Debian 11 system with the <span style="color:#FF0000">Linux6.1</span> kernel will report a GCC error when compiling the kernel module. So if you want to compile the kernel module, please use Debian12 or Ubuntu22.04'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The Linux image released by OPi comes with the deb package of the kernel header file by default, and the storage location is '''/opt/'''</p> | <li><p>The Linux image released by OPi comes with the deb package of the kernel header file by default, and the storage location is '''/opt/'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ls /opt/linux-headers*'''</p> | <p>orangepi@orangepi:~$ '''ls /opt/linux-headers*'''</p> | ||
− | <p>/opt/linux-headers-xxx-sun50iw9_x.x.x_arm64.deb</p></li> | + | <p>/opt/linux-headers-xxx-sun50iw9_x.x.x_arm64.deb</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Use the following command to install the deb package of the kernel header file</p> | <li><p>Use the following command to install the deb package of the kernel header file</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo dpkg -i /opt/linux-headers*.deb'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo dpkg -i /opt/linux-headers*.deb'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After installation, you can see the folder where the kernel header files are located under '''/usr/src'''</p> | <li><p>After installation, you can see the folder where the kernel header files are located under '''/usr/src'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''ls /usr/src'''</p> | <p>orangepi@orangepi:~$ '''ls /usr/src'''</p> | ||
− | <p>linux-headers-x.x.x</p></li> | + | <p>linux-headers-x.x.x</p> |
− | <li><p>Then you can compile the source code of the hello kernel module that comes with the Linux image. The source code of the hello module is in '''/usr/src/hello'''. After entering this directory, use the make command to | + | |} |
+ | </li> | ||
+ | <li><p>Then you can compile the source code of the hello kernel module that comes with the Linux image. The source code of the hello module is in '''/usr/src/hello'''. After entering this directory, use the make command to compile.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''cd /usr/src/hello/'''</p> | <p>orangepi@orangepi:~$ '''cd /usr/src/hello/'''</p> | ||
<p>orangepi@orangepi:/usr/src/hello$ '''sudo make'''</p> | <p>orangepi@orangepi:/usr/src/hello$ '''sudo make'''</p> | ||
<p>make -C /lib/modules/5.4.125/build M=/usr/src/hello modules</p> | <p>make -C /lib/modules/5.4.125/build M=/usr/src/hello modules</p> | ||
<p>make[1]: Entering directory '/usr/src/linux-headers-5.4.125'</p> | <p>make[1]: Entering directory '/usr/src/linux-headers-5.4.125'</p> | ||
− | <p>CC [M] /usr/src/hello/hello.o</p> | + | :<p>CC [M] /usr/src/hello/hello.o</p> |
− | <p>Building modules, stage 2.</p> | + | :<p>Building modules, stage 2.</p> |
− | <p>MODPOST 1 modules</p> | + | :<p>MODPOST 1 modules</p> |
− | <p>CC [M] /usr/src/hello/hello.mod.o</p> | + | :<p>CC [M] /usr/src/hello/hello.mod.o</p> |
− | <p>LD [M] /usr/src/hello/hello.ko</p> | + | :<p>LD [M] /usr/src/hello/hello.ko</p> |
− | <p>make[1]: Leaving directory '/usr/src/linux-headers-5.4.125'</p></li> | + | <p>make[1]: Leaving directory '/usr/src/linux-headers-5.4.125'</p> |
+ | |} | ||
+ | </li> | ||
<li><p>After compiling, the '''hello.ko''' kernel module will be generated</p> | <li><p>After compiling, the '''hello.ko''' kernel module will be generated</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:/usr/src/hello$ '''ls *.ko'''</p> | <p>orangepi@orangepi:/usr/src/hello$ '''ls *.ko'''</p> | ||
− | <p>hello.ko</p></li> | + | <p>hello.ko</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Using the '''insmod''' command, you can insert the '''hello.ko''' kernel module into the kernel</p> | <li><p>Using the '''insmod''' command, you can insert the '''hello.ko''' kernel module into the kernel</p> | ||
− | <p>orangepi@orangepi:/usr/src/hello$ '''sudo insmod hello.ko'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:/usr/src/hello$ '''sudo insmod hello.ko'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then use the '''demsg''' command to view the output of the '''hello.ko''' kernel module. If you can see the output instructions below, the '''hello.ko''' kernel module is loaded correctly</p> | <li><p>Then use the '''demsg''' command to view the output of the '''hello.ko''' kernel module. If you can see the output instructions below, the '''hello.ko''' kernel module is loaded correctly</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:/usr/src/hello$ '''dmesg | grep "Hello"'''</p> | <p>orangepi@orangepi:/usr/src/hello$ '''dmesg | grep "Hello"'''</p> | ||
− | <p>[ 2871.893988] '''Hello Orange Pi -- init'''</p></li> | + | <p>[ 2871.893988] '''Hello Orange Pi -- init'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Use the '''rmmod''' command to uninstall the '''hello.ko''' kernel module</p> | <li><p>Use the '''rmmod''' command to uninstall the '''hello.ko''' kernel module</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:/usr/src/hello$ '''sudo rmmod hello'''</p> | <p>orangepi@orangepi:/usr/src/hello$ '''sudo rmmod hello'''</p> | ||
<p>orangepi@orangepi:/usr/src/hello$ '''dmesg | grep "Hello"'''</p> | <p>orangepi@orangepi:/usr/src/hello$ '''dmesg | grep "Hello"'''</p> | ||
<p>[ 2871.893988] Hello Orange Pi -- init</p> | <p>[ 2871.893988] Hello Orange Pi -- init</p> | ||
− | <p>[ 3173.800892] '''Hello Orange Pi -- exit'''</p></li></ol> | + | <p>[ 3173.800892] '''Hello Orange Pi -- exit'''</p> |
+ | |} | ||
+ | </li></ol> | ||
<span id="some-programming-language-tests-supported-by-linux-system"></span> | <span id="some-programming-language-tests-supported-by-linux-system"></span> | ||
+ | |||
== Some programming language tests supported by Linux system == | == Some programming language tests supported by Linux system == | ||
Line 5,132: | Line 6,897: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The version of gcc is as follows</p> | <li><p>The version of gcc is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc --version'''</p> | <p>orangepi@orangepi:~$ '''gcc --version'''</p> | ||
<p>gcc (Debian 10.2.1-6) 10.2.1 20210110</p> | <p>gcc (Debian 10.2.1-6) 10.2.1 20210110</p> | ||
<p>Copyright (C) 2020 Free Software Foundation, Inc.</p> | <p>Copyright (C) 2020 Free Software Foundation, Inc.</p> | ||
<p>This is free software; see the source for copying conditions. There is NO</p> | <p>This is free software; see the source for copying conditions. There is NO</p> | ||
− | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></li> | + | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Write the '''hello_world.c''' program in C language</p> | <li><p>Write the '''hello_world.c''' program in C language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | ||
<p>#include <stdio.h></p> | <p>#include <stdio.h></p> | ||
+ | |||
+ | |||
<p>int main(void)</p> | <p>int main(void)</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>printf("Hello World!\n");</p> | + | :<p>printf("Hello World!\n");</p> |
− | <p>return 0;</p> | + | |
− | <p>}</p></li> | + | |
+ | :<p>return 0;</p> | ||
+ | <p>}</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then compile and run '''hello_world.c'''</p> | <li><p>Then compile and run '''hello_world.c'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | ||
<p>orangepi@orangepi:~$ '''./hello_world'''</p> | <p>orangepi@orangepi:~$ '''./hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Debian Bullseye comes with Python3 installed by default</p> | <li><p>Debian Bullseye comes with Python3 installed by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The specific version of Python is as follows</p> | <li><p>The specific version of Python is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3'''</p> | <p>orangepi@orangepi:~$ '''python3'''</p> | ||
<p>'''Python 3.9.2''' (default, Feb 28 2021, 17:03:44)</p> | <p>'''Python 3.9.2''' (default, Feb 28 2021, 17:03:44)</p> | ||
Line 5,158: | Line 6,945: | ||
<p>Type "help", "copyright", "credits" or "license" for more information.</p> | <p>Type "help", "copyright", "credits" or "license" for more information.</p> | ||
<p>>>></p> | <p>>>></p> | ||
− | <p>'''Use the Ctrl+D shortcut to exit python's interactive | + | |} |
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Write '''hello_world.py''' program in Python language</p> | <li><p>Write '''hello_world.py''' program in Python language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | ||
− | <p>print('Hello World!')</p></li> | + | <p>print('Hello World!')</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The result of running '''hello_world.py''' is as follows</p> | <li><p>The result of running '''hello_world.py''' is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Debian Bullseye does not install Java compilation tools and runtime environment by default</p> | <li><p>Debian Bullseye does not install Java compilation tools and runtime environment by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>You can use the following command to install openjdk, the latest | + | <li><p>You can use the following command to install openjdk, the latest version in Debian Bullseye is openjdk-17</p> |
− | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After installation, you can check the version of Java</p> | <li><p>After installation, you can check the version of Java</p> | ||
− | <p>orangepi@orangepi:~$ '''java --version'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''java --version'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Edit '''hello_world.java of java version'''</p> | <li><p>Edit '''hello_world.java of java version'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | ||
<p>public class hello_world</p> | <p>public class hello_world</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>public static void main(String[] args)</p> | + | :<p>public static void main(String[] args)</p> |
− | <p>{</p> | + | :<p>{</p> |
− | <p>System.out.println("Hello World!");</p> | + | ::<p>System.out.println("Hello World!");</p> |
+ | :<p>}</p> | ||
<p>}</p> | <p>}</p> | ||
− | + | |} | |
+ | </li> | ||
<li><p>Then compile and run'''hello_world.java'''</p> | <li><p>Then compile and run'''hello_world.java'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | ||
<p>orangepi@orangepi:~$ '''java hello_world'''</p> | <p>orangepi@orangepi:~$ '''java hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="debian-bookworm-system"></span> | <span id="debian-bookworm-system"></span> | ||
+ | |||
=== Debian Bookworm System === | === Debian Bookworm System === | ||
Line 5,194: | Line 7,018: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The version of gcc is as follows</p> | <li><p>The version of gcc is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc --version'''</p> | <p>orangepi@orangepi:~$ '''gcc --version'''</p> | ||
<p>gcc (Debian 12.2.0-14) 12.2.0</p> | <p>gcc (Debian 12.2.0-14) 12.2.0</p> | ||
<p>Copyright (C) 2022 Free Software Foundation, Inc.</p> | <p>Copyright (C) 2022 Free Software Foundation, Inc.</p> | ||
<p>This is free software; see the source for copying conditions. There is NO</p> | <p>This is free software; see the source for copying conditions. There is NO</p> | ||
− | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></li> | + | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Write the '''hello_world.c''' program in C language</p> | <li><p>Write the '''hello_world.c''' program in C language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | ||
<p>#include <stdio.h></p> | <p>#include <stdio.h></p> | ||
+ | |||
+ | |||
<p>int main(void)</p> | <p>int main(void)</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>printf("Hello World!\n");</p> | + | :<p>printf("Hello World!\n");</p> |
− | <p>return 0;</p> | + | |
− | <p>}</p></li> | + | |
+ | :<p>return 0;</p> | ||
+ | <p>}</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then compile and run '''hello_world.c'''</p> | <li><p>Then compile and run '''hello_world.c'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | ||
<p>orangepi@orangepi:~$ '''./hello_world'''</p> | <p>orangepi@orangepi:~$ '''./hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Debian Bookworm has Python3 installed by default</p> | <li><p>Debian Bookworm has Python3 installed by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The specific version of Python is as follows</p> | <li><p>The specific version of Python is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3'''</p> | <p>orangepi@orangepi:~$ '''python3'''</p> | ||
<p>Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux</p> | <p>Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux</p> | ||
<p>Type "help", "copyright", "credits" or "license" for more information.</p> | <p>Type "help", "copyright", "credits" or "license" for more information.</p> | ||
<p>>>></p> | <p>>>></p> | ||
− | <p>'''Use the Ctrl+D shortcut to exit python's interactive | + | |} |
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big><p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p></big> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Write '''hello_world.py''' program in Python language</p> | <li><p>Write '''hello_world.py''' program in Python language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | ||
− | <p>print('Hello World!')</p></li> | + | <p>print('Hello World!')</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The result of running '''hello_world.py''' is as follows</p> | <li><p>The result of running '''hello_world.py''' is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Debian Bookworm does not install Java compilation tools and operating environment by default</p> | <li><p>Debian Bookworm does not install Java compilation tools and operating environment by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>You can use the following command to install openjdk, the latest | + | <li><p>You can use the following command to install openjdk, the latest version in Debian Bookworm is openjdk-17</p> |
− | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After installation, you can check the version of Java</p> | <li><p>After installation, you can check the version of Java</p> | ||
− | <p>orangepi@orangepi:~$ '''java --version'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''java --version'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Edit the Javaverison’s '''hello_world.java'''</p> | <li><p>Edit the Javaverison’s '''hello_world.java'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | ||
<p>public class hello_world</p> | <p>public class hello_world</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>public static void main(String[] args)</p> | + | :<p>public static void main(String[] args)</p> |
− | <p>{</p> | + | :<p>{</p> |
− | <p>System.out.println("Hello World!");</p> | + | ::<p>System.out.println("Hello World!");</p> |
+ | :<p>}</p> | ||
<p>}</p> | <p>}</p> | ||
− | + | |} | |
+ | </li> | ||
<li><p>Then compile and run'''hello_world.java'''</p> | <li><p>Then compile and run'''hello_world.java'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | ||
<p>orangepi@orangepi:~$ '''java hello_world'''</p> | <p>orangepi@orangepi:~$ '''java hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="ubuntu-focal-system"></span> | <span id="ubuntu-focal-system"></span> | ||
+ | |||
=== Ubuntu Focal System === | === Ubuntu Focal System === | ||
Line 5,255: | Line 7,138: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The version of a.gcc is as follows</p> | <li><p>The version of a.gcc is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc --version'''</p> | <p>orangepi@orangepi:~$ '''gcc --version'''</p> | ||
<p>gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0</p> | <p>gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0</p> | ||
<p>Copyright (C) 2019 Free Software Foundation, Inc.</p> | <p>Copyright (C) 2019 Free Software Foundation, Inc.</p> | ||
<p>This is free software; see the source for copying conditions. There is NO</p> | <p>This is free software; see the source for copying conditions. There is NO</p> | ||
− | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></li> | + | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Write the '''hello_world.c''' program in C language</p> | <li><p>Write the '''hello_world.c''' program in C language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | ||
<p>#include <stdio.h></p> | <p>#include <stdio.h></p> | ||
+ | |||
+ | |||
<p>int main(void)</p> | <p>int main(void)</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>printf("Hello World!\n");</p> | + | :<p>printf("Hello World!\n");</p> |
− | <p>return 0;</p> | + | |
− | <p>}</p></li> | + | |
+ | :<p>return 0;</p> | ||
+ | <p>}</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then compile and run '''hello_world.c'''</p> | <li><p>Then compile and run '''hello_world.c'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | ||
<p>orangepi@orangepi:~$ '''./hello_world'''</p> | <p>orangepi@orangepi:~$ '''./hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Ubuntu Focal has Python3 installed by default</p> | <li><p>Ubuntu Focal has Python3 installed by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The specific version of Python3 is as follows</p> | <li><p>The specific version of Python3 is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3'''</p> | <p>orangepi@orangepi:~$ '''python3'''</p> | ||
<p>Python 3.8.10 (default, Nov 14 2022, 12:59:47)</p> | <p>Python 3.8.10 (default, Nov 14 2022, 12:59:47)</p> | ||
Line 5,281: | Line 7,186: | ||
<p>Type "help", "copyright", "credits" or "license" for more information.</p> | <p>Type "help", "copyright", "credits" or "license" for more information.</p> | ||
<p>>>></p> | <p>>>></p> | ||
− | <p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p></li> | + | |} |
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big><p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p></big> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Write the '''hello_world.py''' program in Python language</p> | <li><p>Write the '''hello_world.py''' program in Python language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | ||
− | <p>print('Hello World!')</p></li> | + | <p>print('Hello World!')</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The result of running '''hello_world.py''' is as follows</p> | <li><p>The result of running '''hello_world.py''' is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Ubuntu Focal does not install Java compilation tools and operating environment by default</p> | <li><p>Ubuntu Focal does not install Java compilation tools and operating environment by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>You can use the following command to install openjdk-17</p> | <li><p>You can use the following command to install openjdk-17</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After installation, you can check the version of Java</p> | <li><p>After installation, you can check the version of Java</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''java --version'''</p> | <p>orangepi@orangepi:~$ '''java --version'''</p> | ||
<p>openjdk 17.0.2 2022-01-18</p> | <p>openjdk 17.0.2 2022-01-18</p> | ||
<p>OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04)</p> | <p>OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04)</p> | ||
− | <p>OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)</p></li> | + | <p>OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Write the Java version of '''hello_world.java'''</p> | <li><p>Write the Java version of '''hello_world.java'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | ||
<p>public class hello_world</p> | <p>public class hello_world</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>public static void main(String[] args)</p> | + | :<p>public static void main(String[] args)</p> |
− | <p>{</p> | + | :<p>{</p> |
− | <p>System.out.println("Hello World!");</p> | + | ::<p>System.out.println("Hello World!");</p> |
+ | :<p>}</p> | ||
<p>}</p> | <p>}</p> | ||
− | + | |} | |
+ | </li> | ||
<li><p>Then compile and run '''hello_world.java'''</p> | <li><p>Then compile and run '''hello_world.java'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | ||
<p>orangepi@orangepi:~$ '''java hello_world'''</p> | <p>orangepi@orangepi:~$ '''java hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="ubuntu-jammy-system"></span> | <span id="ubuntu-jammy-system"></span> | ||
+ | |||
=== Ubuntu Jammy System === | === Ubuntu Jammy System === | ||
Line 5,320: | Line 7,262: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The version of a.gcc is as follows</p> | <li><p>The version of a.gcc is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc --version'''</p> | <p>orangepi@orangepi:~$ '''gcc --version'''</p> | ||
<p>gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) '''11.3.0'''</p> | <p>gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) '''11.3.0'''</p> | ||
<p>Copyright (C) 2021 Free Software Foundation, Inc.</p> | <p>Copyright (C) 2021 Free Software Foundation, Inc.</p> | ||
<p>This is free software; see the source for copying conditions. There is NO</p> | <p>This is free software; see the source for copying conditions. There is NO</p> | ||
− | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></li> | + | <p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Write the '''hello_world.c''' program in C language</p> | <li><p>Write the '''hello_world.c''' program in C language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.c'''</p> | ||
<p>#include <stdio.h></p> | <p>#include <stdio.h></p> | ||
+ | |||
+ | |||
<p>int main(void)</p> | <p>int main(void)</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>printf("Hello World!\n");</p> | + | :<p>printf("Hello World!\n");</p> |
− | <p>return 0;</p> | + | |
− | <p>}</p></li> | + | |
+ | :<p>return 0;</p> | ||
+ | <p>}</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then compile and run '''hello_world.c'''</p> | <li><p>Then compile and run '''hello_world.c'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | <p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p> | ||
<p>orangepi@orangepi:~$ '''./hello_world'''</p> | <p>orangepi@orangepi:~$ '''./hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Ubuntu Jammy has Python3 installed by default</p> | <li><p>Ubuntu Jammy has Python3 installed by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The specific version of Python3 is as follows</p> | <li><p>The specific version of Python3 is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3'''</p> | <p>orangepi@orangepi:~$ '''python3'''</p> | ||
<p>Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux</p> | <p>Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux</p> | ||
<p>Type "help", "copyright", "credits" or "license" for more information.</p> | <p>Type "help", "copyright", "credits" or "license" for more information.</p> | ||
<p>>>></p> | <p>>>></p> | ||
− | <p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p></li> | + | |} |
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big><p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p></big> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Write the '''hello_world.py''' program in Python language</p> | <li><p>Write the '''hello_world.py''' program in Python language</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.py'''</p> | ||
− | <p>print('Hello World!')</p></li> | + | <p>print('Hello World!')</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The result of running '''hello_world.py''' is as follows</p> | <li><p>The result of running '''hello_world.py''' is as follows</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | <p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>Ubuntu Jammy does not install Java compilation tools and operating environment by default</p> | <li><p>Ubuntu Jammy does not install Java compilation tools and operating environment by default</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>You can use the following command to install openjdk-18</p> | <li><p>You can use the following command to install openjdk-18</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-18-jdk'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-18-jdk'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After installation, you can check the version of Java</p> | <li><p>After installation, you can check the version of Java</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''java --version'''</p> | <p>orangepi@orangepi:~$ '''java --version'''</p> | ||
<p>openjdk 18.0.2-ea 2022-07-19</p> | <p>openjdk 18.0.2-ea 2022-07-19</p> | ||
<p>OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)</p> | <p>OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)</p> | ||
− | <p>OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode, sharing)</p></li> | + | <p>OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode, sharing)</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Write the Java version of '''hello_world.java'''</p> | <li><p>Write the Java version of '''hello_world.java'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''vim hello_world.java'''</p> | ||
<p>public class hello_world</p> | <p>public class hello_world</p> | ||
<p>{</p> | <p>{</p> | ||
− | <p>public static void main(String[] args)</p> | + | :<p>public static void main(String[] args)</p> |
− | <p>{</p> | + | :<p>{</p> |
− | <p>System.out.println("Hello World!");</p> | + | ::<p>System.out.println("Hello World!");</p> |
+ | :<p>}</p> | ||
<p>}</p> | <p>}</p> | ||
− | + | |} | |
+ | </li> | ||
<li><p>Then compile and run '''hello_world.java'''</p> | <li><p>Then compile and run '''hello_world.java'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | <p>orangepi@orangepi:~$ '''javac hello_world.java'''</p> | ||
<p>orangepi@orangepi:~$ '''java hello_world'''</p> | <p>orangepi@orangepi:~$ '''java hello_world'''</p> | ||
− | <p>Hello World!</p></li></ol> | + | <p>Hello World!</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="the-method-of-uploading-files-to-the-linux-system-of-the-development-board"></span> | <span id="the-method-of-uploading-files-to-the-linux-system-of-the-development-board"></span> | ||
+ | |||
== The method of uploading files to the Linux system of the development board == | == The method of uploading files to the Linux system of the development board == | ||
Line 5,389: | Line 7,390: | ||
<li><p>Use the scp command to upload files from the Ubuntu PC to the Linux system of the development board. The specific commands are as follows</p> | <li><p>Use the scp command to upload files from the Ubuntu PC to the Linux system of the development board. The specific commands are as follows</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>''' | + | <li><p>'''file_path:''' Need to be replaced with the path of the file to be uploaded</p></li> |
− | <li><p>''' | + | <li><p>'''orangepi:''' It is the user name of the Linux system of the development board, and it can also be replaced with other ones, such as root</p></li> |
− | <li><p>'''192.168.xx.xx:''' It is the IP address of the development | + | <li><p>'''192.168.xx.xx:''' It is the IP address of the development board, please modify it according to the actual situation</p></li> |
− | <li><p>'''/home/orangepi:''' The path in the Linux system of the | + | <li><p>'''/home/orangepi:''' The path in the Linux system of the development board can also be modified to other paths</p> |
− | <p>test@test:~$ '''scp file_path orangepi@192.168.xx.xx:/home/orangepi/'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>test@test:~$ '''scp file_path orangepi@192.168.xx.xx:/home/orangepi/'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>If you want to upload a folder, you need to add the -r parameter</p> | <li><p>If you want to upload a folder, you need to add the -r parameter</p> | ||
− | <p>test@test:~$ '''scp -r dir_path orangepi@192.168.xx.xx:/home/orangepi/'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>There are more usages of scp, please use the following command to view the man manual</p></li | + | |- |
+ | | | ||
+ | <p>test@test:~$ '''scp <span style="color:#FF0000">-r</span> dir_path orangepi@192.168.xx.xx:/home/orangepi/'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>There are more usages of scp, please use the following command to view the man manual</p></li> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''man scp''' | test@test:~$ '''man scp''' | ||
+ | |} | ||
+ | </ol> | ||
+ | <span id="how-to-upload-files-using-filezilla"></span> | ||
− | |||
==== How to upload files using filezilla ==== | ==== How to upload files using filezilla ==== | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First install filezilla in Ubuntu PC</p> | <li><p>First install filezilla in Ubuntu PC</p> | ||
− | <p>test@test:~$ '''sudo apt install -y filezilla'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>test@test:~$ '''sudo apt install -y filezilla'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then use the following command to open filezilla</p> | <li><p>Then use the following command to open filezilla</p> | ||
− | <p>test@test:~$ '''filezilla'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>The interface after filezilla is opened is as follows, at this time, the display under the remote site on the right is empty</p> | + | |- |
− | <div class="figure"> | + | | |
+ | <p>test@test:~$ '''filezilla'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>The interface after filezilla is opened is as follows, at this time, the display under the remote site on the right is empty</p> | ||
+ | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img279.png]] |
</div></li> | </div></li> | ||
− | <li><p>The method of connecting the development board is shown in the figure below</p | + | <li><p>The method of connecting the development board is shown in the figure below</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img280.png]] |
− | </div> | + | </div></li></ol> |
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>Then choose to '''<span class="mark">save the password</span>''', and then click '''<span class="mark">OK</span>'''</p> | <li><p>Then choose to '''<span class="mark">save the password</span>''', and then click '''<span class="mark">OK</span>'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img281.png]]</p></li> |
− | <li><p>Then choose to '''<span class="mark">always trust this host</span>''', and then click '''<span class="mark">OK</span>'''</p | + | <li><p>Then choose to '''<span class="mark">always trust this host</span>''', and then click '''<span class="mark">OK</span>'''</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img282.png]] |
− | </div> | + | </div></li></ol> |
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>After the connection is successful, you can see the directory structure of the development board linux file system on the right side of the filezilla software | + | <li>After the connection is successful, you can see the directory structure of the development board linux file system on the right side of the filezilla software |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img283.png]] |
− | </div> | + | </div></li></ol> |
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
− | <li>Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded | + | <li>Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Ubuntu PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board. |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img284.png]] |
− | </div> | + | </div></li></ol> |
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
<li><p>After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded files</p></li> | <li><p>After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded files</p></li> | ||
− | <li><p>The method of uploading a folder is the same as that of uploading a file, so I | + | <li><p>The method of uploading a folder is the same as that of uploading a file, so I won't go into details here</p></li></ol> |
<span id="how-to-upload-files-to-the-development-board-linux-system-in-windows-pc"></span> | <span id="how-to-upload-files-to-the-development-board-linux-system-in-windows-pc"></span> | ||
+ | |||
=== How to upload files to the development board Linux system in Windows PC === | === How to upload files to the development board Linux system in Windows PC === | ||
Line 5,460: | Line 7,487: | ||
# First download the installation file of the Windows version of the filezilla software, the download link is as follows | # First download the installation file of the Windows version of the filezilla software, the download link is as follows | ||
− | + | ::{| class="wikitable" style="width:800px;" | |
+ | |- | ||
+ | | | ||
+ | '''https://filezilla-project.org/download.php?type=client''' | ||
+ | |} | ||
+ | |||
+ | ::[[File:zero3-img285.png]] | ||
− | [[File: | + | ::[[File:zero3-img286-1.png]] |
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
<li><p>The downloaded installation package is as follows, and then double-click to install directly</p> | <li><p>The downloaded installation package is as follows, and then double-click to install directly</p> | ||
− | <p>'''FileZilla_Server_1.5.1_win64-setup.exe'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>During the installation process, please select <span class="mark">Decline</span> on the following installation interface, and then select <span class="mark">Next></span></p | + | |- |
+ | | | ||
+ | <p>'''FileZilla_Server_1.5.1_win64-setup.exe'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>During the installation process, please select <span class="mark">Decline</span> on the following installation interface, and then select <span class="mark">Next></span></p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img287.png]] |
− | </div> | + | </div></li></ol> |
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
− | <li>The interface after filezilla is opened is as follows, and the display under the remote site on the right is empty | + | <li>The interface after filezilla is opened is as follows, and the display under the remote site on the right is empty |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img288.png]] |
− | </div> | + | </div></li></ol> |
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
− | <li>The method of connecting the development board is shown in the figure below: | + | <li>The method of connecting the development board is shown in the figure below: |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img280.png]] |
− | </div> | + | </div></li></ol> |
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
− | <li>Then choose to '''<span class="mark">save the password</span>''', and then click '''<span class="mark">OK</span>''' | + | <li>Then choose to '''<span class="mark">save the password</span>''', and then click '''<span class="mark">OK</span>''' |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img289.png]] |
− | </div> | + | </div></li></ol> |
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>Then select '''<span class="mark">Always trust this host</span>''', and click '''<span class="mark">OK</span>''' | + | <li>Then select '''<span class="mark">Always trust this host</span>''', and click '''<span class="mark">OK</span>''' |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img290.png]] |
− | </div> | + | </div></li></ol> |
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
− | <li> | + | <li>Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Windows PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board. |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img291.png]] |
− | </div> | + | </div></li></ol> |
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
− | <li>Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Windows PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board bingo | + | <li>Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Windows PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board bingo |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img292.png]] |
− | </div> | + | </div></li></ol> |
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
<li><p>After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded files</p></li> | <li><p>After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded files</p></li> | ||
− | <li><p>The method of uploading a folder is the same as that of uploading a file, so I | + | <li><p>The method of uploading a folder is the same as that of uploading a file, so I won't go into details here</p></li></ol> |
<span id="instructions-for-using-the-switch-logo"></span> | <span id="instructions-for-using-the-switch-logo"></span> | ||
+ | |||
== Instructions for using the switch logo == | == Instructions for using the switch logo == | ||
Line 5,532: | Line 7,571: | ||
<li><p>By default, the switch logo will only be displayed in the desktop version of the system</p></li> | <li><p>By default, the switch logo will only be displayed in the desktop version of the system</p></li> | ||
<li><p>Set the '''bootlogo''' variable to '''false''' in '''/boot/orangepiEnv.txt''' to turn off the switch logo</p> | <li><p>Set the '''bootlogo''' variable to '''false''' in '''/boot/orangepiEnv.txt''' to turn off the switch logo</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | <p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | ||
<p>verbosity=1</p> | <p>verbosity=1</p> | ||
− | <p>'''bootlogo=false'''</p></li> | + | <p>'''<span style="color:#FF0000">bootlogo=false</span>'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Set the '''bootlogo''' variable to '''true''' in '''/boot/orangepiEnv.txt''' to enable the switch logo</p> | <li><p>Set the '''bootlogo''' variable to '''true''' in '''/boot/orangepiEnv.txt''' to enable the switch logo</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | <p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p> | ||
<p>verbosity=1</p> | <p>verbosity=1</p> | ||
− | <p>'''bootlogo=true'''</p></li> | + | <p>'''<span style="color:#FF0000">bootlogo=true</span>'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>The location of the boot logo image in the Linux system is</p> | <li><p>The location of the boot logo image in the Linux system is</p> | ||
− | <p>'''/usr/share/plymouth/themes/orangepi/watermark.png'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>'''/usr/share/plymouth/themes/orangepi/watermark.png'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After replacing the boot logo picture, you need to run the following command to take effect</p> | <li><p>After replacing the boot logo picture, you need to run the following command to take effect</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo update-initramfs -u'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo update-initramfs -u'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="how-to-shut-down-and-restart-the-development-board"></span> | <span id="how-to-shut-down-and-restart-the-development-board"></span> | ||
+ | |||
== How to shut down and restart the development board == | == How to shut down and restart the development board == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>During the running of the Linux system, if the power is directly unplugged, the file system may lose some data. It is recommended to use the '''poweroff''' command to shut down the Linux system of the development board before power off, and then unplug the power</p> | <li><p>During the running of the Linux system, if the power is directly unplugged, the file system may lose some data. It is recommended to use the '''poweroff''' command to shut down the Linux system of the development board before power off, and then unplug the power</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>orangepi@orangepi:~$ '''sudo poweroff'''</p> | <p>orangepi@orangepi:~$ '''sudo poweroff'''</p> | ||
− | <p>'''Note that after the development board is turned off, the power supply needs to be re-plugged to turn it on.'''</p></li> | + | |} |
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big><p>'''Note that after the development board is turned off, the power supply needs to be re-plugged to turn it on.'''</p></big> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Use the '''reboot''' command to restart the Linux system on the development board</p> | <li><p>Use the '''reboot''' command to restart the Linux system on the development board</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo''' '''reboot'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo''' '''reboot'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="linux-sdkorangepi-build-instruction"></span> | <span id="linux-sdkorangepi-build-instruction"></span> | ||
Line 5,561: | Line 7,635: | ||
== Compilation system requirements == | == Compilation system requirements == | ||
− | The Linux SDK, '''orangepi-build''', only supports running on X64 computers with '''Ubuntu 22.04''' installed, so before downloading orangepi-build, please make sure that the Ubuntu version installed on your computer is Ubuntu 22.04. The command to check the Ubuntu version installed on the computer is as follows. If the Release field does not display '''22.04''', it means that the current Ubuntu version does not meet the requirements. Please replace the system before performing the following operations. | + | The Linux SDK, '''orangepi-build''', only supports running on X64 computers with '''<span style="color:#FF0000">Ubuntu 22.04</span>''' installed, so before downloading orangepi-build, please make sure that the Ubuntu version installed on your computer is Ubuntu 22.04. The command to check the Ubuntu version installed on the computer is as follows. If the Release field does not display '''<span style="color:#FF0000">22.04</span>''', it means that the current Ubuntu version does not meet the requirements. Please replace the system before performing the following operations. |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''lsb_release -a''' | test@test:~$ '''lsb_release -a''' | ||
Line 5,571: | Line 7,648: | ||
Description: Ubuntu 22.04 LTS | Description: Ubuntu 22.04 LTS | ||
− | Release: '''22.04''' | + | Release: '''<span style="color:#FF0000">22.04</span>''' |
Codename: '''jammy''' | Codename: '''jammy''' | ||
+ | |} | ||
− | If the computer is installed with a Windows system and there is no computer with Ubuntu 22.04 installed, you can consider using '''VirtualBox''' or '''VMware''' to install an Ubuntu 22.04 virtual machine in the Windows system. But please note, do not compile orangepi-build on the WSL virtual machine, because orangepi-build has not been tested in the WSL virtual machine, so it cannot be guaranteed that orangepi-build can be used normally in WSL, and please do not compile it on the Linux system of the development board Use orangepi-build in. The download address of the installation image of Ubuntu 22.04 '''amd64''' version is: | + | If the computer is installed with a Windows system and there is no computer with Ubuntu 22.04 installed, you can consider using '''VirtualBox''' or '''VMware''' to install an Ubuntu 22.04 virtual machine in the Windows system. But please note, do not compile orangepi-build on the WSL virtual machine, because orangepi-build has not been tested in the WSL virtual machine, so it cannot be guaranteed that orangepi-build can be used normally in WSL, and please do not compile it on the Linux system of the development board Use orangepi-build in. The download address of the installation image of Ubuntu 22.04 '''<span style="color:#FF0000">amd64</span>''' version is: |
− | + | {| class="wikitable" style="width:800px;" | |
+ | |- | ||
+ | | | ||
+ | <p>'''https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/22.04/ubuntu-22.04-desktop-amd64.iso'''</p> | ||
+ | |} | ||
− | + | <span id="get-the-source-code-of-linux-sdk"></span> | |
− | |||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Get the source code of linux sdk == | == Get the source code of linux sdk == | ||
Line 5,616: | Line 7,670: | ||
The linux sdk refers to the code of orangepi-build. orangepi-build is modified based on the armbian build system. Using orangepi-build, multiple versions of linux images can be compiled. Use the following command to download the orangepi-build code: | The linux sdk refers to the code of orangepi-build. orangepi-build is modified based on the armbian build system. Using orangepi-build, multiple versions of linux images can be compiled. Use the following command to download the orangepi-build code: | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''sudo apt-get update''' | test@test:~$ '''sudo apt-get update''' | ||
test@test:~$ '''sudo apt-get install -y git''' | test@test:~$ '''sudo apt-get install -y git''' | ||
− | test@test:~$ '''git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next''' | + | test@test:~$ '''git clone https://github.com/orangepi-xunlong/orangepi-build.git <span style="color:#FF0000">-b next</span>''' |
+ | |} | ||
− | '''Note that the development board using the H618 Soc needs to download the source code of the next branch of orangepi-build. The above git clone command needs to specify the branch of the orangepi-build source code as next.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Note that the development board using the H618 Soc needs to download the source code of the <span style="color:#FF0000">next</span> branch of orangepi-build. The above git clone command needs to specify the branch of the orangepi-build source code as next.'''</big> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img294.png|780px|center]] |
</div> | </div> | ||
− | '''Downloading the orangepi-build code through the git clone command does not require entering the user name and password of the github account (the same is true for downloading other codes in this manual), if the Ubuntu PC prompts the user to enter the github account after entering the git clone command The name and password are usually entered incorrectly in the address of the orangepi-build warehouse behind the git clone. Please check the spelling of the command carefully, instead of thinking that we forgot to provide the username and password of the github account.''' | + | |} |
+ | |||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big>'''Downloading the orangepi-build code through the git clone command does not require entering the user name and password of the github account (the same is true for downloading other codes in this manual), if the Ubuntu PC prompts the user to enter the github account after entering the git clone command The name and password are usually entered incorrectly in the address of the orangepi-build warehouse behind the git clone. Please check the spelling of the command carefully, instead of thinking that we forgot to provide the username and password of the github account.'''</big> | ||
+ | |} | ||
The u-boot and linux kernel versions currently used by the H618 series development boards are as follows: | The u-boot and linux kernel versions currently used by the H618 series development boards are as follows: | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''branch''' |
− | | style="text-align: | + | | style="text-align: center;"| '''u-boot version''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Linux kernel version''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''current''' |
− | | style="text-align: | + | | style="text-align: center;"| '''u-boot v2018.05''' |
− | | style="text-align: | + | | style="text-align: center;"| '''linux5.4''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''next''' |
− | | style="text-align: | + | | style="text-align: center;"| '''u-boot v2021.07''' |
− | | style="text-align: | + | | style="text-align: center;"| '''linux6.1''' |
|} | |} | ||
− | '''The branch mentioned here is not the same thing as the branch of the orangepi-build source code, please do not confuse it. This branch is mainly used to distinguish different kernel source code versions.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''The branch mentioned here is not the same thing as the branch of the orangepi-build source code, please do not confuse it. This branch is mainly used to distinguish different kernel source code versions.''' | ||
− | '''We currently define the linux5.4 bsp kernel provided by Allwinner as the current branch. The latest linux6.1 LTS kernel is defined as the next branch.''' | + | '''We currently define the linux5.4 bsp kernel provided by Allwinner as the current branch. The latest linux6.1 LTS kernel is defined as the next branch.'''</big> |
+ | |} | ||
After orangepi-build is downloaded, it will contain the following files and folders: | After orangepi-build is downloaded, it will contain the following files and folders: | ||
Line 5,656: | Line 7,727: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>'''build.sh''': Compile the startup script</p></li> | <li><p>'''build.sh''': Compile the startup script</p></li> | ||
− | <li><p>'''external''': Contains the configuration files needed to compile the | + | <li><p>'''external''': Contains the configuration files needed to compile the image, specific scripts, and the source code of some programs, etc.</p></li> |
<li><p>'''LICENSE''': GPL 2 license file</p></li> | <li><p>'''LICENSE''': GPL 2 license file</p></li> | ||
<li><p>'''README.md''': orangepi-build documentation</p></li> | <li><p>'''README.md''': orangepi-build documentation</p></li> | ||
<li><p>'''scripts''': General script for compiling linux images</p> | <li><p>'''scripts''': General script for compiling linux images</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''ls'''</p> | <p>test@test:~/orangepi-build$ '''ls'''</p> | ||
− | <p>'''build.sh external LICENSE README.md scripts'''</p> | + | <p>'''build.sh external LICENSE README.md scripts'''</p> |
− | <p>'''If you downloaded the code of orangepi-build from github, after downloading, you may find that orangepi-build does not contain the source code of u-boot and linux kernel, nor does u-boot and linux kernel need to use cross-compilation tools Chain, this is normal, because these things are stored in other separate github warehouses or some servers (the addresses will be detailed below). orangepi-build will specify the address of u-boot, linux kernel and cross-compilation toolchain in the script and configuration file. When running orangepi-build, when it finds that there are no such things locally, it will automatically go to the corresponding place to download them.'''</p></li></ol> | + | |} |
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big><p>'''If you downloaded the code of orangepi-build from github, after downloading, you may find that orangepi-build does not contain the source code of u-boot and linux kernel, nor does u-boot and linux kernel need to use cross-compilation tools Chain, this is normal, because these things are stored in other separate github warehouses or some servers (the addresses will be detailed below). orangepi-build will specify the address of u-boot, linux kernel and cross-compilation toolchain in the script and configuration file. When running orangepi-build, when it finds that there are no such things locally, it will automatically go to the corresponding place to download them.'''</p></big> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="download-the-cross-compilation-toolchain"></span> | <span id="download-the-cross-compilation-toolchain"></span> | ||
+ | |||
=== Download the cross-compilation toolchain === | === Download the cross-compilation toolchain === | ||
Line 5,671: | Line 7,752: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img295.png|1200px]] |
</div> | </div> | ||
The mirror URL of the cross-compilation toolchain in China is the open source software mirror site of Tsinghua University: | The mirror URL of the cross-compilation toolchain in China is the open source software mirror site of Tsinghua University: | ||
− | + | {| class="wikitable" style="width:800px;" | |
+ | |- | ||
+ | | | ||
+ | '''https://imola.armbian.com/dl/_toolchain/''' | ||
+ | |} | ||
After the '''toolchains''' are downloaded, it will contain multiple versions of the cross-compilation toolchain: | After the '''toolchains''' are downloaded, it will contain multiple versions of the cross-compilation toolchain: | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~/orangepi-build$ '''ls toolchains/''' | test@test:~/orangepi-build$ '''ls toolchains/''' | ||
− | gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi | + | gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu |
+ | |||
+ | gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu | ||
+ | |||
+ | gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi | ||
+ | |||
+ | gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf | ||
+ | |||
+ | gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi | ||
+ | |||
+ | gcc-linaro-aarch64-none-elf-4.8-2013.11_linux | ||
+ | |||
+ | gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu | ||
+ | |||
+ | gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf | ||
+ | |||
+ | gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux | ||
− | gcc-arm- | + | gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf |
− | gcc- | + | gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu |
− | + | gcc-linaro-arm-none-eabi-4.8-2014.04_linux | |
+ | |} | ||
The cross-compilation toolchain used to compile the H618 Linux kernel source code is: | The cross-compilation toolchain used to compile the H618 Linux kernel source code is: | ||
Line 5,694: | Line 7,799: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>linux5.4</p> | <li><p>linux5.4</p> | ||
− | <p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>linux6.1</p> | <li><p>linux6.1</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p> | <p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p> | ||
− | <p>The cross-compilation toolchain used to compile the H618 u-boot source code is:</p> | + | |} |
− | + | </li></ol> | |
+ | <p>The cross-compilation toolchain used to compile the H618 u-boot source code is:</p> | ||
<!-- --> | <!-- --> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>v2018.05</p> | <li><p>v2018.05</p> | ||
− | <p>'''gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>'''gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>v2021.07</p> | <li><p>v2021.07</p> | ||
− | <p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="orangepi-build-complete-directory-structure-description"></span> | <span id="orangepi-build-complete-directory-structure-description"></span> | ||
+ | |||
=== orangepi-build complete directory structure description === | === orangepi-build complete directory structure description === | ||
Line 5,712: | Line 7,837: | ||
<li><p>The orangepi-build repository does not contain the source code of the linux kernel, u-boot, and cross-compilation toolchain after downloading. The source code of the linux kernel and u-boot is stored in an independent git repository</p> | <li><p>The orangepi-build repository does not contain the source code of the linux kernel, u-boot, and cross-compilation toolchain after downloading. The source code of the linux kernel and u-boot is stored in an independent git repository</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The git warehouse where the linux kernel source code is stored | + | <li><p>The git warehouse where the linux kernel source code is stored is as follows, pay attention to switch the branch of the linux-orangepi warehouse to</p> |
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>Linux5.4</p> | + | <li><p>a) Linux5.4</p> |
− | <p>https://github.com/orangepi-xunlong/linux-orangepi/tree/ | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Linux6.1</p> | + | |- |
− | <p>https://github.com/orangepi-xunlong/linux-orangepi/tree/ | + | | |
+ | <p>https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-5.4-sun50iw9</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>b) Linux6.1</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-6.1-sun50iw9</p> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | </li> | ||
+ | <li><p>The git warehouse where the u-boot source code is stored is as follows, pay attention to switch the branch of the u-boot-orangepi warehouse to</p> | ||
+ | <ol style="list-style-type: none;"> | ||
+ | <li><p>a) v2018.05</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>https://github.com/orangepi-xunlong/u-boot-orangepi/tree/v2018.05-h618</p> | ||
+ | |} | ||
</li> | </li> | ||
− | <li><p> | + | <li><p>b) v2021.07</p> |
− | + | {| class="wikitable" style="width:800px;" | |
− | + | |- | |
− | <p>https://github.com/orangepi-xunlong/u-boot-orangepi/tree/ | + | | |
− | + | <p>https://github.com/orangepi-xunlong/u-boot-orangepi/tree/v2021.07-sunxi</p> | |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
</li></ol> | </li></ol> | ||
− | |||
− | |||
<ol start="2" style="list-style-type: decimal;"> | <ol start="2" style="list-style-type: decimal;"> | ||
Line 5,733: | Line 7,877: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>'''build.sh''': Compile the startup script</p></li> | <li><p>'''build.sh''': Compile the startup script</p></li> | ||
− | <li><p>'''external''': Contains the configuration files needed for | + | <li><p>'''external''': Contains the configuration files needed for compiling the image, scripts for specific functions, and the source code of some programs. The rootfs compressed package cached during the compiling process is also stored in external</p></li> |
<li><p>'''kernel''': Store the source code of the linux kernel</p></li> | <li><p>'''kernel''': Store the source code of the linux kernel</p></li> | ||
<li><p>'''LICENSE''': GPL 2 license file</p></li> | <li><p>'''LICENSE''': GPL 2 license file</p></li> | ||
<li><p>'''README.md''': orangepi-build documentation</p></li> | <li><p>'''README.md''': orangepi-build documentation</p></li> | ||
− | <li><p>'''output''': Store compiled u-boot, linux and other deb packages, | + | <li><p>'''output''': Store compiled u-boot, linux and other deb packages, compilation logs, and compiled images and other files</p></li> |
<li><p>'''scripts''': General script for compiling linux images</p></li> | <li><p>'''scripts''': General script for compiling linux images</p></li> | ||
<li><p>'''toolchains''': Store the cross-compilation toolchain</p></li> | <li><p>'''toolchains''': Store the cross-compilation toolchain</p></li> | ||
<li><p>'''u-boot''': Store the source code of u-boot</p></li> | <li><p>'''u-boot''': Store the source code of u-boot</p></li> | ||
− | <li><p>'''userpatches''': Store the configuration files needed to compile | + | <li><p>'''userpatches''': Store the configuration files needed to compile the script</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''ls'''</p> | <p>test@test:~/orangepi-build$ '''ls'''</p> | ||
− | <p>'''build.sh external kernel LICENSE output README.md scripts toolchains u-boot userpatches'''</p></li></ol> | + | <p>'''build.sh external kernel LICENSE output README.md scripts toolchains u-boot userpatches'''</p> |
+ | |} | ||
+ | </li></ol> | ||
</li></ol> | </li></ol> | ||
<span id="compile-u-boot"></span> | <span id="compile-u-boot"></span> | ||
+ | |||
== Compile u-boot == | == Compile u-boot == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Run the build.sh script, remember to add sudo permission</p> | <li><p>Run the build.sh script, remember to add sudo permission</p> | ||
− | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Select '''U-boot package''', then press Enter</p> | + | |- |
+ | | | ||
+ | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Select '''U-boot package''', then press Enter</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img296.png]] |
</div></li> | </div></li> | ||
<li><p>Then select the model of the development board</p> | <li><p>Then select the model of the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img297.png]]</p></li> |
<li><p>Then select the branch type of u-boot</p> | <li><p>Then select the branch type of u-boot</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The current branch will compile the u-boot v2018.05 code that | + | <li><p>The current branch will compile the u-boot v2018.05 code that needs to be used in the linux5.4 image</p></li> |
− | <li><p>The next branch will compile the u-boot v2021.07 version code | + | <li><p>The next branch will compile the u-boot v2021.07 version code that needs to be used in the linux6.1 image</p> |
− | <p>[[File: | + | <p>[[File:zero3-img298.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>Then it will start to compile u-boot, and part of the information prompted when compiling the next branch is as follows:</p> | <li><p>Then it will start to compile u-boot, and part of the information prompted when compiling the next branch is as follows:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>u-boot source code version</p> | <li><p>u-boot source code version</p> | ||
− | <p>[ o.k. ] Compiling u-boot [ '''v2021.07''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Compiling u-boot [ '''v2021.07''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The version of the cross-compilation toolchain</p> | <li><p>The version of the cross-compilation toolchain</p> | ||
− | <p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 11''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 11''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Path to the generated u-boot deb package</p> | <li><p>Path to the generated u-boot deb package</p> | ||
− | <p>[ o.k. ] Target directory [ '''orangepi-build/output/debs/u-boot''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Target directory [ '''orangepi-build/output/debs/u-boot''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The package name of the generated u-boot deb package</p> | <li><p>The package name of the generated u-boot deb package</p> | ||
− | <p>[ o.k. ] File name [ '''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] File name [ '''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Compilation time</p> | <li><p>Compilation time</p> | ||
− | <p>[ o.k. ] Runtime [ '''1 min''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Repeat the command to compile u-boot, use the following command | + | |- |
− | <p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=u-boot''' ]</p></li></ol> | + | | |
+ | <p>[ o.k. ] Runtime [ '''1 min''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Repeat the command to compile u-boot, use the following command to start compiling u-boot directly without selecting through the graphical interface</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=u-boot''' ]</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>View the u-boot deb package generated by compilation</p> | <li><p>View the u-boot deb package generated by compilation</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''ls output/debs/u-boot/'''</p> | <p>test@test:~/orangepi-build$ '''ls output/debs/u-boot/'''</p> | ||
− | <p>'''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb'''</p></li> | + | <p>'''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>When the orangepi-bulid compilation system compiles the u-boot source code, it will first synchronize the u-boot source code with the u-boot source code of the github server, so if you want to modify the u-boot source code, you first need to turn off the download and update function of the source code '''(This function needs to be fully compiled once u-boot, otherwise it will prompt that the source code of u-boot cannot be found)''', otherwise the changes made will be restored, the method is as follows:</p> | <li><p>When the orangepi-bulid compilation system compiles the u-boot source code, it will first synchronize the u-boot source code with the u-boot source code of the github server, so if you want to modify the u-boot source code, you first need to turn off the download and update function of the source code '''(This function needs to be fully compiled once u-boot, otherwise it will prompt that the source code of u-boot cannot be found)''', otherwise the changes made will be restored, the method is as follows:</p> | ||
<p>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to "yes"</p> | <p>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to "yes"</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p> | <p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p> | ||
<p>......</p> | <p>......</p> | ||
− | <p>IGNORE_UPDATES="'''yes'''"</p> | + | <p>IGNORE_UPDATES="'''<span style="color:#FF0000">yes</span>'''"</p> |
− | <p>......</p></li> | + | <p>......</p> |
+ | |} | ||
+ | </li> | ||
<li><p>When debugging u-boot code, you can use the following method to update u-boot in the linux image for testing</p> | <li><p>When debugging u-boot code, you can use the following method to update u-boot in the linux image for testing</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>First upload the compiled u-boot deb package to the linux system | + | <li><p>First upload the compiled u-boot deb package to the linux system of the development board</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''cd output/debs/u-boot'''</p> | <p>test@test:~/orangepi-build$ '''cd output/debs/u-boot'''</p> | ||
<p>test@test:~/orangepi_build/output/debs/u-boot$ '''scp \'''</p> | <p>test@test:~/orangepi_build/output/debs/u-boot$ '''scp \'''</p> | ||
− | <p>'''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb | + | <p>'''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb root@192.168.1.xxx:/root'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Install the new u-boot deb package just uploaded</p> | <li><p>Install the new u-boot deb package just uploaded</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo dpkg -i''' '''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo dpkg -i''' '''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then run the nand-sata-install script</p> | <li><p>Then run the nand-sata-install script</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo nand-sata-install'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo nand-sata-install'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Then select '''5 Install/Update the bootloader on SD/eMMC'''</p> | <li><p>Then select '''5 Install/Update the bootloader on SD/eMMC'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img299.png]]</p></li> |
<li><p>After pressing the Enter key, a Warning will pop up first</p> | <li><p>After pressing the Enter key, a Warning will pop up first</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img300.png]]</p></li> |
− | <li><p>Press the Enter key again to start updating u-boot, and the | + | <li><p>Press the Enter key again to start updating u-boot, and the following information will be displayed after the update</p> |
− | <p>[[File: | + | <p>[[File:zero3-img301.png]]</p></li> |
− | <li><p>Then you can restart the development board to test whether the | + | <li><p>Then you can restart the development board to test whether the modification of u-boot takes effect</p></li></ol> |
</li></ol> | </li></ol> | ||
<span id="compile-the-linux-kernel"></span> | <span id="compile-the-linux-kernel"></span> | ||
+ | |||
== Compile the linux kernel == | == Compile the linux kernel == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Run the '''build.sh''' script, remember to add sudo permission</p> | <li><p>Run the '''build.sh''' script, remember to add sudo permission</p> | ||
− | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>Select '''Kernel package''', then press Enter</p> | <li><p>Select '''Kernel package''', then press Enter</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img302.png]] |
</div></li> | </div></li> | ||
<li><p>Then you will be prompted whether you need to display the kernel configuration interface. If you do not need to modify the kernel configuration, select the first one. If you need to modify the kernel configuration, select the second one.</p> | <li><p>Then you will be prompted whether you need to display the kernel configuration interface. If you do not need to modify the kernel configuration, select the first one. If you need to modify the kernel configuration, select the second one.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img303.png]]</p></li> |
<li><p>Then select the model of the development board</p> | <li><p>Then select the model of the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img297.png]]</p></li> |
<li><p>Then select the branch type of the kernel source code</p> | <li><p>Then select the branch type of the kernel source code</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>current branch will compile linux5.4 kernel source code</p></li> | <li><p>current branch will compile linux5.4 kernel source code</p></li> | ||
<li><p>The next branch will compile the linux6.1 kernel source code</p> | <li><p>The next branch will compile the linux6.1 kernel source code</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img298.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>If you choose to display the kernel configuration menu (the second option) in step 3), the kernel configuration interface opened by '''make menuconfig''' will pop up. At this time, you can directly modify the kernel configuration, save and exit after modification. Yes, after exiting, it will start compiling the kernel source code.</p> | <li><p>If you choose to display the kernel configuration menu (the second option) in step 3), the kernel configuration interface opened by '''make menuconfig''' will pop up. At this time, you can directly modify the kernel configuration, save and exit after modification. Yes, after exiting, it will start compiling the kernel source code.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img304.png]]</p> |
− | |||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>If you do not need to modify the configuration options of the | + | <li><p>If you do not need to modify the configuration options of the kernel, when running the build.sh script, pass in '''KERNEL_CONFIGURE=no''' to temporarily block the pop-up kernel configuration interface</p> |
− | <p>test@test:~/orangepi-build$ '''sudo ./build.sh KERNEL_CONFIGURE=no'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>You can also set '''KERNEL_CONFIGURE=no''' in the | + | |- |
− | <li><p>If the following error is displayed when compiling the kernel, it is | + | | |
− | <p>[[File: | + | <p>test@test:~/orangepi-build$ '''sudo ./build.sh KERNEL_CONFIGURE=no'''</p> |
− | + | |} | |
+ | </li> | ||
+ | <li><p>You can also set '''KERNEL_CONFIGURE=no''' in the orangepi-build/userpatches/config-default.conf configuration file, which can permanently disable this function</p></li> | ||
+ | <li><p>If the following error is displayed when compiling the kernel, it is because the terminal interface of the Ubuntu PC is too small to display the make menuconfig interface. Please maximize the terminal of the Ubuntu PC and run the build.sh script again</p> | ||
+ | <p>[[File:zero3-img305.png]]</p></li></ol> | ||
+ | </li></ol> | ||
<!-- --> | <!-- --> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li><p>Part of the information prompted when compiling the next branch kernel source code is as | + | <li><p>Part of the information prompted when compiling the next branch kernel source code is as follows:</p> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The version of the linux kernel source code</p> | <li><p>The version of the linux kernel source code</p> | ||
− | <p>[ o.k. ] Compiling current kernel [ '''6.1.31''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Compiling current kernel [ '''6.1.31''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The version of the cross-compilation toolchain used</p> | <li><p>The version of the cross-compilation toolchain used</p> | ||
− | <p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 11''' ] | + | {| class="wikitable" style="width:800px;" |
− | + | |- | |
− | + | | | |
− | + | <p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 11''' ]</p> | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</li> | </li> | ||
− | <li><p> | + | <li><p>The configuration file used by the kernel by default and the path where it is stored are as follows</p> |
− | + | {| class="wikitable" style="width:800px;" | |
− | + | |- | |
− | + | | | |
− | + | <p>[ o.k. ] Using kernel config file [ '''orangepi-build/external/config/kernel/linux-6.1-sun50iw9-next.config''' ]</p> | |
− | + | |} | |
− | |||
− | |||
− | |||
</li> | </li> | ||
− | <li><p>When the orangepi-bulid compilation system compiles the linux kernel source code, it first synchronizes the linux kernel source code with the linux kernel source code of the github server, so if you want to modify the linux kernel source code, you first need to turn off the update function of the source code '''(the linux kernel needs to be fully compiled once This function can only be turned off after the source code, otherwise it will prompt that the source code of the linux kernel cannot be found)''', otherwise the changes made will be restored, the method is as | + | <li><p>The path of the deb package related to the kernel generated by compiling</p> |
− | <p>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to "yes"</p> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Target directory [ '''output/debs/''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>The package name of the compiled kernel image deb package</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] File name [ '''linux-image-next-sun50iw9_x.x.x_arm64.deb''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>The time used for compilation</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Runtime [ '''10 min''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Finally, the compilation command to repeatedly compile the kernel selected last time will be displayed. Use the following command to start compiling the kernel source code directly without selecting through the graphical interface</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=kernel KERNEL_CONFIGURE=no''' ]</p> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | </li> | ||
+ | <li><p>View the deb package related to the kernel generated by compilation</p> | ||
+ | <ol style="list-style-type: lower-alpha;"> | ||
+ | <li><p>'''linux-dtb-next-sun50iw9_x.x.x_arm64.deb''' Contains dtb files used by the kernel</p></li> | ||
+ | <li><p>'''linux-headers-next-sun50iw9_x.x.x_arm64.deb''' Include kernel headers</p></li> | ||
+ | <li><p>'''linux-image-next-sun50iw9_x.x.x_arm64.deb''' Contains kernel images and kernel modules</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>test@test:~/orangepi-build$ '''ls output/debs/linux-*'''</p> | ||
+ | <p>output/debs/linux-dtb-next-sun50iw9_x.x.x_arm64.deb</p> | ||
+ | <p>output/debs/linux-headers-next-sun50iw9_x.x.x_arm64.deb</p> | ||
+ | <p>output/debs/linux-image-next-sun50iw9_x.x.x_arm64.deb</p> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | </li> | ||
+ | <li><p>When the orangepi-bulid compilation system compiles the linux kernel source code, it first synchronizes the linux kernel source code with the linux kernel source code of the github server, so if you want to modify the linux kernel source code, you first need to turn off the update function of the source code '''(the linux kernel needs to be fully compiled once This function can only be turned off after the source code, otherwise it will prompt that the source code of the linux kernel cannot be found)''', otherwise the changes made will be restored, the method is as follows:</p> | ||
+ | <p>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to "yes"</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p> | <p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p> | ||
− | <p>IGNORE_UPDATES="'''yes'''"</p></li> | + | <p>IGNORE_UPDATES="'''<span style="color:#FF0000">yes</span>'''"</p> |
+ | |} | ||
+ | </li> | ||
<li><p>If the kernel has been modified, the following method can be used to update the kernel and kernel modules of the development board linux system</p> | <li><p>If the kernel has been modified, the following method can be used to update the kernel and kernel modules of the development board linux system</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>Upload the deb package of the compiled linux kernel to the linux | + | <li><p>Upload the deb package of the compiled linux kernel to the linux system of the development board</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''cd output/debs'''</p> | <p>test@test:~/orangepi-build$ '''cd output/debs'''</p> | ||
<p>test@test:~/orangepi-build/output/debs$ '''scp \'''</p> | <p>test@test:~/orangepi-build/output/debs$ '''scp \'''</p> | ||
− | <p>'''linux-image-next-sun50iw9_x.x.x_arm64.deb root@192.168.1.xxx:/root'''</p></li> | + | <p>'''linux-image-next-sun50iw9_x.x.x_arm64.deb root@192.168.1.xxx:/root'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Install the deb package of the new linux kernel just uploaded</p> | <li><p>Install the deb package of the new linux kernel just uploaded</p> | ||
− | <p>orangepi@orangepi:~$ '''sudo dpkg -i linux-image-next-sun50iw9_x.x.x_arm64.deb'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Then restart the development board, and then check whether the | + | |- |
− | <p>orangepi@orangepi:~$ '''sudo''' '''reboot'''</p></li></ol> | + | | |
− | </li></ol> | + | <p>orangepi@orangepi:~$ '''sudo dpkg -i linux-image-next-sun50iw9_x.x.x_arm64.deb'''</p> |
− | + | |} | |
+ | </li> | ||
+ | <li><p>Then restart the development board, and then check whether the kernel-related modifications have taken effect</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>orangepi@orangepi:~$ '''sudo''' '''reboot'''</p> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | </li></ol> | ||
+ | |||
<span id="compile-rootfs"></span> | <span id="compile-rootfs"></span> | ||
+ | |||
== Compile rootfs == | == Compile rootfs == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Run the build.sh script, remember to add sudo permission</p> | <li><p>Run the build.sh script, remember to add sudo permission</p> | ||
− | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Select '''Rootfs and all deb packages''', then press Enter</p | + | |- |
+ | | | ||
+ | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Select '''Rootfs and all deb packages''', then press Enter</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img306.png]] |
− | </div> | + | </div></li></ol> |
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Then select the model of the development board</p> | <li><p>Then select the model of the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img297.png]]</p></li> |
<li><p>Then select the branch type of the kernel source code, the type of rootfs maintained by different versions of the kernel source code is different</p> | <li><p>Then select the branch type of the kernel source code, the type of rootfs maintained by different versions of the kernel source code is different</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The current branch can see debian11, ubuntu20.04, ubuntu22.04 | + | <li><p>The current branch can see debian11, ubuntu20.04, ubuntu22.04 three options</p></li> |
− | <li><p>The next branch can see debian11, debian12, ubuntu22.04 three | + | <li><p>The next branch can see debian11, debian12, ubuntu22.04 three options</p> |
− | <p>[[File: | + | <p>[[File:zero3-img298.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>Then select the type of rootfs</p> | <li><p>Then select the type of rootfs</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img307.png]]</p></li> |
<li><p>Then select the type of image</p> | <li><p>Then select the type of image</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''Image with console interface (server)''' Indicates the image of | + | <li><p>'''Image with console interface (server)''' Indicates the image of the server version, which is relatively small</p></li> |
− | <li><p>'''Image with desktop environment''' Indicates a mirror image with | + | <li><p>'''Image with desktop environment''' Indicates a mirror image with a desktop, which is relatively large</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img308.png]] |
</div></li></ol> | </div></li></ol> | ||
Line 5,924: | Line 8,210: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img309.png]] |
</div></li> | </div></li> | ||
<li><p>If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently only XFCE is maintained, so please choose the XFCE type desktop</p> | <li><p>If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently only XFCE is maintained, so please choose the XFCE type desktop</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img310.png]]</p> |
− | <p>[[File: | + | <p>[[File:zero3-img311.png]]</p> |
<p>You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.</p> | <p>You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img312.png]]</p></li> |
<li><p>Then it will start to compile rootfs, and some information prompted during compilation is explained as follows</p> | <li><p>Then it will start to compile rootfs, and some information prompted during compilation is explained as follows</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The type of rootfs</p> | <li><p>The type of rootfs</p> | ||
− | <p>[ o.k. ] local not found [ Creating new rootfs cache for '''bullseye''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] local not found [ Creating new rootfs cache for '''bullseye''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>The storage path of the compiled rootfs compressed package</p> | <li><p>The storage path of the compiled rootfs compressed package</p> | ||
− | <p>[ o.k. ] Target directory [ '''orangepi-build/external/cache/rootfs''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>The name of the rootfs compressed package generated by | + | |- |
− | <p>[ o.k. ] File name [ '''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' ]</p></li></ol> | + | | |
+ | <p>[ o.k. ] Target directory [ '''orangepi-build/external/cache/rootfs''' ]</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>The name of the rootfs compressed package generated by compilation</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <p>[ o.k. ] File name [ '''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' ]</p> | ||
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>View the rootfs compressed package generated by compilation</p> | <li><p>View the rootfs compressed package generated by compilation</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' | + | <li><p>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' is the rootfs compressed package, the meaning of each field of the name is</p> |
− | <ol style="list-style-type: | + | <ol style="list-style-type: none;"> |
− | <li><p>'''bullseye''' indicates the type of linux distribution of | + | <li><p>a) '''bullseye''' indicates the type of linux distribution of rootfs</p></li> |
− | <li><p>'''xfce''' means rootfs is the type of desktop version, if it | + | <li><p>b) '''xfce''' means rootfs is the type of desktop version, if it is '''cli''', it means the type of server version</p></li> |
− | <li><p>'''arm64''' represents the architecture type of rootfs</p></li> | + | <li><p>c) '''arm64''' represents the architecture type of rootfs</p></li> |
− | <li><p>'''25250ec7002de9e81a41de169f1f89721''' is the MD5 hash value generated by the package names of all software packages installed by rootfs. As long as the list of software packages installed by rootfs is not modified, this value will not change. The compilation script will use this MD5 hash value to generate Determine whether rootfs needs to be recompiled</p></li></ol> | + | <li><p>d) '''25250ec7002de9e81a41de169f1f89721''' is the MD5 hash value generated by the package names of all software packages installed by rootfs. As long as the list of software packages installed by rootfs is not modified, this value will not change. The compilation script will use this MD5 hash value to generate Determine whether rootfs needs to be recompiled</p></li></ol> |
</li> | </li> | ||
− | <li><p>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list''' | + | <li><p>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list''' lists the package names of all packages installed by rootfs</p> |
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~/orangepi-build$ '''ls external/cache/rootfs/'''</p> | <p>test@test:~/orangepi-build$ '''ls external/cache/rootfs/'''</p> | ||
<p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4</p> | <p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4</p> | ||
<p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.current</p> | <p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.current</p> | ||
− | <p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list</p></li></ol> | + | <p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list</p> |
+ | |} | ||
+ | </li></ol> | ||
</li> | </li> | ||
<li><p>If the required rootfs already exists under '''external/cache/rootfs''', then compiling rootfs again will directly skip the compilation process and will not restart the compilation. When compiling the image, it will also go to '''external/cache/rootfs''' to find out whether it has If there is rootfs available in the cache, use it directly, which can save a lot of download and compilation time</p></li></ol> | <li><p>If the required rootfs already exists under '''external/cache/rootfs''', then compiling rootfs again will directly skip the compilation process and will not restart the compilation. When compiling the image, it will also go to '''external/cache/rootfs''' to find out whether it has If there is rootfs available in the cache, use it directly, which can save a lot of download and compilation time</p></li></ol> | ||
<span id="compile-linux-image"></span> | <span id="compile-linux-image"></span> | ||
+ | |||
== Compile linux image == | == Compile linux image == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Run the '''build.sh''' script, remember to add sudo permission</p> | <li><p>Run the '''build.sh''' script, remember to add sudo permission</p> | ||
− | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Select '''Full OS image for flashing''', then press Enter</p | + | |- |
+ | | | ||
+ | <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>Select '''Full OS image for flashing''', then press Enter</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img313.png]] |
− | </div> | + | </div></li></ol> |
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Then select the model of the development board</p> | <li><p>Then select the model of the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img297.png]]</p></li> |
<li><p>Then select the branch type of the kernel source code, the type of rootfs maintained by different versions of the kernel source code is different</p> | <li><p>Then select the branch type of the kernel source code, the type of rootfs maintained by different versions of the kernel source code is different</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>The current branch can see debian11, ubuntu20.04, ubuntu22.04 | + | <li><p>The current branch can see debian11, ubuntu20.04, ubuntu22.04 three options</p></li> |
− | <li><p>The next branch can see debian11, debian12, ubuntu22.04 three | + | <li><p>The next branch can see debian11, debian12, ubuntu22.04 three options</p> |
− | <p>[[File: | + | <p>[[File:zero3-img298.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>Then select the type of rootfs</p> | <li><p>Then select the type of rootfs</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img307.png]]</p></li> |
<li><p>Then select the type of image</p> | <li><p>Then select the type of image</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p>'''Image with console interface (server)''' Indicates the image of | + | <li><p>'''Image with console interface (server)''' Indicates the image of the server version, which is relatively small</p></li> |
− | <li><p>'''Image with desktop environment''' Indicates a mirror image with | + | <li><p>'''Image with desktop environment''' Indicates a mirror image with a desktop, which is relatively large</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img308.png]] |
</div></li></ol> | </div></li></ol> | ||
Line 5,995: | Line 8,307: | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img309.png]] |
</div></li> | </div></li> | ||
<li><p>If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently only XFCE is maintained, so please select the XFCE type desktop</p> | <li><p>If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently only XFCE is maintained, so please select the XFCE type desktop</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img310.png]]</p> |
− | <p>[[File: | + | <p>[[File:zero3-img311.png]]</p> |
<p>You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.</p> | <p>You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img312.png]]</p></li> |
<li><p>Then it will start to compile the linux image. The general process of compilation is as follows</p> | <li><p>Then it will start to compile the linux image. The general process of compilation is as follows</p> | ||
− | <p> | + | <ol style="list-style-type: lower-alpha;"> |
− | <p> | + | <li><p>Initialize the compilation environment of Ubuntu PC and install the software packages required for the compilation process</p></li> |
− | <p> | + | <li><p>Download the source code of u-boot and linux kernel (if cached, only update the code)</p></li> |
− | <p> | + | <li><p>Compile u-boot source code and generate u-boot deb package</p></li> |
− | <p> | + | <li><p>Compile the linux source code and generate linux-related deb packages</p></li> |
− | <p> | + | <li><p>Make the deb package of linux firmware</p></li> |
− | <p> | + | <li><p>Make the deb package of the orangepi-config tool</p></li> |
− | <p> | + | <li><p>Create a deb package supported by the board</p></li> |
− | <p> | + | <li><p>If you are compiling the desktop image, you will also create desktop-related deb packages</p></li> |
− | <p> | + | <li><p>Check whether the rootfs has been cached, if not, recreate the rootfs, if it has been cached, directly decompress and use</p></li> |
− | <p> | + | <li><p>Install the previously generated deb package into rootfs</p></li> |
− | <p> | + | <li><p>Make some specific settings for different development boards and different types of images, such as pre-installing additional software packages, modifying system configuration, etc.</p></li> |
− | <p> | + | <li><p>Then make an image file and format the partition, the default type is ext4</p></li> |
− | <p> | + | <li><p>Then copy the configured rootfs to the mirrored partition</p></li> |
− | <p> | + | <li><p>Then update initramfs</p></li> |
+ | <li><p>Finally, write the bin file of u-boot into the image through the dd command</p></li> | ||
+ | </ol></li> | ||
<li><p>After compiling the image, the following information will be prompted</p> | <li><p>After compiling the image, the following information will be prompted</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>The storage path of the compiled image</p> | <li><p>The storage path of the compiled image</p> | ||
− | <p>[ o.k. ] Done building [ '''output/images/orangepizero3_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop/orangepizero3_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop.img''' ]</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>Compilation time</p></li> | + | |- |
− | + | | | |
− | + | <p>[ o.k. ] Done building [ '''output/images/orangepizero3_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop/orangepizero3_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop.img''' ]</p> | |
+ | |} | ||
+ | </li> | ||
+ | <li><p>Compilation time</p></li> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
'''[ o.k. ] Runtime [ 19 min ]''' | '''[ o.k. ] Runtime [ 19 min ]''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: lower-alpha;"> | <ol start="3" style="list-style-type: lower-alpha;"> | ||
− | <li><p>Repeat the command to compile the image, and use the following | + | <li><p>Repeat the command to compile the image, and use the following command to start compiling the image directly without selecting through the graphical interface</p> |
− | <p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes''' ]</p></li></ol> | + | {| class="wikitable" style="width:800px;" |
− | + | |- | |
+ | | | ||
+ | <p>[ o.k. ] Repeat Build Options [ '''sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes''' ]</p> | ||
+ | |} | ||
+ | </li></ol> | ||
+ | </li></ol> | ||
<span id="android-12-tv-system-instructions"></span> | <span id="android-12-tv-system-instructions"></span> | ||
Line 6,039: | Line 8,365: | ||
== Supported Android versions == | == Supported Android versions == | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| Android version |
− | | style="text-align: | + | | style="text-align: center;"| kernel version |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Android 12 TV version''' |
− | | style="text-align: | + | | style="text-align: center;"| '''linux5.4''' |
|} | |} | ||
<span id="android-12-tv-function-adaptation"></span> | <span id="android-12-tv-function-adaptation"></span> | ||
+ | |||
== Android 12 TV function adaptation == | == Android 12 TV function adaptation == | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| Function |
− | | style="text-align: | + | | style="text-align: center;"| Android12 |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| HDMI Video |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| HDMI Audio |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| USB2.0 x 3 |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| TFcard boot |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| network card |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| infrared |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| WIFI |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| WIFI hotsport |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| Bluetooth |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| BLE Bluetooth |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| headphone audio |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| TV-OUT |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| USB camera |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| LED light |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| Temperature Sensor |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| Mali GPU |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| video codec |
− | | style="text-align: | + | | style="text-align: center;"| OK |
|} | |} | ||
<span id="onboard-led-light-display-instructions"></span> | <span id="onboard-led-light-display-instructions"></span> | ||
+ | |||
== Onboard LED light display instructions == | == Onboard LED light display instructions == | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
| | | | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Green Light''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Red Light''' |
|- | |- | ||
| '''u-boot startup phase''' | | '''u-boot startup phase''' | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Off''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Bright''' |
|- | |- | ||
| '''The kernel boots into the system''' | | '''The kernel boots into the system''' | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Bright''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Off''' |
|} | |} | ||
<span id="android-method-to-return-to-the-previous-interface"></span> | <span id="android-method-to-return-to-the-previous-interface"></span> | ||
+ | |||
== Android method to return to the previous interface == | == Android method to return to the previous interface == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>We generally use the mouse and keyboard to control the Android system of the development board. When entering certain interfaces and need to return to the previous interface or desktop, we can only return through the '''right mouse button''', and the keyboard cannot return.</p></li> | + | <li><p>We generally use the mouse and keyboard to control the Android system of the development board. When entering certain interfaces and need to return to the previous interface or desktop, we can only return through the '''<span style="color:#FF0000">right mouse button</span>''', and the keyboard cannot return.</p></li> |
<li><p>If you have purchased the infrared remote control (other remote control does not work) and the expansion board that match the development board, after inserting the expansion board into the development board, you can return to the previous menu through the return key in the remote control. The position of the return key is shown in the figure below shown:</p> | <li><p>If you have purchased the infrared remote control (other remote control does not work) and the expansion board that match the development board, after inserting the expansion board into the development board, you can return to the previous menu through the return key in the remote control. The position of the return key is shown in the figure below shown:</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img314.png]]</p></li></ol> |
<span id="how-to-use-adb"></span> | <span id="how-to-use-adb"></span> | ||
+ | |||
== How to use ADB == | == How to use ADB == | ||
Line 6,140: | Line 8,470: | ||
=== Use network connection adb debugging === | === Use network connection adb debugging === | ||
− | '''Using the network adb does not require a USB Type C interface data cable to connect the computer and the development board, but to communicate through the network, so first make sure that the wired or wireless network of the development board has been connected, and then obtain the IP address of the development board, and then to use.''' | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big>'''Using the network adb does not require a USB Type C interface data cable to connect the computer and the development board, but to communicate through the network, so first make sure that the wired or wireless network of the development board has been connected, and then obtain the IP address of the development board, and then to use.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Make sure that the '''service.adb.tcp.port''' of the Android system is set to port number 5555</p> | <li><p>Make sure that the '''service.adb.tcp.port''' of the Android system is set to port number 5555</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>apollo-p2:/ # '''getprop | grep "adb.tcp"'''</p> | <p>apollo-p2:/ # '''getprop | grep "adb.tcp"'''</p> | ||
− | <p>[service.adb.tcp.port]: [5555]</p></li> | + | <p>[service.adb.tcp.port]: [5555]</p> |
− | <li><p>If '''service.adb.tcp.port''' is not set, you can use the following command to set the port number of network adb in the serial port</p></li> | + | |} |
+ | </li> | ||
+ | <li><p>If '''service.adb.tcp.port''' is not set, you can use the following command to set the port number of network adb in the serial port</p></li> | ||
+ | |||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | apollo-p2:/ # '''setprop service.adb.tcp.port 5555''' | ||
− | |||
apollo-p2:/ # '''stop adbd''' | apollo-p2:/ # '''stop adbd''' | ||
apollo-p2:/ # '''start adbd''' | apollo-p2:/ # '''start adbd''' | ||
− | + | |} | |
+ | </ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Install adb tool on Ubuntu PC</p> | <li><p>Install adb tool on Ubuntu PC</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~$ '''sudo apt-get update'''</p> | <p>test@test:~$ '''sudo apt-get update'''</p> | ||
− | <p>test@test:~$ '''sudo apt-get install -y adb'''</p></li> | + | <p>test@test:~$ '''sudo apt-get install -y adb'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>Then connect network adb on Ubuntu PC</p> | <li><p>Then connect network adb on Ubuntu PC</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~$ '''adb connect 192.168.1.xxx:5555''' '''(It needs to be modified to the IP address of the development board)'''</p> | <p>test@test:~$ '''adb connect 192.168.1.xxx:5555''' '''(It needs to be modified to the IP address of the development board)'''</p> | ||
<p>* daemon not running; starting now at tcp:5037</p> | <p>* daemon not running; starting now at tcp:5037</p> | ||
<p>* daemon started successfully</p> | <p>* daemon started successfully</p> | ||
<p>connected to 192.168.1.xxx:5555</p> | <p>connected to 192.168.1.xxx:5555</p> | ||
+ | |||
+ | |||
<p>test@test:~$ '''adb devices'''</p> | <p>test@test:~$ '''adb devices'''</p> | ||
<p>List of devices attached</p> | <p>List of devices attached</p> | ||
− | <p>192.168.1.xxx:5555 device</p></li> | + | <p>192.168.1.xxx:5555 device</p> |
− | <li><p>Then you can log in to the android system through the adb shell on the Ubuntu PC</p | + | |} |
+ | </li> | ||
+ | <li><p>Then you can log in to the android system through the adb shell on the Ubuntu PC</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''adb shell''' | test@test:~$ '''adb shell''' | ||
apollo-p2:/ # | apollo-p2:/ # | ||
+ | |} | ||
+ | </li></ol> | ||
+ | <span id="use-the-data-cable-to-connect-to-adb-debugging"></span> | ||
− | |||
=== Use the data cable to connect to adb debugging === | === Use the data cable to connect to adb debugging === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Prepare a data cable with USB Type C interface, plug one end of the USB interface into the USB interface of the computer, and insert one end of the USB Type C interface into the power interface of the development board. In this case, the development board is powered by the USB interface of the computer, so please make sure that the USB interface of the computer can provide the most power to drive the development board</p> | <li><p>Prepare a data cable with USB Type C interface, plug one end of the USB interface into the USB interface of the computer, and insert one end of the USB Type C interface into the power interface of the development board. In this case, the development board is powered by the USB interface of the computer, so please make sure that the USB interface of the computer can provide the most power to drive the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img315.png]]</p></li> |
<li><p>Install adb tool on Ubuntu PC</p> | <li><p>Install adb tool on Ubuntu PC</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~$ '''sudo apt-get update'''</p> | <p>test@test:~$ '''sudo apt-get update'''</p> | ||
− | <p>test@test:~$ '''sudo apt-get install -y adb'''</p></li> | + | <p>test@test:~$ '''sudo apt-get install -y adb'''</p> |
+ | |} | ||
+ | </li> | ||
<li><p>View the identified ADB device</p> | <li><p>View the identified ADB device</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>test@test:~$ '''adb devices'''</p> | <p>test@test:~$ '''adb devices'''</p> | ||
<p>List of devices attached</p> | <p>List of devices attached</p> | ||
− | <p>4c00146473c28651dd0 device</p></li> | + | <p>4c00146473c28651dd0 device</p> |
− | <li><p>Then you can log in to the android system through the adb shell on the Ubuntu PC</p | + | |} |
+ | </li> | ||
+ | <li><p>Then you can log in to the android system through the adb shell on the Ubuntu PC</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
test@test:~$ '''adb shell''' | test@test:~$ '''adb shell''' | ||
apollo-p2:/ $ | apollo-p2:/ $ | ||
+ | |} | ||
+ | </li></ol> | ||
+ | <span id="view-the-method-of-setting-hdmi-display-resolution"></span> | ||
− | |||
== View the method of setting HDMI display resolution == | == View the method of setting HDMI display resolution == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First enter '''Settings'''</p> | <li><p>First enter '''Settings'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img316.png]]</p></li> |
<li><p>Then select '''Device Preferences'''</p> | <li><p>Then select '''Device Preferences'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img317.png]]</p></li> |
<li><p>Then select '''Display & Sound'''</p> | <li><p>Then select '''Display & Sound'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img318.png]]</p></li> |
<li><p>Then select '''Advanced display settings'''</p> | <li><p>Then select '''Advanced display settings'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img319.png]]</p></li> |
<li><p>Then select '''HDMI outpu mode'''</p> | <li><p>Then select '''HDMI outpu mode'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img320.png]]</p></li> |
<li><p>Then you can see the list of resolutions supported by the display. At this time, click the corresponding option to switch to the corresponding resolution. Please note that the resolutions supported by different monitors may be different. If you connect to a TV, you will generally see more resolution options than the picture below.</p> | <li><p>Then you can see the list of resolutions supported by the display. At this time, click the corresponding option to switch to the corresponding resolution. Please note that the resolutions supported by different monitors may be different. If you connect to a TV, you will generally see more resolution options than the picture below.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img321.png]]</p></li> |
<li><p>The HDMI output of the development board supports 4K display. When connected to a 4K TV, you can see the option of 4K resolution</p> | <li><p>The HDMI output of the development board supports 4K display. When connected to a 4K TV, you can see the option of 4K resolution</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img322.png]]</p></li></ol> |
<span id="hdmi-to-vga-display-test-1"></span> | <span id="hdmi-to-vga-display-test-1"></span> | ||
Line 6,216: | Line 8,592: | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>HDMI to VGA Converter</p> | <li><p>HDMI to VGA Converter</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img145.png]]</p></li> |
− | <li><p>A VGA cable and a Micro HDMI male to HDMI female conversion | + | <li><p>A VGA cable and a Micro HDMI male to HDMI female conversion cable</p> |
− | <p>[[File: | + | <p>[[File:zero3-img146-1.png|300px]] [[File:zero3-img147.png|300px]]</p></li> |
<li><p>A monitor or TV that supports VGA interface</p></li></ol> | <li><p>A monitor or TV that supports VGA interface</p></li></ol> | ||
</li> | </li> | ||
<li><p>HDMI to VGA display test as shown below</p> | <li><p>HDMI to VGA display test as shown below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img323.png]]</p> |
− | <p>'''When using HDMI to VGA display, the development board and the Android system of the development board do not need to make any settings, only the Micro HDMI interface of the development board can display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.'''</p></li></ol> | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" |
+ | |- | ||
+ | | | ||
+ | <big><p>'''When using HDMI to VGA display, the development board and the Android system of the development board do not need to make any settings, only the Micro HDMI interface of the development board can display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.'''</p></big> | ||
+ | |} | ||
+ | </li></ol> | ||
<span id="wi-fi-connection-method"></span> | <span id="wi-fi-connection-method"></span> | ||
+ | |||
== WI-FI connection method == | == WI-FI connection method == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First select '''Settings'''</p> | <li><p>First select '''Settings'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img316.png]]</p></li> |
<li><p>Then select '''Network & Internet'''</p> | <li><p>Then select '''Network & Internet'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img324.png]]</p></li> |
<li><p>Then open WI-FI</p> | <li><p>Then open WI-FI</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img325.png]]</p></li> |
<li><p>After turning on WI-FI, you can see the searched signal under '''Available networks'''</p> | <li><p>After turning on WI-FI, you can see the searched signal under '''Available networks'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img326.png]]</p></li> |
<li><p>After selecting the WI-FI you want to connect to, the password input interface shown in the figure below will pop up</p> | <li><p>After selecting the WI-FI you want to connect to, the password input interface shown in the figure below will pop up</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img327.png]] |
</div></li> | </div></li> | ||
− | <li><p>Then use the keyboard to enter the password corresponding to the WI-FI, and then use the '''mouse''' to click the Enter button in the virtual keyboard to start connecting to the WI-FI</p> | + | <li><p>Then use the keyboard to enter the password corresponding to the WI-FI, and then use the '''<span style="color:#FF0000">mouse</span>''' to click the Enter button in the virtual keyboard to start connecting to the WI-FI</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img328.png]] |
</div></li> | </div></li> | ||
<li><p>After the WI-FI connection is successful, the display is as shown in the figure below</p> | <li><p>After the WI-FI connection is successful, the display is as shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img329.png]]</p></li></ol> |
<span id="how-to-use-wi-fi-hotspot"></span> | <span id="how-to-use-wi-fi-hotspot"></span> | ||
+ | |||
== How to use WI-FI hotspot == | == How to use WI-FI hotspot == | ||
Line 6,258: | Line 8,641: | ||
<li><p>First, please make sure that the Ethernet port is connected to the network cable and can access the Internet normally</p></li> | <li><p>First, please make sure that the Ethernet port is connected to the network cable and can access the Internet normally</p></li> | ||
<li><p>Then select '''Settings'''</p> | <li><p>Then select '''Settings'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img316.png]]</p></li> |
<li><p>Then select '''Network & Internet'''</p> | <li><p>Then select '''Network & Internet'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img324.png]]</p></li> |
<li><p>Then select '''WIFI hotspot'''</p> | <li><p>Then select '''WIFI hotspot'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img330.png]]</p></li> |
<li><p>Then turn on '''Hotspot Enable''', you can also see the name and password of the generated hotspot in the figure below, remember them and use them when connecting to the hotspot (if you need to modify the name and password of the hotspot, you need to turn off '''Hotspot Enable''' first, before modifying)</p> | <li><p>Then turn on '''Hotspot Enable''', you can also see the name and password of the generated hotspot in the figure below, remember them and use them when connecting to the hotspot (if you need to modify the name and password of the hotspot, you need to turn off '''Hotspot Enable''' first, before modifying)</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img331.png]]</p></li> |
<li><p>At this point, you can take out your mobile phone. If everything is normal, you can find the WIFI hotspot with the same name '''(here AndroidAP_7132)''' displayed under the '''Hotspot name''' in the above picture in the WI-FI list searched by the mobile phone. Then you can click '''AndroidAP_7132''' to connect to the hotspot, and the password can be seen under the '''Hotspot password''' in the above picture</p> | <li><p>At this point, you can take out your mobile phone. If everything is normal, you can find the WIFI hotspot with the same name '''(here AndroidAP_7132)''' displayed under the '''Hotspot name''' in the above picture in the WI-FI list searched by the mobile phone. Then you can click '''AndroidAP_7132''' to connect to the hotspot, and the password can be seen under the '''Hotspot password''' in the above picture</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img332.png]]</p></li> |
<li><p>After the connection is successful, it will be displayed as shown in the figure below (the interface of different mobile phones will be different, the specific interface is subject to the display of your mobile phone). At this point, you can open a webpage on your mobile phone to see if you can access the Internet. If you can open the webpage normally, it means that the '''WI-FI Hotspot''' of the development board can be used normally.</p> | <li><p>After the connection is successful, it will be displayed as shown in the figure below (the interface of different mobile phones will be different, the specific interface is subject to the display of your mobile phone). At this point, you can open a webpage on your mobile phone to see if you can access the Internet. If you can open the webpage normally, it means that the '''WI-FI Hotspot''' of the development board can be used normally.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img333.png]]</p></li></ol> |
<span id="how-to-check-the-ip-address-of-the-ethernet-port"></span> | <span id="how-to-check-the-ip-address-of-the-ethernet-port"></span> | ||
Line 6,276: | Line 8,659: | ||
<li><p>First, please make sure that the Gigabit Ethernet port of the development board is connected to a router or switch</p></li> | <li><p>First, please make sure that the Gigabit Ethernet port of the development board is connected to a router or switch</p></li> | ||
<li><p>Then open '''Settings'''</p> | <li><p>Then open '''Settings'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img334.png]]</p></li> |
<li><p>Then select '''Network & Internet'''</p> | <li><p>Then select '''Network & Internet'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img335.png]]</p></li> |
<li><p>Then you can see the IP address of the development board's wired network port at the position shown in the figure below</p> | <li><p>Then you can see the IP address of the development board's wired network port at the position shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img336.png]]</p></li></ol> |
<span id="bluetooth-connection-method"></span> | <span id="bluetooth-connection-method"></span> | ||
Line 6,287: | Line 8,670: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First select '''Settings'''</p> | <li><p>First select '''Settings'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img316.png]]</p></li> |
<li><p>Then select '''Bluetooth'''</p> | <li><p>Then select '''Bluetooth'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img337.png]]</p></li> |
<li><p>Then open '''Bluetooth Enable'''</p> | <li><p>Then open '''Bluetooth Enable'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img338.png]]</p></li> |
<li><p>Then click '''Pair new device''' to start scanning the surrounding Bluetooth devices</p> | <li><p>Then click '''Pair new device''' to start scanning the surrounding Bluetooth devices</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img339.png]]</p></li> |
<li><p>The searched Bluetooth devices will be displayed under '''Available devices'''</p> | <li><p>The searched Bluetooth devices will be displayed under '''Available devices'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img340.png]]</p></li> |
<li><p>Then click the Bluetooth device you want to connect to start pairing. When the following interface pops up, please use the mouse to select the '''Pair''' option</p> | <li><p>Then click the Bluetooth device you want to connect to start pairing. When the following interface pops up, please use the mouse to select the '''Pair''' option</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img341.png]]</p></li> |
− | <li><p>The test here is the configuration process of the development board and the Bluetooth of the '''Android mobile phone'''. At this time, the following confirmation interface will pop up on the mobile phone. After clicking the pairing button on the mobile phone, the pairing process will start</p> | + | <li><p>The test here is the configuration process of the development board and the Bluetooth of the '''<span style="color:#FF0000">Android mobile phone</span>'''. At this time, the following confirmation interface will pop up on the mobile phone. After clicking the pairing button on the mobile phone, the pairing process will start</p> |
− | <p>[[File: | + | <p>[[File:zero3-img342.png]]</p></li> |
<li><p>After the pairing is complete, open '''Paired devices''' and you can see the paired Bluetooth devices</p> | <li><p>After the pairing is complete, open '''Paired devices''' and you can see the paired Bluetooth devices</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img343.png]]</p></li> |
<li><p>At this time, you can use the Bluetooth of your mobile phone to send a picture to the development board. After sending, you can see the following confirmation interface in the Android system of the development board, and then click '''Accept''' to start receiving the picture sent by the mobile phone.</p> | <li><p>At this time, you can use the Bluetooth of your mobile phone to send a picture to the development board. After sending, you can see the following confirmation interface in the Android system of the development board, and then click '''Accept''' to start receiving the picture sent by the mobile phone.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img344.png]]</p></li> |
<li><p>The pictures received by the Android system Bluetooth of the development board can be viewed in '''Received files'''</p> | <li><p>The pictures received by the Android system Bluetooth of the development board can be viewed in '''Received files'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img345.png]]</p></li></ol> |
<span id="how-to-use-the-usb-camera"></span> | <span id="how-to-use-the-usb-camera"></span> | ||
+ | |||
== How to use the USB camera == | == How to use the USB camera == | ||
Line 6,313: | Line 8,697: | ||
<li><p>First insert the USB (UVC protocol) camera into the USB interface of the development board</p></li> | <li><p>First insert the USB (UVC protocol) camera into the USB interface of the development board</p></li> | ||
<li><p>If the USB camera is recognized normally, a corresponding video device node will be generated under /dev</p> | <li><p>If the USB camera is recognized normally, a corresponding video device node will be generated under /dev</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>console:/ # '''ls /dev/video0'''</p> | <p>console:/ # '''ls /dev/video0'''</p> | ||
− | <p>/dev/video0</p></li> | + | <p>/dev/video0</p> |
− | <li><p>Then make sure that the adb connection between the Ubuntu PC and the development board is normal. For how to use adb, please refer to the instructions in the section on '''how to use ADB'''</p></li> | + | |} |
+ | </li> | ||
+ | <li><p>Then make sure that the adb connection between the Ubuntu PC and the development board is normal. For how to use adb, please refer to the instructions in the section on [[Orange Pi Zero 3#How to use ADB|'''how to use ADB''']]</p></li> | ||
<li><p>Download the USB camera test APP in the <span class="mark">official tool</span> on the development board data download page</p> | <li><p>Download the USB camera test APP in the <span class="mark">official tool</span> on the development board data download page</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img346.png]]</p> |
− | <p>[[File: | + | <p>[[File:zero3-img347.png]]</p></li> |
<li><p>Then use the adb command to install the USB camera test APP to the Android system, of course, you can also use the U disk to copy the installation</p> | <li><p>Then use the adb command to install the USB camera test APP to the Android system, of course, you can also use the U disk to copy the installation</p> | ||
− | <p>test@test:~$ '''adb install usbcamera.apk'''</p></li> | + | {| class="wikitable" style="width:800px;" |
− | <li><p>After installation, you can see the startup icon of the USB camera on the Android desktop</p> | + | |- |
− | <p>[[File: | + | | |
+ | <p>test@test:~$ '''adb install usbcamera.apk'''</p> | ||
+ | |} | ||
+ | </li> | ||
+ | <li><p>After installation, you can see the startup icon of the USB camera on the Android desktop</p> | ||
+ | <p>[[File:zero3-img348.png]]</p></li> | ||
<li><p>Then double-click to open the USB camera APP and you can see the output video of the USB camera</p></li></ol> | <li><p>Then double-click to open the USB camera APP and you can see the output video of the USB camera</p></li></ol> | ||
<span id="android-system-root-instructions"></span> | <span id="android-system-root-instructions"></span> | ||
+ | |||
== Android system ROOT instructions == | == Android system ROOT instructions == | ||
− | + | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | |
+ | |- | ||
+ | | | ||
+ | <big>'''The Android system released by Orange Pi has been ROOT, you can use the following method to test.'''</big> | ||
+ | |} | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>Download '''rootcheck.apk''' from the <span class="mark">official tool</span> on the development board data download page</p> | + | <li><p>Download '''rootcheck.apk''' from the <span class="mark">[http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.html '''official tool''']</span> on the development board data download page</p> |
− | <p>[[File: | + | <p>[[File:zero3-img349.png|1200px]]</p> |
− | <p>[[File: | + | <p>[[File:zero3-img350.png|1200px]]</p></li> |
− | <li><p>Then make sure that the adb connection between the Ubuntu PC and the development board is normal. For how to use adb, please refer to the instructions in the section on '''how to use ADB'''</p></li> | + | <li><p>Then make sure that the adb connection between the Ubuntu PC and the development board is normal. For how to use adb, please refer to the instructions in the section on [[Orange Pi Zero 3#How to use ADB|'''how to use ADB''']]</p></li> |
<li><p>Then use the adb command to install rootcheck.apk to the Android system, of course, you can also use the U disk to copy the installation</p> | <li><p>Then use the adb command to install rootcheck.apk to the Android system, of course, you can also use the U disk to copy the installation</p> | ||
− | <p>test@test:~$ '''adb install rootcheck.apk'''</p></li> | + | {| class="wikitable" style="width:800px;" |
+ | |- | ||
+ | | | ||
+ | <p>test@test:~$ '''adb install rootcheck.apk'''</p> | ||
+ | |} | ||
+ | </li> | ||
<li><p>After installation, you can see the startup icon of the ROOT test tool on the Android desktop</p> | <li><p>After installation, you can see the startup icon of the ROOT test tool on the Android desktop</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img351.png]]</p></li> |
<li><p>The display interface after opening the '''ROOT test tool''' for the first time is shown in the figure below</p> | <li><p>The display interface after opening the '''ROOT test tool''' for the first time is shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img352.png]]</p></li> |
<li><p>Then you can click '''CHECK NOW''' to start checking the ROOT status of the Android system. After the check, the display is as follows, and you can see that the Android system has obtained the ROOT permission</p> | <li><p>Then you can click '''CHECK NOW''' to start checking the ROOT status of the Android system. After the check, the display is as follows, and you can see that the Android system has obtained the ROOT permission</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img353.png]]</p></li></ol> |
<span id="the-method-of-using-miracastreceiver-to-cast-the-mobile-phone-screen-to-the-development-board"></span> | <span id="the-method-of-using-miracastreceiver-to-cast-the-mobile-phone-screen-to-the-development-board"></span> | ||
+ | |||
== The method of using MiracastReceiver to cast the mobile phone screen to the development board == | == The method of using MiracastReceiver to cast the mobile phone screen to the development board == | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
− | <li><p>First, please make sure that the development board and the mobile phone are connected to the same WIFI hotspot. For the method of connecting the development board to WIFI, please refer to the description in the section of '''WI-FI connection method'''</p></li> | + | <li><p>First, please make sure that the development board and the mobile phone are connected to the same WIFI hotspot. For the method of connecting the development board to WIFI, please refer to the description in the section of [[Orange Pi Zero 3#WI-FI connection method|'''WI-FI connection method''']]</p></li> |
<li><p>Then open the '''MiracastReceiver''' application in the Android system of the development board</p> | <li><p>Then open the '''MiracastReceiver''' application in the Android system of the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img354.png]]</p></li> |
<li><p>The interface after '''MiracastReceiver''' is opened is as follows</p> | <li><p>The interface after '''MiracastReceiver''' is opened is as follows</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img355.png]] |
</div></li> | </div></li> | ||
<li><p>Then find the screen projection function in the mobile phone settings. '''Here we take the Mi 12S Pro mobile phone as an example'''. Please research other brands of mobile phones by yourself. As shown in the figure below, click the button in the red box to open the screen projection function of the mobile phone</p> | <li><p>Then find the screen projection function in the mobile phone settings. '''Here we take the Mi 12S Pro mobile phone as an example'''. Please research other brands of mobile phones by yourself. As shown in the figure below, click the button in the red box to open the screen projection function of the mobile phone</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img356-1.png]]</p></li> |
<li><p>After waiting for a while, you can see the searched and connectable devices on the mobile phone, and then we can select the device corresponding to the development board to connect</p> | <li><p>After waiting for a while, you can see the searched and connectable devices on the mobile phone, and then we can select the device corresponding to the development board to connect</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img357-1.png]]</p></li> |
<li><p>Then the selection box shown in the figure below will pop up on the '''MiracastReceiver''' application interface of the development board, here we can select '''Accept'''</p> | <li><p>Then the selection box shown in the figure below will pop up on the '''MiracastReceiver''' application interface of the development board, here we can select '''Accept'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img358.png]]</p></li> |
<li><p>Then you can see the content of the mobile phone screen on the HDMI screen connected to the development board</p> | <li><p>Then you can see the content of the mobile phone screen on the HDMI screen connected to the development board</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img359-1.png]]</p></li></ol> |
<span id="pin-interface-gpio-uart-spi-test"></span> | <span id="pin-interface-gpio-uart-spi-test"></span> | ||
+ | |||
== 26pin interface GPIO, UART, SPI test == | == 26pin interface GPIO, UART, SPI test == | ||
Line 6,374: | Line 8,780: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>First open the wiringOP APP on the desktop</p> | <li><p>First open the wiringOP APP on the desktop</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img360.png]]</p></li> |
<li><p>Then click the '''GPIO_TEST''' button to open the GPIO test interface</p> | <li><p>Then click the '''GPIO_TEST''' button to open the GPIO test interface</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img361.png]]</p></li> |
<li><p>The GPIO test interface is shown in the figure below. There is a one-to-one correspondence between the two rows of '''CheckBox''' buttons on the left and the 26pin pins '''(PC1/PI16/PI6/PH10 in the lower left corner are GPIO ports in the 13pin pins)'''. When the '''CheckBox''' button is checked, the corresponding GPIO pin will be set to '''OUT''' mode, and the pin level will be set to high level; when the checkbox is unchecked, the GPIO pin level will be set to low level; When the '''GPIO READALL''' button is pressed, information such as the wPi number, GPIO mode, and pin level can be obtained.</p> | <li><p>The GPIO test interface is shown in the figure below. There is a one-to-one correspondence between the two rows of '''CheckBox''' buttons on the left and the 26pin pins '''(PC1/PI16/PI6/PH10 in the lower left corner are GPIO ports in the 13pin pins)'''. When the '''CheckBox''' button is checked, the corresponding GPIO pin will be set to '''OUT''' mode, and the pin level will be set to high level; when the checkbox is unchecked, the GPIO pin level will be set to low level; When the '''GPIO READALL''' button is pressed, information such as the wPi number, GPIO mode, and pin level can be obtained.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img362.png]]</p></li> |
− | <li><p>Then click the '''GPIO READALL''' button, the output information is as shown in the figure | + | <li><p>Then click the '''GPIO READALL''' button, the output information is as shown in the figure below:</p> |
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img363.png]] |
</div></li> | </div></li> | ||
<li><p>There are a total of 17 GPIO ports in the 26pin of the development board that can be used '''(if you add 4 GPIO ports in the 13pin, then there are 21 in total)''', and the following pin No. 7 - corresponding to GPIO is PC9 - corresponding to wPi The serial number is 2——as an example to demonstrate how to set the high and low levels of the GPIO port. First click the '''CheckBox''' button corresponding to pin 7. When the button is selected, pin 7 will be set to high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is '''3.3v''', it means setting high level success</p> | <li><p>There are a total of 17 GPIO ports in the 26pin of the development board that can be used '''(if you add 4 GPIO ports in the 13pin, then there are 21 in total)''', and the following pin No. 7 - corresponding to GPIO is PC9 - corresponding to wPi The serial number is 2——as an example to demonstrate how to set the high and low levels of the GPIO port. First click the '''CheckBox''' button corresponding to pin 7. When the button is selected, pin 7 will be set to high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is '''3.3v''', it means setting high level success</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img364.png]]</p></li> |
<li><p>Then click the '''GPIO READALL''' button, you can see that the current pin 7 mode is '''OUT''', and the pin level is high</p> | <li><p>Then click the '''GPIO READALL''' button, you can see that the current pin 7 mode is '''OUT''', and the pin level is high</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img365.png]]</p></li> |
<li><p>Click the '''CheckBox''' button in the figure below again to cancel the check status. Pin 7 will be set to low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is '''0v''', it means that the low level is set successfully.</p> | <li><p>Click the '''CheckBox''' button in the figure below again to cancel the check status. Pin 7 will be set to low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is '''0v''', it means that the low level is set successfully.</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img366.png]]</p></li> |
<li><p>Then click the '''GPIO READALL''' button, you can see that the current pin 7 mode is OUT, and the pin level is low</p> | <li><p>Then click the '''GPIO READALL''' button, you can see that the current pin 7 mode is OUT, and the pin level is low</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img367.png]]</p></li></ol> |
<span id="pin-uart-test-method"></span> | <span id="pin-uart-test-method"></span> | ||
Line 6,399: | Line 8,805: | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>'''UART5''' is enabled by default in Android, and the corresponding device node is '''/dev/ttyAS5'''</p> | <li><p>'''UART5''' is enabled by default in Android, and the corresponding device node is '''/dev/ttyAS5'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>apollo-p2:/ # '''ls /dev/ttyAS5'''</p> | <p>apollo-p2:/ # '''ls /dev/ttyAS5'''</p> | ||
− | <p>/dev/ttyAS5</p></li> | + | <p>/dev/ttyAS5</p> |
+ | |} | ||
+ | </li> | ||
<li><p>First open the wiringOP APP on the desktop</p> | <li><p>First open the wiringOP APP on the desktop</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img360.png]]</p></li> |
<li><p>Then click the '''UART_TEST''' button to open the UART test interface</p> | <li><p>Then click the '''UART_TEST''' button to open the UART test interface</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img368.png]]</p></li> |
− | <li><p>The serial port test interface of wiringOP is shown in the figure below</p></li> | + | <li><p>The serial port test interface of wiringOP is shown in the figure below</p></li> |
− | |||
− | |||
+ | [[File:zero3-img369.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>Then select the '''/dev/ttyAS5''' node in the selection box</p> | <li><p>Then select the '''/dev/ttyAS5''' node in the selection box</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img370.png]]</p></li> |
− | <li><p>Enter the baud rate you want to set in the edit box, and then click the '''OPEN''' button to open the '''/dev/ttyAS5''' node. After the opening is successful, the '''OPEN''' button becomes unselectable, and the '''CLOSE''' button and '''SEND''' button become selectable.</p></li> | + | <li><p>Enter the baud rate you want to set in the edit box, and then click the '''OPEN''' button to open the '''/dev/ttyAS5''' node. After the opening is successful, the '''OPEN''' button becomes unselectable, and the '''CLOSE''' button and '''SEND''' button become selectable.</p></li> |
− | |||
− | |||
+ | [[File:zero3-img371.png]] | ||
+ | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
− | <li>Then use Dupont wire to short the rx and tx pins of uart5 | + | <li>Then use Dupont wire to short the rx and tx pins of uart5 |
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
| | | | ||
− | | style="text-align: | + | | style="text-align: center;"| uart5 |
|- | |- | ||
| Tx pin | | Tx pin | ||
− | | style="text-align: | + | | style="text-align: center;"| Corresponding to pin 8 of 26pin |
|- | |- | ||
| Rx pin | | Rx pin | ||
− | | style="text-align: | + | | style="text-align: center;"| Corresponding to pin 10 of 26pin |
|} | |} | ||
− | + | </li></ol> | |
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
− | <li>Then you can enter a character in the send edit box below, click the '''SEND''' button to start sending</li> | + | <li>Then you can enter a character in the send edit box below, click the '''SEND''' button to start sending</li> |
− | |||
− | |||
+ | [[File:zero3-img372.png]] | ||
+ | </ol> | ||
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
− | <li>If everything is normal, the received string will be displayed in the receiving box</li | + | <li>If everything is normal, the received string will be displayed in the receiving box</li> |
− | [[File: | + | [[File:zero3-img373.png]] |
+ | </ol> | ||
+ | <span id="pin-spi-test-method"></span> | ||
− | |||
=== 26pin SPI test method === | === 26pin SPI test method === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The SPI that can be used in 26pin is SPI1, and the corresponding device node is '''/dev/spidev1.1'''</p> | <li><p>The SPI that can be used in 26pin is SPI1, and the corresponding device node is '''/dev/spidev1.1'''</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img360.png]]</p></li> |
− | <li><p>Here is a demonstration to test the SPI1 interface through the '''w25q64''' module, first connect the w25q64 module to the SPI1 interface</p> | + | <li><p>Here is a demonstration to test the SPI1 interface through the '''w25q64''' module, first connect the w25q64 module to the SPI1 interface</p> |
− | |||
− | |||
+ | {| class="wikitable" style="background-color:#ffffdc;width:800px;" | ||
+ | |- | ||
+ | | | ||
+ | <big>'''It doesn't matter if there is no w25q64 module, because there is a SPIFlash connected to SPI0 on the development board, and the configuration of SPI0 is also enabled by default in Android, so we can also directly use the onboard SPIFlash test.'''</big> | ||
+ | |} | ||
+ | </li></ol> | ||
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li><p>Then open the wiringOP APP on the desktop</p></li> | <li><p>Then open the wiringOP APP on the desktop</p></li> | ||
<li><p>Then click the '''SPI_TEST''' button to open the SPI test interface</p> | <li><p>Then click the '''SPI_TEST''' button to open the SPI test interface</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img374.png]]</p></li> |
<li><p>Then select the spi device node in the upper left corner. If you directly test the onboard SPIFlash, then keep the default '''/dev/spidev0.0'''. If you connect the '''w25q64''' module to the 26pin spi1, then please select /dev '''/dev/spidev1.1'''</p> | <li><p>Then select the spi device node in the upper left corner. If you directly test the onboard SPIFlash, then keep the default '''/dev/spidev0.0'''. If you connect the '''w25q64''' module to the 26pin spi1, then please select /dev '''/dev/spidev1.1'''</p> | ||
<div class="figure"> | <div class="figure"> | ||
− | [[File: | + | [[File:zero3-img375.png]] |
</div></li> | </div></li> | ||
− | <li><p>Then click the '''OPEN''' button to initialize the SPI</p></li> | + | <li><p>Then click the '''OPEN''' button to initialize the SPI</p></li> |
− | |||
− | |||
+ | [[File:zero3-img376.png]] | ||
+ | </ol> | ||
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
<li><p>Then fill in the bytes that need to be sent, such as reading the ID information of the onboard SPIFlash, fill in the address 0x9f in data[0], and then click the '''TRANSFER''' button</p> | <li><p>Then fill in the bytes that need to be sent, such as reading the ID information of the onboard SPIFlash, fill in the address 0x9f in data[0], and then click the '''TRANSFER''' button</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img377.png]]</p></li> |
− | <li><p>Finally, the APP will display the read ID information of the onboard SPI Flash</p></li> | + | <li><p>Finally, the APP will display the read ID information of the onboard SPI Flash</p></li> |
− | |||
− | |||
+ | [[File:zero3-img378.png]] | ||
+ | </ol> | ||
<ol start="9" style="list-style-type: decimal;"> | <ol start="9" style="list-style-type: decimal;"> | ||
<li><p>If it is to read the w25q64 module connected to 26pin SPI1, then the read ID information is shown in the figure below</p> | <li><p>If it is to read the w25q64 module connected to 26pin SPI1, then the read ID information is shown in the figure below</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img379.png]]</p></li> |
<li><p>The MANUFACTURER ID of the w25q64 module is EFh, and the Device ID is 4017h, corresponding to the value read above (h stands for hexadecimal)</p> | <li><p>The MANUFACTURER ID of the w25q64 module is EFh, and the Device ID is 4017h, corresponding to the value read above (h stands for hexadecimal)</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img380.png]]</p></li></ol> |
<span id="pin-i2c-test-method"></span> | <span id="pin-i2c-test-method"></span> | ||
+ | |||
=== 26pin I2C test method === | === 26pin I2C test method === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>The i2c3 in 26pin is enabled by default in Android, and the corresponding device node is '''/dev/i2c-3'''</p> | <li><p>The i2c3 in 26pin is enabled by default in Android, and the corresponding device node is '''/dev/i2c-3'''</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>apollo-p2:/ # '''ls /dev/i2c-3'''</p> | <p>apollo-p2:/ # '''ls /dev/i2c-3'''</p> | ||
− | <p>/dev/i2c-3</p></li> | + | <p>/dev/i2c-3</p> |
+ | |} | ||
+ | </li> | ||
<li><p>First open the wiringOP APP on the desktop</p> | <li><p>First open the wiringOP APP on the desktop</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img360.png]]</p></li> |
<li><p>Then click the '''I2C_TEST''' button to open the i2c test interface</p> | <li><p>Then click the '''I2C_TEST''' button to open the i2c test interface</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img381.png]]</p></li> |
− | <li><p>The i2c test interface of wiringOP is shown in the figure below. You can see that the default i2c is '''/dev/i2c-3''', so we | + | <li><p>The i2c test interface of wiringOP is shown in the figure below. You can see that the default i2c is '''/dev/i2c-3''', so we don't need to re-select</p></li> |
− | |||
− | |||
+ | [[File:zero3-img382.png]] | ||
+ | </ol> | ||
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
<li><p>Then connect an i2c device to the 26pin i2c3 pin, here we take the ds1307 rtc module as an example</p> | <li><p>Then connect an i2c device to the 26pin i2c3 pin, here we take the ds1307 rtc module as an example</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img186.png]]</p></li> |
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Pins of the RTC module''' |
− | | style="text-align: | + | | style="text-align: center;"| '''The pin corresponding to the 26pin of the development board''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''5V''' |
− | | style="text-align: | + | | style="text-align: center;"| '''pin 2''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''GND''' |
− | | style="text-align: | + | | style="text-align: center;"| '''pin 6''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''SDA''' |
− | | style="text-align: | + | | style="text-align: center;"| '''pin 3''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''SCL''' |
− | | style="text-align: | + | | style="text-align: center;"| '''pin 5''' |
|} | |} | ||
− | + | </ol> | |
<ol start="6" style="list-style-type: decimal;"> | <ol start="6" style="list-style-type: decimal;"> | ||
<li><p>The i2c address of the ds1307 rtc module is 0x68. After connecting the wires, we can use the '''i2cdetect -y 3''' command in the serial port command line to check whether the i2c address of the ds1307 rtc module can be scanned. As shown in the figure below, if you can see the address 0x68, it means that the wiring of the ds1307 rtc module is correct.</p> | <li><p>The i2c address of the ds1307 rtc module is 0x68. After connecting the wires, we can use the '''i2cdetect -y 3''' command in the serial port command line to check whether the i2c address of the ds1307 rtc module can be scanned. As shown in the figure below, if you can see the address 0x68, it means that the wiring of the ds1307 rtc module is correct.</p> | ||
+ | {| class="wikitable" style="width:800px;" | ||
+ | |- | ||
+ | | | ||
<p>apollo-p2:/ # '''i2cdetect -y 3'''</p> | <p>apollo-p2:/ # '''i2cdetect -y 3'''</p> | ||
− | <p>[[File: | + | |} |
+ | <p>[[File:zero3-img383.png]]</p></li> | ||
<li><p>Then set the address of i2c to 0x68 in wiringOP, and then click the '''OPEN''' button to open i2c3</p> | <li><p>Then set the address of i2c to 0x68 in wiringOP, and then click the '''OPEN''' button to open i2c3</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img384.png]]</p></li> |
− | <li><p>The display after clicking the '''OPEN''' button to open i2c3 is as | + | <li><p>The display after clicking the '''OPEN''' button to open i2c3 is as follows:</p> |
− | <p>[[File: | + | <p>[[File:zero3-img385.png]]</p></li> |
<li><p>Then we test to write a value into the register of the rtc module, for example, write 0x55 to the 0x1c address</p> | <li><p>Then we test to write a value into the register of the rtc module, for example, write 0x55 to the 0x1c address</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
<li><p>We first set the address of the register to be written to 0x1c</p> | <li><p>We first set the address of the register to be written to 0x1c</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img386.png]]</p></li> |
<li><p>Then set the value to be written to 0x55</p> | <li><p>Then set the value to be written to 0x55</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img387.png]]</p></li> |
<li><p>Then click the '''WRITE BYTE''' button to execute the write action</p> | <li><p>Then click the '''WRITE BYTE''' button to execute the write action</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img388.png]]</p></li></ol> |
</li> | </li> | ||
<li><p>Then click the '''READ BYTE''' button to read the value of the 0x1c register, if it is displayed as 0x55, it means that the i2c read and write test has passed</p> | <li><p>Then click the '''READ BYTE''' button to read the value of the 0x1c register, if it is displayed as 0x55, it means that the i2c read and write test has passed</p> | ||
− | <p>[[File: | + | <p>[[File:zero3-img389.png]]</p></li></ol> |
<span id="appendix"></span> | <span id="appendix"></span> | ||
Line 6,542: | Line 8,968: | ||
== User Manual Update History == | == User Manual Update History == | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;" |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| '''Version''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Date''' |
− | | style="text-align: | + | | style="text-align: center;"| '''Update Notes''' |
|- | |- | ||
− | | style="text-align: | + | | style="text-align: center;"| v1.0 |
− | | style="text-align: | + | | style="text-align: center;"| 2023-07-05 |
− | | style="text-align: | + | | style="text-align: center;"| initial version |
+ | |- | ||
+ | | style="text-align: center;"| v1.1 | ||
+ | | style="text-align: center;"| 2023-07-14 | ||
+ | | style="text-align: center;"| Add the compilation method of Android 12 source code | ||
|} | |} | ||
<span id="image-update-history"></span> | <span id="image-update-history"></span> | ||
+ | |||
== Image update history == | == Image update history == | ||
− | {| class="wikitable" | + | {| class="wikitable" style="width:800px;text-align: center;" |
|- | |- | ||
− | | | + | | '''Date''' |
| '''Update Notes''' | | '''Update Notes''' | ||
|- | |- | ||
− | | | + | | 2023-07-05 |
| Orangepizero3_1.0.0_ubuntu_jammy_server_linux5.4.125.7z | | Orangepizero3_1.0.0_ubuntu_jammy_server_linux5.4.125.7z | ||
Orangepizero3_1.0.0_debian_bullseye_server_linux5.4.125.7z | Orangepizero3_1.0.0_debian_bullseye_server_linux5.4.125.7z | ||
− | + | Orangepizero3_1.0.0_ubuntu_focal_desktop_xfce_linux5.4.125.7z | |
+ | |||
+ | Orangepizero3_1.0.0_ubuntu_jammy_desktop_xfce_linux5.4.125.7z | ||
− | + | Orangepizero3_1.0.0_debian_bullseye_desktop_xfce_linux5.4.125.7z | |
− | |||
Orangepizero3_1.0.0_ubuntu_jammy_server_linux6.1.31.7z | Orangepizero3_1.0.0_ubuntu_jammy_server_linux6.1.31.7z | ||
Line 6,579: | Line 9,011: | ||
Orangepizero3_1.0.0_debian_bullseye_server_linux6.1.31.7z | Orangepizero3_1.0.0_debian_bullseye_server_linux6.1.31.7z | ||
− | + | Orangepizero3_1.0.0_ubuntu_jammy_desktop_xfce_linux6.1.31.7z | |
+ | |||
+ | Orangepizero3_1.0.0_debian_bookworm_desktop_xfce_linux6.1.31.7z | ||
− | + | Orangepizero3_1.0.0_debian_bullseye_desktop_xfce_linux6.1.31.7z | |
− | |||
OrangePi_Zero3_Android12_v1.0.tar.gz | OrangePi_Zero3_Android12_v1.0.tar.gz | ||
− | |||
+ | : *initial version | ||
+ | |- | ||
+ | | 2023-07-13 | ||
+ | | | ||
+ | Opios-arch-aarch64-xfce-opizero3-23.07-linux6.1.31.img.xz | ||
+ | |||
+ | |||
+ | : *initial version | ||
|} | |} |
Latest revision as of 10:19, 19 July 2023
Basic features of Orange Pi Zero 3
What is Orange Pi Zero 3
Orange Pi is an open source single-board card computer, a new generation of arm64 development board, which can run Android TV 12, Ubuntu and Debian and other operating systems. Orange Pi Zero 3 uses Allwinner H618 system-on-a-chip and has 1GB or 1.5GB or 2GB or 4GB LPDDR4 memory.
Purpose of Orange Pi Zero 3
We can use it to achieve:
- A small Linux desktop computer
- A small Linux web server
- Install the Klipper host computer to control the 3D printer
- Android TV box
Of course, there are more functions. Relying on a powerful ecosystem and a variety of expansion accessories, Orange Pi can help users easily realize the delivery from idea to prototype to mass production. It is a maker, dreamer, hobby The ideal creative platform for readers. |
Who is Orange Pi Zero 3 designed for?
The Orange Pi development board is not just a consumer product, but is designed for anyone who wants to use technology to create and innovate. It's a simple, fun, and useful tool you can use to shape the world around you.
Hardware Features of Orange Pi Zero 3
Introduction to hardware features
| |
CPU | Allwinner H618 quad-core 64-bit 1.5GHz high-performance Cortex-A53 processor |
GPU | Mali G31 MP2
Supports OpenGL ES 1.0/2.0/3.2、OpenCL 2.0 |
Memory | 1GB/1.5GB/2GB/4GB LPDDR4 (shared with GPU) |
Onboard storage | micro SD card slot, 16MB SPI Flash |
Ethernet | Support 10/100M/1000M Ethernet |
WIFI+Bluetooth |
AW859A chip, support IEEE 802.11 a/b/g/n/ac, BT5.0 |
Video Output |
Micro HDMI 2.0a TV CVBS output, support PAL/NTSC (via 13pin expansion board) |
Audio output |
Micro HDMI output 3.5mm audio port (via 13pin expansion board) |
Power Supply | USB Type C interface input |
USB 2.0 port | 3 * USB 2.0 HOST (two of them are through 13pin expansion board) |
26pin connector | With I2Cx1, SPIx1, UARTx1 and multiple GPIO ports |
13pin connector | With USB 2.0 HOSTx2, TV-OUT, LINE OUT, IR-RX, and 3 GPIO ports |
Debug serial port | UART-TX, UART-RX and GND |
LED light | Power light and status light |
Infrared receiver | Support infrared remote control (via 13pin expansion board) |
Supported OS | Android12 TV, Ubuntu, Debian, etc. |
Introduction of Appearance Specifications
| |
Product Size | 85mm×56mm |
Weight | 30g |
Top view and bottom view of Orange Pi Zero 3
Top view:
Bottom view:
Interface details of Orange Pi Zero 3
The diameters of the four positioning holes are all 3.0mm. |
Introduction to the use of the development board
Prepare the required accessories
- Micro SD card, a high-speed SanDisk card of class 10 or above with a minimum capacity of 8GB
Using other brands of micro SD cards (non-SanDisk micro SD cards), as shown in the picture below (including but not limited to these cards), some friends have reported that there will be problems during the system startup process, such as the system is stuck halfway through startup, Or the reboot command cannot be used normally, and it was finally resolved after changing the SanDisk micro SD card. So if you use a non-SanDisk micro SD card and find that there is a problem with the system startup or use, please replace the SanDisk micro SD card and then test.
Current feedback is that there are some micro SD cards that have problems starting on Orange Pi Zero 3
In addition, the micro SD card that can be used normally on other types of development boards does not guarantee that it can be started normally on Orange Pi Zero 3, please pay special attention to this point.
- Micro HDMI to HDMI cable, used to connect the development board to an HDMI monitor or TV for display
Note, please do not use the relatively wide Micro HDMI adapter as shown in the figure below, because the distance between the Micro HDMI interface of the development board and the Type-C power interface is relatively small, it may cause that the two cannot be inserted into the development board at the same time. plate. |
- Power supply, if you have a 5V/2A or 5V/3A power head, you only need to prepare a USB-to-Type C interface data cable as shown in the picture on the left below, and you can also use a cable similar to the picture on the right below A 5V/2A or 5V/3A high-quality USB Typc C interface power adapter integrated with the power head.
13pin expansion board
- The way to insert the expansion board into the development board is as follows, remember not to insert it backwards
- The 13pin pin header on the Orange Pi Zero 3 development board can be connected to the expansion board to expand the functions that are not on the development board. The functions that the expansion board can use are as follows
1 Microphone (Mic) No support, no support, no support! ! !
The 13pin expansion board is a general-purpose expansion board, which is suitable for various development boards of Orange Pi, but the 13pin interface of Orange Pi Zero3 has no Mic function, so although there is a Mic on the 13pin expansion board, it is on the Orange Pi Zero 3. Unusable, the 13pin expansion board is mainly used to expand functions other than Mic on Orange Pi Zero 3.2 Analog audio and video output interface Supported, it can be used to connect headphones to play music, or connect to TV through AV cable to output analog audio and video signals (Android system only). 3 USB 2.0 Host x 2 Support, used to connect USB keyboard, mouse and USB storage device. 4 Infrared receiving function Support, Android system can be controlled by infrared remote control.
The mouse and keyboard of the USB interface, as long as the mouse and keyboard of the standard USB interface are acceptable, the mouse and keyboard can be used to control the Orange Pi development board
Infrared remote control, mainly used to control Android TV system
Note that the remote control of the air conditioner or the remote control of the TV cannot control the Orange Pi development board. By default, only the remote control provided by Orange Pi can. |
100M or 1000M network cable, used to connect the development board to the Internet
AV video cable, if you want to display video through the AV interface instead of the HDMI interface, then you need to connect the development board to the TV through the AV video cable
- Heat sink, if you are worried that the temperature of the development board is too high, you can add a heat sink, and the heat sink can be pasted on the H618 chip
- 5V cooling fan, as shown in the figure below, both 5V and GND pins on the 26pin and 13pin interfaces of the development board can be connected to the cooling fan. The spacing between the 26pin and 13pin headers is 2.54mm. Refer to this Specifications can be purchased.
Note that the 5V pin can be used directly after the development board is plugged in without other settings, and the output voltage of the 5V pin cannot be adjusted or turned off by software. |
Matching shell (pictures to be added)
USB to TTL module and DuPont line, when using the serial port debugging function, need USB to TTL module and DuPont line to connect the development board and computer
Note that the TTL level used by the development board is 3.3v. In addition to the USB to TTL module shown in the above figure, other similar 3.3v USB to TTL modules are generally available. |
- X64 computer with Ubuntu and Windows operating systems installed
1 | Ubuntu22.04 PC | Optional, used to compile Android and Linux source code |
2 | Windows PC | For burning Android and Linux images |
- The website for downloading the English version is
The information mainly includes
Android source code: Save on Google Drive
Linux source code:Save on Github
Android source code:Save on Google Drive
Ubuntu source code:Save on Google Drive
Debian source code:Save on Google Drive
User Manual and Schematic:Chip-related data sheets will also be placed here
Official tool:It mainly includes the software that needs to be used during the use of the development board
Method of burning Linux image to micro SD card based on Windows PC
Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the Orange Pi data download page. |
How to use balenaEtcher to burn Linux image
- First prepare a micro SD card with a capacity of 8GB or more. The transmission speed of the micro SD card must be class 10 or above. It is recommended to use a micro SD card of SanDisk and other brands
- Then use the card reader to insert the micro SD card into the computer
- Download the Linux operating system image file compression package that you want to burn from the Orange Pi data download page, and then use the decompression software to decompress it. Among the decompressed files, the file ending with ".img" is the image file of the operating system. The size is generally more than 1GB
- Then download the burning software of Linux image——balenaEtcher, the download address is
- After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded
- Then you can choose to download the Portable version of balenaEtcher software. The Portable version does not need to be installed, and you can use it by double-clicking to open it
- If the downloaded version of balenaEtcher needs to be installed, please install it before using it. If you downloaded the Portable version of balenaEtcher, just double-click to open it. The opened balenaEtcher interface is shown in the figure below
When opening balenaEtcher, if the following error is prompted: Please select balenaEtcher, right-click, and select Run as administrator. |
The specific steps to use balenaEtcher to burn the Linux image are as follows
The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the micro SD card
- After burning the Linux image, balenaEtcher will also verify the image burned to the micro SD card by default to ensure that there is no problem in the burning process. As shown in the figure below, a green progress bar indicates that the image has been burnt, and balenaEtcher is verifying the burnt image.
- After successful burning, the display interface of balenaEtcher is as shown in the figure below. If the green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the micro SD card and insert it into the micro SD card slot of the development board. .
How to use Win32Diskimager to burn Linux image
First prepare a micro SD card with a capacity of 8GB or more. The transmission speed of the micro SD card must be class 10 or above. It is recommended to use a micro SD card of SanDisk and other brands
Then use the card reader to insert the micro SD card into the computer
Then format the micro SD card
- SD Card Formatter can be used to format the micro SD card. The download link is
https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip
After downloading, unzip and install directly, and then open the software
If only a micro SD card is inserted into the computer, the drive letter of the micro SD card will be displayed in the " Select card " column. If multiple USB storage devices are inserted into the computer, you can select the corresponding drive letter of the micro SD card through the drop-down box
- Then click " Format ", a warning box will pop up before formatting, and formatting will start after selecting "Yes (Y)"
Download the Linux operating system image file compression package that you want to burn from the Orange Pi data download page, and then use the decompression software to decompress it. Among the decompressed files, the file ending with ".img" is the image file of the operating system. The size is generally more than 1GB
Use Win32Diskimager to burn the Linux image to the micro SD card
- The download page of Win32Diskimager is
http://sourceforge.net/projects/win32diskimager/files/Archive/
After downloading, install it directly. The interface of Win32Diskimager is as follows
a) First select the path of the image file
b) Then confirm that the drive letter of the micro SD card is consistent with that displayed in the "Device" column
c) Finally click "Write" to start burning
- After the image writing is completed, click the "Exit" button to exit, and then you can pull out the micro SD card and insert it into the development board to start
Method of burning Linux image to micro SD card based on Ubuntu PC
Note that the Linux image mentioned here specifically refers to the image of Linux distributions such as Debian or Ubuntu downloaded from the Orange Pi data download page, and the Ubuntu PC refers to the personal computer with the Ubuntu system installed. |
- First prepare a micro SD card with a capacity of 8GB or more. The transmission speed of the micro SD card must be class 10 or above. It is recommended to use a micro SD card of SanDisk and other brands
- Then use the card reader to insert the micro SD card into the computer
- Download the balenaEtcher software, the download address is
- After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded
- Download the image file compression package of the Linux operating system that you want to burn from the Orange Pi data download page, and then use the decompression software to decompress it. Among the decompressed files, the file ending with ".img" is the image file of the operating system. The size is generally above 1GB. The decompression command for the compressed package ending in 7z is as follows:
test@test:~$ 7z x orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.7z test@test:~$ ls orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.* orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.7z orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.sha # checksum file orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.img # mirror file |
- After decompressing the image, you can first use the sha256sum -c *.sha command to calculate whether the checksum is correct. If the prompt is successful, it means that the downloaded image is correct, and you can safely burn it to the micro SD card. If it prompts that the checksum does not match, it means there is a problem with the downloaded image, please try to download again
test@test:~$ sha256sum -c *.sha orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.img: success |
- Then double-click balenaEtcher-1.14.3-x64.AppImage on the graphical interface of Ubuntu PC to open balenaEtcher (no installation required), and the interface after balenaEtcher is opened is displayed as shown in the figure below
The specific steps to use balenaEtcher to burn the Linux image are as follows
First select the path of the Linux image file to be burned
Then select the drive letter of the micro SD card
Finally click Flash to start burning the Linux image to the micro SD card
- The interface displayed in the process of burning the Linux image by balenaEtcher is shown in the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the micro SD card
- After burning the Linux image, balenaEtcher will also verify the image burned into the micro SD card by default to ensure that there is no problem in the burning process. As shown in the figure below, a green progress bar indicates that the image has been burnt, and balenaEtcher is verifying the burnt image
- After successful burning, the display interface of balenaEtcher is as shown in the figure below. If a green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, and then pull out the micro SD card and insert it into the micro SD card slot of the development board for use
How to burn Android image to micro SD card
The Android image of the development board can only be burned into the micro SD card under the Windows platform using the PhoenixCard software, and the version of the PhoenixCard software must be PhonixCard-4.2.8. Please do not use software for burning Linux images, such as Win32Diskimager or balenaEtcher, to burn Android images. In addition, the PhoenixCard software does not have versions for Linux and Mac platforms, so it is impossible to burn Android images to micro SD cards under Linux and Mac platforms. |
- First, please make sure that the Windows system has installed Microsoft Visual C++ 2008 Redistrbutable - x86
- If not installed Microsoft Visual C++ 2008 Redistrbutable - x86, Using PhoenixCard to format micro SD card or burn Android image will prompt the following error
- Microsoft Visual C++ 2008 Redistrbutable - x86 the installation package can be downloaded from the official tool of Orange Pi Zero 3, or you can go to the official website of Microsoft to download
Then prepare a micro SD card with 8GB or larger capacity. The transmission speed of the micro SD card must be class 10 or above. It is recommended to use a micro SD card of SanDisk and other brands
Then use the card reader to insert the micro SD card into the computer
Download the Android image and PhoenixCard programming tool from the Orange Pi data download page. Please ensure that the version of the PhonenixCrad tool is PhonixCard-4.2.8. Please do not use the PhonixCard software version lower than 4.2.8 to burn the Android image. There may be problems with the Android image flashed by this version of the PhonixCard tool
- Then use decompression software to decompress PhonixCard4.2.8.zip, this software does not need to be installed, just find PhoenixCard in the decompressed folder and open it
- After opening PhoenixCard, if the micro SD card is recognized normally, the drive letter and capacity of the micro SD card will be displayed in the middle list. Please make sure that the displayed drive letter is consistent with the drive letter of the micro SD card you want to burn. If there is no display, you can try to unplug the micro SD card, or click the "Refresh Drive Letter" button in PhoenixCard
- After confirming the drive letter, format the micro SD card first, and click the "Recover Card" button in PhoenixCard (if the "Recover Card" button is gray and cannot be pressed, you can first click the "Refresh Drive Letter" button)
If there is a problem with formatting, please try to unplug and insert the micro SD card and then test again. If the problem still exists after re-plugging and inserting the micro SD card, you can restart the Windows computer or try another computer. |
Then start to write the Android image into the micro SD card
- 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 micro SD card from the computer and insert it into the development board to start
After burning the Android system, the micro SD card can only see a 128 MB partition in Windows, and the displayed partition is as shown in the figure below (some computers may pop up more than 20 disk partitions, but only the 128 MB partition can be opened. partition), please note that this is normal, please do not think that the micro SD card is burned out. The reason for this is that the Android system has a total of more than 20 partitions, but most of them cannot be recognized normally in the Windows system. At this point, please safely unplug the micro SD card and insert it into the development board to start it. After the Android system starts, use the following command to see the twenty or so partitions in the micro SD card: Use the df -h command to see that the 16GB micro SD card has about 11 GB of space available after burning the Android system (more than 20 partitions will not be mounted to the Android system, focus on these to the partition). |
Instructions for using the micro linux system in the onboard SPI Flash
There is a 16MB SPI Flash on the development board, and its location is shown in the figure below:
There is a tiny linux system programmed into SPI Flash by default, which is mainly used to prove that the development board can start normally. When you get the development board, you don't need to burn the system into the micro SD card, you only need to connect the Type-C power supply to the development board to start the micro linux system in the SPI Flash. The main functions of this system are:
During the u-boot start-up phase, the red LED light will be lit, and after entering the kernel, the red LED light will be turned off and the green LED light will be set to flash;
If the development board is connected to an HDMI screen, after the system starts up, the command line interface of the micro-linux system can be seen on the HDMI screen;
If the development board is connected with a USB keyboard, some simple linux commands can be run on the command line, such as ls, cd, etc.
Due to the limited functions of the tiny linux system in SPI Flash, if you want to use all the functions of the development board normally, please burn the linux image or Android image to the micro SD card, and then use it.
Start the Orange Pi development board
- Insert the micro SD card with the burned image into the micro SD card slot of the Orange Pi development board
- The development board has a Micro HDMI interface, and the development board can be connected to a TV or HDMI display through a Micro HDMI to HDMI cable
- If you have purchased a 13pin expansion board, you can plug the 13pin expansion board into the 13pin interface of the development board
- Connect the USB mouse and keyboard to control the Orange Pi development board
- The development board has an Ethernet port, which can be plugged into a network cable for Internet access
- Connect a high-quality power adapter with a 5V/2A (5V/3A is also available) USB Type C interface
Remember not to plug in a power adapter with a voltage output greater than 5V, as this will burn out the development board.
Many unstable phenomena during the power-on and start-up process of the system are basically caused by power supply problems, so a reliable power adapter is very important. If you find that there is a phenomenon of continuous restart during the startup process, please replace the power supply or Type C data cable and try again.
Then turn on the switch of the power adapter, if everything is normal, the HDMI monitor can see the system startup screen at this time
If you want to view the output information of the system through the debugging 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 how to use the debugging serial port
How to use the debugging serial port
Connection instruction of debugging serial port
- First, you need to prepare a 3.3v USB to TTL module, and then insert the USB interface end of the USB to TTL module into the USB interface of the computer
- The corresponding relationship between GND, TX and RX pins of the debugging serial port of the development board is shown in the figure below
The GND, TX and RX pins of the USB to TTL module need to be connected to the debugging serial port of the development board through a DuPont line
Connect the GND of the USB to TTL module to the GND of the development board
The RX of the USB to TTL module is connected to the TX of the development board
Connect the TX of the USB to TTL module to the RX of the development board
The schematic diagram of connecting the USB to TTL module to the computer and the Orange Pi development board is as follows
The TX and RX of the serial port need to be cross-connected. If you don’t want to carefully distinguish the order of TX and RX, you can connect the TX and RX of the serial port casually first. If there is no output from the test serial port, then exchange the order of TX and RX. One order is right. |
How to use the debugging serial port on the Ubuntu platform
There are many serial port debugging software that can be used under Linux, such as putty, minicom, etc. The following demonstrates how to use putty. |
- First, insert the USB-to-TTL module into the USB port of the Ubuntu computer. If the connection and identification of the USB-to-TTL module is normal, you can see the corresponding device node name under /dev on the Ubuntu PC. Remember this node name, and then set the serial port software will be used
test@test:~$ ls /dev/ttyUSB*
/dev/ttyUSB0
- Then use the following command to install putty on Ubuntu PC
test@test:~$ sudo apt update test@test:~$ sudo apt install -y putty |
- Then run putty, remember to add sudo permission
test@test:~$ sudo putty |
- First select the setting interface of the serial port
Then set the parameters of the serial port
Set Serial line to connect toto as dev/ttyUSB0 (modify to the corresponding node name, usually /dev/ttyUSB0)
Set Speed(baud) to 115200 (the baud rate of the serial port)
Set Flow control as None
After setting the setting interface of the serial port, return to the Session interface
First select the Connection type as Serial
Then click the Open button to connect to the serial port
- Then start the development board, and you can see the Log information output by the system from the opened serial port terminal
How to use the debugging serial port on Windows platform
There are many serial port debugging software that can be used under Windows, such as SecureCRT, MobaXterm, etc. The following demonstrates how to use MobaXterm. This software has a free version and can be used without buying a serial number. |
Download MobaXterm
- Download MobaXterm website as follows
- Then select the Portable version. After downloading, you don’t need to install it, just open it and use it
- After downloading, use decompression software to decompress the downloaded compressed package, you can get the executable software of MobaXterm, and then double-click to open
After opening the software, the steps to set up the serial port connection are as follows
Open the session settings interface
Select the serial port type
Select the port number of the serial port (select the corresponding port number according to the actual situation), if you cannot see the port number, please use 360 Driver Master to scan and install the driver for the USB-to-TTL serial port chip
Select the baud rate of the serial port as 115200
Finally click the "OK" button to complete the setup
- After clicking the "OK" button, you will enter the following interface. At this time, start the development board and you can see the output information of the serial port
Instructions for using the 5v pin in the 26pin or 13pin interface of the development board to supply power
The power supply method we recommend for the development board is to use the 5V/2A or 5V/3A Type C interface power cord to plug into the Type C power interface of the development board for power supply. If you need to use the 5V pin in the 26pin or 13pin interface to power the development board, please make sure that the power cable used can meet the power supply requirements of the development board. If the use is unstable, please switch back to the Type C power supply. |
- First, you need to prepare a power cord as shown in the figure below
The power cord shown in the picture above can be bought on Amazon, please search and buy by yourself.
Use the 5V pin in the 26pin or 13pin interface to supply power to the development board. The connection method of the power line is as follows
The USB A port of the power cord shown in the above figure needs to be plugged into the 5V/2A or 5V/3A power adapter connector (it is not recommended to plug into the USB port of the computer for power supply. If there are too many peripherals connected to the development board, use will be unstable)
The red DuPont wire needs to be plugged into the 5V pin of the 26pin or 13pin interface of the development board
The black Dupont wire needs to be inserted into the GND pin of the 26pin or 13pin interface
The positions of the 5V pin and GND pin of the 26pin and 13pin interfaces in the development board are shown in the figure below, remember not to reverse the connection.
The method of using the 13pin interface of the development board to expand the USB interface
- If you have purchased a 13pin expansion board for Orange Pi, insert the expansion board into the 13pin interface of the development board to expand 2 USB interfaces
If there is no 13pin expansion board, you can use a 4pin 2.54mm DuPont to USB2.0 female cable to expand the USB interface. The specific method is as follows:
- First, you need to prepare a 4pin 2.54mm Dupont to USB2.0 female cable (this cable can be bought on Amazon, please search and buy by yourself), as shown in the figure below:
Instructions for use of Debian/Ubuntu Server and Xfce desktop system
Supported linux image types and kernel versions
Linux image type | kernel version | server version | desktop version |
Ubuntu 20.04 - Focal | Linux5.4 | Support | Support |
Ubuntu 22.04 - Focal | Linux5.4 | Support | Support |
Debian 11 - Bullseye | Linux5.4 | Support | Support |
Ubuntu 22.04 - Jammy | Linux6.1 | Support | Support |
Debian 11 - Bullseye | Linux6.1 | Support | Support |
Debian 12 - Bookworm | Linux6.1 | Support | Support |
After entering the download page of the corresponding development board on the Orange Pi data download page, you can see the following download options. In the description below, the Ubuntu image and the Debian image are generally referred to as the Linux image.
The naming rules of Linux images are as follows:
Development board model_version number_Linux distribution type_release code name_server or desktop_kernel version |
The model of the development board:Both are orangepizero3. The model names of different development boards are generally different. Before burning the image, please make sure that the model name of the selected image matches the development board.
Version number:For example, 1.x.x, this version number will increase with the update of the image function, and the last number of the version number of the Linux image on the development board is an even number.
Types of Linux distributions: Ubuntu and Debian are currently supported. Since Ubuntu is derived from Debian, there is not much difference between the two systems in terms of usage. However, there are still some differences in the default configuration of some software and the use of commands. In addition, both Ubuntu and Debian have their own software warehouses supported by maintenance, and there are also some differences in the supported and installable software packages. These need to be experienced in person to have a deeper understanding. For more details, you can refer to the official documentation provided by Ubuntu and Debian.
Release code name: Used to distinguish between different versions of a specific Linux distribution such as Ubuntu or Debian. Among them, both focal and jammy are Ubuntu distributions, focal means Ubuntu20.04, and jammy means Ubuntu22.04. The biggest difference between different versions is that the software in the software warehouse maintained by the new version of Ubuntu system is much better than that of the old version of Ubuntu system. The ones in it should be new, such as Python and GCC compilation tool chains. bullseye is the specific version code of Debian, bullseye means Debian11, and bookworm means Debian12.
Server or Desktop:It is used to indicate whether the system has a desktop environment. If it is server, it means that the system does not have a desktop environment. The storage space and resources occupied by the image are relatively small, and the command line is mainly used to operate and control the system. If it is desktop_xfce, it means that the system is installed with the XFCE desktop environment by default. The storage space and resources occupied by the image are relatively large. You can connect the monitor, mouse and keyboard to operate the system through the interface. Of course, the desktop version of the system can also be operated through the command line like the server version of the system.
Kernel version:Used to indicate the version number of the linux kernel, currently supports linux5.4 and linux6.1.
Linux kernel driver adaptation
Function | Linux5.4 | Linux6.1 |
HDMI video | OK | OK |
HDMI audio | OK | OK |
USB2.0 x 3 | OK | OK |
micro SD card start | OK | OK |
Gigabit Ethernet | OK | OK |
Infrared receiver | OK | OK |
WIFI | OK | OK |
Bluetooth | OK | OK |
headphone audio | OK | OK |
usb camera | OK | OK |
LED light | OK | OK |
26pin GPIO | OK | OK |
26pin I2C | OK | OK |
26pin SPI1 | OK | OK |
26pin UART | OK | OK |
PWM | OK | OK |
Temperature Sensor | OK | OK |
hardware watchdog | OK | OK |
Mali GPU | NO | NO |
Video codec | NO | NO |
TV-OUT | NO | NO |
The format of linux commands in this manual
- In this manual, all commands that need to be entered in the Linux system will be marked with the following box
- As shown below, the content in the yellow box indicates the content that needs special attention, except for the commands in it.
Description of the prompt type in front of the command
- The prompt in front of the command refers to the content of the red part in the box below, which is not part of the linux command, so when entering the command in the linux system, please do not enter the content of the red font part.
orangepi@orangepi:~$ sudo apt update
root@orangepi:~# vim /boot/boot.cmd
test@test:~$ ssh root@192.168.1.xxx
root@test:~# ls
root@orangepi:~$ The prompt indicates that this command is entered in the linux system of the development board. The $ at the end of the prompt indicates that the current user of the system is a normal user. When executing a privileged command, you need to add sudo
root@orangepi:~# The prompt indicates that this command is entered in the linux system of the development board, and the # at the end of the prompt indicates that the current user of the system is the root user, who can execute any desired command
test@test:~$ The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the linux system of the development board. The $ at the end of the prompt indicates that the current user of the system is an ordinary user. When executing privileged commands, sudo needs to be added
root@test:~# The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, not in the linux system of the development board. The # at the end of the prompt indicates that the current user of the system is the root user and can execute any command you want
What are the commands that need to be entered?
- As shown below, the black bold part is the command that needs to be input, and the content below the command is the output content (some commands have output, some may not), and this part of the content does not need to be input
root@orangepi:~# cat /boot/orangepiEnv.txt
verbosity=7
bootlogo=false
console=serial
- As shown below, some commands cannot be written in one line and will be placed on the next line. As long as the black and bold parts are all commands that need to be input. When these commands are entered into one line, the last "\" of each line needs to be removed, this is not part of the command. In addition, there are spaces in different parts of the command, please don't miss it
orangepi@orangepi:~$ echo \
"deb [arch=$(dpkg --print-architecture) \
signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \
https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Linux system login instructions
Linux system default login account and password
Account | password |
root | orangepi |
orangepi | orangepi |
Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting. |
When the wrong password is prompted, or there is a problem with the ssh connection, please note that as long as you are using the Linux image provided by Orange Pi, please do not suspect that the above password is wrong, but look for other reasons. |
How to set automatic terminal login in linux system
- The Linux system automatically logs in to the terminal by default, and the default login user name is orangepi
- Use the following command to set the root user to automatically log in to the terminal
orangepi@orangepi:~$ sudo auto_login_cli.sh root |
- Use the following command to disable automatic login terminal
orangepi@orangepi:~$ sudo auto_login_cli.sh -d |
- Use the following command to set the orangepi user to automatically log in to the terminal again
orangepi@orangepi:~$ sudo auto_login_cli.sh orangepi |
Instructions for automatic login of linux desktop version system
- After the desktop system starts, it will automatically log in to the desktop without entering a password
- Run the following command to prohibit the desktop system from automatically logging into the desktop
orangepi@orangepi:~$ sudo disable_desktop_autologin.sh |
- Then restart the system and a login dialog box will appear, at which point a Linux system default login account and password is required to enter the system
The setting method of root user automatic login in Linux desktop version system
- Execute the following command to set the desktop system to automatically log in as the root user
orangepi@orangepi:~$ sudo desktop_login.sh root
- Then restart the system, and the root user will automatically log in to the desktop
Note that if you log in to the desktop system as the root user, you cannot use pulseaudio in the upper right corner to manage audio devices.
|
- Execute the following command to set the desktop system to log in automatically with the orangepi user again
orangepi@orangepi:~$ sudo desktop_login.sh orangepi |
The method of disabling the desktop in the Linux desktop version system
- First enter the following command on the command line, Please remember to add sudo permission
orangepi@orangepi:~$ sudo systemctl disable lightdm.service
- Then restart the Linux system and you will find that the desktop will not be displayed
orangepi@orangepi:~$ sudo reboot |
- The command to reopen the desktop is as follows,Please remember to add sudo permission
orangepi@orangepi:~$ sudo systemctl start lightdm.service orangepi@orangepi:~$ sudo systemctl enable lightdm.service |
Onboard LED Light Test Instructions
- There are two LED lights on the development board, one is green and the other is red. When the system starts, the default display of the LED lights is as follows:
Green light Red light u-boot startup phase off on The kernel boots into the system flashing off GPIO interface PC13 PC12
The two LED lights on the development board are controlled by software.
When you get the development board, you may find that even if the micro SD card with the system programmed is not inserted into the development board, the two LED lights will be on after the development board is connected to the power supply. This is because the 16MB on the development board SPI Flash will burn a miniature linux system by default when leaving the factory. This system will light up the red light during the u-boot startup phase. After entering the kernel, it will turn off the red light and set the green light to flash.
If the linux system in the SPI Flash is cleared, then the two LED lights on the development board will not light up after the power is turned on without inserting the micro SD card with the system programmed
- The method of setting the green light on/off and flashing is as follows:
- First enter the setting directory of the green light
- The command to set the green light to stop flashing is as follows
- The command to set the green light to be on is as follows
- The command to set the green light to flash is as follows
Note that the following operations should be performed under the root user. |
root@orangepi:~# cd /sys/class/leds/green_led |
root@orangepi:/sys/class/leds/green_led# echo none > trigger |
root@orangepi:/sys/class/leds/green_led# echo default-on > trigger |
root@orangepi:/sys/class/leds/green_led# echo heartbeat > trigger |
- The method of setting the red light on/off and flashing is as follows:
- First enter the setting directory of the red light
- The command to set the red light to be on is as follows
- The command to set the flashing red light is as follows
- The command to set the red light to stop flashing is as follows
Note that the following operations should be performed under the root user. |
root@orangepi:~# cd /sys/class/leds/red_led |
root@orangepi:/sys/class/leds/red_led# echo default-on > trigger |
root@orangepi:/sys/class/leds/red_led# echo heartbeat > trigger |
root@orangepi:/sys/class/leds/red_led# echo none > trigger |
If you do not need the LED light to flash after booting, you can use the following method to turn off the green light flashing
- First run orangepi-config, common users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
- Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select disable-leds
- After restarting and fully entering the system, you can see that the two LED lights on the development board will not light up
Instructions for operating the rootfs partition capacity of the linux system in the micro SD card
The first startup will automatically expand the capacity of the rootfs partition in the micro SD card
- After burning the Linux image of the development board into the micro SD card, you can check the capacity usage of the micro SD card on the Ubuntu computer, the steps are as follows:
Note that this step does not affect the automatic expansion of the Linux system of the development board. Here I just want to explain how to check the capacity of the micro SD card after burning the Linux image on the micro SD card.
- First install the gparted software on the Ubuntu computer
test@test:~$ sudo apt install -y gparted
- Then open gparted
test@test:~$ sudo gparted
- After opening gparted, you can select the micro SD card in the upper right corner, and then you can see the usage of the micro SD card capacity
- The figure above shows the situation of the micro SD card after burning the Linux desktop version system. It can be seen that although the total capacity of the micro SD card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/ sdc1) actually allocated only 4.05GiB, leaving 10.79GiB unallocated
Then you can insert the micro SD card that has burned the Linux system into the development board to start. When the micro SD card starts the Linux system for the first time, it will call the orangepi-resize-filesystem script automatically through the systemd service orangepi-resize-filesystem.service The expansion of the rootfs partition, so there is no need to manually expand the capacity
After logging in to the system, you can use the df -h command to check the size of the rootfs. If it is consistent with the actual capacity of the micro SD card, it means that the automatic expansion is running correctly.
orangepi@orangepi:~$ df -h
Filesystem Size Used AvailUse% Mounted on
udev430M0430M 0% /dev
tmpfs 100M 5.6M 95M 6% /run
/dev/mmcblk0p115G915M14G7% /
tmpfs 500M 0500M 0% /dev/shm
- After starting the Linux system for the first time, we can also remove the micro SD card from the development board and reinsert it into the Ubuntu computer, and then use gparted to check the status of the micro SD card again, as shown in the figure below, the rootfs partition (/dev/ The capacity of sdc1) has been expanded to 14.69GiB
It should be noted that the Linux system has only one partition in ext4 format, and does not use a separate BOOT partition to store files such as the kernel image, so there is no problem of expanding the BOOT partition. |
The method of prohibiting automatic expansion of the capacity of the rootfs partition in the micro SD card
- First burn the linux image of the development board to the micro SD card on the Ubuntu computer (Windows not available), and then re-plug and insert the micro SD card
- Then the Ubuntu computer will automatically mount the partition of the micro SD card. If the automatic mounting is normal, use the ls command to see the following output
test@test:~$ ls /media/test/opi_root/
bin boot dev etc home lib lost+found media mnt opt proc root run
sbin selinux srv sys tmp usr var
- Then switch the current user to the root user on the Ubuntu computer
test@test:~$ sudo -i [sudo] password for test: root@test:~# |
- Then enter the root directory of the linux system in the micro SD card and create a new file named .no_rootfs_resize
root@test:~# cd /media/test/opi_root/ root@test:/media/test/opi_root/# cd root root@test:/media/test/opi_root/root# touch .no_rootfs_resize root@test:/media/test/opi_root/root# ls .no_rootfs* .no_rootfs_resize |
Then you can uninstall the micro SD card, and then pull out the micro SD card and insert it into the development board to start. When the linux system starts, when the file.no_rootfs_resize is detected in the /root directory, the rootfs will not be automatically expanded.
After entering the Linux system after prohibiting automatic expansion of rootfs, you can see that the total capacity of the rootfs partition is only 4GB (the image of the desktop version is tested here), which is much smaller than the actual capacity of the micro SD card, indicating that the automatic expansion of rootfs is prohibited.
orangepi@orangepi:~$ df -h Filesystem Size Used AvailUse% Mounted on |
- If you need to re-expand the capacity of the rootfs partition in the micro SD card, just execute the following command, and then restart the Linux system of the development board.
Note, please execute the following commands under the root user. |
root@orangepi:~# rm /root/.no_rootfs_resize root@orangepi:~# systemctl enable orangepi-resize-filesystem.service root@orangepi:~# sudo reboot |
After restarting, enter the Linux system of the development board again, and you can see that the rootfs partition has been expanded to the actual capacity of the micro SD card
root@orangepi:~$ df -h Filesystem Size Used AvailUse% Mounted on |
The method of manually expanding the capacity of the rootfs partition in the micro SD card
If the total capacity of the micro SD card is large, such as 128GB, you do not want the rootfs partition of the Linux system to use all the capacity of the micro SD card, but only want to allocate a part of the capacity, such as 16GB, to the Linux system, and then the remaining capacity of the micro SD card can be used for other use. Then you can use the content introduced in this section to manually expand the capacity of the rootfs partition in TF. |
- First burn the linux image of the development board to the micro SD card on the Ubuntu computer (Windows not available), and then re-plug and insert the micro SD card
- Then the Ubuntu computer will automatically mount the partition of the micro SD card. If the automatic mounting is normal, use the ls command to see the following output
test@test:~$ ls /media/test/opi_root/
bin boot dev etc home lib lost+found media mnt opt proc root run
sbin selinux srv sys tmp usr var
- Then switch the current user to the root user on the Ubuntu computer
test@test:~$ sudo -i [sudo] password for test: root@test:~# |
- Then enter the root directory of the linux system in the micro SD card and create a new file named .no_rootfs_resize
root@test:~# cd /media/test/opi_root/ root@test:/media/test/opi_root/# cd root root@test:/media/test/opi_root/root# touch .no_rootfs_resize root@test:/media/test/opi_root/root# ls .no_rootfs* .no_rootfs_resize |
- Then install the gparted software on the Ubuntu computer
test@test:~$ sudo apt install -y gparted |
- Then open gparted
test@test:~$ sudo gparted |
- After opening gparted, you can select the micro SD card in the upper right corner, and then you can see the usage of the micro SD card capacity. The figure below shows the situation of the micro SD card after burning the Linux desktop version system. It can be seen that although the total capacity of the micro SD card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/sdc1) Only 4.05GiB were actually allocated, leaving 10.79GiB unallocated
- Click the right mouse button again to see the operation options shown in the figure below. If the micro SD card has been mounted, first you need to Umount the rootfs partition of the micro SD card
- Then select the rootfs partition again, click the right mouse button, and select Resize/Move to start expanding the size of the rootfs partition
- Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in New size(MiB)
- Then you can pull out the micro SD card, insert it into the development board and start it up. After entering the Linux system of the development board, if you can see that the size of the rootfs partition is the same as the size set before, it means manual Expansion succeeded
root@orangepi:~# df -h Filesystem Size Used AvailUse% Mounted on |
How to reduce the capacity of the rootfs partition in the micro SD card
After configuring the application program or other development environment in the Linux system of the micro SD card, if you want to back up the Linux system in the micro SD card, you can use the method in this section to reduce the size of the rootfs partition first, and then start the backup. |
- First insert the micro SD card you want to operate in the Ubuntu computer (Windows not available)
- Then install the gparted software on the Ubuntu computer
test@test:~$ sudo apt install -y gparted
- Then open gparted
test@test:~$ sudo gparted |
- After opening gparted, you can select the micro SD card in the upper right corner, and then you can see the usage of the micro SD card capacity
- Click the right mouse button again to see the operation options shown in the figure below. If the micro SD card has been mounted, first you need to Umount the rootfs partition of the micro SD card
- Then select the rootfs partition again, click the right mouse button, and select Resize/Move to start setting the size of the rootfs partition
- Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in New size(MiB)
- Then you can pull out the micro SD card, insert it into the development board and start it up. After entering the Linux system of the development board, if you can use the df -h command to see that the size of the rootfs partition is the same as the size set before, it means that the size has been reduced. capacity success
root@orangepi:~# df -h Filesystem Size Used AvailUse% Mounted on |
Network connection test
Ethernet port test
First, insert one end of the network cable into the Ethernet interface of the development board, and connect the other end of the network cable to the router, and ensure that the network is unblocked
After the system starts, it will automatically assign an IP address to the Ethernet card through DHCP, without any other configuration
The command to view the IP address in the Linux system of the development board is as follows:
Please do not copy the following commands. For example, the network node name in debian12 is end0, and the following commands need to be changed to ip a s end0.
orangepi@orangepi:~$ ip a s eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
- link/ether 5e:ac:14:a5:93:b3 brd ff:ff:ff:ff:ff:ff
- inet 192.168.1.16/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
- valid_lft 259174sec preferred_lft 259174sec
- inet6 240e:3b7:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute
- valid_lft 259176sec preferred_lft 172776sec
- inet6 fe80::957d:bbbd:4928:3604/64 scope link noprefixroute
- valid_lft forever preferred_lft forever
There are three ways to check the IP address after the development board starts:
1. Connect the HDMI monitor, then log in to the system and use the ip a s eth0 command to view the IP address
2. Enter the ip a s eth0 command in the debugging serial terminal to view the IP address
3. If there is no debugging serial port and no HDMI display, you can also check the IP address of the development board’s network port through the router’s management interface. However, in this method, some people often cannot see the IP address of the development board normally. If you can't see it, the debug method looks like this:
First check whether the Linux system has started normally. If the green light of the development board is flashing, it is generally started normally. If only the red light is on, or the red and green lights are not on, it means that the system has not started normally;
Check whether the network cable is plugged in tightly, or try another network cable;
Try another router (I have encountered many problems with the router, such as the router cannot assign the IP address normally, or the IP address has been assigned normally but cannot be seen in the router);
If there is no router to replace, you can only connect to an HDMI display or use the debugging serial port to check the IP address.
In addition, it should be noted that the development board DHCP automatically assigns an IP address without any settings.
The command to test the network connectivity is as follows, the ping command can be interrupted through the shortcut key of Ctrl+C
Please do not copy the following commands. For example, the network node name in debian12 is end0, and the following command needs to be changed to ping www.baidu.com -I end0, I is capital i,.
orangepi@orangepi:~$ ping www.baidu.com -I eth0
PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=56 time=6.74 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=56 time=6.80 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=56 time=7.27 ms
^C
--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms
WIFI connection test
Please do not connect to WIFI by modifying the /etc/network/interfaces configuration file. There will be problems connecting to the WIFI network in this way. |
The server image connects to WIFI through commands
When the development board is not connected to Ethernet, not connected to HDMI display, but only connected to the serial port, it is recommended to use the commands demonstrated in this section to connect to the WIFI network. Because nmtui can only display characters in some serial port software (such as minicom), and cannot display the graphical interface normally. Of course, if the development board is connected to an Ethernet or HDMI display, you can also use the commands demonstrated in this section to connect to the WIFI network. |
First log in to the linux system, there are the following three ways
- If the development board is connected with a network cable, SSH remote login development board under Ubuntu
If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the Linux system
If the development board is connected to the HDMI display, you can log in to the linux system through the terminal displayed on the HDMI
- First use the nmcli dev wifi command to scan the surrounding WIFI hotspots
orangepi@orangepi:~$ nmcli dev wifi
Then use the nmcli command to connect to the scanned WIFI hotspot, where:
wifi_name Need to replace it with the name of the WIFI hotspot you want to connect to
wifi_passwd Need to change to the password of the WIFI hotspot you want to connect to
orangepi@orangepi:~$ sudo nmcli dev wifi connect wifi_name password wifi_passwd
Device 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'.
- You can view the IP address of wifi through the ip addr show wlan0 command
- link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff
- inet 192.168.1.11/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
- valid_lft 259192sec preferred_lft 259192sec
- inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute
- valid_lft 259192sec preferred_lft 172792sec
- inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute
- valid_lft forever preferred_lft forever
orangepi@orangepi:~$ ip a s wlan0 11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 |
- Use the ping command to test the connectivity of the wifi network, and the ping command can be interrupted through the shortcut key Ctrl+C
orangepi@orangepi:~$ ping www.orangepi.org -I wlan0 PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data. 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms ^C --- www.orangepi.org ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms |
The server image connects to WIFI in a graphical way
First log in to the linux system, there are the following three ways
If the development board is connected with a network cable, SSH remote login development board under Ubuntu
If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the linux system (please use MobaXterm for the serial port software, and the minicom cannot display the graphical interface)
If the development board is connected to the HDMI display, you can log in to the linux system through the HDMI display terminal
Then enter the nmtui command in the command line to open the wifi connection interface
orangepi@orangepi:~$ sudo nmtui
- Then you can see all the searched WIFI hotspots
- Select the WIFI hotspot you want to connect to, then use the Tab key to position the cursor on Activate and press Enter
- Then a dialog box for entering a password will pop up, enter the corresponding password in Password and press Enter to start connecting to WIFI
- After the WIFI connection is successful, a "*" will be displayed in front of the connected WIFI name
- You can view the IP address of wifi through the ip a s wlan0 command
- link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff
- inet 192.168.1.11/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
- valid_lft 259069sec preferred_lft 259069sec
- inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute
- valid_lft 259071sec preferred_lft 172671sec
- inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute
- valid_lft forever preferred_lft forever
orangepi@orangepi:~$ ip a s wlan0 11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 |
- Use the ping command to test the connectivity of the wifi network, and the ping command can be interrupted through the shortcut key Ctrl+C
orangepi@orangepi:~$ ping www.orangepi.org -I wlan0 PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data. 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms ^C --- www.orangepi.org ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms |
Test method of desktop image
- Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI)
- Click More networks in the pop-up drop-down box to see all scanned WIFI hotspots, and then select the WIFI hotspot you want to connect to
- After connecting to WIFI, you can open the browser to check whether you can access the Internet. The entrance of the browser is shown in the figure below
- If you can open other web pages after opening the browser, it means that the WIFI connection is normal
The method of creating WIFI hotspot through create_ap
create_ap is a script that helps quickly create WIFI hotspots on Linux, and supports bridge and NAT modes. It can automatically combine hostapd, dnsmasq and iptables to complete the setting of WIFI hotspots, avoiding complex configuration for users. The github address is as follows: |
The Linux image released by OPi has pre-installed the create_ap script. You can create a WIFI hotspot through the create_ap command. The basic command format of create_ap is as follows:
* wifi-interface:The name of the wireless network card * interface-with-internet: The name of the network card that can be connected to the Internet, generally eth0 * access-point-name: hotspot name * passphrase:hotspot password |
create_ap method to create WIFI hotspot in NAT mode
Enter the following command to create a WIFI hotspot named orangepi and password orangepi in NAT mode
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt
- If the following information is output, it means that the WIFI hotspot is created successfully
orangepi@orangepi:~$ sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt Config dir: /tmp/create_ap.wlan0.conf.TQkJtsz1 PID: 26139 Network Manager found, set wlan0 as unmanaged device... DONE Sharing Internet using method: nat hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlan0.conf.TQkJtsz1/hostapd_ctrl wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED wlan0: STA ce:bd:9a:dd:a5:86 IEEE 802.11: associated wlan0: AP-STA-CONNECTED ce:bd:9a:dd:a5:86 wlan0: STA ce:bd:9a:dd:a5:86 RADIUS: starting accounting session D4FBF7E5C604F169 wlan0: STA ce:bd:9a:dd:a5:86 WPA: pairwise key handshake completed (RSN) wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86 |
- Take out the mobile phone at this time, you can find the WIFI hotspot named orangepi created by the development board in the searched WIFI list, and then you can click orangepi to connect to the hotspot, the password is set above orangepi
In NAT mode, the wireless device connected to the hotspot of the development board requests an IP address from the DHCP service of the development board, so there will be two different network segments, for example, the IP of the development board is 192.168.1.X
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ sudo ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
- inet 192.168.1.150 netmask 255.255.255.0 broadcast 192.168.1.255
- inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20<link>
- ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet)
- RX packets 25370 bytes 2709590 (2.7 MB)
- RX errors 0 dropped 50 overruns 0 frame 0
- TX packets 3798 bytes 1519493 (1.5 MB)
- TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- device interrupt 83
By default, the DHCP service of the development board will assign an IP address of 192.168.12.0/24 to the device connected to the hotspot. At this time, click on the connected WIFI hotspot orangepi, and then you can see that the IP address of the mobile phone is 192.168.12.X
- If you want to specify a different network segment for the connected device, you can specify it through the -g parameter, such as specifying the network segment of the access point AP through the -g parameter as 192.168.2.1
Note that in the following commands, Debian12 needs to change eth0 to end0. |
orangepi@orangepi:~$ sudo create_ap -m nat wlan0 eth0 orangepi orangepi -g 192.168.2.1 --no-virt |
At this time, after connecting to the hotspot through the mobile phone, click on the connected WIFI hotspot orangepi, and then you can see that the IP address of the mobile phone is 192.168.2.X.
If the --freq-band parameter is not specified, the hotspot created by default is in the 2.4G frequency band. If you want to create a hotspot in the 5G frequency band, you can specify the--freq-band 5 parameter. The specific command is as follows
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ sudo create_ap -m nat wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt
If you need to hide the SSID, you can specify the --hidden parameter, the specific command is as follows
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ sudo create_ap -m nat wlan0 eth0 orangepi orangepi --hidden --no-virt
At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot.
create_ap method to create WIFI hotspot in bridge mode
Enter the following command to create a WIFI hotspot named orangepi and password orangepi in bridge mode
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt
- If the following information is output, it means that the WIFI hotspot is created successfully
orangepi@orangepi:~$ sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt Config dir: /tmp/create_ap.wlan0.conf.zAcFlYTx PID: 27707 Network Manager found, set wlan0 as unmanaged device... DONE Sharing Internet using method: bridge Create a bridge interface... br0 created. hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlan0.conf.zAcFlYTx/hostapd_ctrl wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED wlan0: STA ce:bd:9a:dd:a5:86 IEEE 802.11: associated wlan0: AP-STA-CONNECTED ce:bd:9a:dd:a5:86 wlan0: STA ce:bd:9a:dd:a5:86 RADIUS: starting accounting session 937BF40E51897A7B wlan0: STA ce:bd:9a:dd:a5:86 WPA: pairwise key handshake completed (RSN) wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86 |
- Take out the mobile phone at this time, and you can find the WIFI hotspot named orangepi created by the development board in the searched WIFI list, and then you can click orangepi to connect to the hotspot, and the password is the orangepi set above
- In bridge mode, the wireless device connected to the hotspot of the development board also requests an IP address from the DHCP service of the main router (the router connected to the development board), for example, the IP of the development board is 192.168.1.X
- inet 192.168.1.150 netmask 255.255.255.0 broadcast 192.168.1.255
- inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20<link>
- ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet)
- RX packets 25370 bytes 2709590 (2.7 MB)
- RX errors 0 dropped 50 overruns 0 frame 0
- TX packets 3798 bytes 1519493 (1.5 MB)
- TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- device interrupt 83
orangepi@orangepi:~$ sudo ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
The IP of the device connected to the WIFI hotspot is also assigned by the main router, so the mobile phone connected to the WIFI hotspot and the development board are in the same network segment. At this time, click on the connected WIFI hotspot orangepi, and then you can see the IP address of the mobile phone also 192.168.1.X.
If the --freq-band y band. If you want to create a hotspot in the 5G frequency band, you can specify the --freq-band 5 parameter. The specific command is as follows
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt
If you need to hide the SSID, you can specify the --hidden parameter, the specific command is as follows
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --hidden --no-virt
At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot.
How to set static IP address
Please do not set a static IP address by modifying the /etc/network/interfaces configuration file. |
Use the nmtui command to set a static IP address
First run the nmtui command
orangepi@orangepi:~$ sudo nmtui
Then select Edit a connection and press Enter
Then select the network interface that needs to set a static IP address, for example, to set the static IP address of the Ethernet interface, select Wired connection 1.
Then select Edit with the Tab key and press the Enter key
Then use the Tab key to move the cursor to the <Automatic> position shown in the figure below to configure IPv4
Then press Enter, select Manual through the up and down arrow keys, and press Enter to confirm
The display after selection is shown in the figure below
Then move the cursor to <Show> via the Tab key
Then press Enter, the following setting interface will pop up after entering
Then you can set the IP address (Addresses), gateway (Gateway) and DNS server address in the position shown in the figure below (there are many other setting options in it, please explore by yourself), please set according to your specific needs, The values set in the image below are just an example
After setting, move the cursor to <OK> in the lower right corner, and press Enter to confirm
Then click <Back> to return to the previous selection interface
Then select Activate a connection, then move the cursor to <OK>, and finally click Enter
Then select the network interface that needs to be set, such as Wired connection 1, then move the cursor to <Deactivate>, and press the Enter key to disable Wired connection 1
Then please do not move the cursor, and then press the Enter key to re-enable Wired connection 1, so that the static IP address set earlier will take effect
Then you can exit nmtui through the <Back> and Quit buttons
Then through ip a s eth0, you can see that the IP address of the network port has changed to the static IP address set earlier
Note that in the following commands, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ ip a s eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 5e:ac:14:a5:92:b3 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.177/24 brd 192.168.1.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute
valid_lft 259149sec preferred_lft 172749sec
inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Then you can test the connectivity of the network to check whether the IP address is configured OK, and the ping command can be interrupted through the shortcut key Ctrl+C
Note that in the following commands, I is capital i, Debian12 needs to change eth0 to end0.
orangepi@orangepi:~$ ping 192.168.1.177 -I eth0
PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.
64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=0.233 ms
64 bytes from 192.168.1.47: icmp_seq=2 ttl=64 time=0.263 ms
64 bytes from 192.168.1.47: icmp_seq=3 ttl=64 time=0.273 ms
64 bytes from 192.168.1.47: icmp_seq=4 ttl=64 time=0.269 ms
64 bytes from 192.168.1.47: icmp_seq=5 ttl=64 time=0.275 ms
^C
--- 192.168.1.47 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4042ms
rtt min/avg/max/mdev = 0.233/0.262/0.275/0.015 ms
Use the nmcli command to set a static IP address
If you want to set the static IP address of the network port, please insert the network cable into the development board first. If you need to set the static IP address of WIFI, please connect the WIFI first, and then start to set the static IP address
Then you can view the name of the network device through the nmcli con show command, as shown below
orangepi is the name of the WIFI network interface (the name is not necessarily the same)
Wired connection 1 is the name of the Ethernet interface
orangepi@orangepi:~$ nmcli con show
NAMEUUID TYPE DEVICE
orangepicfc4f922-ae48-46f1-84e1-2f19e9ec5e2awifi wlan0
Wired connection 19db058b7-7701-37b8-9411-efc2ae8bfa30ethernet eth0
Then enter the following command, where
"Wired connection 1" means to set the static IP address of the Ethernet port. If you need to set the static IP address of the WIFI, please modify it to the corresponding name of the WIFI network interface (you can get it through the nmcli con show command)
ipv4.addresses is followed by the static IP address to be set, which can be modified to the value you want to set
ipv4.gateway represents the address of the gateway
orangepi@orangepi:~$ sudo nmcli con mod "Wired connection 1" \
ipv4.addresses "192.168.1.110" \
ipv4.gateway "192.168.1.1" \
ipv4.dns "8.8.8.8" \
ipv4.method "manual"
Then restart the linux system
orangepi@orangepi:~$ sudo reboot
Then re-enter the linux system and use the ip addr show eth0 command to see that the IP address has been set to the desired value
orangepi@orangepi:~$ ip addr show eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 5e:ae:14:a5:91:b3 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.110/32 brd 192.168.1.110 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute
valid_lft 259183sec preferred_lft 172783sec
inet6 fe80::3312:861a:a589:d3c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
The method of setting the Linux system to automatically connect to the network for the first time
The development board has an Ethernet port. If you want to remotely log in to the Linux system of the development board through the Ethernet port, you only need to plug in a network cable that can access the Internet normally to the Ethernet port. Assign an IP address, and then we can obtain the IP address of the Ethernet port through the HDMI screen, serial port or view the background of the router, and then we can log in to the Linux system remotely. The development board also has wireless WIFI. If you want to remotely log in to the Linux system of the development board through WIFI, you need to remotely log in to the Linux system through the IP address of the Ethernet port ssh and then connect to WIFI through commands, or through commands on the HDMI screen or serial port. Connect to WIFI. But if there is no HDMI screen and serial port module, although there is a network cable, the IP address of the development board cannot be checked through the background of the router. Or there is no HDMI screen, serial port module and network cable, and only WIFI can be connected, then you can use the method introduced in this section to automatically connect to WIFI and also set the static IP address of WIFI or automatically set the static IP address of the Ethernet port. |
To use the method in this section, you first need to prepare a Linux system machine. For example, a computer or a virtual machine with Ubuntu system installed. Why do you need a Linux system machine, because the root file system of the development board Linux system burned in the micro SD card is in ext4 format, and the Linux system machine can mount it normally, and then modify the configuration files in it. |
If you want to modify it in the Windows system, you can use the software Paragon ExtFS for Windows. Since this software needs to be paid, and there is no similar free software that is easy to use, I will not demonstrate it here. In addition, if you have any problems with Paragon ExtFS for Windows software, please solve it yourself, we will not answer questions. |
First burn the Linux image of the development board you want to use into the micro SD card, and then use a card reader to insert the micro SD card that has burned the Linux image of the development board into a machine with a Linux system (such as a machine with an Ubuntu system installed computer, the following uses Ubuntu computer as an example to demonstrate)
When the micro SD card is inserted into the Ubuntu computer, the Ubuntu computer will generally automatically mount the partition of the Linux root file system in the micro SD card. You can know from the following command that /media/test/opi_root is the Linux root file in the micro SD card The path where the system is mounted
test@test:~$ df -h | grep "media"
/dev/sdd1 1.4G 1.2G 167M 88% /media/test/opi_root
test@test:~$ ls /media/test/opi_root
bin boot dev etc home lib lost+found media mnt opt proc root run
sbin selinux srv sys tmp usr varThen enter the /boot directory of the Linux system burned in the micro SD card
test@test:~$ cd /media/test/opi_root/boot/
Then copy the orangepi_first_run.txt.template to orangepi_first_run.txt. Through the orangepi_first_run.txt configuration file, you can set the Linux system on the development board to automatically connect to a WIFI hotspot when it starts for the first time, and you can also set the WIFI or Ethernet port. static IP address
test@test:/media/test/opi_root/boot$ sudo cp orangepi_first_run.txt.template orangepi_first_run.txt
You can open the orangepi_first_run.txt file with the following command, and then you can view and modify the contents
test@test:/media/test/opi_root/boot$ sudo vim orangepi_first_run.txt
Instructions for using variables in the orangepi_first_run.txt file
FR_general_delete_this_file_after_completion variable is used to set whether to delete the orangepi_first_run.txt file after the first startup. The default is 1, that is, delete. If it is set to 0, orangepi_first_run.txt will be renamed to orangepi_first_run.txt after the first startup .old, generally keep the default value
FR_net_change_defaults variable is used to set whether to change the default network settings, this must be set to 1, otherwise all network settings will not take effect
FR_net_ethernet_enabled variable is used to control whether to enable the configuration of the Ethernet port. If you need to set the static IP address of the Ethernet port, please set it to 1
FR_net_wifi_enabled variable is used to control whether to enable WIFI configuration. If you need to set the development board to automatically connect to WIFI hotspots, you must set it to 1. In addition, please note that if this variable is set to 1, the setting of the Ethernet port will be will fail. That is to say, the WIFI and Ethernet ports cannot be set at the same time (why, because it is not necessary...)
FR_net_wifi_ssid variable is used to set the name of the WIFI hotspot you want to connect to
FR_net_wifi_key variable is used to set the password of the WIFI hotspot you want to connect to
FR_net_use_static variable is used to set whether to set the static IP address of WIFI or Ethernet port
FR_net_static_ip variable is used to set static IP address, please set according to your actual situation
FR_net_static_gateway variable is used to set the gateway, please set it according to your actual situation
The following demonstrates several specific setting examples:
For example, if you want the Linux system of the development board to automatically connect to the WIFI hotspot after the first startup, you can set it like this:
a) Set FR_net_change_defaults to 1
b) Set FR_net_wifi_enabled to 1
c) Set FR_net_wifi_ssid to the name of the WIFI hotspot you want to connect to
d) Set FR_net_wifi_key to the password of the WIFI hotspot you want to connect to
For example, if you want the Linux system of the development board to automatically connect to the WIFI hotspot after the first startup, and set the IP address of the WIFI to a specific static IP address (so that when the Linux system is started, you can directly use the set static IP address to ssh remotely Log in to the development board without checking the IP address of the development board through the background of the router), you can set it like this:
a) Set FR_net_change_defaults to 1
b) Set FR_net_wifi_enabled to 1
c) Set FR_net_wifi_ssid to the name of the WIFI hotspot you want to connect to
d) Set FR_net_wifi_key to the password of the WIFI hotspot you want to connect to
e) Set FR_net_use_static to 1
f) Set FR_net_static_ip to the desired IP address
g) Set FR_net_static_gateway to the corresponding gateway address
For example, if you want to automatically set the IP address of the Ethernet port to the desired static IP address after the Linux system of the development board starts for the first time, you can set it like this:
a) Set FR_net_change_defaults to 1
b) Set FR_net_ethernet_enabled to 1
c) Set FR_net_use_static to 1
d) Set FR_net_static_ip to the desired IP address
e) Set FR_net_static_gateway to the corresponding gateway address
After modifying the orangepi_first_run.txt file, you can exit the /boot directory of the development board Linux system in the micro SD card, uninstall the micro SD card, and then insert the micro SD card into the development board to start
If you have not set a static IP address, you still need to check the IP address through the background of the router. If you have set a static IP address, you can ping the set static IP address on the computer. If you can ping, it means that the system has started normally, and The network has also been set correctly, and then you can use the set IP address ssh to remotely log in to the Linux system of the development board
After the Linux system of the development board is started for the first time, orangepi_first_run.txt will be deleted or renamed to orangepi_first_run.txt.old. At this time, the orangepi_first_run.txt configuration file will be reset, and then the Linux system of the development board will be restarted, orangepi_first_run. The configuration in txt will not take effect again, because this configuration will only be effective when the Linux system is started for the first time after burning, please pay special attention to this point.
SSH remote login development board
Linux systems enable ssh remote login by default and allow the root user to log in to the system. Before logging in with ssh, you first need to ensure that the Ethernet or wifi network is connected, and then use the ip addr command or check the router to obtain the IP address of the development board. |
SSH remote login development board under Ubuntu
- Obtain the IP address of the development board
- Then you can remotely log in to the linux system through the ssh command
test@test:~$ ssh orangepi@192.168.1.xxx (Need to be replaced with the IP address of the development board)
orangepi@192.168.1.xx's password: (Enter the password here, the default password is orangepi)
Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.
If you are prompted to refuse the connection, as long as you are using the image provided by Orange Pi, please do not suspect that the password orangepi is wrong, but find other reasons.
After successfully logging in to the system, the display is as shown in the figure below
If ssh fails to log in to the linux system normally, first check whether the IP address of the development board can be pinged. If the ping is ok, you can log in to the linux system through the serial port or HDMI display and then enter the following command on the development board and try again. Is it possible to connect:
root@orangepi:~# reset_ssh.sh
If it still doesn't work, try to reset the system.
SSH remote login development board under Windows
First obtain the IP address of the development board
Under Windows, you can use MobaXterm to remotely log in to the development board, first create a new ssh session
Open Session
Then select SSH in Session Setting
Then enter the IP address of the development board in the Remote host
Then enter the user name root or orangepi of the linux system in Specify username
Finally click OK
Then you will be prompted to enter a password. The default passwords for root and orangepi users are orangepi
Note that when entering the password, the specific content of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputting.
The display after successfully logging in to the system is shown in the figure below
HDMI test
HDMI display test
Use a Micro HDMI to HDMI cable to connect the Orange Pi development board and HDMI display
After starting the linux system, if the HDMI monitor has image output, it means that the HDMI interface is working normally
Note that although many laptops have an HDMI interface, the HDMI interface of the notebook generally only has the output function, and does not have the function of HDMI IN, that is to say, the HDMI output of other devices cannot be displayed on the notebook screen.
When you want to connect the HDMI of the development board to the HDMI port of the laptop, please make sure that your laptop supports the HDMI IN function.
When the HDMI is not displayed, please check whether the HDMI cable is plugged in tightly. After confirming that there is no problem with the connection, you can change a different screen and try to see if it is displayed.
HDMI to VGA display test
First you need to prepare the following accessories
HDMI to VGA display test as shown below
When using HDMI to VGA display, the development board and the Linux system of the development board do not need to make any settings, only the Micro HDMI interface of the development board can display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.
How to set HDMI resolution in Linux5.4 system
Note: This method is only applicable to systems with linux5.4 kernel. |
There is a disp_mode variable in /boot/orangepiEnv.txt of the linux system, which can be used to set the resolution of the HDMI output. The default resolution of the linux system is 1080p60
orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt
verbosity=1
console=both
disp_mode=1080p60
fb0_width=1920
fb0_height=1080
The values supported by the disp_mode variable are shown in the table below
Supported values for disp_mode HDMI resolution HDMI refresh rate 480i 720x480 60 576i 720x480 50 480p 720x480 60 576p 720x576 60 720p50 1280x720 50 720p60 1280x720 60 1080i50 1920x1080 50 1080i60 1920x1080 60 1080p24 1920x1080 24 1080p50 1920x1080 50 1080p60 1920x1080 60 Note: Linux systems currently do not support 4K resolution.
Change the value of the disp_mode variable to the desired output resolution, and then restart the system, HDMI will output the set resolution
The method of viewing the HDMI output resolution is as follows. If the displayed resolution is the same as the set resolution, it means that the setting of the development board is correct.
orangepi@orangepi:~$ sudo cat /sys/class/disp/disp/attr/sys
How to Modify the Framebuffer Width and Height of Linux5.4 System
Note: This method is only applicable to systems with linux5.4 kernel. |
There are two variables fb0_width and fb0_height in the /boot/orangepiEnv.txt of the linux system, which can be used to set the width and height of the Framebuffer. The default setting of the linux system is fb0_width=1920 and fb0_height=1080.
orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt verbosity=1 console=both disp_mode=1080p60 fb0_width=1920 fb0_height=1080 |
The reference values corresponding to different resolutions of fb0_width and fb0_height are as follows:
HDMI resolution | fb0_width | fb0_height |
480p | 720 | 480 |
576p | 720 | 576 |
720p | 1280 | 720 |
1080p | 1920 | 1080 |
Under the same HDMI resolution, the larger the value of fb0_width and fb0_height, the smaller the text displayed on the screen, and the smaller the value of fb0_width and fb0_height, the larger the text displayed on the screen.
Framebuffer Cursor Setting
The softcursor used by Framebuffer, the method of setting the cursor to blink or not is as follows
root@orangepi:~# echo 1 > /sys/class/graphics/fbcon/cursor_blink #cursor blinking
root@orangepi:~# echo 0 > /sys/class/graphics/fbcon/cursor_blink #cursor not blinking
If you need to hide the cursor, you can add vt.global_cursor_default=0 in the extraargs variable of /boot/orangepiEnv.txt (the value of extraargs will be assigned to the bootargs environment variable and finally passed to the kernel) (if vt.global_cursor_default=1, the cursor will be displayed) , and then restart the system to see that the cursor has disappeared
orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt
verbosity=1
console=both
disp_mode=1080p60
fb0_width=1920
fb0_height=1080
extraargs=vt.global_cursor_default=0
How to use Bluetooth
Test method of desktop image
Click the Bluetooth icon in the upper right corner of the desktop
Then select the adapter
If there is a prompt on the following interface, please select Yes
Then set the Visibility Setting to Always visible in the Bluetooth adapter setting interface, and then close it
Then open the configuration interface of the Bluetooth device
Click Search to start scanning the surrounding Bluetooth devices
Then select the Bluetooth device you want to connect to, and then click the right button of the mouse to pop up the operation interface for this Bluetooth device, select Pair to start pairing, and the demonstration here is to pair with an Android phone
When pairing, a pairing confirmation box will pop up in the upper right corner of the desktop, just select Confirm to confirm, and the phone also needs to confirm at this time
After pairing with the mobile phone, you can select the paired Bluetooth device, then right click and select Send a File to start sending a picture to the mobile phone
The interface for sending pictures is as follows
How to use the server image
After entering the system, you can first check whether there is a Bluetooth device node through the hciconfig command. If it exists, it means that the Bluetooth initialization is normal.
orangepi@orangepi:~$ sudo apt update && sudo apt install -y bluez
orangepi@orangepi:~$ hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 3E:61:3D:19:0E:52 ACL MTU: 1021:8 SCO MTU: 240:3
UP RUNNING
RX bytes:925 acl:0 sco:0 events:72 errors:0
TX bytes:5498 acl:0 sco:0 commands:72 errors:0
Features: 0xbf 0xff 0x8d 0xfe 0xdb 0x3d 0x7b 0xc7
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'orangepi'
Class: 0x3c0000
Service Classes: Rendering, Capturing, Object Transfer, Audio
Device Class: Miscellaneous,
HCI Version: 5.0 (0x9) Revision: 0x400
LMP Version: 5.0 (0x9) Subversion: 0x400
Manufacturer: Spreadtrum Communications Shanghai Ltd (492)
Use bluetoothctl to scan bluetooth devices
orangepi@orangepi:~$ sudo bluetoothctl
[NEW] Controller 10:11:12:13:14:15 orangepizero3 [default]
Agent registered
[bluetooth]# power on #enable controller
Changing power on succeeded
[bluetooth]# discoverable on #Make the controller discoverable
Changing discoverable on succeeded
[CHG] Controller 10:11:12:13:14:15 Discoverable: yes
[bluetooth]# pairable on #Set the controller as pairable
Changing pairable on succeeded
[bluetooth]# scan on #Start scanning for nearby Bluetooth devices
Discovery started
[CHG] Controller 10:11:12:13:14:15 Discovering: yes
[NEW] Device 76:60:79:29:B9:31 76-60-79-29-B9-31
[NEW] Device 9C:2E:A1:42:71:11 MiPhone
[NEW] Device DC:72:9B:4C:F4:CF orangepi
[bluetooth]# scan off #After scanning to the Bluetooth device you want to connect, you can close the scan, and then write down the MAC address of the Bluetooth device. The Bluetooth device tested here is an Android phone, the name of the Bluetooth is orangepi, and the corresponding MAC address is DC:72:9B:4C :F4:CF
Discovery stopped
[CHG] Controller 10:11:12:13:14:15 Discovering: no
[CHG] Device DC:72:9B:4C:F4:CF RSSI is nil
After scanning to the device you want to pair, you can pair it. You need to use the MAC address of the device for pairing
[bluetooth]# pair DC:72:9B:4C:F4:CF #Use the MAC address of the scanned Bluetooth device for pairing
Attempting to pair with DC:72:9B:4C:F4:CF
[CHG] Device DC:72:9B:4C:F4:CF Connected: yes
Request confirmation
[leeb1m[agent] Confirm passkey 764475 (yes/no): yes #Enter yes here, and you need to confirm on the mobile phone
[CHG] Device DC:72:9B:4C:F4:CF Modalias: bluetooth:v010Fp107Ed1436
[CHG] Device DC:72:9B:4C:F4:CF UUIDs: 0000046a-0000-1000-8000-00805f9b34fb
[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: yes
[CHG] Device DC:72:9B:4C:F4:CF Paired: yes
Pairing successful #Prompt that the pairing is successful
[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: no
[CHG] Device DC:72:9B:4C:F4:CF Connected: no
After the pairing is successful, the Bluetooth interface of the mobile phone will be displayed as follows
To connect a Bluetooth device, you need to install the pulseaudio-module-bluetooth package, and then start the pulseaudio service
orangepi@orangepi:~$ sudo apt update
orangepi@orangepi:~$ sudo apt -y install pulseaudio-module-bluetooth
orangepi@orangepi:~$ pulseaudio --start
How to connect to a Bluetooth device
orangepi@orangepi:~$ sudo bluetoothctl
Agent registered
[bluetooth]# paired-devices #View the MAC address of the paired Bluetooth device
Device DC:72:9B:4C:F4:CF orangepi
[bluetooth]# connect DC:72:9B:4C:F4:CF #Connect to bluetooth device using MAC address
Attempting to connect to DC:72:9B:4C:F4:CF
[CHG] Device DC:72:9B:4C:F4:CF Connected: yes
Connection successful
[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: yes
[CHG] Controller 10:11:12:13:14:15 Discoverable: no
[orangepi]# #This prompt appears to indicate that the connection is successful
After connecting the bluetooth device, the bluetooth configuration interface of the Android mobile phone can see the prompt that the audio has been connected for calls and media
USB interface test
The USB interface can be connected to a USB hub to expand the number of USB interfaces. |
Connect USB mouse or keyboard to test
- Insert the USB interface keyboard into the USB interface of the Orange Pi development board
- Connect the Orange Pi development board to the HDMI display
- If the mouse or keyboard can operate normally, it means that the USB interface is working normally (the mouse can only be used in the desktop version of the system)
Connect USB storage device test
- First insert the U disk or USB mobile hard disk into the USB interface of the Orange Pi development board
- Execute the following command, if you can see the output of sdX, it means that the U disk is recognized successfully
orangepi@orangepi:~$ cat /proc/partitions | grep "sd*"
major minor #blocksname
8030044160 sda
8130043119 sda1
- Use the mount command to mount the U disk to /mnt, and then you can view the files in the U disk
orangepi@orangepi:~$ sudo mount /dev/sda1 /mnt/ orangepi@orangepi:~$ ls /mnt/ test.txt |
- After mounting, you can view the capacity usage and mount point of the U disk through the df -h command
orangepi@orangepi:~$ df -h | grep "sd" /dev/sda1 29G 208K 29G 1% /mnt |
USB Ethernet card test
- The usable USB Ethernet cards that have been tested so far are as follows. Among them, the RTL8153 USB Gigabit network card can be used normally when it is inserted into the USB 2.0 Host interface of the development board, but the speed cannot reach Gigabit. Please note that
serial number model 1 RTL8152B USB 100M network card 2 RTL8153 USB Gigabit LAN
First insert the USB network card into the USB interface of the development board, and then insert the network cable into the USB network card to ensure that the network cable can access the Internet normally. If you can see the following log information through the dmesg command, it means that the USB network card is recognized normally.
orangepi@orangepi:~$ dmesg | tail
[ 121.985016] usb 3-1: USB disconnect, device number 2
[ 126.873772] sunxi-ehci 5311000.ehci3-controller: ehci_irq: highspeed device connect
[ 127.094054] usb 3-1: new high-speed USB device number 3 using sunxi-ehci
[ 127.357472] usb 3-1: reset high-speed USB device number 3 using sunxi-ehci
[ 127.557960] r8152 3-1:1.0 eth1: v1.08.9
[ 127.602642] r8152 3-1:1.0 enx00e04c362017: renamed from eth1
[ 127.731874] IPv6: ADDRCONF(NETDEV_UP): enx00e04c362017: link is not ready
[ 127.763031] IPv6: ADDRCONF(NETDEV_UP): enx00e04c362017: link is not ready
[ 129.892465] r8152 3-1:1.0 enx00e04c362017: carrier on
[ 129.892583] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c362017: link becomes ready
Then you can see the device node of the USB network card and the automatically assigned IP address through the ifconfig command
orangepi@orangepi:~$ sudo ifconfig
enx00e04c362017: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.177 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::681f:d293:4bc5:e9fd prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:36:20:17 txqueuelen 1000 (Ethernet)
RX packets 1849 bytes 134590 (134.5 KB)
RX errors 0 dropped 125 overruns 0 frame 0
TX packets 33 bytes 2834 (2.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The command to test network connectivity is as follows
orangepi@orangepi:~$ ping www.baidu.com -I enx00e04c362017
PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=56 time=6.74 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=56 time=6.80 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=56 time=7.27 ms
^C
--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 6.260/6.770/7.275/0.373 ms
USB camera test
First insert the USB camera into the USB port of the Orange Pi development board
Then through the lsmod command, you can see that the kernel has automatically loaded the following modules
orangepi@orangepi:~$ lsmod
Module Size Used by
uvcvideo 106496 0
Through the v4l2-ctl command, you can see that the device node information of the USB camera is /dev/video0
orangepi@orangepi:~$ sudo apt update
orangepi@orangepi:~$ sudo apt install -y v4l-utils
orangepi@orangepi:~$ v4l2-ctl --list-devices
USB 2.0 Camera (usb-sunxi-ehci-1):
/dev/video0
Note that the l in v4l2 is a lowercase letter l, not the number 1.
In addition, the serial number of the video is not necessarily video0, please refer to what you actually see.
Use fswebcam to test the USB camera
Install fswebcam
orangepi@orangepi:~$ sudo apt update
orangepi@orangepi:~$ sudo apt-get install -y fswebcam
After installing fswebcam, you can use the following command to take pictures
a) -d option is used to specify the device node of the USB camera
b) --no-banner is used to remove the watermark of the photo
c) -r option is used to specify the resolution of the photo
d) -S option is used to set the number of previous frames to skip
e) ./image.jpg is used to set the name and path of the generated photo
orangepi@orangepi:~$ sudo fswebcam -d /dev/video0 \
--no-banner -r 1280x720 -S 5 ./image.jpg
In the server version of the linux system, you can use the scp command to transfer the taken pictures to the Ubuntu PC for mirror viewing after taking pictures
orangepi@orangepi:~$ scp image.jpg test@192.168.1.55:/home/test (Modify the IP address and path according to the actual situation)
In the desktop version of the linux system, you can directly view the captured pictures through the HDMI display
Use mjpg-streamer to test USB camera
Download mjpg-streamer
a) Github download address:
orangepi@orangepi:~$ git clone https://github.com/jacksonliam/mjpg-streamer
b) The image download address of Gitee is:
orangepi@orangepi:~$ git clone https://gitee.com/leeboby/mjpg-streamer
Install dependent packages
a) Ubuntu system
orangepi@orangepi:~$ sudo apt-get install -y cmake libjpeg8-dev
b) Debian system
orangepi@orangepi:~$ sudo apt-get install -y cmake libjpeg62-turbo-dev
Compile and install mjpg-streamer
orangepi@orangepi:~$ cd mjpg-streamer/mjpg-streamer-experimental
orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ make -j4
orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ sudo make install
Then enter the following command to start mjpg_streamer
Note that the serial number of the video is not necessarily video0, please refer to what you actually see.
orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ export LD_LIBRARY_PATH=.
orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ sudo ./mjpg_streamer -i "./input_uvc.so -d \
/dev/video0 -u -f 30" -o "./output_http.so -w ./www"
Then enter [the IP address of the development board: 8080] in the browser of the Ubuntu PC or Windows PC or mobile phone on the same LAN as the development board to see the video output by the camera
Audio Test
How to play audio using the command line
Headphone jack playback audio test
First, you need to insert the 13pin expansion board into the 13pin interface of the Orange Pi development board, and then insert the earphone into the audio interface
Through the aplay -l command, you can view the sound card devices supported by the Linux system
The output of the linux5.4 system is as follows, where card 0: audiocodec is the sound card device required for earphone playback
root@orangepi:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sun50iw9-codec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
The output of the linux6.1 system is as follows, where audiocodec is the sound card device required for earphone playback
root@orangepi:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Then use the aplay command to play the audio, and the headset can hear the sound
root@orangepi:~# aplay -D hw:0,0 /usr/share/sounds/alsa/audio.wav
Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
If there is noise in the earphone test, please pull out some earphones, do not insert all the earphones.
HDMI audio playback test
First use the Micro HDMI to HDMI cable to connect the Orange Pi development board to the TV (other HDMI monitors need to ensure that they can play audio)
HDMI audio playback does not require other settings, just use the aplay command to play directly
root@orangepi:~# aplay -D hw:2,0 /usr/share/sounds/alsa/audio.wav
Testing audio methods on desktop systems
First open the file manager
Then find the following file (if there is no audio file in the system, you can upload an audio file to the system yourself)
Then select the audio.wav file, right click and select open with vlc to start playing
How to switch between different audio devices such as HDMI playback and headphone playback
Infrared receiving test
First, you need to insert the 13pin expansion board into the 13pin interface of the Orange Pi development board. After inserting the expansion board, the development board can use the infrared receiving function
Install ir-keytable infrared testing software
orangepi@orangepi:~$ sudo apt update orangepi@orangepi:~$ sudo apt-get install -y ir-keytable |
Then execute ir-keytable to view the information of the infrared device
- linux5.4 system output is as follows
- Driver: sunxi-rc-recv, table: rc_map_sunxi
- lirc device: /dev/lirc0
- Supported protocols: lirc nec
- Enabled protocols: lirc nec
- Name: sunxi_ir_recv
- bus: 25, vendor/product: 0001:0001, version: 0x0100
- Repeat delay = 500 ms, repeat period = 125 ms
orangepi@orangepi:~$ ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event1) with:
The output of the linux6.1 system is as follows
orangepi@orangepi:~$ ir-keytable
Found /sys/class/rc/rc0/ with:
Name: sunxi-ir
Driver: sunxi-ir
Default keymap: rc-empty
Input device: /dev/input/event5
LIRC device: /dev/lirc0
Attached BPF protocols: Operation not permitted
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
Enabled kernel protocols: lirc
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
Before testing the infrared receiving function, you need to prepare an infrared remote controller dedicated to Orange Pi, other remote controllers do not support it
Then enter the ir-keytable -t command in the terminal, and then use the infrared remote control to press the button against the infrared receiver of the Orange Pi development board to see the received key code in the terminal
- linux5.4 system output is as follows
orangepi@orangepi:~$ sudo ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1598339152.260376: event type EV_MSC(0x04): scancode = 0xfb0413
1598339152.260376: event type EV_SYN(0x00).
1598339152.914715: event type EV_MSC(0x04): scancode = 0xfb0410
linux6.1 system output is as follows
orangepi@orangepi:~$ sudo ir-keytable -c -p NEC -t
Old keytable cleared
Protocols changed to nec
Testing events. Please, press CTRL-C to abort.
202.063219: lirc protocol(nec): scancode = 0x45c
202.063249: event type EV_MSC(0x04): scancode = 0x45c
202.063249: event type EV_SYN(0x00).
Temperature sensor
- H618 has a total of 4 temperature sensors, the command to view the temperature is as follows:
The displayed temperature value needs to be divided by 1000, the unit is Celsius.
- sensor0: CPU temperature sensor, the first command is used to view the type of temperature sensor, and the second command is used to view the value of the temperature sensor
sensor1: DDR temperature sensor, the first command is used to view the type of temperature sensor, and the second command is used to view the value of the temperature sensor
orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone1/type
ddr_thermal_zone
orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone1/temp
57410
sensor2: GPU temperature sensor, the first command is used to view the type of temperature sensor, the second command is used to view the value of the temperature sensor
orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone2/type
gpu_thermal_zone
orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone2/temp
59273
sensor3: VE temperature sensor, the first command is used to view the type of temperature sensor, and the second command is used to view the value of the temperature sensor
orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone3/type
ve_thermal_zone
orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone3/temp
58949
orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone0/type cpu_thermal_zone orangepi@orangepi:~$ cat /sys/class/thermal/thermal_zone0/temp 57734 |
- The system with Linux6.1 kernel can also use the sensors command to view the current temperature of the system
orangepi@orangepi:~$ sensors cpu_thermal-virtual-0 Adapter: Virtual device temp1: +47.4°C (crit = +110.0°C)
Adapter: Virtual device temp1: +48.7°C (crit = +110.0°C)
Adapter: Virtual device temp1: +47.8°C (crit = +110.0°C)
Adapter: Virtual device temp1: +47.2°C (crit = +110.0°C) |
13 Pin Description of the Pin Expansion Board Interface
Please refer to the figure below for the order of the interface pins of the 13 pin expansion board on the development board
The schematic diagram of the 13pin interface of the development board is as follows
The function description of the 13 pin expansion board interface pins of the development board is as follows
When the 13pin pin is connected to the expansion board, it can be provided additionally
a) 2个USB 2.0 Host
b) Audio output of the left and right audio channels of the earphones
c) TV-OUT video output
d) Infrared receiving function
e) After the expansion board is connected, pins 10, 11 and 12 of the 13pin interface cannot be used
f) In addition, it should be noted that the MIC on the 13pin expansion board cannot be used on the Orange Pi Zero 3
When pin 13 is not connected to the expansion board, pins 10, 11, 12 and 13 can be used as ordinary GPIO ports
GPIO serial number Function Pin 5V 1 GND 2 USB2-DM 3 USB2-DP 4 USB3-DM 5 USB3-DP 6 LINEOUTR 7 LINEOUTL 8 TV-OUT 9 65 PC1 10 272 PI16 11 262 PI6 12 234 IR-RX/PH10 13
26 Pin Interface Pin Description
For the order of the 26-pin interface pins on the Orange Pi Zero 3 development board, please refer to the silkscreen diagram on the development board
The functions of the 26 pin interface pins on the development board are shown in the table below
GPIO S/N GPIO Function Pin 3.3V 1 229 PH5 TWI3-SDA 3 228 PH4 TWI3-SCK 5 73 PC9 PC9 7 GND 9 70 PC6 PC6 11 69 PC5 PC5 13 72 PC8 PC8 15 3.3V 17 231 PH7 SPI1_MOSI 19 232 PH8 SPI1_MISO 21 230 PH6 SPI1_CLK 23 GND 25 Pin Function GPIO GPIO S/N 2 5V 4 5V 6 GND 8 UART5_TX PH2 226 10 UART5_RX PH3 227 12 PC11 PC11 75 14 GND 16 PC15 PC15 79 18 PC14 PC14 78 20 GND 22 PC7 PC7 71 24 SPI1_CS PH9 233 26 PC10 PC10 74
- There are a total of 17 GPIO ports in the 26pin interface, and the voltage of all GPIO ports is 3.3v
How to install wiringOP
Note that wiringOP has been pre-installed in the linux image released by Orange Pi. Unless the code of wiringOP is updated, there is no need to re-download, compile and install, just use it directly.
orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb
wiringOP is currently mainly adapted to the functions of setting GPIO port input and output, setting GPIO port output high and low levels, and setting up and down pull-down resistors. Functions such as hardware PWM are not available. |
Download the code of wiringOP
orangepi@orangepi:~$ sudo apt update
orangepi@orangepi:~$ sudo apt install -y git
orangepi@orangepi:~$ git clone https://github.com/orangepi-xunlong/wiringOP.git -b next
Note that the source code needs to download the code of the wiringOP next branch, please don't miss the -b next parameter.
If you have problems downloading the code from GitHub, you can directly use the wiringOP source code that comes with the Linux image, and the storage location is: /usr/src/wiringOP.
Compile and install wiringOP
orangepi@orangepi:~$ cd wiringOP
orangepi@orangepi:~/wiringOP$ sudo ./build clean
orangepi@orangepi:~/wiringOP$ sudo ./build
Test the output of the gpio readall command as follows
There is a one-to-one correspondence between pins 1 to 26 and 26 Pins on the development board
Pin 27 corresponds to pin 10 of 13pin on the development board
Pin 29 corresponds to pin 11 of 13pin on the development board
Pin 31 corresponds to pin 12 of 13pin on the development board
Pin 33 corresponds to pin 13 of 13pin on the development board
Pins 28, 30, 32, and 34 are empty, please ignore them
26pin interface GPIO, I2C, UART, SPI and PWM test
26pin GPIO port test
The following takes pin 7—corresponding to GPIO as PC9—corresponding to wPi number 2—as an example to demonstrate how to set the high and low levels of the GPIO port
First set the GPIO port to output mode, where the third parameter requires the serial number of the wPi corresponding to the input pin
root@orangepi:~/wiringOP# gpio mode 2 out
Then set the GPIO port to output a low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully
root@orangepi:~/wiringOP# gpio write 2 0
Use gpio readall to see that the value (V) of pin 7 has changed to 0
Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.
root@orangepi:~/wiringOP# gpio write 2 1
Use gpio readall to see that the value (V) of pin 7 has changed to 1
The setting method of other pins is similar, just modify the serial number of wPi to the corresponding serial number of the pin
How to set pull-up and pull-down resistors on 26 pin GPIO ports
The following takes pin 7—the corresponding GPIO is PC9—the corresponding wPi number is 2—as an example to demonstrate how to set the pull-up and pull-down resistors of the GPIO port
First, you need to set the GPIO port to the input mode, and the third parameter needs to be the serial number of the wPi corresponding to the input pin
root@orangepi:~/wiringOP# gpio mode 2 in
After setting to input mode, execute the following command to set the GPIO port to pull-up mode
root@orangepi:~/wiringOP# gpio mode 2 up
Then enter the following command to read the level of the GPIO port, if the level is 1, it means that the pull-up mode is set successfully
root@orangepi:~/wiringOP# gpio read 2
1
Then execute the following command to set the GPIO port to pull-down mode
root@orangepi:~/wiringOP# gpio mode 2 down
Then enter the following command to read the level of the GPIO port, if the level is 0, the pull-down mode is set successfully
root@orangepi:~/wiringOP# gpio read 2
0
26pin SPI test
According to the schematic diagram of the 26pin interface, the available spi is spi1
The spi1 is disabled by default in the Linux system and needs to be manually enabled before it can be used. The steps to open are as follows:
First run orangepi-config, normal users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
Then select System
Then select Hardware
Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select spi1-cs1-spidev
Then select <Save> to save
Then select <Back>
Then select <Reboot> to restart the system to make the configuration take effect
Then check whether there is a spidev1.1 device node in the Linux system. If it exists, it means that the configuration of SPI1 has taken effect
orangepi@orangepi:~$ ls /dev/spidev1*
/dev/spidev1.1
Do not short-circuit the mosi and miso pins of SPI1 first, the output result of running spidev_test is as follows, you can see that the data of TX and RX are inconsistent
orangepi@orangepi:~$ sudo spidev_test -v -D /dev/spidev1.1
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.
RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ............................….
Then short the two pins of mosi (the 19th pin in the 26pin interface) and miso (the 21st pin in the 26pin interface) of SPI1, and then run the output of spidev_test as follows, you can see the sending and receiving same data
orangepi@orangepi:~$ sudo spidev_test -v -D /dev/spidev1.1
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.
RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.
26pin I2C test
According to the schematic diagram of 26pin, the available i2c is i2c3
i2c3 is disabled by default in the Linux system, and it needs to be manually enabled before it can be used. The steps to open are as follows:
First run orangepi-config, normal users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
Then select System
Then select Hardware
Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select ph-i2c3
Then select <Save> to save
Then select <Back>
Then select <Reboot> to restart the system to make the configuration take effect
After starting the linux system, first confirm that there is an i2c3 device node under /dev
orangepi@orangepi:~$ ls /dev/i2c-3
/dev/i2c-3
Then start testing i2c, first install i2c-tools
orangepi@orangepi:~$ sudo apt-get update
orangepi@orangepi:~$ sudo apt-get install -y i2c-tools
Then connect an i2c device to the i2c3 pin of the 26pin connector
Please select the 5V and 3.3V pins according to the specific i2c device, and the voltage value required by different i2c devices may be different.
sda pin Corresponding to pin 3 in 26pin sck pin Corresponding to pin 5 in 26pin 5v pin Corresponding to pin 2 in 26pin 3.3v pin Corresponding to pin 1 in 26pin gnd pin Corresponding to pin 6 in 26pin
Then use the i2cdetect -y 3 command, if the address of the connected i2c device can be detected, it means that i2c can be used normally
Different i2c device addresses are different, the address 0x50 in the figure below is just an example. Please refer to what you actually see.
26pin UART test
According to the schematic diagram of the 26pin interface, the available uart is uart5
Uart5 is disabled by default in the Linux system, and it needs to be opened manually to use it. The steps to open are as follows:
First run orangepi-config, normal users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
Then select System
Then select Hardware
Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select ph-uart5
Then select <Save> to save
Then select <Back>
Then select <Reboot> to restart the system to make the configuration take effect
After entering the linux system, first confirm whether there is a uart5 device node under /dev
Note that the linux5.4 system is /dev/ttyAS5.
orangepi@orangepi:~$ ls /dev/ttyS5
/dev/ttyS5
Then start to test the uart5 interface, first use the DuPont line to short the rx and tx of the uart5 interface to be tested
uart5 | |
tx pin | Corresponding to pin 8 of 26pin |
rx pin | Corresponding to pin 10 of 26pin |
Use the gpio command in wiringOP to test the loopback function of the serial port as shown below. If you can see the following print, it means that the serial port communication is normal
orangepi@orangepi:~$ gpio serial /dev/ttyS5 # linux-6.1 test command
orangepi@orangepi:~$ gpio serial /dev/ttyAS5 # linux-5.4 test command
Out: 0: -> 0
Out: 1: -> 1
Out: 2: -> 2
Out: 3: -> 3^C
PWM test method
The development board can use up to 4 channels of PWM, and the positions of their pins are shown in the figure below: |
In the Linux system, the pwm is closed by default, and it needs to be opened manually to use it. The steps to open are as follows:
First run orangepi-config, normal users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
Then select System
Then select Hardware
Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select the configuration corresponding to pwm
Since the RX and TX pins of UART5 in the PWM1, PWM2 and 26pin interfaces are multiplexed, please make sure that the UART5 configuration is not selected (do not check ph-uart5) when turning on PWM1 and PWM2 (you need to select ph-pwm12).
PWM3, PWM4 and the TX and RX pins in the debug serial port are multiplexed, so when using PWM3 and PWM4 (need to select ph-pwm34), please turn off the configuration of UART0 (need to select disable-uart0), after turning off UART0 The debug serial port cannot be used.
Then select <Save> to save
Then select <Back>
Then select <Reboot> to restart the system to make the configuration take effect
After restarting, the PWM test can be started
Please execute the following commands under the root user.
Enter the following command on the command line to make pwm1 output a 50Hz square wave
root@orangepi:~# echo 1 > /sys/class/pwm/pwmchip0/export
root@orangepi:~# echo 20000000 > /sys/class/pwm/pwmchip0/pwm1/period
root@orangepi:~# echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
root@orangepi:~# echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable
Enter the following command on the command line to make pwm2 output a 50Hz square wave
root@orangepi:~# echo 2 > /sys/class/pwm/pwmchip0/export
root@orangepi:~# echo 20000000 > /sys/class/pwm/pwmchip0/pwm2/period
root@orangepi:~# echo 1000000 > /sys/class/pwm/pwmchip0/pwm2/duty_cycle
root@orangepi:~# echo 1 > /sys/class/pwm/pwmchip0/pwm2/enable
- Enter the following command on the command line to make pwm3 output a 50Hz square wave
root@orangepi:~# echo 3 > /sys/class/pwm/pwmchip0/export
root@orangepi:~# echo 20000000 > /sys/class/pwm/pwmchip0/pwm3/period
root@orangepi:~# echo 1000000 > /sys/class/pwm/pwmchip0/pwm3/duty_cycle
root@orangepi:~# echo 1 > /sys/class/pwm/pwmchip0/pwm3/enable
- Enter the following command on the command line to make pwm4 output a 50Hz square wave
root@orangepi:~# echo 4 > /sys/class/pwm/pwmchip0/export
root@orangepi:~# echo 20000000 > /sys/class/pwm/pwmchip0/pwm4/period
root@orangepi:~# echo 1000000 > /sys/class/pwm/pwmchip0/pwm4/duty_cycle
root@orangepi:~# echo 1 > /sys/class/pwm/pwmchip0/pwm4/enable
How to install and use wiringOP-Python
wiringOP-Python is the Python language version of wiringOP, which is used to operate the hardware resources of the development board, such as GPIO, I2C, SPI and UART, in the Python program. In addition, please note that all the following commands are operated under the root user. |
How to install wiringOP-Python
First install the dependency package
root@orangepi:~# sudo apt-get update
root@orangepi:~# sudo apt-get -y install git swig python3-dev python3-setuptools
Then use the following command to download the source code of wiringOP-Python
Note that the following git clone --recursive command will automatically download the source code of wiringOP, because wiringOP-Python depends on wiringOP. Please make sure that the download process does not report errors due to network problems.
If you have problems downloading the code from GitHub, you can directly use the wiringOP-Python source code that comes with the Linux image, and the storage location is: /usr/src/wiringOP-Python
root@orangepi:~# git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next
root@orangepi:~# cd wiringOP-Python
root@orangepi:~/wiringOP-Python# git submodule update --init --remote
Then use the following command to compile wiringOP-Python and install it into the Linux system of the development board
root@orangepi:~# cd wiringOP-Python
root@orangepi:~/wiringOP-Python# python3 generate-bindings.py > bindings.i
root@orangepi:~/wiringOP-Python# sudo python3 setup.py install
Then enter the following command, if there is help information output, it means that wiringOP-Python is installed successfully, press the q key to exit the help information interface
- wiringpi
- # This file was automatically generated by SWIG (http://www.swig.org).
- # Version 4.0.2
- #
- # Do not make changes to this file unless you know what you are doing--modify
- # the SWIG interface file instead.
root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; help(wiringpi)" Help on module wiringpi:
|
The steps to test whether wiringOP-Python is successfully installed under the python command line are as follows:
- First use the python3 command to enter the command line mode of python3
- Then import the python module of wiringpi
root@orangepi:~# python3
>>> import wiringpi;
- Finally, enter the following command to view the help information of wiringOP-Python, and press the q key to exit the help information interface
- wiringpi
- # This file was automatically generated by SWIG (http://www.swig.org).
- # Version 4.0.2
- #
- # Do not make changes to this file unless you know what you are doing--modify
- # the SWIG interface file instead.
- builtins.object
- GPIO
- I2C
- Serial
- nes
- class GPIO(builtins.object)
- | GPIO(pinmode=0)
- |
>>> help(wiringpi)
Help on module wiringpi:
NAME
DESCRIPTION
CLASSES
>>>
26pin GPIO port test
The following takes pin 7—the corresponding GPIO is PC9—the corresponding wPi number is 2—as an example to demonstrate how to set the high and low levels of the GPIO port
The steps to test directly with the command are as follows:
First set the GPIO port to output mode, where the first parameter of the pinMode function is the serial number of the wPi corresponding to the pin, and the second parameter is the GPIO mode
root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; \
from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \
wiringpi.pinMode(2, GPIO.OUTPUT) ; "
Then set the GPIO port to output low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully.
root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; \
from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\
wiringpi.digitalWrite(2, GPIO.LOW)"
Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.
root@orangepi:~/wiringOP-Python# python3 -c "import wiringpi; \
from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\
wiringpi.digitalWrite(2, GPIO.HIGH)"
The steps to test in the command line of python3 are as follows:
First use the python3 command to enter the command line mode of python3
root@orangepi:~# python3
Then import the python module of wiringpi
>>> import wiringpi
>>> from wiringpi import GPIO
Then set the GPIO port to output mode, where the first parameter of the pinMode function is the serial number of the wPi corresponding to the pin, and the second parameter is the GPIO mode
>>> wiringpi.wiringPiSetup()
0
>>> wiringpi.pinMode(2, GPIO.OUTPUT)
Then set the GPIO port to output low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully.
>>> wiringpi.digitalWrite(2, GPIO.LOW)
Then set the GPIO port to output a high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set successfully.
>>> wiringpi.digitalWrite(2, GPIO.HIGH)
The method of wiringOP-Python to set GPIO high and low levels in python code can refer to the blink.py test program in the examples below. The blink.py test program will set the voltage of all GPIO ports in the 26 pins of the development board to change continuously.
root@orangepi:~/wiringOP-Python# cd examples
root@orangepi:~/wiringOP-Python/examples# ls blink.py
blink.py
root@orangepi:~/wiringOP-Python/examples# python3 blink.py
26pin SPI test
According to the schematic diagram of the 26pin interface, the available spi is spi1
The spi1 is disabled by default in the Linux system and needs to be manually enabled before it can be used. The steps to open are as follows:
First run orangepi-config, normal users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
Then select System
Then select Hardware
Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select spi1-cs1-spidev
Then select <Save> to save
Then select <Back>然后选择<Back>
Then select <Reboot> to restart the system to make the configuration take effect
Then check whether there is a spidev1.1 device node in the Linux system. If it exists, it means that the configuration of SPI1 has taken effect
orangepi@orangepi:~$ ls /dev/spidev1*
/dev/spidev1.1
Then you can use the spidev_test.py program in the examples to test the loopback function of the SPI. The spidev_test.py program needs to specify the following two parameters:
--channel: Specify the channel number of SPI
--port: Specify the port number of SPI
Do not short-circuit the mosi and miso pins of SPI1, the output result of running spidev_test.py is as follows, you can see that the data of TX and RX are inconsistent
root@orangepi:~/wiringOP-Python# cd examples root@orangepi:~/wiringOP-Python/examples# python3 spidev_test.py \ --channel 1 --port 1 spi mode: 0x0 max speed: 500000 Hz (500 KHz) Opening device /dev/spidev1.1 TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |.............….| |
Then use the Dupont wire to short-circuit the two pins of txd (pin 19 in the 26pin interface) and rxd (pin 21 in the 26pin interface) of SPI1 and then run the output of spidev_test.py as follows, you can see The data sent and received are the same, indicating that the SPI1 loopback test is normal
root@orangepi:~/wiringOP-Python# cd examples root@orangepi:~/wiringOP-Python/examples# python3 spidev_test.py \ --channel 1 --port 1 spi mode: 0x0 max speed: 500000 Hz (500 KHz) Opening device /dev/spidev1.1 TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…| |
26pin I2C test
According to the schematic diagram of 26pin, the available i2c is i2c3
i2c3 is disabled by default in the Linux system, and it needs to be manually enabled before it can be used. The steps to open are as follows:
First run orangepi-config, normal users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
Then select System
Then select Hardware
Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select ph-i2c3
Then select <Save> to save
Then select <Back>
Then select <Reboot> to restart the system to make the configuration take effect
After starting the linux system, first confirm that there is an i2c3 device node under /dev
orangepi@orangepi:~$ ls /dev/i2c-3
/dev/i2c-3
Then start testing i2c, first install i2c-tools
orangepi@orangepi:~$ sudo apt-get update
orangepi@orangepi:~$ sudo apt-get install -y i2c-tools
Then connect an i2c device to the i2c3 pin of the 26pin connector, here we take the DS1307 RTC module as an example
Pins of the RTC module The pin corresponding to the 26pin of the development board 5V Pin 2 GND Pin 6 SDA Pin 3 SCL Pin 5
- Then use the i2cdetect -y 3 command, if the address of the connected i2c device can be detected, it means that the i2c device is connected correctly
Then you can run the ds1307.py test program in the examples to read the RTC time
root@orangepi:~/wiringOP-Python# cd examples
root@orangepi:~/wiringOP-Python/examples# python3 ds1307.py --device \
"/dev/i2c-3"
Thu 2022-06-16 04:35:46
Thu 2022-06-16 04:35:47
Thu 2022-06-16 04:35:48
^C
exit
26pin UART test
According to the schematic diagram of the 26pin interface, the available uart is uart5
uart5 is disabled by default in the Linux system, and it needs to be opened manually to use it. The steps to open are as follows:
First run orangepi-config, normal users remember to add sudo permission
orangepi@orangepi:~$ sudo orangepi-config
Then select System
Then select Hardware
Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the space to select ph-uart5
Then select <Save> to save
Then select <Back>
Then select <Reboot> to restart the system to make the configuration take effect
After entering the linux system, first confirm whether there is a uart5 device node under /dev
Note that the linux5.4 system is /dev/ttyAS5.
orangepi@orangepi:~$ ls /dev/ttyS5
/dev/ttyS5
Then start to test the uart5 interface, first use the DuPont line to short the rx and tx of the uart5 interface to be tested
uart5 tx pin Corresponding to pin 8 in 26pin rx pin Corresponding to pin 10 in 26pin
Finally, you can run the serialTest.py program in the examples to test the loopback function of the serial port. If you can see the following print, it means that the loopback test of the serial port is normal
root@orangepi:~/wiringOP-Python# cd examples
root@orangepi:~/wiringOP-Python/examples# python3 serialTest.py --device "/dev/ttyS5" # linux6.1使用
root@orangepi:~/wiringOP-Python/examples# python3 serialTest.py --device "/dev/ttyAS5" # linux5.4使用
Out: 0: -> 0
Out: 1: -> 1
Out: 2: -> 2
Out: 3: -> 3
Out: 4:^C
exit
Hardware Watchdog Test
The watchdog_test program is pre-installed in the linux system released by Orange PI, which can be tested directly.
The method of running the watchdog_test program is shown below:
The second parameter 10 indicates the counting of the door dog. If the dog is not fed in this time, the system will restart
We can feed the dog by pressing any key (except ESC) on the keyboard. After the dog is fed, the program will print a line of Keep Alive to indicate that the dog is successful.
orangepi@orangepi:~$ sudo watchdog_test 10
open success
options is 33152,identity is sunxi-wdt
put_usr return,if 0,success:0
The old reset time is: 16
return ENOTTY,if -1,success:0
return ENOTTY,if -1,success:0
put_user return,if 0,success:0
put_usr return,if 0,success:0
keep alive
keep alive
keep alive
Check the chipid of the H618 chip
The command of the H618 chip Chipid is shown below. The chipid of each chip is different, so you can use Chipid to distinguish multiple development boards.
orangepi@orangepi:~$ cat /sys/class/sunxi_info/sys_info | grep "chipid" sunxi_chipid : 338020004c0048080147478824681ed1 |
Python source code compilation and installation method
If the Python version in the Ubuntu or Debian system software warehouse does not meet the requirements of development, if you want to use the latest version of Python, you can use the following method to download the source code package of Python to compile and install the latest version of Python. The following demonstration is the latest version of the compilation and installation of Python3.9. If you want to compile and install other versions of Python, the method is the same (need to download the source code corresponding to the Python you want to install). |
First install the dependency package required to compile Python
orangepi@orangepi:~$ sudo apt-get update
orangepi@orangepi:~$ sudo apt-get install -y build-essential zlib1g-dev \
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev \
libreadline-dev libffi-dev curl libbz2-dev
Then download the latest version of the Python3.9 source code and decompress it
orangepi@orangepi:~$ wget \
https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz
orangepi@orangepi:~$ tar xvf Python-3.9.10.tgz
Then run the configuration command
orangepi@orangepi:~$ cd Python-3.9.10
orangepi@orangepi:~$ ./configure --enable-optimizations
Then compile and install python3.9, the compilation time takes about half an hour
orangepi@orangepi:~$ make -j4
orangepi@orangepi:~$ sudo make altinstall
After installation, you can use the following command to view the Python version number just installed
orangepi@orangepi:~$ python3.9 --version
Python 3.9.10
Then update pip
orangepi@orangepi:~$ /usr/local/bin/python3.9 -m pip install --upgrade pip
Python to replace the pip source method
The Linux system PIP's default source is the official source of Python, but the source of the official Python official visits is very slow, and the Python software packaging failure is often caused by network reasons. So when installing the Python library with PIP, remember to replace the pip source |
First install python3-pip
orangepi@orangepi:~$ sudo apt-get update
orangepi@orangepi:~$ sudo apt-get install -y python3-pip
Method of permanent replacement of pip source under Linux
Create a new~/.pip directory first, then add the pip.conf configuration file, and set the source of the pip as Tsinghua source
orangepi@orangepi:~$ mkdir -p ~/.pip
orangepi@orangepi:~$ cat <<EOF > ~/.pip/pip.conf
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
EOF
Then install the Python library with pip3, it will be fast
The method of temporarily replacing the pip source under Linux, the <packagename> needs to be replaced with a specific package name
orangepi@orangepi:~$ pip3 install <packagename> -i \
https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
The Method Of Installing The Docker
Orange Pi's Linux image has been pre-installed with Docker, but the Docker service has not been opened by default. Use enable_docker.sh script to enable the docker service, and then you can start using the docker command, and the docker service will be automatically activated at the next start of the system.
orangepi@orangepi:~$ enable_docker.sh |
You can use the following command to test the docker,If you can run hello-world to indicate that docker can be used normally..
orangepi@orangepi:~$ docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 256ab8fe8778: Pull complete Digest: sha256:7f0a9f93b4aa3022c3a4c147a449ef11e0941a1fd0bf4a8e6c9408b2600777c5 Status: Downloaded newer image for hello-world:latest
This message shows that your installation appears to be working correctly. .…. |
When using the docker command, if it prompts permission denied, please add the current user to the docker user group, so that the docker command can be run without sudo.
orangepi@orangepi:~$ sudo usermod -aG docker $USER |
Note: You need to log out of the system and log in again to take effect, and restarting the system is also OK. |
How to install Home Assistant
Note that only the method of installing Home Assistant in Ubuntu or Debian system will be provided here. For detailed usage of Home Assistant, please refer to official documents or corresponding books. |
Install via docker
First of all, please install docker and make sure that docker can run normally. The Method Of Installing The Docker, please refer to the instructions in the section on how to install Docker.
Then you can search for the docker image of Home Assistant
orangepi@orangepi:~$ docker search homeassistant
Then use the following command to download the docker image of Home Assistant to the local. The size of the image is about 1GB, and the download time will be relatively long. Please wait patiently for the download to complete
orangepi@orangepi:~$ docker pull homeassistant/home-assistant
Using default tag: latest
latest: Pulling from homeassistant/home-assistant
be307f383ecc: Downloading
5fbc4c07ac88: Download complete
...... (omit some output)
3cc6a1510c9f: Pull complete
7a4e4d5b979f: Pull complete
Digest: sha256:81d381f5008c082a37da97d8b08dd8b358dae7ecf49e62ce3ef1eeaefc4381bb
Status: Downloaded newer image for homeassistant/home-assistant:latest
docker.io/homeassistant/home-assistant:latest
Then you can use the following command to view the docker image of Home Assistant just downloaded
orangepi@orangepi:~$ docker images homeassistant/home-assistant
REPOSITORY TAG IMAGE ID CREATED SIZE
homeassistant/home-assistant latest bfa0ab9e1cf5 2 months ago 1.17GB
Now you can run the docker container of Home Assistant
orangepi@orangepi:~$ docker run -d \
--name homeassistant \
--privileged \
--restart=unless-stopped \
-e TZ=Asia/Shanghai \
-v /home/orangepi/home-assistant:/config \
--network=host \
homeassistant/home-assistant:latest
Then enter【IP address of the development board: 8123】in the browser to see the Home Assistant interface
It takes a while for the Home Assistant container to start. If the following interface is not displayed normally, please wait for a few seconds and then refresh. If the following interface is not displayed normally after waiting for more than one minute, it means that there is a problem with the installation of Home Assistant. At this time, you need to check whether there is a problem with the previous installation and setting process.
Then enter your name, user name and password and click Create Account
Then follow the interface prompts to set according to your preferences, and then click Next
Then click Next
Then click Finish
The final main interface displayed by Home Assistant is shown in the figure below
How to stop the Home Assistant container
The command to view the docker container is as follows
orangepi@orangepi:~$ docker ps -a
The command to stop the Home Assistant container is as follows
orangepi@orangepi:~$ docker stop homeassistant
The command to delete the Home Assistant container is as follows
orangepi@orangepi:~$ docker rm homeassistant
Install via python
Before installation, please replace the source of pip with a domestic source to speed up the installation of the Python package. For the configuration method, see the instructions in the section on how to replace the pip source with Python. |
First install the dependency package
orangepi@orangepi:~$ sudo apt-get update
orangepi@orangepi:~$ sudo apt-get install -y python3 python3-dev python3-venv \
python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \
libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata
If it is debian12, please use the following command:
orangepi@orangepi:~$ sudo apt-get update
orangepi@orangepi:~$ sudo apt-get install -y python3 python3-dev python3-venv \
python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \
libopenjp2-7 libturbojpeg0-dev tzdata
Then you need to compile and install Python3.9. For the method, please refer to the section on how to compile and install Python source code
The default Python version of Debian Bullseye is Python3.9, so there is no need to compile and install.
The default Python version of Ubuntu Jammy is Python3.10, so there is no need to compile and install.
The default Python version of Debian Bookworm is Python3.11, so there is no need to compile and install.
Then create a Python virtual environment
Debian Bookworm is python3.11, please remember to replace the corresponding command.
orangepi@orangepi:~$ sudo mkdir /srv/homeassistant
orangepi@orangepi:~$ sudo chown orangepi:orangepi /srv/homeassistant
orangepi@orangepi:~$ cd /srv/homeassistant
orangepi@orangepi:~$ python3.9 -m venv .
orangepi@orangepi:~$ source bin/activate
(homeassistant) orangepi@orangepi:/srv/homeassistant$
Then install the required Python package
(homeassistant) orangepi@orangepi:/srv/homeassistant$ python3 -m pip install wheel
Then you can install Home Assistant Core
(homeassistant) orangepi@orangepi:/srv/homeassistant$ pip3 install homeassistant
Then enter the following command to run Home Assistant Core
(homeassistant) orangepi@orangepi:/srv/homeassistant$ hass
Then enter [IP address of the development board: 8123] in the browser to see the interface of Home Assistant
When running the hass command for the first time, you will download and install and cache some necessary libraries and dependencies to run. This process may take a few minutes. Note that at this time, the interface of Home Assistant cannot be seen in the browser. Please wait for a while before refreshing.
OpenCV installation method
Use apt to install OpenCV
The installation command is shown below
orangepi@orangepi:~$ sudo apt-get update
orangepi@orangepi:~$ sudo apt-get install -y libopencv-dev python3-opencv
Then use the following command to print the output of the version number of OpenCV, indicating that the installation of OpenCV is successful
The version of OpenCV in ubuntu22.04 is shown below:
orangepi@orangepi:~$ python3 -c "import cv2; print(cv2.__version__)"
4.5.4
The version of OpenCV in Ubuntu 20.04 is shown below:
orangepi@orangepi:~$ python3 -c "import cv2; print(cv2.__version__)"
4.2.0
The version of OpenCV in Debian11 is shown below:
orangepi@orangepi:~$ python3 -c "import cv2; print(cv2.__version__)"
4.5.1
The version of OpenCV in Debian12 is shown below:
orangepi@orangepi:~$ python3 -c "import cv2; print(cv2.__version__)"
4.6.0
The installation method of the aapanel Linux panel
aapanel Linux panel is a server management software that improves operation and maintenance efficiency. It supports more than 100 server management functions such as one -click LAMP/LNMP/cluster/monitoring/website/FTP/database/Java (excerpted from Baota official website) |
First of all, you need to expand the/tmp memory. After setting, you need to restart the linux system of the development board,and the command is shown below:
orangepi@orangepi:~$ sudo sed -i 's/nosuid/&,size=2G/' /etc/fstab
orangepi@orangepi:~$ sudo reboot
After restarting, you can see that the size of the/tmp space has become 2G
orangepi@orangepi:~$ df -h | grep "/tmp"
tmpfs 2.0G 12K 2.0G 1% /tmp
Then enter the following command in the Linux system to start the installation of the aapanel
orangepi@orangepi:~$ sudo install_bt_panel.sh
Then the aapanel installation program reminds whether to install the Bt-Panel to the /www folder, and enter Y at this time
+----------------------------------------------------------------------
| Bt-WebPanel FOR CentOS/Ubuntu/Debian
+----------------------------------------------------------------------
| Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.
+----------------------------------------------------------------------
| The WebPanel URL will be http://SERVER_IP:8888 when installed.
+----------------------------------------------------------------------
Do you want to install Bt-Panel to the /www directory now?(y/n): y
Then you have to wait patiently. When you see the printing information below the terminal output, it means that the pagoda has been installed. The entire installation process takes about 34 minutes. There may be some differences according to the difference in network speed
At this time, enter the panel address displayed above in the browser to open the login interface of the aapanel Linux panel, and then enter the username and password displayed in the corresponding position to log in to the aapanel
After successfully logging in to the aapanel, the following welcome interface will pop up. First, please take the intermediate user notice to read to the bottom, and then you can choose "I have agreed and read" User Agreement ", and then click" Enter the panel " You can enter the aapanel
After entering the aapanel, you will first prompt that you need to bind the account of the aapanel official website. If you do n’t have an account, you can go to the aapanel's official website (https://www.bt.cn) to register one
The final display interface is shown in the figure below. You can intuitively see some status information of the development board Linux system, such as load state, CPU usage, memory usage and storage space usage
For more functions of the aapanel, please refer to the following information to explore by yourself
Use manual: http://docs.bt.cn
Forum website: https://www.bt.cn/bbs
GitHub Link: https://github.com/aaPanel/BaoTa
"face_recognition" The installation and testing method of the face recognition library
Note that the contents of this section are tested in the Linux system of the desktop version, so please make sure that the system used by the development board is a desktop version system. In addition, the installation test below is performed under OrangePi users. Please keep the environment consistent.
|
The address of the source code warehouse of Face_recognition is: https://github.com/ageitgey/face_recognition Face_recognition Chinese version of the explanation document is: https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md |
The method of using script to automatically install face_recognition
First open a terminal on the desktop, then download face_recognition_install.sh
orangepi@orangepi:~/Desktop$ wget \
https://gitee.com/leeboby/face_recognition_install/raw/master/face_recognition_install.sh
Then execute the following command to start the installation face_recognition
orangepi@orangepi:~/Desktop$ bash face_recognition_install.sh
After face_recognition is installed, it will automatically download the source code of face_recognition, and then automatically run some examples in face_recognition. If you can finally see the following pictures popping up on the desktop, it means that the face_recognition installation test is successful.
Manually install face_recognition
First create a new ~/.pip directory, then add the pip.conf configuration file, and set the mirror source of pip to Tsinghua source in it, the commands to be executed are as follows:
orangepi@orangepi:~$ mkdir -p ~/.pip
orangepi@orangepi:~$ cat <<EOF > ~/.pip/pip.conf
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
EOF
Then install dependencies
orangepi@orangepi:~$ sudo apt update
orangepi@orangepi:~$ sudo apt install -y python3-pip libopencv-dev \
python3-opencv imagemagick python3-scipy python3-setuptools python3-wheel \
python3-dev cmake python3-testresources
Then update pip3
orangepi@orangepi:~$ python3 -m pip install -U pip setuptools wheel
Before installing face_recognition, you first need to install the dlib library. Since the compilation and installation of the dlib library on the development board is relatively slow, I saved a compiled dlib whl file on gitee, and you can install it directly after downloading. The download address of the dlib whl file is as follows:
First download the python_whl warehouse to the Linux system of the development board
orangepi@orangepi:~$ git clone --depth=1 https://gitee.com/leeboby/python_whl
In the python_whl folder, you can see that there are multiple versions of dlib installation packages. The Linux systems corresponding to different versions of dlib are as follows:
Ubuntu20.04 dlib-19.24.0-cp38-cp38-linux_aarch64.whl Ubuntu22.04 dlib-19.24.0-cp310-cp310-linux_aarch64.whl Debian11 dlib-19.24.0-cp39-cp39-linux_aarch64.whl
Then you can start installing dlib, the command is as follows
a) Ubuntu20.04
orangepi@orangepi:~$ cd python_whl
orangepi@orangepi:~/python_whl$ python3 -m pip install dlib-19.24.0-cp38-cp38-linux_aarch64.whl
b) Ubuntu22.04
orangepi@orangepi:~$ cd python_whl
orangepi@orangepi:~/python_whl$ python3 -m pip install dlib-19.24.0-cp310-cp310-linux_aarch64.whl
c) Debian11
orangepi@orangepi:~$ cd python_whl
orangepi@orangepi:~/python_whl$ python3 -m pip install dlib-19.24.0-cp39-cp39-linux_aarch64.whl
After installation, if the version number of dlib can be printed normally by using the following command, it means that dlib is installed correctly
orangepi@orangepi:~/python_whl$ python3 -c "import dlib; print(dlib.__version__)"
19.24.0
Then install face_recognition_models-0.3.0-py2.py3-none-any.whl
orangepi@orangepi:~/python_whl$ python3 -m pip install face_recognition_models-0.3.0-py2.py3-none-any.whl
Then install face_recognition
orangepi@orangepi:~$ python3 -m pip install face_recognition
Then you need to reopen a terminal to find and run the two commands face_detection and face_recognition
a. The face_recognition command is used to recognize whose face is in a single image or a folder of images.
b. The face_detection command is used to locate the face in a single picture or a picture folder
orangepi@orangepi:~$ which face_detection
/usr/local/bin/face_detection
orangepi@orangepi:~$ which face_recognition
/usr/local/bin/face_recognition
- If you can't find the above two commands after reopening the terminal, please try to manually import environment variables, and then test again
orangepi@orangepi:~$ export PATH=/home/orangepi/.local/bin:$PATH
The test method of face_recognition
Note that the following operations are demonstrated on the desktop, so please connect the HDMI monitor first, or use NoMachine/VNC to remotely log in to the Linux desktop to test. |
There are some sample codes in the source code of face_recognition, which we can use directly for testing. The download address of the source code of face_recognition is as follows:
GitHub official download address
orangepi@orangepi:~$ git clone https://github.com/ageitgey/face_recognition.git
Gitee image download address
orangepi@orangepi:~$ git clone https://gitee.com/leeboby/face_recognition.git
The path to the face_recognition sample code is as follows
face_recognition/examples
The Chinese description document link of face_recognition is as follows, please read it carefully before using face_recognition
https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md
find_faces_in_picture.py is used to locate the position of the face in the picture, the test steps are as follows
Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ python3 find_faces_in_picture.py
I found 1 face(s) in this photograph.
A face is located at pixel location Top: 241, Left: 419, Bottom: 562, Right: 740
Wait for a while and the following picture will pop up, which is the face located in the test picture
find_facial_features_in_picture.py is used to identify the key points of the face in a single picture, and the test steps are as follows
Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ python3 find_facial_features_in_picture.py
After waiting for a while, the following picture will pop up, and you can see that the outline of the face is marked
identify_and_draw_boxes_on_faces.py is used to identify faces and mark them with boxes. The test steps are as follows
Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ python3 identify_and_draw_boxes_on_faces.py
After waiting for a while, the following picture will pop up. You can see that the faces in the picture are marked with boxes, and the names of the characters are displayed correctly
face_distance.py is used to compare whether two faces belong to the same person at different precisions. First open a terminal, then enter the face_recognition/examples directory, and then execute the following command to see the output of the test
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ python3 face_distance.py
The test image has a distance of 0.35 from known image #0
- With a normal cutoff of 0.6, would the test image match the known image? True
- With a very strict cutoff of 0.5, would the test image match the known image? True
The test image has a distance of 0.82 from known image #1
- With a normal cutoff of 0.6, would the test image match the known image? False
- With a very strict cutoff of 0.5, would the test image match the known image? False
recognize_faces_in_pictures.py is used to identify who the face in the unknown picture is. First open a terminal, then enter the face_recognition/examples directory, and then execute the following command, and you can see the test results after waiting for a while
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ python3 recognize_faces_in_pictures.py
Is the unknown face a picture of Biden? False
Is the unknown face a picture of Obama? True
Is the unknown face a new person that we've never seen before? False
facerec_from_webcam_faster.py is used to recognize the face in the USB camera, the test steps are as follows:
First, please insert the USB camera into the USB interface of the development board, and then use the v4l2-ctl (note that l in v4l2 is a lowercase letter l, not the number 1) command to check the serial number of the device node of the USB camera
orangepi@orangepi:~$ sudo apt update
orangepi@orangepi:~$ sudo apt install -y v4l-utils
orangepi@orangepi:~$ v4l2-ctl --list-devices
cedrus (platform:cedrus):
/dev/video0
USB2.0 UVC PC Camera: USB2.0 UV (usb-5311000.usb-1):
/dev/video1
/dev/video2
Then open a terminal on the desktop, enter the face_recognition/examples directory, and first modify the device serial number of the camera used in facerec_from_webcam_faster.py. For example, through the v4l2-ctl --list-devices command above, you can see that the USB camera is /dev/video1, then modify the 0 in cv2.VideoCapture(0) to 1
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ vim facerec_from_webcam_faster.py
video_capture = cv2.VideoCapture(1)
Then execute the following command to run facerec_from_webcam_faster.py
orangepi@orangepi:~/face_recognition/examples$ python3 facerec_from_webcam_faster.py
Wait for a while and the camera display screen will pop up
At this point, you can point the camera at yourself. When the camera detects a face, it will frame the detected face with a square. Note that when detecting a face, the image displayed by the camera will be relatively slow, please do not move too fast
You can also open a picture of Obama, and then use the camera to point at the opened picture. You can see that not only the face can be marked, but also the name of the detected face can be displayed correctly. Note that when detecting a face, the image displayed by the camera will be relatively slow, please do not move too fast
web_service_example.py is a very simple case of using a web service to upload a picture to run face recognition. The backend server will identify whether the picture is Obama, and output the recognition result as a json key-value pair. The test steps are as follows:
Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command (if face_recognition is automatically installed using a script, then there is no need to install flask)
orangepi@orangepi:~$ python3 -m pip install flask
orangepi@orangepi:~$ cd face_recognition/examples
root@orangepi:~/face_recognition/examples$ python3 web_service_example.py
* Serving Flask app 'web_service_example' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on all addresses (0.0.0.0)
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://127.0.0.1:5001
* Running on http://192.168.1.79:5001 (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 500-161-390
Then open another terminal and run the following command to return the result of image recognition (note that the execution path of the following command is face_recognition/examples)
orangepi@orangepi:~/face_recognition/examples$ curl -XPOST -F \
"file=@obama2.jpg" http://127.0.0.1:5001
{
"face_found_in_image": true,
"is_picture_of_obama": true
}
We can also copy the picture face_recognition/examples/obama2.jpg to other Linux computers. Of course, we can also prepare a picture named obama2.jpg by ourselves, and then use the following command on the Linux computer to remotely Use the service running on the development board to recognize faces (note that the IP address in the command needs to be replaced with the IP address of the development board, and the file name after file needs to be replaced with the name of the picture you want to test).
test@test:~$ curl -XPOST -F "file=@obama2.jpg" http://192.168.1.79:5001
{
"face_found_in_image": true,
"is_picture_of_obama": true
}
The method to test using the browser is as follows:
a) First open the browser, then enter the IP address of the development board: 5001 in the address bar of the browser, and then you can see the following page
b) Then copy obama2.jpg to the desktop
orangepi@orangepi:~/face_recognition/examples$ cp obama2.jpg /home/orangepi/Desktop/
c) Then select the picture you just copied in your browser
d) Then click Upload to upload the picture you just selected for face recognition
e) After waiting for a while, the detection result will be displayed
face_detection command test example
The face_detection command-line tool can locate the face position (output pixel coordinates) in a single picture or a picture folder. Use face_detection --help to view the help information of the face_detection command
orangepi@orangepi:~$ face_detection --help
Usage: face_detection [OPTIONS] IMAGE_TO_CHECK
Options:
--cpus INTEGER number of CPU cores to use in parallel. -1 means "use all in system"
--model TEXT Which face detection model to use. Options are "hog" or "cnn".
--help Show this message and exit.
An example of detecting a single image is shown below:
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ face_detection obama2.jpg
obama2.jpg,302,474,611,164
An example of using multiple cores to detect multiple images in parallel is shown below:
a) First enter the face_recognition/examples folder
b) Then create a new test folder
c) Then copy the jpg images to the test folder
d) Then use all cpus to run face_detection in parallel to check the pictures in the test folder, where --cpus -1 means to use all cpus
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ mkdir test
orangepi@orangepi:~/face_recognition/examples$ cp *.jpg test
orangepi@orangepi:~/face_recognition/examples$ face_detection --cpus -1 test
test/obama-240p.jpg,29,261,101,189
test/obama_small.jpg,65,215,169,112
test/obama2.jpg,302,474,611,164
test/two_people.jpg,62,394,211,244
test/two_people.jpg,95,941,244,792
test/obama.jpg,136,624,394,366
test/obama-480p.jpg,65,507,189,383
test/obama-720p.jpg,94,751,273,572
test/obama-1080p.jpg,136,1140,394,882
test/biden.jpg,233,749,542,439
face_recognition command test example
face_recognition command-line tool can recognize whose face is in a single picture or a picture folder. Use face_recognition --help to view the help information of the face_recognition command
orangepi@orangepi:~$ face_recognition --help
Usage: face_recognition [OPTIONS] KNOWN_PEOPLE_FOLDER IMAGE_TO_CHECK
Options:
--cpus INTEGER number of CPU cores to use in parallel (can speed up processing lots of images). -1 means "use all in system"
--tolerance FLOAT Tolerance for face comparisons. Default is 0.6. Lower this if you get multiple matches for the same person.
--show-distance BOOLEAN Output face distance. Useful for tweaking tolerance setting.
--help Show this message and exit.
First create a new face picture folder known_people with a known name, then copy two pictures to known_people, and then copy obama2.jpg to unknown.jpg, which is the picture we want to identify
orangepi@orangepi:~$ cd face_recognition/examples
orangepi@orangepi:~/face_recognition/examples$ mkdir known_people
orangepi@orangepi:~/face_recognition/examples$ cp biden.jpg obama.jpg known_people
orangepi@orangepi:~/face_recognition/examples$ cp obama2.jpg unkown.jpg
Then you can use the following command to identify the name of the person in the unknown.jpg picture, and you can see that the unknown.jpg picture is recognized as obama
orangepi@orangepi:~/face_recognition/examples$ face_recognition known_people \
unkown.jpg
unkown.jpg,obama
If we identify an irrelevant image, unknown_person will be displayed
root@orangepi:~/face_recognition/examples$ face_recognition known_people \
alex-lacamoire.png
alex-lacamoire.png,unknown_person
We can also create a new test folder and put multiple pictures in it, and then we can use all the CPUs to recognize all the pictures in parallel
orangepi@orangepi:~/face_recognition/examples$ mkdir test
orangepi@orangepi:~/face_recognition/examples$ cp *.jpg *.png test
orangepi@orangepi:~/face_recognition/examples$ face_recognition --cpus -1 \
known_people test
test/obama-240p.jpg,obama
test/alex-lacamoire.png,unknown_person
test/obama_small.jpg,obama
test/unkown.jpg,obama
test/obama2.jpg,obama
test/lin-manuel-miranda.png,unknown_person
test/two_people.jpg,biden
test/two_people.jpg,obama
test/obama-720p.jpg,obama
test/obama.jpg,obama
test/obama-480p.jpg,obama
test/biden.jpg,biden
test/obama-1080p.jpg,obama
Setting Chinese environment and installing Chinese input method
Note, please make sure that the Linux system used by the development board is a desktop system before installing the Chinese input method. |
How to install Debian system
First set the default locale to Chinese
Enter the following command to start configuring the locale
orangepi@orangepi:~$ sudo dpkg-reconfigure locales
Then select zh_CN.UTF-8 UTF-8 in the pop-up interface (move up and down through the up and down direction keys on the keyboard, select through the space bar, and finally move the cursor to <OK> through the Tab key, and then press Enter.)
Then set the default locale to zh_CN.UTF-8
After exiting the interface, the locale setting will start, and the output displayed on the command line is as follows
orangepi@orangepi:~$ sudo dpkg-reconfigure locales
Generating locales (this might take a while)...
en_US.UTF-8... done
zh_CN.UTF-8... done
Generation complete.
Then open the Input Method
Then choose OK
Then choose Yes
Then choose fcitx
Then choose OK
Then restart the Linux system to make the configuration take effect
Then open Fcitx configuration
Then click the + sign in the position shown in the figure below
Then search Google Pinyin and click OK
Then bring Google Pinyin to the front
Then open the Geany editor to test the Chinese input method
The Chinese input method test is as follows
The Chinese and English input methods can be switched through the Ctrl+Space shortcut key
If the entire system needs to be displayed in Chinese, you can set the variables in /etc/default/locale to zh_CN.UTF-8
orangepi@orangepi:~$ sudo vim /etc/default/locale
# File generated by update-locale
LC_MESSAGES=zh_CN.UTF-8
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN.UTF-8
Then restart the system and you can see that the system is displayed in Chinese
How to install Ubuntu 20.04 system
First open Language Support
Then find the Chinese (China) option
Then please use the left mouse button to select Chinese (China) and hold it down, then drag it up to the initial position, the display after dragging is as shown in the figure below:
Note that this step is not easy to drag, please be patient and try a few more times.
Then select Apply System-Wide to apply the Chinese settings to the entire system
Then setKeyboard input method system to fcitx
Then restart the Linux system to make the configuration take effect
After re-entering the system, please choose not to ask me again in the following interface, and then please decide whether the standard folder should also be updated to Chinese according to your preferences
Then you can see that the desktop is displayed in Chinese
Then we can open Geany to test the Chinese input method, as shown in the figure below
After opening Geany, the default is English input method, we can switch to Chinese input method through Ctrl+Space shortcut key, and then we can input Chinese
How to install Ubuntu 22.04 system
First open Language Support
Then find the Chinese (China) option
Then please use the left mouse button to select Chinese (China) and hold it down, then drag it up to the initial position, the display after dragging is as shown in the figure below:
Note that this step is not easy to drag, please be patient and try a few more times.
Then select Apply System-Wide to apply the Chinese settings to the entire system
Then restart the Linux system to make the configuration take effect
After re-entering the system, please choose not to ask me again in the following interface, and then please decide whether the standard folder should also be updated to Chinese according to your preferences
Then you can see that the desktop is displayed in Chinese
Then open the Fcitx5 configuration program
Then choose to use Pinyin input method
The interface after selection is as shown below, and then click OK
Then we can open Geany to test the Chinese input method, the opening method is shown in the figure below
After opening Geany, the default is English input method, we can switch to Chinese input method through Ctrl+Space shortcut key, and then we can input Chinese
How to Remotely Log In to the Desktop of Linux System
Remote login using NoMachine
Make sure the Ubuntu or Debian system installed on the development board is a desktop system version. In addition, NoMachine also provides detailed documents. It is strongly recommended to read this document to be familiar with the use of NoMachine. The document link is shown below: |
NoMachine supports Windows, Mac, Linux, iOS and Android platforms, so we can remotely log in and control the Orange Pi development board through NoMachine on a variety of devices. The following demonstrates how to remotely log in to the Linux system desktop of the Orange Pi development board through NoMachine in Windows. For installation methods on other platforms, please refer to the official documentation of NoMachine |
Before operation, please make sure that the Windows computer and the development board are in the same LAN, and can log in to the Ubuntu or Debian system of the development board through ssh |
First download the installation package of the NoMachine software Linux arm64 deb version, and then install it into the Linux system of the development board
- Since H618 is a SOC of the ARMV8 architecture, the system we use is Ubuntu or Debian, so you need to download the NoMachine for ARM ARMv8 DEB installation package. The download link is shown below:
Note that this download link may change, please look for the deb package of the Armv8/Arm64 version.
In addition, the installation package of NoMachine can also be downloaded in the official tool
First enter the remote login software-NoMachine folder
Then download the arm64 version of the deb installation package
Then upload the downloaded nomachine_x.x.x_x_arm64.deb to the Linux system of the development board
Then use the following command to install NoMachine in the Linux system of the development board
orangepi@orangepi:~$ sudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb
- Then download the installation package of the Windows version of the NoMachine software, the download address is as follows
Note that this download link may change. |
Then install NoMachine in Windows, please restart the computer after installation
Then open NoMachine in Window
After Nomachine starts, it will automatically scan other devices installed in the local area network. After entering the main interface of Nomachine, you can see that the development board is already in the connected device list, and then click the location shown in the red box below. Start log in to the linux system desktop of the development board
Then click OK
Then enter the username and password of the linux system in the corresponding position in the figure below, and then click OK to start logging in
Then click OK in the next interface
Finally, you can see the desktop of the development board Linux system
Log in remotely using VNC
Before operation, please make sure that the Windows computer and the development board are in the same local area network, and can log in to the Ubuntu or Debian system of the development board normally with ssh.
|
First run the set_vnc.sh script to set up vnc, remember to add sudo permission
orangepi@orangepi:~$ sudo set_vnc.sh
You will require a password to access your desktops.
Password: #Set the vnc password here, 8 -bit characters
Verify: #Set the vnc password here, 8 characters
Would you like to enter a view-only password (y/n)? n
xauth: file /root/.Xauthority does not exist
New 'X' desktop is orangepi:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/orangepi:1.log
Killing Xtightvnc process ID 3047
New 'X' desktop is orangepi:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/orangepi:1.log
The steps to use the MobaXterm software to connect to the desktop of the Linux system of the development board are as follows:
- First click on Session, then select VNC, then fill in the IP address and port of the development board, and finally click OK to confirm
How to install QT
Use the script below to install QT5 and QT Creator
orangepi@orangepi:~$ install_qt.sh
After installation, the version number of QT will be automatically printed
The qt version that comes with Ubuntu 20.04 is 5.12.8
orangepi@orangepi:~$ install_qt.sh
......
QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/aarch64-linux-gnu
The QT version that comes with Ubuntu 22.04 is 5.15.3
orangepi@orangepi:~$ install_qt.sh
......
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/aarch64-linux-gnu
The QT version that comes with Debian11 is 5.15.2
orangepi@orangepi:~$ install_qt.sh
......
QMake version 3.1
Using Qt version 5.15.2 in /usr/lib/aarch64-linux-gnu
The QT version that comes with Debian12 is 5.15.8
orangepi@orangepi:~$ install_qt.sh
......
QMake version 3.1
Using Qt version 5.15.8 in /usr/lib/aarch64-linux-gnu
Then you can see the QT Creator startup icon in Applications
You can also use the following command to open QT Creator
orangepi@orangepi:~$ qtcreator
The interface after QT Creator is opened is as follows
The version of QT Creator is as follows
Then set up QT
Then you can open a sample code
After clicking the sample code, the corresponding instruction document will be opened automatically, you can read the instructions carefully
Then click Configure Project
Then click the green triangle in the lower left corner to compile and run the sample code
After waiting for a period of time, the interface shown in the figure below will pop up, which means that QT can compile and run normally
References
https://wiki.qt.io/Install_Qt_5_on_Ubuntu
How to install ROS
How to install ROS 1 Noetic on Ubuntu 20.04
- The currently active version of ROS 1 is shown below, and the recommended version is Noetic Ninjemys
ROS 1 Noetic Ninjemys official installation documentation link is as follows:
In the ROS Noetic Ninjemys official installation document, Ubuntu recommends using Ubuntu20.04, so please make sure that the system used by the development board is the Ubuntu20.04 desktop system
Then use the script below to install ros1
orangepi@orangepi:~$ install_ros.sh ros1
Before using the ROS tool, you first need to initialize rosdep, and then you can quickly install some system dependencies and some core components in ROS when compiling the source code
Note that running the following command needs to ensure that the development board can access github normally, otherwise an error will be reported due to network problems
The install_ros.sh script will try to modify /etc/hosts and run the following commands automatically. However, this method cannot guarantee that github can be accessed normally every time. If install_ros.sh prompts the following error after installing ros1, please find other ways to allow the linux system of the development board to access github normally, and then manually run the following command.
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yamlHit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
ERROR: error loading sources list:
- The read operation timed out
orangepi@orangepi:~$ source /opt/ros/noetic/setup.bash
orangepi@orangepi:~$ sudo rosdep init
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
- rosdep update
orangepi@orangepi:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Add distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/orangepi/.ros/rosdep/sources.cache
Then open a command line terminal window on the desktop, and use the test_ros.sh script to start a small turtle routine to test whether ROS can be used normally
orangepi@orangepi:~$ test_ros.sh
After running the test_ros.sh script, a little turtle as shown in the figure below will pop up
Then please keep the terminal window you just opened on top
At this time, press the direction keys on the keyboard to control the little turtle to move up, down, left, and right
How to install ROS 2 Galactic on Ubuntu 20.04
The currently active version of ROS 2 is shown below, and the recommended version is Galactic Geochelone
The link to the official ROS 2 Galactic Geochelone installation documentation is as follows:
docs.ros.org/en/galactic/Installation.html
http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html
In the official ROS 2 Galactic Geochelone installation document, Ubuntu Linux recommends using Ubuntu 20.04, so please make sure that the system used by the development board is the Ubuntu 20.04 desktop system. There are several ways to install ROS 2. The following demonstrates how to install ROS 2 Galactic Geochelone through Debian packages.
Ros2 can be installed using the install_ros.sh script
orangepi@orangepi:~$ install_ros.sh ros2
The install_ros.sh script will automatically run the ros2 -h command after installing ros2. If you can see the following print, it means that the ros2 installation is complete
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2 is an extensible command-line tool for ROS 2.
optional arguments:
-h, --help show this help message and exit
Commands:
action Various action related sub-commands
bag Various rosbag related sub-commands
component Various component related sub-commands
daemon Various daemon related sub-commands
doctor Check ROS setup and other potential issues
interface Show information about ROS interfaces
launch Run a launch file
lifecycle Various lifecycle related sub-commands
multicast Various multicast related sub-commands
node Various node related sub-commands
param Various param related sub-commands
pkg Various package related sub-commands
run Run a package specific executable
security Various security related sub-commands
service Various service related sub-commands
topic Various topic related sub-commands
wtf Use `wtf` as alias to `doctor`
Call `ros2 <command> -h` for more detailed usage.
Then you can use the test_ros.sh script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally
orangepi@orangepi:~$ test_ros.sh
[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'
[INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]
[INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'
[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]
[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'
[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]
Run the following command to open rviz2
orangepi@orangepi:~$ source /opt/ros/galactic/setup.bash
orangepi@orangepi:~$ ros2 run rviz2 rviz2
For how to use ROS, please refer to the documentation of ROS 2
How to install ROS 2 Humble on Ubuntu 22.04
Ros2 can be installed using the install_ros.sh script
orangepi@orangepi:~$ install_ros.sh ros2
The install_ros.sh script will automatically run the ros2 -h command after installing ros2. If you can see the following print, it means that the ros2 installation is complete
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2 is an extensible command-line tool for ROS 2.
optional arguments:
-h, --help show this help message and exit
Commands:
action Various action related sub-commands
bag Various rosbag related sub-commands
component Various component related sub-commands
daemon Various daemon related sub-commands
doctor Check ROS setup and other potential issues
interface Show information about ROS interfaces
launch Run a launch file
lifecycle Various lifecycle related sub-commands
multicast Various multicast related sub-commands
node Various node related sub-commands
param Various param related sub-commands
pkg Various package related sub-commands
run Run a package specific executable
security Various security related sub-commands
service Various service related sub-commands
topic Various topic related sub-commands
wtf Use `wtf` as alias to `doctor`
Call `ros2 <command> -h` for more detailed usage.
Then you can use the test_ros.sh script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally
orangepi@orangepi:~$ test_ros.sh
[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'
[INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]
[INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'
[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]
[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3'
[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]
Run the following command to open rviz2
orangepi@orangepi:~$ source /opt/ros/humble/setup.bash
orangepi@orangepi:~$ ros2 run rviz2 rviz2
Reference documents
http://docs.ros.org/en/humble/index.html
http://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html
How to install the kernel header file
The Debian 11 system with the Linux6.1 kernel will report a GCC error when compiling the kernel module. So if you want to compile the kernel module, please use Debian12 or Ubuntu22.04 |
The Linux image released by OPi comes with the deb package of the kernel header file by default, and the storage location is /opt/
orangepi@orangepi:~$ ls /opt/linux-headers*
/opt/linux-headers-xxx-sun50iw9_x.x.x_arm64.deb
Use the following command to install the deb package of the kernel header file
orangepi@orangepi:~$ sudo dpkg -i /opt/linux-headers*.deb
After installation, you can see the folder where the kernel header files are located under /usr/src
orangepi@orangepi:~$ ls /usr/src
linux-headers-x.x.x
Then you can compile the source code of the hello kernel module that comes with the Linux image. The source code of the hello module is in /usr/src/hello. After entering this directory, use the make command to compile.
orangepi@orangepi:~$ cd /usr/src/hello/
orangepi@orangepi:/usr/src/hello$ sudo make
make -C /lib/modules/5.4.125/build M=/usr/src/hello modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.125'
CC [M] /usr/src/hello/hello.o
Building modules, stage 2.
MODPOST 1 modules
CC [M] /usr/src/hello/hello.mod.o
LD [M] /usr/src/hello/hello.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.125'
After compiling, the hello.ko kernel module will be generated
orangepi@orangepi:/usr/src/hello$ ls *.ko
hello.ko
Using the insmod command, you can insert the hello.ko kernel module into the kernel
orangepi@orangepi:/usr/src/hello$ sudo insmod hello.ko
Then use the demsg command to view the output of the hello.ko kernel module. If you can see the output instructions below, the hello.ko kernel module is loaded correctly
orangepi@orangepi:/usr/src/hello$ dmesg | grep "Hello"
[ 2871.893988] Hello Orange Pi -- init
Use the rmmod command to uninstall the hello.ko kernel module
orangepi@orangepi:/usr/src/hello$ sudo rmmod hello
orangepi@orangepi:/usr/src/hello$ dmesg | grep "Hello"
[ 2871.893988] Hello Orange Pi -- init
[ 3173.800892] Hello Orange Pi -- exit
Some programming language tests supported by Linux system
Debian Bullseye System
Debian Bullseye has a gcc compilation tool chain installed by default, which can directly compile C language programs in the Linux system of the development board
The version of gcc is as follows
orangepi@orangepi:~$ gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Write the hello_world.c program in C language
orangepi@orangepi:~$ vim hello_world.c
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
Then compile and run hello_world.c
orangepi@orangepi:~$ gcc -o hello_world hello_world.c
orangepi@orangepi:~$ ./hello_world
Hello World!
Debian Bullseye comes with Python3 installed by default
The specific version of Python is as follows
orangepi@orangepi:~$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Use the Ctrl+D shortcut to exit python's interactive mode.
Write hello_world.py program in Python language
orangepi@orangepi:~$ vim hello_world.py
print('Hello World!')
The result of running hello_world.py is as follows
orangepi@orangepi:~$ python3 hello_world.py
Hello World!
Debian Bullseye does not install Java compilation tools and runtime environment by default
You can use the following command to install openjdk, the latest version in Debian Bullseye is openjdk-17
orangepi@orangepi:~$ sudo apt install -y openjdk-17-jdk
After installation, you can check the version of Java
orangepi@orangepi:~$ java --version
Edit hello_world.java of java version
orangepi@orangepi:~$ vim hello_world.java
public class hello_world
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
Then compile and runhello_world.java
orangepi@orangepi:~$ javac hello_world.java
orangepi@orangepi:~$ java hello_world
Hello World!
Debian Bookworm System
Debian Bookworm is installed with a gcc compilation tool chain by default, which can directly compile C language programs in the Linux system of the development board
The version of gcc is as follows
orangepi@orangepi:~$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Write the hello_world.c program in C language
orangepi@orangepi:~$ vim hello_world.c
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
Then compile and run hello_world.c
orangepi@orangepi:~$ gcc -o hello_world hello_world.c
orangepi@orangepi:~$ ./hello_world
Hello World!
Debian Bookworm has Python3 installed by default
The specific version of Python is as follows
orangepi@orangepi:~$ python3
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Use the Ctrl+D shortcut to exit python's interactive mode.
Write hello_world.py program in Python language
orangepi@orangepi:~$ vim hello_world.py
print('Hello World!')
The result of running hello_world.py is as follows
orangepi@orangepi:~$ python3 hello_world.py
Hello World!
Debian Bookworm does not install Java compilation tools and operating environment by default
You can use the following command to install openjdk, the latest version in Debian Bookworm is openjdk-17
orangepi@orangepi:~$ sudo apt install -y openjdk-17-jdk
After installation, you can check the version of Java
orangepi@orangepi:~$ java --version
Edit the Javaverison’s hello_world.java
orangepi@orangepi:~$ vim hello_world.java
public class hello_world
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
Then compile and runhello_world.java
orangepi@orangepi:~$ javac hello_world.java
orangepi@orangepi:~$ java hello_world
Hello World!
Ubuntu Focal System
Ubuntu Focal has a gcc compilation tool chain installed by default, which can directly compile C language programs in the Linux system of the development board
The version of a.gcc is as follows
orangepi@orangepi:~$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Write the hello_world.c program in C language
orangepi@orangepi:~$ vim hello_world.c
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
Then compile and run hello_world.c
orangepi@orangepi:~$ gcc -o hello_world hello_world.c
orangepi@orangepi:~$ ./hello_world
Hello World!
Ubuntu Focal has Python3 installed by default
The specific version of Python3 is as follows
orangepi@orangepi:~$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Use the Ctrl+D shortcut to exit python's interactive mode.
Write the hello_world.py program in Python language
orangepi@orangepi:~$ vim hello_world.py
print('Hello World!')
The result of running hello_world.py is as follows
orangepi@orangepi:~$ python3 hello_world.py
Hello World!
Ubuntu Focal does not install Java compilation tools and operating environment by default
You can use the following command to install openjdk-17
orangepi@orangepi:~$ sudo apt install -y openjdk-17-jdk
After installation, you can check the version of Java
orangepi@orangepi:~$ java --version
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)
Write the Java version of hello_world.java
orangepi@orangepi:~$ vim hello_world.java
public class hello_world
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
Then compile and run hello_world.java
orangepi@orangepi:~$ javac hello_world.java
orangepi@orangepi:~$ java hello_world
Hello World!
Ubuntu Jammy System
Ubuntu Jammy is installed with a gcc compilation tool chain by default, which can directly compile C language programs in the Linux system of the development board
The version of a.gcc is as follows
orangepi@orangepi:~$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Write the hello_world.c program in C language
orangepi@orangepi:~$ vim hello_world.c
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
Then compile and run hello_world.c
orangepi@orangepi:~$ gcc -o hello_world hello_world.c
orangepi@orangepi:~$ ./hello_world
Hello World!
Ubuntu Jammy has Python3 installed by default
The specific version of Python3 is as follows
orangepi@orangepi:~$ python3
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Use the Ctrl+D shortcut to exit python's interactive mode.
Write the hello_world.py program in Python language
orangepi@orangepi:~$ vim hello_world.py
print('Hello World!')
The result of running hello_world.py is as follows
orangepi@orangepi:~$ python3 hello_world.py
Hello World!
Ubuntu Jammy does not install Java compilation tools and operating environment by default
You can use the following command to install openjdk-18
orangepi@orangepi:~$ sudo apt install -y openjdk-18-jdk
After installation, you can check the version of Java
orangepi@orangepi:~$ java --version
openjdk 18.0.2-ea 2022-07-19
OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)
OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode, sharing)
Write the Java version of hello_world.java
orangepi@orangepi:~$ vim hello_world.java
public class hello_world
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
Then compile and run hello_world.java
orangepi@orangepi:~$ javac hello_world.java
orangepi@orangepi:~$ java hello_world
Hello World!
The method of uploading files to the Linux system of the development board
How to upload files to the development board Linux system in Ubuntu PC
How to upload files using the scp command
Use the scp command to upload files from the Ubuntu PC to the Linux system of the development board. The specific commands are as follows
file_path: Need to be replaced with the path of the file to be uploaded
orangepi: It is the user name of the Linux system of the development board, and it can also be replaced with other ones, such as root
192.168.xx.xx: It is the IP address of the development board, please modify it according to the actual situation
/home/orangepi: The path in the Linux system of the development board can also be modified to other paths
test@test:~$ scp file_path orangepi@192.168.xx.xx:/home/orangepi/
If you want to upload a folder, you need to add the -r parameter
test@test:~$ scp -r dir_path orangepi@192.168.xx.xx:/home/orangepi/
There are more usages of scp, please use the following command to view the man manual
test@test:~$ man scp |
How to upload files using filezilla
First install filezilla in Ubuntu PC
test@test:~$ sudo apt install -y filezilla
Then use the following command to open filezilla
test@test:~$ filezilla
The interface after filezilla is opened is as follows, at this time, the display under the remote site on the right is empty
The method of connecting the development board is shown in the figure below
Then choose to save the password, and then click OK
Then choose to always trust this host, and then click OK
- After the connection is successful, you can see the directory structure of the development board linux file system on the right side of the filezilla software
- Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Ubuntu PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board.
After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded files
The method of uploading a folder is the same as that of uploading a file, so I won't go into details here
How to upload files to the development board Linux system in Windows PC
How to upload files using filezilla
- First download the installation file of the Windows version of the filezilla software, the download link is as follows
The downloaded installation package is as follows, and then double-click to install directly
FileZilla_Server_1.5.1_win64-setup.exe
During the installation process, please select Decline on the following installation interface, and then select Next>
- The interface after filezilla is opened is as follows, and the display under the remote site on the right is empty
- The method of connecting the development board is shown in the figure below:
- Then choose to save the password, and then click OK
- Then select Always trust this host, and click OK
- Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Windows PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board.
- Then select the path to be uploaded to the development board on the right side of the filezilla software, and then select the file to be uploaded on the Windows PC on the left side of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the file to the development board bingo
After the upload is complete, you can go to the corresponding path in the Linux system of the development board to view the uploaded files
The method of uploading a folder is the same as that of uploading a file, so I won't go into details here
Instructions for using the switch logo
By default, the switch logo will only be displayed in the desktop version of the system
Set the bootlogo variable to false in /boot/orangepiEnv.txt to turn off the switch logo
orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt
verbosity=1
bootlogo=false
Set the bootlogo variable to true in /boot/orangepiEnv.txt to enable the switch logo
orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt
verbosity=1
bootlogo=true
The location of the boot logo image in the Linux system is
/usr/share/plymouth/themes/orangepi/watermark.png
After replacing the boot logo picture, you need to run the following command to take effect
orangepi@orangepi:~$ sudo update-initramfs -u
How to shut down and restart the development board
During the running of the Linux system, if the power is directly unplugged, the file system may lose some data. It is recommended to use the poweroff command to shut down the Linux system of the development board before power off, and then unplug the power
orangepi@orangepi:~$ sudo poweroff
Note that after the development board is turned off, the power supply needs to be re-plugged to turn it on.
Use the reboot command to restart the Linux system on the development board
orangepi@orangepi:~$ sudo reboot
Linux SDK——orangepi-build instruction
Compilation system requirements
The Linux SDK, orangepi-build, only supports running on X64 computers with Ubuntu 22.04 installed, so before downloading orangepi-build, please make sure that the Ubuntu version installed on your computer is Ubuntu 22.04. The command to check the Ubuntu version installed on the computer is as follows. If the Release field does not display 22.04, it means that the current Ubuntu version does not meet the requirements. Please replace the system before performing the following operations.
test@test:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy |
If the computer is installed with a Windows system and there is no computer with Ubuntu 22.04 installed, you can consider using VirtualBox or VMware to install an Ubuntu 22.04 virtual machine in the Windows system. But please note, do not compile orangepi-build on the WSL virtual machine, because orangepi-build has not been tested in the WSL virtual machine, so it cannot be guaranteed that orangepi-build can be used normally in WSL, and please do not compile it on the Linux system of the development board Use orangepi-build in. The download address of the installation image of Ubuntu 22.04 amd64 version is:
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/22.04/ubuntu-22.04-desktop-amd64.iso |
Get the source code of linux sdk
Download orangepi-build from github
The linux sdk refers to the code of orangepi-build. orangepi-build is modified based on the armbian build system. Using orangepi-build, multiple versions of linux images can be compiled. Use the following command to download the orangepi-build code:
test@test:~$ sudo apt-get update test@test:~$ sudo apt-get install -y git test@test:~$ git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next |
Note that the development board using the H618 Soc needs to download the source code of the next branch of orangepi-build. The above git clone command needs to specify the branch of the orangepi-build source code as next. |
Downloading the orangepi-build code through the git clone command does not require entering the user name and password of the github account (the same is true for downloading other codes in this manual), if the Ubuntu PC prompts the user to enter the github account after entering the git clone command The name and password are usually entered incorrectly in the address of the orangepi-build warehouse behind the git clone. Please check the spelling of the command carefully, instead of thinking that we forgot to provide the username and password of the github account. |
The u-boot and linux kernel versions currently used by the H618 series development boards are as follows:
branch | u-boot version | Linux kernel version |
current | u-boot v2018.05 | linux5.4 |
next | u-boot v2021.07 | linux6.1 |
The branch mentioned here is not the same thing as the branch of the orangepi-build source code, please do not confuse it. This branch is mainly used to distinguish different kernel source code versions. We currently define the linux5.4 bsp kernel provided by Allwinner as the current branch. The latest linux6.1 LTS kernel is defined as the next branch. |
After orangepi-build is downloaded, it will contain the following files and folders:
build.sh: Compile the startup script
external: Contains the configuration files needed to compile the image, specific scripts, and the source code of some programs, etc.
LICENSE: GPL 2 license file
README.md: orangepi-build documentation
scripts: General script for compiling linux images
test@test:~/orangepi-build$ ls
build.sh external LICENSE README.md scripts
If you downloaded the code of orangepi-build from github, after downloading, you may find that orangepi-build does not contain the source code of u-boot and linux kernel, nor does u-boot and linux kernel need to use cross-compilation tools Chain, this is normal, because these things are stored in other separate github warehouses or some servers (the addresses will be detailed below). orangepi-build will specify the address of u-boot, linux kernel and cross-compilation toolchain in the script and configuration file. When running orangepi-build, when it finds that there are no such things locally, it will automatically go to the corresponding place to download them.
Download the cross-compilation toolchain
When orangepi-build runs for the first time, it will automatically download the cross-compilation toolchain and put it in the toolchains folder. Every time you run the build.sh script of orangepi-build, it will check whether the cross-compilation toolchain in toolchains exists. If If it does not exist, the download will be restarted, if it exists, it will be used directly, and the download will not be repeated.
The mirror URL of the cross-compilation toolchain in China is the open source software mirror site of Tsinghua University:
After the toolchains are downloaded, it will contain multiple versions of the cross-compilation toolchain:
test@test:~/orangepi-build$ ls toolchains/ gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi gcc-linaro-aarch64-none-elf-4.8-2013.11_linux gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu gcc-linaro-arm-none-eabi-4.8-2014.04_linux |
The cross-compilation toolchain used to compile the H618 Linux kernel source code is:
linux5.4
gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu
linux6.1
gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu
The cross-compilation toolchain used to compile the H618 u-boot source code is:
v2018.05
gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi
v2021.07
gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu
orangepi-build complete directory structure description
The orangepi-build repository does not contain the source code of the linux kernel, u-boot, and cross-compilation toolchain after downloading. The source code of the linux kernel and u-boot is stored in an independent git repository
The git warehouse where the linux kernel source code is stored is as follows, pay attention to switch the branch of the linux-orangepi warehouse to
The git warehouse where the u-boot source code is stored is as follows, pay attention to switch the branch of the u-boot-orangepi warehouse to
When orangepi-build runs for the first time, it will download the cross-compilation toolchain, u-boot and linux kernel source code. After successfully compiling a linux image, the files and folders that can be seen in orangepi-build are:
build.sh: Compile the startup script
external: Contains the configuration files needed for compiling the image, scripts for specific functions, and the source code of some programs. The rootfs compressed package cached during the compiling process is also stored in external
kernel: Store the source code of the linux kernel
LICENSE: GPL 2 license file
README.md: orangepi-build documentation
output: Store compiled u-boot, linux and other deb packages, compilation logs, and compiled images and other files
scripts: General script for compiling linux images
toolchains: Store the cross-compilation toolchain
u-boot: Store the source code of u-boot
userpatches: Store the configuration files needed to compile the script
test@test:~/orangepi-build$ ls
build.sh external kernel LICENSE output README.md scripts toolchains u-boot userpatches
Compile u-boot
Run the build.sh script, remember to add sudo permission
test@test:~/orangepi-build$ sudo ./build.sh
Select U-boot package, then press Enter
Then select the model of the development board
Then select the branch type of u-boot
Then it will start to compile u-boot, and part of the information prompted when compiling the next branch is as follows:
u-boot source code version
[ o.k. ] Compiling u-boot [ v2021.07 ]
The version of the cross-compilation toolchain
[ o.k. ] Compiler version [ aarch64-linux-gnu-gcc 11 ]
Path to the generated u-boot deb package
[ o.k. ] Target directory [ orangepi-build/output/debs/u-boot ]
The package name of the generated u-boot deb package
[ o.k. ] File name [ linux-u-boot-next-orangepizero3_x.x.x_arm64.deb ]
Compilation time
[ o.k. ] Runtime [ 1 min ]
Repeat the command to compile u-boot, use the following command to start compiling u-boot directly without selecting through the graphical interface
[ o.k. ] Repeat Build Options [ sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=u-boot ]
View the u-boot deb package generated by compilation
test@test:~/orangepi-build$ ls output/debs/u-boot/
linux-u-boot-next-orangepizero3_x.x.x_arm64.deb
When the orangepi-bulid compilation system compiles the u-boot source code, it will first synchronize the u-boot source code with the u-boot source code of the github server, so if you want to modify the u-boot source code, you first need to turn off the download and update function of the source code (This function needs to be fully compiled once u-boot, otherwise it will prompt that the source code of u-boot cannot be found), otherwise the changes made will be restored, the method is as follows:
Set the IGNORE_UPDATES variable in userpatches/config-default.conf to "yes"
test@test:~/orangepi-build$ vim userpatches/config-default.conf
......
IGNORE_UPDATES="yes"
......
When debugging u-boot code, you can use the following method to update u-boot in the linux image for testing
First upload the compiled u-boot deb package to the linux system of the development board
test@test:~/orangepi-build$ cd output/debs/u-boot
test@test:~/orangepi_build/output/debs/u-boot$ scp \
linux-u-boot-next-orangepizero3_x.x.x_arm64.deb root@192.168.1.xxx:/root
Install the new u-boot deb package just uploaded
orangepi@orangepi:~$ sudo dpkg -i linux-u-boot-next-orangepizero3_x.x.x_arm64.deb
Then run the nand-sata-install script
orangepi@orangepi:~$ sudo nand-sata-install
Then select 5 Install/Update the bootloader on SD/eMMC
After pressing the Enter key, a Warning will pop up first
Press the Enter key again to start updating u-boot, and the following information will be displayed after the update
Then you can restart the development board to test whether the modification of u-boot takes effect
Compile the linux kernel
Run the build.sh script, remember to add sudo permission
test@test:~/orangepi-build$ sudo ./build.sh
Select Kernel package, then press Enter
Then you will be prompted whether you need to display the kernel configuration interface. If you do not need to modify the kernel configuration, select the first one. If you need to modify the kernel configuration, select the second one.
Then select the model of the development board
Then select the branch type of the kernel source code
If you choose to display the kernel configuration menu (the second option) in step 3), the kernel configuration interface opened by make menuconfig will pop up. At this time, you can directly modify the kernel configuration, save and exit after modification. Yes, after exiting, it will start compiling the kernel source code.
If you do not need to modify the configuration options of the kernel, when running the build.sh script, pass in KERNEL_CONFIGURE=no to temporarily block the pop-up kernel configuration interface
test@test:~/orangepi-build$ sudo ./build.sh KERNEL_CONFIGURE=no
You can also set KERNEL_CONFIGURE=no in the orangepi-build/userpatches/config-default.conf configuration file, which can permanently disable this function
If the following error is displayed when compiling the kernel, it is because the terminal interface of the Ubuntu PC is too small to display the make menuconfig interface. Please maximize the terminal of the Ubuntu PC and run the build.sh script again
Part of the information prompted when compiling the next branch kernel source code is as follows:
The version of the linux kernel source code
[ o.k. ] Compiling current kernel [ 6.1.31 ]
The version of the cross-compilation toolchain used
[ o.k. ] Compiler version [ aarch64-linux-gnu-gcc 11 ]
The configuration file used by the kernel by default and the path where it is stored are as follows
[ o.k. ] Using kernel config file [ orangepi-build/external/config/kernel/linux-6.1-sun50iw9-next.config ]
The path of the deb package related to the kernel generated by compiling
[ o.k. ] Target directory [ output/debs/ ]
The package name of the compiled kernel image deb package
[ o.k. ] File name [ linux-image-next-sun50iw9_x.x.x_arm64.deb ]
The time used for compilation
[ o.k. ] Runtime [ 10 min ]
Finally, the compilation command to repeatedly compile the kernel selected last time will be displayed. Use the following command to start compiling the kernel source code directly without selecting through the graphical interface
[ o.k. ] Repeat Build Options [ sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=kernel KERNEL_CONFIGURE=no ]
View the deb package related to the kernel generated by compilation
linux-dtb-next-sun50iw9_x.x.x_arm64.deb Contains dtb files used by the kernel
linux-headers-next-sun50iw9_x.x.x_arm64.deb Include kernel headers
linux-image-next-sun50iw9_x.x.x_arm64.deb Contains kernel images and kernel modules
test@test:~/orangepi-build$ ls output/debs/linux-*
output/debs/linux-dtb-next-sun50iw9_x.x.x_arm64.deb
output/debs/linux-headers-next-sun50iw9_x.x.x_arm64.deb
output/debs/linux-image-next-sun50iw9_x.x.x_arm64.deb
When the orangepi-bulid compilation system compiles the linux kernel source code, it first synchronizes the linux kernel source code with the linux kernel source code of the github server, so if you want to modify the linux kernel source code, you first need to turn off the update function of the source code (the linux kernel needs to be fully compiled once This function can only be turned off after the source code, otherwise it will prompt that the source code of the linux kernel cannot be found), otherwise the changes made will be restored, the method is as follows:
Set the IGNORE_UPDATES variable in userpatches/config-default.conf to "yes"
test@test:~/orangepi-build$ vim userpatches/config-default.conf
IGNORE_UPDATES="yes"
If the kernel has been modified, the following method can be used to update the kernel and kernel modules of the development board linux system
Upload the deb package of the compiled linux kernel to the linux system of the development board
test@test:~/orangepi-build$ cd output/debs
test@test:~/orangepi-build/output/debs$ scp \
linux-image-next-sun50iw9_x.x.x_arm64.deb root@192.168.1.xxx:/root
Install the deb package of the new linux kernel just uploaded
orangepi@orangepi:~$ sudo dpkg -i linux-image-next-sun50iw9_x.x.x_arm64.deb
Then restart the development board, and then check whether the kernel-related modifications have taken effect
orangepi@orangepi:~$ sudo reboot
Compile rootfs
Run the build.sh script, remember to add sudo permission
test@test:~/orangepi-build$ sudo ./build.sh
Select Rootfs and all deb packages, then press Enter
Then select the model of the development board
Then select the branch type of the kernel source code, the type of rootfs maintained by different versions of the kernel source code is different
Then select the type of rootfs
Then select the type of image
Image with console interface (server) Indicates the image of the server version, which is relatively small
Image with desktop environment Indicates a mirror image with a desktop, which is relatively large
If you are compiling the image of the server version, you can also choose to compile the Standard version or the Minimal version. The pre-installed software of the Minimal version will be much less than that of the Standard version (please do not choose the Minimal version if there is no special requirement, because many things are not pre-installed by default. Some functions may not be available)
If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently only XFCE is maintained, so please choose the XFCE type desktop
You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.
Then it will start to compile rootfs, and some information prompted during compilation is explained as follows
The type of rootfs
[ o.k. ] local not found [ Creating new rootfs cache for bullseye ]
The storage path of the compiled rootfs compressed package
[ o.k. ] Target directory [ orangepi-build/external/cache/rootfs ]
The name of the rootfs compressed package generated by compilation
[ o.k. ] File name [ bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4 ]
View the rootfs compressed package generated by compilation
bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4 is the rootfs compressed package, the meaning of each field of the name is
a) bullseye indicates the type of linux distribution of rootfs
b) xfce means rootfs is the type of desktop version, if it is cli, it means the type of server version
c) arm64 represents the architecture type of rootfs
d) 25250ec7002de9e81a41de169f1f89721 is the MD5 hash value generated by the package names of all software packages installed by rootfs. As long as the list of software packages installed by rootfs is not modified, this value will not change. The compilation script will use this MD5 hash value to generate Determine whether rootfs needs to be recompiled
bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list lists the package names of all packages installed by rootfs
test@test:~/orangepi-build$ ls external/cache/rootfs/
bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4
bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.current
bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list
If the required rootfs already exists under external/cache/rootfs, then compiling rootfs again will directly skip the compilation process and will not restart the compilation. When compiling the image, it will also go to external/cache/rootfs to find out whether it has If there is rootfs available in the cache, use it directly, which can save a lot of download and compilation time
Compile linux image
Run the build.sh script, remember to add sudo permission
test@test:~/orangepi-build$ sudo ./build.sh
Select Full OS image for flashing, then press Enter
Then select the model of the development board
Then select the branch type of the kernel source code, the type of rootfs maintained by different versions of the kernel source code is different
Then select the type of rootfs
Then select the type of image
Image with console interface (server) Indicates the image of the server version, which is relatively small
Image with desktop environment Indicates a mirror image with a desktop, which is relatively large
If you are compiling the image of the server version, you can also choose to compile the Standard version or the Minimal version. The pre-installed software of the Minimal version will be much less than that of the Standard version (please do not choose the Minimal version if there is no special requirement, because many things are not pre-installed by default. Some functions may not be available)
If you are compiling the image of the desktop version, you also need to select the type of desktop environment. Currently only XFCE is maintained, so please select the XFCE type desktop
You can then select additional packages that need to be installed. Please press the Enter key to skip directly here.
Then it will start to compile the linux image. The general process of compilation is as follows
Initialize the compilation environment of Ubuntu PC and install the software packages required for the compilation process
Download the source code of u-boot and linux kernel (if cached, only update the code)
Compile u-boot source code and generate u-boot deb package
Compile the linux source code and generate linux-related deb packages
Make the deb package of linux firmware
Make the deb package of the orangepi-config tool
Create a deb package supported by the board
If you are compiling the desktop image, you will also create desktop-related deb packages
Check whether the rootfs has been cached, if not, recreate the rootfs, if it has been cached, directly decompress and use
Install the previously generated deb package into rootfs
Make some specific settings for different development boards and different types of images, such as pre-installing additional software packages, modifying system configuration, etc.
Then make an image file and format the partition, the default type is ext4
Then copy the configured rootfs to the mirrored partition
Then update initramfs
Finally, write the bin file of u-boot into the image through the dd command
After compiling the image, the following information will be prompted
The storage path of the compiled image
[ o.k. ] Done building [ output/images/orangepizero3_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop/orangepizero3_x.x.x_debian_bullseye_linux6.1.xx_xfce_desktop.img ]
Compilation time
[ o.k. ] Runtime [ 19 min ]
Repeat the command to compile the image, and use the following command to start compiling the image directly without selecting through the graphical interface
[ o.k. ] Repeat Build Options [ sudo ./build.sh BOARD=orangepizero3 BRANCH=next BUILD_OPT=image RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=yes ]
Android 12 TV system instructions
Supported Android versions
Android version | kernel version |
Android 12 TV version | linux5.4 |
Android 12 TV function adaptation
Function | Android12 |
HDMI Video | OK |
HDMI Audio | OK |
USB2.0 x 3 | OK |
TFcard boot | OK |
network card | OK |
infrared | OK |
WIFI | OK |
WIFI hotsport | OK |
Bluetooth | OK |
BLE Bluetooth | OK |
headphone audio | OK |
TV-OUT | OK |
USB camera | OK |
LED light | OK |
Temperature Sensor | OK |
Mali GPU | OK |
video codec | OK |
Onboard LED light display instructions
Green Light | Red Light | |
u-boot startup phase | Off | Bright |
The kernel boots into the system | Bright | Off |
Android method to return to the previous interface
We generally use the mouse and keyboard to control the Android system of the development board. When entering certain interfaces and need to return to the previous interface or desktop, we can only return through the right mouse button, and the keyboard cannot return.
If you have purchased the infrared remote control (other remote control does not work) and the expansion board that match the development board, after inserting the expansion board into the development board, you can return to the previous menu through the return key in the remote control. The position of the return key is shown in the figure below shown:
How to use ADB
Use network connection adb debugging
Using the network adb does not require a USB Type C interface data cable to connect the computer and the development board, but to communicate through the network, so first make sure that the wired or wireless network of the development board has been connected, and then obtain the IP address of the development board, and then to use. |
Make sure that the service.adb.tcp.port of the Android system is set to port number 5555
apollo-p2:/ # getprop | grep "adb.tcp"
[service.adb.tcp.port]: [5555]
If service.adb.tcp.port is not set, you can use the following command to set the port number of network adb in the serial port
apollo-p2:/ # setprop service.adb.tcp.port 5555 apollo-p2:/ # stop adbd apollo-p2:/ # start adbd |
Install adb tool on Ubuntu PC
test@test:~$ sudo apt-get update
test@test:~$ sudo apt-get install -y adb
Then connect network adb on Ubuntu PC
test@test:~$ adb connect 192.168.1.xxx:5555 (It needs to be modified to the IP address of the development board)
* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 192.168.1.xxx:5555
test@test:~$ adb devices
List of devices attached
192.168.1.xxx:5555 device
Then you can log in to the android system through the adb shell on the Ubuntu PC
test@test:~$ adb shell
apollo-p2:/ #
Use the data cable to connect to adb debugging
Prepare a data cable with USB Type C interface, plug one end of the USB interface into the USB interface of the computer, and insert one end of the USB Type C interface into the power interface of the development board. In this case, the development board is powered by the USB interface of the computer, so please make sure that the USB interface of the computer can provide the most power to drive the development board
Install adb tool on Ubuntu PC
test@test:~$ sudo apt-get update
test@test:~$ sudo apt-get install -y adb
View the identified ADB device
test@test:~$ adb devices
List of devices attached
4c00146473c28651dd0 device
Then you can log in to the android system through the adb shell on the Ubuntu PC
test@test:~$ adb shell
apollo-p2:/ $
View the method of setting HDMI display resolution
First enter Settings
Then select Device Preferences
Then select Display & Sound
Then select Advanced display settings
Then select HDMI outpu mode
Then you can see the list of resolutions supported by the display. At this time, click the corresponding option to switch to the corresponding resolution. Please note that the resolutions supported by different monitors may be different. If you connect to a TV, you will generally see more resolution options than the picture below.
The HDMI output of the development board supports 4K display. When connected to a 4K TV, you can see the option of 4K resolution
HDMI to VGA display test
First, you need to prepare the following accessories
HDMI to VGA display test as shown below
When using HDMI to VGA display, the development board and the Android system of the development board do not need to make any settings, only the Micro HDMI interface of the development board can display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.
WI-FI connection method
First select Settings
Then select Network & Internet
Then open WI-FI
After turning on WI-FI, you can see the searched signal under Available networks
After selecting the WI-FI you want to connect to, the password input interface shown in the figure below will pop up
Then use the keyboard to enter the password corresponding to the WI-FI, and then use the mouse to click the Enter button in the virtual keyboard to start connecting to the WI-FI
After the WI-FI connection is successful, the display is as shown in the figure below
How to use WI-FI hotspot
First, please make sure that the Ethernet port is connected to the network cable and can access the Internet normally
Then select Settings
Then select Network & Internet
Then select WIFI hotspot
Then turn on Hotspot Enable, you can also see the name and password of the generated hotspot in the figure below, remember them and use them when connecting to the hotspot (if you need to modify the name and password of the hotspot, you need to turn off Hotspot Enable first, before modifying)
At this point, you can take out your mobile phone. If everything is normal, you can find the WIFI hotspot with the same name (here AndroidAP_7132) displayed under the Hotspot name in the above picture in the WI-FI list searched by the mobile phone. Then you can click AndroidAP_7132 to connect to the hotspot, and the password can be seen under the Hotspot password in the above picture
After the connection is successful, it will be displayed as shown in the figure below (the interface of different mobile phones will be different, the specific interface is subject to the display of your mobile phone). At this point, you can open a webpage on your mobile phone to see if you can access the Internet. If you can open the webpage normally, it means that the WI-FI Hotspot of the development board can be used normally.
How to check the IP address of the Ethernet port
First, please make sure that the Gigabit Ethernet port of the development board is connected to a router or switch
Then open Settings
Then select Network & Internet
Then you can see the IP address of the development board's wired network port at the position shown in the figure below
Bluetooth connection method
First select Settings
Then select Bluetooth
Then open Bluetooth Enable
Then click Pair new device to start scanning the surrounding Bluetooth devices
The searched Bluetooth devices will be displayed under Available devices
Then click the Bluetooth device you want to connect to start pairing. When the following interface pops up, please use the mouse to select the Pair option
The test here is the configuration process of the development board and the Bluetooth of the Android mobile phone. At this time, the following confirmation interface will pop up on the mobile phone. After clicking the pairing button on the mobile phone, the pairing process will start
After the pairing is complete, open Paired devices and you can see the paired Bluetooth devices
At this time, you can use the Bluetooth of your mobile phone to send a picture to the development board. After sending, you can see the following confirmation interface in the Android system of the development board, and then click Accept to start receiving the picture sent by the mobile phone.
The pictures received by the Android system Bluetooth of the development board can be viewed in Received files
How to use the USB camera
First insert the USB (UVC protocol) camera into the USB interface of the development board
If the USB camera is recognized normally, a corresponding video device node will be generated under /dev
console:/ # ls /dev/video0
/dev/video0
Then make sure that the adb connection between the Ubuntu PC and the development board is normal. For how to use adb, please refer to the instructions in the section on how to use ADB
Download the USB camera test APP in the official tool on the development board data download page
Then use the adb command to install the USB camera test APP to the Android system, of course, you can also use the U disk to copy the installation
test@test:~$ adb install usbcamera.apk
After installation, you can see the startup icon of the USB camera on the Android desktop
Then double-click to open the USB camera APP and you can see the output video of the USB camera
Android system ROOT instructions
The Android system released by Orange Pi has been ROOT, you can use the following method to test. |
Download rootcheck.apk from the official tool on the development board data download page
Then make sure that the adb connection between the Ubuntu PC and the development board is normal. For how to use adb, please refer to the instructions in the section on how to use ADB
Then use the adb command to install rootcheck.apk to the Android system, of course, you can also use the U disk to copy the installation
test@test:~$ adb install rootcheck.apk
After installation, you can see the startup icon of the ROOT test tool on the Android desktop
The display interface after opening the ROOT test tool for the first time is shown in the figure below
Then you can click CHECK NOW to start checking the ROOT status of the Android system. After the check, the display is as follows, and you can see that the Android system has obtained the ROOT permission
The method of using MiracastReceiver to cast the mobile phone screen to the development board
First, please make sure that the development board and the mobile phone are connected to the same WIFI hotspot. For the method of connecting the development board to WIFI, please refer to the description in the section of WI-FI connection method
Then open the MiracastReceiver application in the Android system of the development board
The interface after MiracastReceiver is opened is as follows
Then find the screen projection function in the mobile phone settings. Here we take the Mi 12S Pro mobile phone as an example. Please research other brands of mobile phones by yourself. As shown in the figure below, click the button in the red box to open the screen projection function of the mobile phone
After waiting for a while, you can see the searched and connectable devices on the mobile phone, and then we can select the device corresponding to the development board to connect
Then the selection box shown in the figure below will pop up on the MiracastReceiver application interface of the development board, here we can select Accept
Then you can see the content of the mobile phone screen on the HDMI screen connected to the development board
26pin interface GPIO, UART, SPI test
26pin GPIO port test method
First open the wiringOP APP on the desktop
Then click the GPIO_TEST button to open the GPIO test interface
The GPIO test interface is shown in the figure below. There is a one-to-one correspondence between the two rows of CheckBox buttons on the left and the 26pin pins (PC1/PI16/PI6/PH10 in the lower left corner are GPIO ports in the 13pin pins). When the CheckBox button is checked, the corresponding GPIO pin will be set to OUT mode, and the pin level will be set to high level; when the checkbox is unchecked, the GPIO pin level will be set to low level; When the GPIO READALL button is pressed, information such as the wPi number, GPIO mode, and pin level can be obtained.
Then click the GPIO READALL button, the output information is as shown in the figure below:
There are a total of 17 GPIO ports in the 26pin of the development board that can be used (if you add 4 GPIO ports in the 13pin, then there are 21 in total), and the following pin No. 7 - corresponding to GPIO is PC9 - corresponding to wPi The serial number is 2——as an example to demonstrate how to set the high and low levels of the GPIO port. First click the CheckBox button corresponding to pin 7. When the button is selected, pin 7 will be set to high level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 3.3v, it means setting high level success
Then click the GPIO READALL button, you can see that the current pin 7 mode is OUT, and the pin level is high
Click the CheckBox button in the figure below again to cancel the check status. Pin 7 will be set to low level. After setting, you can use a multimeter to measure the voltage value of the pin. If it is 0v, it means that the low level is set successfully.
Then click the GPIO READALL button, you can see that the current pin 7 mode is OUT, and the pin level is low
26pin UART test method
UART5 is enabled by default in Android, and the corresponding device node is /dev/ttyAS5
apollo-p2:/ # ls /dev/ttyAS5
/dev/ttyAS5
First open the wiringOP APP on the desktop
Then click the UART_TEST button to open the UART test interface
The serial port test interface of wiringOP is shown in the figure below
Then select the /dev/ttyAS5 node in the selection box
Enter the baud rate you want to set in the edit box, and then click the OPEN button to open the /dev/ttyAS5 node. After the opening is successful, the OPEN button becomes unselectable, and the CLOSE button and SEND button become selectable.
- Then use Dupont wire to short the rx and tx pins of uart5
uart5 Tx pin Corresponding to pin 8 of 26pin Rx pin Corresponding to pin 10 of 26pin
26pin SPI test method
The SPI that can be used in 26pin is SPI1, and the corresponding device node is /dev/spidev1.1
Here is a demonstration to test the SPI1 interface through the w25q64 module, first connect the w25q64 module to the SPI1 interface
It doesn't matter if there is no w25q64 module, because there is a SPIFlash connected to SPI0 on the development board, and the configuration of SPI0 is also enabled by default in Android, so we can also directly use the onboard SPIFlash test.
Then open the wiringOP APP on the desktop
Then click the SPI_TEST button to open the SPI test interface
Then select the spi device node in the upper left corner. If you directly test the onboard SPIFlash, then keep the default /dev/spidev0.0. If you connect the w25q64 module to the 26pin spi1, then please select /dev /dev/spidev1.1
Then click the OPEN button to initialize the SPI
Then fill in the bytes that need to be sent, such as reading the ID information of the onboard SPIFlash, fill in the address 0x9f in data[0], and then click the TRANSFER button
Finally, the APP will display the read ID information of the onboard SPI Flash
If it is to read the w25q64 module connected to 26pin SPI1, then the read ID information is shown in the figure below
The MANUFACTURER ID of the w25q64 module is EFh, and the Device ID is 4017h, corresponding to the value read above (h stands for hexadecimal)
26pin I2C test method
The i2c3 in 26pin is enabled by default in Android, and the corresponding device node is /dev/i2c-3
apollo-p2:/ # ls /dev/i2c-3
/dev/i2c-3
First open the wiringOP APP on the desktop
Then click the I2C_TEST button to open the i2c test interface
The i2c test interface of wiringOP is shown in the figure below. You can see that the default i2c is /dev/i2c-3, so we don't need to re-select
Then connect an i2c device to the 26pin i2c3 pin, here we take the ds1307 rtc module as an example
Pins of the RTC module | The pin corresponding to the 26pin of the development board |
5V | pin 2 |
GND | pin 6 |
SDA | pin 3 |
SCL | pin 5 |
The i2c address of the ds1307 rtc module is 0x68. After connecting the wires, we can use the i2cdetect -y 3 command in the serial port command line to check whether the i2c address of the ds1307 rtc module can be scanned. As shown in the figure below, if you can see the address 0x68, it means that the wiring of the ds1307 rtc module is correct.
apollo-p2:/ # i2cdetect -y 3
Then set the address of i2c to 0x68 in wiringOP, and then click the OPEN button to open i2c3
The display after clicking the OPEN button to open i2c3 is as follows:
Then we test to write a value into the register of the rtc module, for example, write 0x55 to the 0x1c address
Then click the READ BYTE button to read the value of the 0x1c register, if it is displayed as 0x55, it means that the i2c read and write test has passed
Appendix
User Manual Update History
Version | Date | Update Notes |
v1.0 | 2023-07-05 | initial version |
v1.1 | 2023-07-14 | Add the compilation method of Android 12 source code |
Image update history
Date | Update Notes |
2023-07-05 | Orangepizero3_1.0.0_ubuntu_jammy_server_linux5.4.125.7z
Orangepizero3_1.0.0_debian_bullseye_server_linux5.4.125.7z Orangepizero3_1.0.0_ubuntu_focal_desktop_xfce_linux5.4.125.7z Orangepizero3_1.0.0_ubuntu_jammy_desktop_xfce_linux5.4.125.7z Orangepizero3_1.0.0_debian_bullseye_desktop_xfce_linux5.4.125.7z
Orangepizero3_1.0.0_debian_bookworm_server_linux6.1.31.7z Orangepizero3_1.0.0_debian_bullseye_server_linux6.1.31.7z Orangepizero3_1.0.0_ubuntu_jammy_desktop_xfce_linux6.1.31.7z Orangepizero3_1.0.0_debian_bookworm_desktop_xfce_linux6.1.31.7z Orangepizero3_1.0.0_debian_bullseye_desktop_xfce_linux6.1.31.7z
|
2023-07-13 |
Opios-arch-aarch64-xfce-opizero3-23.07-linux6.1.31.img.xz
|