Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero 3

23,868 bytes added, 10:19, 19 July 2023
How to install Debian system
<span id="basic-features-of-orange-pi-zero-3"></span>= '''Basic features of Orange Pi Zero 3'''=
'''User Manual'''<span id="what-is-orange-pi-zero-3"></span>== What is Orange Pi Zero 3 ==
[[File:media/image2Orange 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.png|575x396px]]
'''Catalog'''<span id="purpose-of-orange-pi-zero-3"></span>== Purpose of Orange Pi Zero 3 ==
[[\l|1. Basic features of Orange Pi Zero 3 [1](#basic-features-of-orange-pi-zero-3)]]We can use it to achieve:
[[\l|1.1. What is Orange Pi Zero 3 [1](#what-is-orange-pi-zero-3)]]* A small Linux desktop computer* A small Linux web server* Install the Klipper host computer to control the 3D printer* Android TV box
[[\l{|1.2class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Of course, there are more functions. Purpose Relying on a powerful ecosystem and a variety of expansion accessories, Orange Pi Zero 3 [1](#purpose-of-orange-pi-zero-3)]]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.'''</big>|}
[[\l|1.3. Who is Orange Pi Zero 3 designed for? [1](#<span id="who-is-orange-pi-zero-3-designed-for)]]"></span>
[[\l|1.4. Hardware Features of == Who is Orange Pi Zero 3 [2](#hardware-features-of-orange-pi-zero-3)]]designed for? ==
[[\l|1.5. Top view and bottom view of The Orange Pi Zero 3 [3](#top-view-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-bottom-view-of-orange-pi-zero-3)]]useful tool you can use to shape the world around you.
[[\l|1.6. Interface details of Orange Pi Zero 3 [4](#interface<span id="hardware-detailsfeatures-of-orange-pi-zero-3)]]"></span>== Hardware Features of Orange Pi Zero 3 ==
[[\l{|class="wikitable" style="width:800px;text-align: center;" |-|colspan=2. |<div style="text-align:center"><big>'''Introduction to the use of the development board [6](#introductionhardware features'''</big></div>|-to| CPU| Allwinner H618 quad-thecore 64-usebit 1.5GHz high-ofperformance Cortex-theA53 processor|-development-board)]]| GPU| Mali G31 MP2
[[\l|Supports OpenGL ES 1.0/2.10/3.2、OpenCL 2. Prepare the required accessories [6](#prepare-the-required-accessories)]]0
[[\l|2.2-| Memory| 1GB/1. Download the image of the development board and related materials [12]5GB/2GB/4GB LPDDR4 (#downloadshared with GPU)|-the| Onboard storage| micro SD card slot, 16MB SPI Flash|-image| Ethernet| Support 10/100M/1000M Ethernet|-of| WIFI+Bluetooth|AW859A chip, support IEEE 802.11 a/b/g/n/ac, BT5.0|-the-development-board-and-related-materials)]]| Video Output| Micro HDMI 2.0a
[[\l|2.3. Method of burning Linux image to TF card based on Windows PC [12]TV CVBS output, support PAL/NTSC (#method-of-burning-linux-image-to-tf-card-based-on-windows-pcvia 13pin expansion board)]]
[[\l|2.3.1. How to use balenaEtcher to burn Linux image [13](#how-to-use-balenaetcher-to-burn-linux-image)]]| Audio output| Micro HDMI output
[[\l|2.3.2. How to use Win32Diskimager to burn Linux image [17]5mm audio port (#how-to-use-win32diskimager-to-burn-linux-imagevia 13pin expansion board)]]
[[\l|-| Power Supply| USB Type C interface input|-| USB 2.40 port| 3 * USB 2. Method of burning Linux image to TF card based on Ubuntu PC [19]0 HOST (#method-two ofthem are through 13pin expansion board)|-burning-linux-image-to-tf-card-based-on-ubuntu| 26pin connector| With I2Cx1, SPIx1, UARTx1 and multiple GPIO ports|-pc)]]| 13pin connector[[\l|With USB 2.5. How to burn Android image to TF card [23](#how0 HOSTx2, TV-toOUT, LINE OUT, IR-burnRX, and 3 GPIO ports|-android| Debug serial port| UART-imageTX, UART-toRX and GND|-tf| LED light| Power light and status light|-card| Infrared receiver| Support infrared remote control (via 13pin expansion board)]]|-[[\l|2Supported OS| Android12 TV, Ubuntu, Debian, etc.6. Instructions for using the micro linux system in the onboard SPI Flash [30](#instructions|-for|colspan=2|<div style="text-usingalign:center"><big>'''Introduction of Appearance Specifications'''</big></div>|-the| Product Size| 85mm×56mm|-micro-linux-system-in-the-onboard-spi-flash)]]| Weight| 30g|}
[[\l|2.7. Start the Orange Pi development board [31](#start<span id="top-theview-and-bottom-view-of-orange-pi-developmentzero-board)]]3"></span>
[[\l|2.8. How to use the debugging serial port [32](#how-to-use-the-debugging-serial-port)]]== Top view and bottom view of Orange Pi Zero 3 ==
[[\l|2.8.1. Connection instruction of debugging serial port [32](#connection-instruction-of-debugging-serial-port)]]<big>'''Top view:'''</big>
[[\l|2.8.2. How to use the debugging serial port on the Ubuntu platform [33](#howFile:zero3-toimg3-use-the-debugging-serial-port-on-the-ubuntu-platform)1.png]]
[[\l|2.8.3. How to use the debugging serial port on Windows platform [36](#how-to-use-the-debugging-serial-port-on-windows-platform)]]<big>'''Bottom view:'''</big>
[[\l|2File:zero3-img4.9. Instructions for using the 5v pin in the 26pin or 13pin interface of the development board to supply power [39](#instructions-for-using-the-5v-pin-in-the-26pin-or-13pin-interface-of-the-development-board-to-supply-power)png]]
[[\l|2.10. The method of using the 13pin interface of the development board to expand the USB <span id="interface [41](#the-methoddetails-of-using-the-13pin-interfaceorange-ofpi-thezero-development-board-to-expand-the-usb-interface)]]3"></span>
[[\l|== Interface details of Orange Pi Zero 3. Instructions for use of Debian/Ubuntu Server and Xfce desktop system [43](#instructions-for-use-of-debianubuntu-server-and-xfce-desktop-system)]]==
[[\l|3.1File:zero3-img5. Supported linux image types and kernel versions [43](#supported-linux-image-types-and-kernel-versions)png]]
[[\l|3File:zero3-img6.2. Linux kernel driver adaptation [44](#linux-kernel-driver-adaptation)png]]
[[\l{|class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The diameters of the four positioning holes are all 3.30mm. The format of linux commands in this manual [45](#the-format-of-linux-commands-in-this-manual)]]'''</big>|}
[[\l|3.4. Linux system login instructions [47](#linux<span id="introduction-systemto-loginthe-instructions)]]use-of-the-development-board"></span>
[[\l|3.4.1. Linux system default login account and password [47](#linux-system-default-login-account-and-password)]]= '''Introduction to the use of the development board''' =
[[\l|3.4.2. How to set automatic terminal login in linux system [47](#how<span id="prepare-tothe-setrequired-automatic-terminal-login-in-linux-system)]]accessories"></span>== Prepare the required accessories ==
[[\l|3.4.3. Instructions for automatic login of linux desktop version system [48](#instructions-for-automatic-loginMicro SD card, a high-speed SanDisk card of class 10 or above with a minimum capacity of-linux-desktop-version-system)]]8GB
::[[\l|3.4.4File:zero3-img7. The setting method of root user automatic login in Linux desktop version system [49](#the-setting-method-of-root-user-automatic-login-in-linux-desktop-version-system)png]]
[[\l::{|3.4.5. The method class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Using other brands of disabling micro SD cards (non-SanDisk micro SD cards), as shown in the desktop in 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 Linux desktop version system [50](#is stuck halfway through startup, Or the-method-of-disabling-reboot command cannot be used normally, and it was finally resolved after changing theSanDisk micro SD card. So if you use a non-desktop-in-SanDisk micro SD card and find that there is a problem with the-linux-desktop-version-system)]]startup or use, please replace the SanDisk micro SD card and then test.'''</big>
<p>[[\lFile:zero3-img8.png|3180px]][[File:zero3-img9.5png|195px]][[File:zero3-img10. Onboard LED Light Test Instructions png|198px]][50](#onboard[File:zero3-ledimg11-light-test-instructions)1.png|190px]]</p>
[[\l|<p style="text-align: center;">'''Current feedback is that there are some micro SD cards that have problems starting on Orange Pi Zero 3.6. Instructions for operating the rootfs partition capacity of the linux system in the TF card [53](#instructions-for-operating-the-rootfs-partition-capacity-of-the-linux-system-in-the-tf-card)]]'''</p>
[[\l|3.6.1. The first startup will automatically expand the capacity of the rootfs partition in <big>'''In addition, the TF micro SD card [53](#the-first-startup-will-automatically-expand-the-capacity-that can be used normally on other types of-the-rootfs-partition-in-the-tf-card)]]development boards does not guarantee that it can be started normally on Orange Pi Zero 3, please pay special attention to this point.'''</big>|}
[[\l|3.6.<ol start="2. The method of prohibiting automatic expansion of the capacity of the rootfs partition in the TF card [55](#the" style="list-method-of-prohibiting-automatic-expansion-of-the-capacity-of-the-rootfs-partition-in-the-tfstyle-type: decimal;"><li>micro SD card reader, used to read and write micro SD card)]]</li>
[[\l|3.6File:zero3-img12.png]]</ol><ol start="3. The method of manually expanding the capacity of the rootfs partition in the TF card [56](#the" style="list-method-of-manually-expandingstyle-type: decimal;"><li>Micro HDMI to HDMI cable, used to connect the-capacity-of-the-rootfs-partition-in-the-tf-card)]]development board to an HDMI monitor or TV for display</li>
[[\l|3.6.4File:zero3-img13. How to reduce the capacity of the rootfs partition in the TF card [62](#how-to-reduce-the-capacity-of-the-rootfs-partition-in-the-tf-card)png]]
[[\l{|3.7. Network connection test [66](class="wikitable" style="background-color:#networkffffdc;width:800px;" |-connection| <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-test)]]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>
[[\lFile:zero3-img14.png|3.7.1. Ethernet port test [66center]](#ethernet|}</ol><ol start="4" style="list-portstyle-test)]]type: decimal;"><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>
[[\l|3File:zero3-img15.7png]] [[File:zero3-img16.2. WIFI connection test [68png]](#wifi</ol><ol start="5" style="list-style-connectiontype: decimal;"><li><p>13pin expansion board</p><ol style="list-test)]]style-type: lower-alpha;"><li>The physical object of the expansion board is as follows</li>
[[\l|3File:zero3-img17-1.7.3. The method of creating WIFI hotspot through create_ap [76png]](#the</ol><ol start="2" style="list-methodstyle-oftype: lower-creating-wifi-hotspot-through-create_ap)]]alpha;"><li>The way to insert the expansion board into the development board is as follows, remember not to insert it backwards</li>
[[\l|3File:zero3-img18.7.4. How to set static IP address [83png]](#how-to</ol><ol start="3" style="list-setstyle-statictype: lower-ip-address)]]alpha;"><li>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</li>
[[\l{|3.7.5. class="wikitable" style="width:800px;"|-| style="text-align: center;"| 1| style="text-align: center;"| Microphone (Mic)| style="text-align: center;"| '''<span style="color:#FF0000">No support, no support, no support! ! !</span><br /><br />'''The method 13pin expansion board is a general-purpose expansion board, which is suitable for various development boards of setting Orange Pi, but the Linux system to automatically connect to 13pin interface of Orange Pi Zero3 has no Mic function, so although there is a Mic on the network for 13pin expansion board, it is on the first time [91](#Orange Pi Zero 3. Unusable, the13pin expansion board is mainly used to expand functions other than Mic on Orange Pi Zero 3.|-method| style="text-ofalign: center;"| 2| style="text-settingalign: center;"| Analog audio and video output interface| style="text-thealign: 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-linuxalign: center;"| 3| style="text-systemalign: center;"| USB 2.0 Host x 2| style="text-align: center;"| Support, used toconnect USB keyboard, mouse and USB storage device.|-automatically| style="text-connectalign: center;"| 4| style="text-toalign: center;"| Infrared receiving function| style="text-thealign: center;"| Support, Android system can be controlled by infrared remote control.|}</ol><ol start="4" style="list-networkstyle-fortype: lower-alpha;"><li>The schematic diagram of the 13pin header of the-first-time)]]Orange Pi Zero 3 development board is shown below</li>
[[\l|3File:zero3-img19.8. SSH remote login development board [96png]](#ssh-remote</ol></li></ol><ol start="6" style="list-loginstyle-type: decimal;"><li><p>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)]]</p></li><li><p>Infrared remote control, mainly used to control Android TV system</p></li>
[[\l|3File:zero3-img20.8.1. SSH remote login development board under Ubuntu [96](#ssh-remote-login-development-board-under-ubuntu)png]]
[[\l{|3.8.2. SSH class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that the remote control of the air conditioner or the remote login control of the TV cannot control the Orange Pi development board under Windows [97](#ssh-. By default, only the remotecontrol provided by Orange Pi can.'''</big>|}</ol><ol start="8" style="list-loginstyle-type: decimal;"><li><p>100M or 1000M network cable, used to connect the development board to the Internet</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-under-windows)]]to the TV through the AV video cable</p></li>
[[\l|3File:zero3-img21.9. HDMI test [99png]](#hdmi</ol><ol start="10" style="list-style-test)]]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>
[[\l|3.9File:zero3-img22.png]] [[File:zero3-img23-1. HDMI display test [99png]](#hdmi</ol><ol start="11" style="list-displaystyle-test)]]type: decimal;"><li>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.</li>
[[\l{|3.9.2. HDMI to VGA display test [100](class="wikitable" style="background-color:#hdmiffffdc;width:800px;" |-to-vga-display-test)]]| <big>'''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.'''</big>|}
[[\l|3File:zero3-img24-1.9.3. How to set HDMI resolution in Linux5.4 system [101png]]</ol><ol start="12" style="list-style-type: decimal;"><li><p>Matching shell '''(#how-pictures to-set-hdmi-resolution-in-linux5.4-systembe added)]]'''</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>
[[\l|3File:zero3-img25-1.9.4. How to Modify the Framebuffer Width and Height of Linux5.4 System png]] [[102](#how-toFile:zero3-modify-the-framebuffer-width-and-height-of-linux5img26.4-system)png]]
[[\l{|class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that the TTL level used by the development board is 3.93v.5In addition to the USB to TTL module shown in the above figure, other similar 3.3v USB to TTL modules are generally available. Framebuffer Cursor Setting [103](#framebuffer'''</big>|}</ol><ol start="14" style="list-cursorstyle-setting)]]type: decimal;"><li>X64 computer with Ubuntu and Windows operating systems installed</li>
[[\l{|3class="wikitable" style="width:800px;"|-| style="text-align: center;"| 1| style="text-align: center;"| Ubuntu22.10. How 04 PC| style="text-align: center;"| Optional, used to use Bluetooth [104](#howcompile Android and Linux source code|-| style="text-toalign: center;"| 2| style="text-align: center;"| Windows PC| style="text-align: center;"| For burning Android and Linux images|}</ol><span id="download-the-image-of-the-development-board-and-userelated-bluetooth)]]materials"></span>
[[\l|3.10.1. Test method of desktop == Download the image [104](#test-method-of-desktop-image-1)]]the development board and related materials ==
[[\l|3.10.2. How to use the server image [107](#how-to-use-The website for downloading the-server-image)]]English version is
::{| class="wikitable" style="width:800px;" |-| [[\l|http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.11html '''http://www. USB interface test [110](#usborangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-interfaceZero-test)]3.html''']|}
[[\l|3.11.1. Connect USB mouse or keyboard to test [110](#connect<ol start="2" style="list-style-usbtype: decimal;"><li><p>The information mainly includes</p><ol style="list-mousestyle-ortype: lower-keyboardalpha;"><li><p>'''Android''' '''source code''': Save on Google Drive</p></li><li><p>'''Linux''' '''source code''':Save on Github</p></li><li><p>'''Android''' '''source code''':Save on Google Drive</p></li><li><p>'''Ubuntu''' '''source code''':Save on Google Drive</p></li><li><p>'''Debian''' '''source code''':Save on Google Drive</p></li><li><p>'''User Manual and Schematic:'''Chip-related data sheets will also be placed here</p></li><li><p>'''Official tool:'''It mainly includes the software that needs to-test)]]be used during the use of the development board</p></li></ol></li></ol>
[[\l|3.11.2. Connect USB storage device test [110](#connect<span id="method-usbof-storageburning-devicelinux-test)]]image-to-tf-card-based-on-windows-pc"></span>
[[\l|3.11.3. USB Ethernet == Method of burning Linux image to micro SD card test [111](#usb-ethernet-card-test)]]based on Windows PC ==
{| 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 [[\l|3http://www.11orangepi.4. USB camera test [112](#usborg/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-cameraZero-test)]3.html Orange Pi data download page].'''</big>|}
[[\l|3.12. Audio Test [115](#audio<span id="how-test)]]to-use-balenaetcher-to-burn-linux-image"></span>=== How to use balenaEtcher to burn Linux image ===
[[\l|3# First prepare a micro SD card with a capacity of 8GB or more.12The transmission speed of the micro SD card must be '''class 10 or above'''.1. How It is recommended to use a micro SD card of SanDisk and other brands# Then use the card reader to play audio using insert the micro SD card into the command line [115](computer#how-Download the Linux operating system image file compression package that you want toburn from the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-playand-audiosupport/Orange-usingPi-theZero-command-line)]3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;.img&quot; 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
::{| class="wikitable" style="width:800px;" |-| [[\l|3https://www.balena.12io/etcher/ '''https://www.2balena. Testing audio methods on desktop systems [116](#testing-audio-methods-on-desktop-systems)]io/etcher/''']|}
[[\l|3.13. Infrared receiving test [118](#infrared<ol start="5" style="list-receivingstyle-test)]]type: decimal;"><li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li>
[[\l|3File:zero3-img27.14png]]</ol><ol start="6" style="list-style-type: decimal;"><li>Then you can choose to download the Portable version of balenaEtcher software. Temperature sensor [120](#temperatureThe Portable version does not need to be installed, and you can use it by double-sensor)]]clicking to open it</li>
[[\l|3File:zero3-img28.15. 13 Pin Description of the Pin Expansion Board Interface [122png]](#pin</ol><ol start="7" style="list-descriptionstyle-type: decimal;"><li>If the downloaded version of-balenaEtcher needs to be installed, please install it before using it. If you downloaded thePortable version of balenaEtcher, just double-pin-expansion-board-click to open it. The opened balenaEtcher interface)]]is shown in the figure below</li>
[[\l|3File:zero3-img29.16. 26 Pin Interface Pin Description [123](#pin-interface-pin-description)png]]
[[\l{|3.17. How to install wiringOP [124](class="wikitable" style="background-color:#howffffdc;width:800px;" |-to-install-wiringop)]]| <big>'''When opening balenaEtcher, if the following error is prompted:'''</big>
[[\lFile:zero3-img30.png|3.18. 26pin interface GPIO, I2C, UART, SPI and PWM test [126](#pin-interface-gpio-i2c-uart-spi-and-pwm-test)center]]
[[\l|3.18.1<big>'''Please select balenaEtcher, right-click, and select Run as administrator. 26pin GPIO port test [126](#pin-gpio-port-test)]]'''</big>
[[\lFile:zero3-img31-1.png|center]]|3.18.2. 26 How to set the pull}</ol><ol start="8" style="list-down resistance of pin GPIO port [128](#howstyle-type: decimal;"><li><p>The specific steps to use balenaEtcher to-set-burn theLinux image are as follows</p><ol style="list-pullstyle-down-resistancetype: lower-alpha;"><li><p>First select the path of the Linux image file to be burned</p></li><li><p>Then select the drive letter ofthe micro SD card</p></li><li><p>Finally click Flash to start burning the Linux image to the micro SD card</p>[[File:zero3-pin-gpio-port)img32.png]]</li></ol></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 micro SD card</p></li>
[[\l|3File:zero3-img33.18.3. 26pin SPI test [129png]](#pin</ol><ol start="10" style="list-spistyle-test)]]type: decimal;"><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>
[[\l|3File:zero3-img34.18png]]</ol><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.4At 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. 26pin I2C test [131](#_Toc31340)]].</li>
[[\l|3.18.5. 26pin UART test [134](#pin-uart-test)]]<div class="figure">
[[\l|3File:zero3-img35.18.6. PWM test method [136](#pwm-test-method)png]]
[[\l|3.19. How </div></ol><span id="how-to install and -use wiringOP-Python [140](#howwin32diskimager-to-install-and-useburn-wiringoplinux-python)]]image"></span>
[[\l|3.19.1. === How to install wiringOP-Python [140](#how-use Win32Diskimager to-install-wiringop-python)]]burn Linux image ===
[[\l|3<ol style="list-style-type: decimal;"><li><p>First prepare a micro SD card with a capacity of 8GB or more.19The transmission speed of the micro SD card must be '''class 10 or above'''.2. 26pin GPIO port test [142](#pinIt 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 micro SD card into the computer</p></li><li><p>Then format the micro SD card</p><ol style="list-gpiostyle-porttype: lower-test-1)]]alpha;"><li>'''SD Card Formatter''' can be used to format the micro SD card. The download link is</li>
{| class="wikitable" style="width:800px;" |-| [[\l|3https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip '''https://www.19sdcard.3org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN. 26pin SPI test [145zip'''](#pin|}</ol><ol start="2" style="list-spistyle-testtype: lower-1)]]alpha;"><li><p>After downloading, unzip and install directly, and then open the software</p></li><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 &quot; '''Select card''' &quot; 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>
[[\l|3.19.4. 26pin I2C test [148](#pin-i2c-test-1)]]<div class="figure">
[[\l|3.19.5File:zero3-img36. 26pin UART test [151](#pin-uart-test-1)png]]
[[\l|3.20. Hardware Watchdog Test [153](#hardware</div></ol><ol start="4" style="list-style-watchdogtype: lower-testalpha;"><li>Then click &quot; '''Format''' &quot;, a warning box will pop up before formatting, and formatting will start after selecting &quot;Yes (Y)]]&quot;</li>
[[\l|3File:zero3-img37.21. Check the chipid of the H618 chip [154png]](#check</ol><ol start="5" style="list-thestyle-chipid-oftype: lower-alpha;"><li>After formatting the micro SD card, the message shown in the-h618-chip)]]figure below will pop up, click OK</li>
[[\l|File:zero3-img38.png]]</ol></li></ol><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 [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-3.22html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;. Python related instructions [154](#pythonimg&quot; 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 micro SD card</p><ol style="list-style-relatedtype: lower-instructions)]]alpha;"><li>The download page of Win32Diskimager is</li>
{| class="wikitable" style="width:800px;" |-| [[\l|3.22http://sourceforge.1net/projects/win32diskimager/files/Archive/ '''http://sourceforge. Python source code compilation and installation method [154net/projects/win32diskimager/files/Archive/'''](#python|}</ol><ol start="2" style="list-sourcestyle-codetype: lower-compilationalpha;"><li><p>After downloading, install it directly. The interface of Win32Diskimager is as follows</p><ol style="list-andstyle-installation-methodtype: none;"><li><p>a) First select the path of the image file</p></li><li><p>b) Then confirm that the drive letter of the micro SD card is consistent with that displayed in the &quot;'''Device'''&quot; column</p></li><li><p>c)]]Finally click &quot;'''Write'''&quot; to start burning</p></li><div class="figure">
[[\l|3File:zero3-img39.22.2. Python to replace the pip source method [155](#python-to-replace-the-pip-source-method)png]]
[[\l|</div></ol></li></ol><ol start="3.23. The Method Of Installing The Docker [156](#" style="list-style-type: lower-alpha;"><li>After the image writing is completed, click the &quot;'''Exit'''&quot; 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><span id="method-of-installingburning-thelinux-image-to-tf-card-based-on-ubuntu-docker)]]pc"></span>
[[\l|3.24. How == Method of burning Linux image to install Home Assistant [157](#how-to-install-home-assistant)]]micro SD card based on Ubuntu PC ==
{| 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 [[\l|3http://www.24orangepi.1. Install via docker [157](#installorg/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-viaZero-docker)]3.html Orange Pi data download page], and the Ubuntu PC refers to the personal computer with the Ubuntu system installed.'''</big>|}
[[\l|3# First prepare a micro SD card with a capacity of 8GB or more.24The transmission speed of the micro SD card must be '''class 10 or above'''.2. Install via python [161](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#install-via-python)]]Download the balenaEtcher software, the download address is
::{| class="wikitable" style="width:800px;" |-| [[\l|3https://www.balena.io/etcher/ '''https://www.25balena. OpenCV installation method [163](#opencv-installation-method)]io/etcher/''']|}
[[\l|3.25.1. Use apt to install OpenCV [163](#use<ol start="4" style="list-aptstyle-type: decimal;"><li>After entering the balenaEtcher download page, click the green download button to jump to-install-opencv)]]the place where the software is downloaded</li>
[[\l|3File:zero3-img27.26. The installation method of the aapanel Linux panel [164png]](#the</ol><ol start="5" style="list-installation-methodstyle-type: decimal;"><li>Then choose to download the Linux version of-the-aapanel-linux-panel)]]software</li>
[[\l|3File:zero3-img40.27. face_recognition The installation and testing method png]]</ol><ol start="6" style="list-style-type: decimal;"><li>Download the image file compression package of the face recognition library Linux operating system that you want to burn from the [167](#face_recognitionhttp://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-theand-installationsupport/Orange-andPi-testing-methodZero-3.html '''Orange Pi data download page'''], and then use the decompression software to decompress it. Among the decompressed files, the file ending with &quot;'''.img'''&quot; is the image file of-the-face-recognition-library)]]operating system. The size is generally above 1GB. The decompression command for the compressed package ending in 7z is as follows:</li>
[[\l{|3class="wikitable" style="width:800px;" |-| test@test:~$ '''7z x orangepizero3_1.270.0_ubuntu_focal_desktop_linux6.1. The method of using script to automatically install face_recognition [168](#the-method-of-using-script-to-automatically-install-face_recognition)]]31.7z'''
[[\l|3test@test:~$ '''ls orangepizero3_1.270.20_ubuntu_focal_desktop_linux6. Manually install face_recognition [168](#manually-install-face_recognition)]]1.31.*'''
[[\l|3orangepizero3_1.270.30_ubuntu_focal_desktop_linux6. The test method of face_recognition [170](1.31.7z '''orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.sha''' #the-test-method-of-face_recognition)]]checksum file
[[\l|3'''orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.2831. Setting Chinese environment and installing Chinese input method [181](img''' #settingmirror file|}</ol><ol start="7" style="list-chinesestyle-environmenttype: 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-installing-chinese-input-method)]]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>
[[\l{| class="wikitable" style="width:800px;" |3.28.1. How to install Debian system [181](#how-to| test@test:~$ '''sha256sum -install-debian-system)]]c *.sha'''
[[\l|3orangepizero3_1.0.280_ubuntu_focal_desktop_linux6.21. How to install Ubuntu 2031.04 system [187](#howimg: '''success'''|}</ol><ol start="8" style="list-tostyle-installtype: decimal;"><li>Then double-ubuntuclick '''balenaEtcher-201.14.043-systemx64.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>
[[\l|3File:zero3-img41.28.3. How to install Ubuntu 22.04 system [192png]](#how</ol><ol start="9" style="list-style-type: decimal;"><li><p>The specific steps touse balenaEtcher to burn the Linux image are as follows</p><ol style="list-installstyle-ubuntutype: lower-22.04-system)]]alpha;"><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 micro SD card</p></li><li><p>Finally click Flash to start burning the Linux image to the micro SD card</p></li>
[[\l|3.29. How to Remotely Log In to the Desktop of Linux System [197](#how-to-remotely-log-in-to-the-desktop-of-linux-system)]]<div class="figure">
[[\l|3.29.1File:zero3-img32. Remote login using NoMachine [197](#remote-login-using-nomachine)png]]
[[\l|3.29.2. Log </div></ol></li></ol><ol start="10" style="list-style-type: decimal;"><li>The interface displayed in remotely using VNC [201](#log-the process of burning the Linux image by balenaEtcher is shown in-remotely-using-vnc)]]the figure below, and the progress bar displays purple, indicating that the Linux image is being burned into the micro SD card</li>
[[\l|3File:zero3-img42.30. How to install QT [204png]](#how</ol><ol start="11" style="list-style-type: decimal;"><li>After burning the Linux image, balenaEtcher will also verify the image burned into the micro SD card by default to-install-qt)]]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>
[[\l|3File:zero3-img43.31. How to install ROS [212png]](#how</ol><ol start="12" style="list-tostyle-install-ros)]]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 micro SD card and insert it into the micro SD card slot of the development board for use</li>
[[\l|3File:zero3-img44.31.1. How to install ROS 1 Noetic on Ubuntu 20.04 [212png]](#</ol><span id="how-to-installburn-rosandroid-1image-noeticto-ontf-ubuntu-20.04)]]card"></span>
[[\l|3.31.2. == How to install ROS 2 Galactic on Ubuntu 20.04 [216](#how-burn Android image to-install-ros-2-galactic-on-ubuntu-20.04)]]micro SD card ==
[[\l{|3.31.3. How to install ROS 2 Humble on Ubuntu 22.04 [219](class="wikitable" style="background-color:#howffffdc;width:800px;" |-to-install-ros| <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-humble-on-ubuntu-22.04)]]8</span>.'''
[[\l|3.32'''Please do not use software for burning Linux images, such as Win32Diskimager or balenaEtcher, to burn Android images. How to install the kernel header file [221](#how-to-install-the-kernel-header-file)]]'''
[[\l'''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>|3.33. Some programming language tests supported by Linux system [223](#some-programming-language-tests-supported-by-linux-system)]]}
[[\l|3.33.1. Debian Bullseye System [223](#debianFirst, please make sure that the Windows system has installed '''Microsoft Visual C++ 2008 Redistrbutable -bullseye-system)]]x86'''
::[[\l|3.33.2File:zero3-img45. Debian Bookworm System [224](#debian-bookworm-system)png]]
[[\l|3.33.3. Ubuntu Focal System [226](#ubuntu<ol start="2" style="list-focalstyle-system)]]type: decimal;"><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>
[[\l|3.33.4. Ubuntu Jammy System [228](#ubuntu-jammy-system)]]<div class="figure">
[[\l|3.34File:zero3-img46. The method of uploading files to the Linux system of the development board [230](#the-method-of-uploading-files-to-the-linux-system-of-the-development-board)png]]
[[\l|</div></ol><ol start="3.34.1. How to upload files to the development board Linux system in Ubuntu PC [230](#how" style="list-tostyle-upload-files-totype: decimal;"><li>'''Microsoft Visual C++ 2008 Redistrbutable -x86''' the installation package can be downloaded from the[http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-developmentand-boardsupport/Orange-linuxPi-systemZero-in3.html '''official tool'''] of Orange Pi Zero 3, or you can go to the [https://www.microsoft.com/zh-ubuntu-pc)]cn/download/details.aspx?id=26368 '''official website of Microsoft''']to download</li>
[[\l|3File:zero3-img47.png]] [[File:zero3-img48.34png]]</ol><ol start="4" style="list-style-type: decimal;"><li><p>Then prepare a micro SD card with 8GB or larger capacity.2The transmission speed of the micro SD card must be '''class 10 or above'''. How It is recommended to upload files use a micro SD card of SanDisk and other brands</p></li><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 development board Linux system in Windows PC [234](#howhttp://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-toand-uploadsupport/Orange-filesPi-toZero-3.html '''Orange Pi data download page''']. '''<span style="color:#FF0000">Please ensure that theversion of the PhonenixCrad tool is PhonixCard-development-board-linux-system-in-windows-pc)]]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>
[[\l|3File:zero3-img49-1.35. Instructions for using the switch logo [239png]](#instructions</ol><ol start="7" style="list-for-usingstyle-type: decimal;"><li>Then use decompression software to decompress '''PhonixCard4.2.8.zip''', this software does not need to be installed, just find PhoenixCard in the-switch-logo)]]decompressed folder and open it</li>
[[\l|3File:zero3-img51.36. How to shut down png]]</ol><ol start="8" style="list-style-type: decimal;"><li>After opening PhoenixCard, if the micro SD card is recognized normally, the drive letter and restart capacity of the micro SD card will be displayed in the development board [239](middle list. '''<span style="color:#how-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-shut-down-and-restart-unplug the micro SD card, or click the-development-board)]]&quot;'''Refresh Drive Letter'''&quot; button in PhoenixCard</li>
[[\l|4File:zero3-img52-1. Linux SDK——orangepi-build instruction [240png]](#linux</ol><ol start="9" style="list-sdkorangepistyle-build-instructiontype: decimal;"><li>After confirming the drive letter, format the micro SD card first, and click the &quot;'''Recover Card'''&quot; button in PhoenixCard (if the &quot;'''Recover Card'''&quot; button is gray and cannot be pressed, you can first click the &quot;'''Refresh Drive Letter'''&quot; button)]]</li>
[[\l|4.1. Compilation system requirements [240](#compilation-system-requirements)]]<div class="figure">
[[\l|4.2File:zero3-img53. Get the source code of linux sdk [242](#get-the-source-code-of-linux-sdk)png]]
[[\l</div>{|4.2.1. Download orangepiclass="wikitable" style="background-build from github [242](color:#downloadffffdc;width:800px;" |-orangepi-build-from-github)]]| [[\l|4<big>'''If there is a problem with formatting, please try to unplug and insert the micro SD card and then test again.2.2. Download If the cross-compilation toolchain [244](#downloadproblem still exists after re-plugging and inserting the micro SD card, you can restart theWindows computer or try another computer.'''</big>|}</ol><ol start="10" style="list-crossstyle-compilation-toolchain)]]type: decimal;"><li><p>Then start to write the Android image into the micro SD card</p>[[\l|4.2.3. orangepi-build complete directory structure description [246](#orangepi<ol style="list-buildstyle-completetype: lower-directory-structure-description)]]alpha;"><li><p>First select the path of the Android image in the &quot;'''Firmware'''&quot; column</p></li><li><p>Select &quot;'''Activation Card'''&quot; in &quot;Card Type&quot;</p></li><li><p>Then click the &quot;'''burn card'''&quot; button to start burning</p></li>
[[\l|4File:zero3-img54-1.3. Compile u-boot [247png]](#compile</ol></li></ol><ol start="11" style="list-ustyle-boot)]]type: decimal;"><li>After burning, the display of PhoenixCard is as shown in the figure below. At this time, click the &quot;'''Close'''&quot; 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>
[[\l|4.4. Compile the linux kernel [250](#compile-the-linux-kernel)]]<div class="figure">
[[\l|4.5File:zero3-img55-1. Compile rootfs [254](#compile-rootfs)png]]
[[\l|4.6. Compile linux image [257](#compile-linux-image)]]</div>
[[\l{|5class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <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 12 TV system instructions [261](#android-12-tv-has a total of more than 20 partitions, but most of them cannot be recognized normally in the Windows system-instructions)]]. At this point, please safely unplug the micro SD card and insert it into the development board to start it.'''</big>
[[\lFile:zero3-img56.png|5.1. Supported Android versions [261](#supported-android-versions)center]]
[[\l|5.2. <big>'''After the Android 12 TV function adaptation [261](#android-12-tv-function-adaptation)]]system starts, use the following command to see the twenty or so partitions in the micro SD card:'''</big>
[[\lFile:zero3-img57.png|5.3. Onboard LED light display instructions [261](#onboard-led-light-display-instructions)center]]
[[\l|5.4. Android method to return <big>'''Use the df -h command to see that the 16GB micro SD card has about 11 GB of space available after burning the previous interface [262]Android system (#android-method-more than 20 partitions will not be mounted to-return-the Android system, focus on these to-the-previous-interfacepartition)]].'''</big>
[[\lFile:zero3-img58.png|5.5. How to use ADB [262center]](#how|}</ol><span id="instructions-for-using-the-micro-linux-system-in-the-toonboard-usespi-adb)]]flash"></span>
[[\l|5.5.1. Use network connection adb debugging [262](#use-network-connection-adb-debugging)]]== Instructions for using the micro linux system in the onboard SPI Flash ==
[[\l|5.5.2. Use There is a 16MB SPI Flash on the data cable to connect to adb debugging [263](#use-development board, and its location is shown in the-data-cable-to-connect-to-adb-debugging)]]figure below:
[[\l|5.6. View the method of setting HDMI display resolution [264](#viewFile:zero3-theimg59-method-of-setting-hdmi-display-resolution)1.png]]
[[\l|5There is a tiny linux system programmed into SPI Flash by default, which is mainly used to prove that the development board can start normally.7. HDMI When you get the development board, you don't need to burn the system into the micro SD card, you only need to VGA display test [266](#hdmiconnect the Type-C power supply to-vga-display-test-1)]]the development board to start the micro linux system in the SPI Flash. The main functions of this system are:
[[\l|5.8. WI<ol style="list-style-type: lower-FI connection method [267](#wialpha;"><li><p>During the u-fiboot start-connectionup 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;</p></li><li><p>If the development board is connected to an HDMI screen, after the system starts up, the command line interface of the micro-method)]]linux system can be seen on the HDMI screen;</p></li><li><p>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.</p></li></ol>
[[\l|5.9. How to use WI-FI hotspot [269](#how-to-use-wi-fi-hotspot)]]
[[\l|5.10. How <p>Due to check the IP address limited functions of the Ethernet port [271](#how-tiny linux system in SPI Flash, if you want to-check-use all the-ip-address-functions of-the-ethernet-port)]]development board normally, please burn the linux image or Android image to the micro SD card, and then use it.</p>
[[\l|5.11. Bluetooth connection method [272](#bluetooth<span id="start-connectionthe-method)]]orange-pi-development-board"></span>
[[\l|5.12. How to use == Start the USB camera [275](#how-to-use-the-usb-camera)]]Orange Pi development board ==
[[\l|5.13. Android system ROOT instructions [276](#androidInsert 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-system-root-instructionsquality power adapter with a 5V/2A (5V/3A is also available)]]USB Type C interface
[[\l::{|5.14. The method of using MiracastReceiver to cast the mobile phone screen to the development board [278](class="wikitable" style="background-color:#the-method-of-using-miracastreceiver-to-cast-the-mobile-phone-screenffffdc;width:800px;" |-| <big>'''<span style="color:#FF0000">Remember not to-plug in a power adapter with a voltage output greater than 5V, as this will burn out the-development-board)]].</span>'''
[[\l|5.15. 26pin interface GPIO, UART, SPI test [281](#pin-interface-gpio-uart-spi-test)]]
[[\l|5.15.1. 26pin GPIO port test method [281]('''<span style="color:#pinFF0000">Many unstable phenomena during the power-gpioon and start-port-test-method)]]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.</span>'''</big>|}
[[\l|5.15.2<ol start="7" style="list-style-type: decimal;"><li><p>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</p></li><li><p>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. 26pin UART test For the connection method of the serial port, please refer to [[284](Orange Pi Zero 3#pin-uart-test-method)How to use the debugging serial port|'''the section on how to use the debugging serial port''']]</p></li></ol>
[[\l|5.15.3. 26pin SPI test method [286](#pin<span id="how-spito-testuse-method)]]the-debugging-serial-port"></span>
[[\l|5.15.4. 26pin I2C test method [289](#pin-i2c-test-method)]]== How to use the debugging serial port ==
[[\l|6. Appendix [293](#appendix)]]<span id="connection-instruction-of-debugging-serial-port"></span>=== Connection instruction of debugging serial port ===
[[\l|6# First, you need to prepare a 3.1. User Manual Update History [293](#user-manual-update-history)]]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
[[\l|6.2. Image update history [293](#image-update-history)]]<div class="figure">
<span id="basic::[[File:zero3-featuresimg60-of-orange-pi-zero-3"></span>= Basic features of Orange Pi Zero 3 =1.png]]
<span id/div><ol start="what2" style="list-isstyle-orange-pi-zero-3type: decimal;"><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</spanli>== What is Orange Pi Zero 3 ==
Orange Pi is an open source single[[File:zero3-img61-1.png]]</ol><ol start="3" style="list-style-type: decimal;"><li><p>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 card computer, through a new generation DuPont line</p><ol style="list-style-type: lower-alpha;"><li><p>Connect the GND of arm64 the USB to TTL module to the GND of the development board, which can run Android TV 12, Ubuntu and Debian </p></li><li><p>The RX of the USB to TTL module is '''<span style="color:#FF0000">connected to the TX of the development board</span>'''</p></li><li><p>Connect the TX of the USB '''<span style="color:#FF0000">to TTL module to the RX of the development board</span>'''</p></li></ol></li><li><p>The schematic diagram of connecting the USB to TTL module to the computer and other operating systems. the Orange Pi Zero 3 uses Allwinner H618 system-on-a-chip and has 1GB or 1.5GB or 2GB or 4GB LPDDR4 memory.development board is as follows</p></li>
[[File:zero3-img62.png]] {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''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.'''</big>|}</ol><span id="purposehow-ofto-use-the-debugging-serial-port-orangeon-pithe-zeroubuntu-3platform"></span>== Purpose of Orange Pi Zero 3 ==
We can === How to use it to achieve:the debugging serial port on the Ubuntu platform ===
* A small Linux desktop computer{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| * A small <big>'''There are many serial port debugging software that can be used under Linux web server* Install the Klipper host computer , such as putty, minicom, etc. The following demonstrates how to control the 3D printeruse putty.'''</big>* Android TV box|}
'''Of course# First, there are more functionsinsert the USB-to-TTL module into the USB port of the Ubuntu computer. Relying on a powerful ecosystem If the connection and a variety identification of expansion accessories, Orange Pi can help users easily realize the delivery from idea USB-to prototype to mass production. It -TTL module is a makernormal, dreamer, hobby The ideal creative platform for readers.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
<span id::{| class="whowikitable" style="width:800px;" |-is-orange-pi-zero-3-designed-for"><| test@test:~$ '''ls /dev/span>== Who is Orange Pi Zero 3 designed for? ==ttyUSB*'''
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.''/dev/ttyUSB0'''|}
<span idol start="hardware-features-of-orange-pi2" style="list-zerostyle-3type: decimal;"><li>Then use the following command to install putty on Ubuntu PC</spanli>== Hardware Features of Orange Pi Zero 3 ==
{| class="wikitable" style="width:800px;"
|-
| test@test:~$ '''Introduction to hardware featuressudo apt update'''||-| CPU| Allwinner H618 quad-core 64-bit 1.5GHz high-performance Cortex-A53 processor|-| GPU| Mali G31 MP2
Supports OpenGL ES 1.0test@test:~$ '''sudo apt install -y putty'''|}</2.0ol><ol start="3" style="list-style-type: decimal;"><li>Then run putty, '''<span style="color:#FF0000">remember to add sudo permission</3.2、OpenCL 2.0span>'''</li>
{| class="wikitable" style="width:800px;"
|-
| Memorytest@test:~$ '''sudo putty'''| 1GB}</ol><ol start="4" style="list-style-type: decimal;"><li>After executing the putty command, the following interface will pop up</li> [[File:zero3-img63.png]]</1ol><ol start="5" style="list-style-type: decimal;"><li>First select the setting interface of the serial port</li> <div class="figure"> [[File:zero3-img64.5GBpng]] </div></ol><ol start="6" style="list-style-type: decimal;"><li><p>Then set the parameters of the serial port</p><ol style="list-style-type: lower-alpha;"><li><p>Set '''Serial line to connect to'''to as '''dev/ttyUSB0''' (modify to the corresponding node name, usually /dev/ttyUSB0)</2GBp></4GB LPDDR4 li><li><p>Set '''Speed(shared with GPUbaud)''' to 115200 (the baud rate of the serial port)</p></li><li><p>Set '''Flow control''' as '''None'''</p></li> <div class="figure"> |[[File:zero3-img65-1.png]] </div></ol></li></ol>| Onboard storage<ol start="7" style="list-style-type: decimal;">| TF card slot<li><p>After setting the setting interface of the serial port, 16MB SPI Flashreturn to the Session interface</p>|<ol style="list-style-type: lower-alpha;">| Ethernet<li><p>First select the '''Connection type''' as Serial</p></li>| Support 10<li><p>Then click the '''Open''' button to connect to the serial port</100Mp></1000M Ethernetli> |<div class="figure"> [[File:zero3-img66.png]]| WIFI+Bluetooth| • AW859A chip, support IEEE 802.11 a</bdiv></gol></nli></acol><ol start="8" style="list-style-type: decimal;"><li>Then start the development board, BT5.0and you can see the Log information output by the system from the opened serial port terminal</li> |[[File:zero3-img67.png]]| Video Output</ol>| • Micro HDMI 2.0a<span id="how-to-use-the-debugging-serial-port-on-windows-platform"></span>
* TV CVBS output, support PAL/NTSC (via 13pin expansion board)=== How to use the debugging serial port on Windows platform ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| Audio output<big>'''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.'''</big>| • Micro HDMI output}
• 3.5mm audio port (via 13pin expansion board)<ol style="list-style-type: decimal;"><li><p>Download MobaXterm</p><ol style="list-style-type: lower-alpha;"><li>Download MobaXterm website as follows</li>
{| class="wikitable" style="width:800px;"
|-
| Power Supply| USB Type C interface input|-| USB 2[https://mobaxterm.mobatek.net/ '''https://mobaxterm.0 port| 3 USB 2mobatek.0 HOST (two of them are through 13pin expansion board)net/''']|-}| 26pin connector</ol>| With I2Cx1, SPIx1, UARTx1 and multiple GPIO ports|-| 13pin connector| With USB <ol start="2.0 HOSTx2, TV" style="list-OUT, LINE OUT, IRstyle-RX, and 3 GPIO ports|type: lower-alpha;">| Debug serial port| UART-TX<li>After entering the MobaXterm download page, 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.|-| click '''Introduction of Appearance SpecificationsGET XOBATERM NOW!'''||-| Product Size| 85mm×56mm|-| Weight| 30g|-| [[File:media</image1.%20png]]{width=“0.255 55555555555554in” h eight=“0.27638888 88888889in”}range Pi™ is a registered trademark of Shenzhen Xunlong Software Co., Ltd.||}li>
[[File:zero3-img68.png]]<span id/ol><ol start="top-view-and-bottom-view-of-orange3" style="list-pistyle-zerotype: lower-3alpha;"><li>Then choose to download the Home version</spanli>== Top view and bottom view of Orange Pi Zero 3 ==
'''Top view:'''[[File:zero3-img69.png]]</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Then select the Portable version. After downloading, you don’t need to install it, just open it and use it</li>
[[File:media/image3.png|390x329px]]<div class="figure">
'''Bottom view:'''[[File:zero3-img70.png]]
[[File</div></ol></li></ol><ol start="2" style="list-style-type:mediadecimal;"><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</image4.png|494x292px]]li>
[[File:zero3-img71.png]]<span id/ol><ol start="interface3" style="list-detailsstyle-oftype: decimal;"><li><p>After opening the software, the steps to set up the serial port connection are as follows</p><ol style="list-orangestyle-pi-zerotype: lower-3alpha;"><li><p>Open the session settings interface</p></li><li><p>Select the serial port type</p></spanli>== Interface details <li><p>Select the port number of Orange Pi Zero 3 == [the serial port (select the corresponding port number according to the actual situation), if you cannot see the port number, please use [Filehttp:media/image5/weishi.png|485x787px]360.cn/qudongdashi/ '''360 Driver Master''']to scan and install the driver for the USB-to-TTL serial port chip</p></li><li><p>Select the baud rate of the serial port as '''115200'''</p></li><li><p>Finally click the &quot;'''OK'''&quot; button to complete the setup</p></li>
[[File:media/image6.png|575x227px]]<div class="figure">
'''The diameters of the four positioning holes are all 3[[File:zero3-img72.0mm.'''png]]
<span id/div></ol></li></ol><ol start="4" style="introduction-to-the-use-of-thelist-developmentstyle-boardtype: decimal;"></spanli>= After clicking the &quot;'''OK'''Introduction to &quot; button, you will enter the use of following interface. At this time, start the development board''' =and you can see the output information of the serial port</li>
<span iddiv class="prepare-the-required-accessoriesfigure"></span>== Prepare the required accessories ==
# TF card, a high[[File:zero3-speed SanDisk card of class 10 or above with a minimum capacity of 8GBimg73.png]]
[[File:media</image7.png|124x96px]]div></ol><span id="instructions-for-using-the-5v-pin-in-the-26pin-or-13pin-interface-of-the-development-board-to-supply-power"></span>
'''Using other brands of TF cards (non-SanDisk TF cards), as shown == Instructions for using the 5v pin 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 TF card. So if you use a non-SanDisk TF card and find that there is a problem with the system startup 26pin or use, please replace 13pin interface of the SanDisk TF card and then test.'''development board to supply power ==
[[File{| class="wikitable" style="background-color:#ffffdc;width:media800px;" |-| <big>'''The power supply method we recommend for the development board is to use the 5V/image82A or 5V/3A Type C interface power cord to plug into the Type C power interface of the development board for power supply.png|103x85px]][[File:media/image9If 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.png|112x85px]][[File:media/image10If the use is unstable, please switch back to the Type C power supply.png|114x85px]][[File:media'''</image11.pngbig>|86x109px]]}
'''Current feedback is that there are some TF cards that have problems starting on Orange Pi Zero 3'''# First, you need to prepare a power cord as shown in the figure below
'''In addition, the TF 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.'''<div class="figure">
<ol start="2" style="list::[[File:zero3-style-type: decimal;"><li>TF card reader, used to read and write TF card</li></ol>img74.png]]
[[File:media</image12.png|139x96px]]div>
<ol start::{| class="3wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>Micro HDMI to HDMI cable'''The power cord shown in the picture above can be bought on Amazon, used to connect the development board to an HDMI monitor or TV for displayplease search and buy by yourself.'''</li></olbig>|}
[[File<ol start="2" style="list-style-type:mediadecimal;"><li><p>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</p><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/image133A power adapter connector ('''it is not recommended to plug into the USB port of the computer for power supply.png|215x222px]]If there are too many peripherals connected to the development board, use will be unstable''')</p></li><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 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>
'''Note, please do not use [[File:zero3-img24-1.png]]</ol></li></ol><span id="the relatively wide Micro HDMI adapter as shown in -method-of-using-the figure below, because the distance between the Micro HDMI -13pin-interface -of -the -development -board and -to-expand-the Type-C power usb-interface is relatively small, it may cause that the two cannot be inserted into the development board at the same time. plate.'''"></span>
[[File:media/image14.png|151x120px]]== The method of using the 13pin interface of the development board to expand the USB interface ==
<ol start="4" style="list-style-type: decimal;"><li>Power supply, if # If you have purchased a 5V/2A or 5V/3A power head13pin expansion board for Orange Pi, you only need to prepare a USB-to-Type C insert the expansion board into the 13pin interface data cable as shown in the picture on of the left below, and you can also use a cable similar development board to the picture on the right below A 5V/2A or 5V/3A high-quality expand 2 USB Typc C interface power adapter integrated with the power head.</li></ol>interfaces
[[File:media/image15.png|217x223px]] :[[File:media/image16zero3-img18.png|218x218px]]
<ol start="52" 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>
<ol style="list-style-type: lower-alpha;">
<li>The physical object of 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 expansion board is as followsfigure below:</li></ol></li></ol>
[[File:media/image17zero3-img75-1.png]] [[File:zero3-img76.png|252x154px]]</ol><ol start="2" style="list-style-type: lower-alpha;"><li>The schematic diagram of the 13pin interface is shown below</li>
[[File:zero3-img19.png]] [[File:zero3-img77.png]]</ol><ol start="23" style="list-style-type: lower-alpha;"><li>The way to insert the expansion board into the development board wiring of USB2 is as follows, remember not to insert it backwards</li></ol>
[[File:media/image18zero3-img78.png|246x162px]]</ol><ol start="4" style="list-style-type: lower-alpha;"><li>The wiring of USB3 is as follows</li>
[[File:zero3-img79.png]]</ol><ol start="35" style="list-style-type: lower-alpha;"><li>The If you need to connect two USB devices to the 13pin pin header on interface at the Orange Pi Zero 3 development board can be connected to same time, you will find that the expansion board to expand 5V and GND pins on the functions that 13pin interface are not on the development boardenough. The functions that At this time, one of the expansion board USB devices can use are the 5V and GND pins in the 26pin interface. The location is as followsshown in the figure below Shown:</li></ol>
[[File:zero3-img24-1.png]]</ol></li></ol><span id="instructions-for-use-of-debianubuntu-server-and-xfce-desktop-system"></span> = '''Instructions for use of Debian/Ubuntu Server and Xfce desktop system''' = <span id="supported-linux-image-types-and-kernel-versions"></span>== Supported linux image types and kernel versions == {| class="wikitable"style="width:800px;"|-|style="text-align: center;"| '''Linux image type'''| style="text-align: leftcenter;"| 1'''kernel version'''| style="text-align: center;"| '''server version'''| style="text-align: center;"| '''desktop version'''|-| style="text-align: leftcenter;"| Microphone (Mic)'''Ubuntu 20.04 - Focal'''| style="text-align: leftcenter;"| '''No support, no support, no support! ! !<br />Linux5.4'''<br />| style="text-align: center;"| '''Support'''| style="text-align: center;"| '''Support'''The 13pin expansion board is a general|-| style="text-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 3align: center;"| '''Ubuntu 22. Unusable, the 13pin expansion board is mainly used to expand functions other than Mic on Orange Pi Zero 304 - Focal'''| style="text-align: center;"| '''Linux5.4'''| style="text-align: center;"| '''Support'''| style="text-align: center;"| '''Support'''
|-
| style="text-align: leftcenter;"| 2'''Debian 11 - Bullseye'''| style="text-align: leftcenter;"| Analog audio and video output interface'''Linux5.4'''| style="text-align: leftcenter;"| 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).Support'''| style="text-align: center;"| '''Support'''
|-
| style="text-align: leftcenter;"| 3'''Ubuntu 22.04 - Jammy'''| style="text-align: leftcenter;"| USB 2'''Linux6.0 Host x 21'''| style="text-align: center;"| '''Support'''| style="text-align: leftcenter;"| '''Support, used to connect USB keyboard, mouse and USB storage device.'''
|-
| style="text-align: leftcenter;"| 4'''Debian 11 - Bullseye'''| style="text-align: center;"| '''Linux6.1'''| style="text-align: leftcenter;"| Infrared receiving function'''Support'''| style="text-align: leftcenter;"| '''Support, Android system can be controlled by infrared remote control'''|-| style="text-align: center;"| '''Debian 12 - Bookworm'''| style="text-align: center;"| '''Linux6.1'''| style="text-align: center;"| '''Support'''| style="text-align: center;"| '''Support'''
|}
<ol start="4" style="list-style-type: lower-alpha;"><li>The schematic diagram of After entering the 13pin header download page of the corresponding development board on [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange -Pi -Zero -3 development board is shown .html '''the Orange Pi data download page'''], you can see the following download options. In the description below</li></ol>, the Ubuntu image and the Debian image are generally referred to as the Linux image.
[[File:media/image19zero3-img80.png|264x142px]]
<ol start="6" style="list-style-type: decimal;"><li><p>The mouse and keyboard naming rules of the USB interface, Linux images are 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</p></li><li><p>Infrared remote control, mainly used to control Android TV system</p></li></ol>follows:
[[File{| class="wikitable" style="width:media/image20.png800px;" |-| '''Development board model_version number_Linux distribution type_release code name_server or desktop_kernel version'''|170x173px]]}
<ol style="list-style-type: lower-alpha;"><li><p>'''Note 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 remote control model name of the selected image matches the development board.</p></li><li><p>'''Version number''':For example, '''1.x.x''', this version number will increase with the update of the air conditioner or image function, and the last number of the remote control version number of the TV cannot control Linux image on the Orange Pi development boardis an even number.</p></li><li><p>'''Types of Linux distributions''': '''Ubuntu''' and '''Debian''' are currently supported. By 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 defaultconfiguration of some software and the use of commands. In addition, only both Ubuntu and Debian have their own software warehouses supported by maintenance, and there are also some differences in the remote 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''': 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''':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 provided 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 Orange Pi 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 canalso be operated through the command line like the server version of the system.</p></li><li><p>'''Kernel version''':Used to indicate the version number of the linux kernel, currently supports '''linux5.4''' and '''linux6.1.'''</p></li></ol>
<ol startspan id="8" style="listlinux-kernel-styledriver-type: decimal;adaptation"><li><p>100M or 1000M network cable, used to connect the development board to the Internet</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></olspan>
[[File:media/image21.png|217x218px]]== Linux kernel driver adaptation ==
<ol start{| class="10wikitable" style="list-style-typewidth: decimal800px;"><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></ol>|- [[File:media/image22.png|171x140px]] [[Filestyle="text-align:media/image23.pngcenter;"|151x147px]]'''Function''' <ol start| style="11text-align: center;" | '''Linux5.4'''| style="listtext-style-typealign: decimalcenter;"><li>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.</li></ol> | '''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 softwareLinux6.1'''|-[[File:media/image24.png|212x226px]] <ol startstyle="12text-align: center;" | '''HDMI video'''| style="listtext-style-typealign: decimalcenter;"><li><p>Matching shell | '''(pictures to be added)OK'''</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></ol> [[File:media/image25.png|176x118px]] [[Filestyle="text-align:media/image26.pngcenter;"|305x110px]] '''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.OK'''|-<ol start| style="14text-align: center;" | '''HDMI audio'''| style="listtext-style-typealign: decimalcenter;">| '''OK'''<li>X64 computer with Ubuntu and Windows operating systems installed</li></ol> {| classstyle="wikitabletext-align: center;"| '''OK'''
|-
| style="text-align: leftcenter;"| 1'''USB2.0 x 3'''| style="text-align: leftcenter;"| Ubuntu22.04 PC'''OK'''| style="text-align: leftcenter;"| Optional, used to compile Android and Linux source code'''OK'''
|-
| style="text-align: leftcenter;"| 2'''micro SD card start'''| style="text-align: leftcenter;"| Windows PC'''OK'''| style="text-align: leftcenter;"| For burning Android and Linux images'''OK'''|}-| style="text-align: center;"| '''Gigabit Ethernet'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''Infrared receiver'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''WIFI'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''Bluetooth'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''headphone audio'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''usb camera'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''LED light'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''26pin GPIO'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''26pin I2C'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''26pin SPI1'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''26pin UART'''| style="text-align: center;"| '''OK'''| style="text-align: center;"| '''OK'''|-| style="text-align: center;"| '''PWM'''| style="text-align: center;"| '''OK'''<span id| style="downloadtext-thealign: center;"| '''OK'''|-image| style="text-ofalign: center;"| '''Temperature Sensor'''| style="text-thealign: center;"| '''OK'''| style="text-developmentalign: center;"| '''OK'''|-board| style="text-andalign: center;"| '''hardware watchdog'''| style="text-relatedalign: center;"| '''OK'''| style="text-materialsalign: center;"| '''OK'''|-| style="text-align: center;"| '''Mali GPU'''| style="text-align: center;"| '''<span style="color:#FF0000">NO</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">NO</span>'''|-| style= Download the image of the development board and related materials "text-align: center;"| '''Video codec'''| style="text-align: center;"| '''<span style="color:#FF0000">NO</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">NO</span>'''|-| style="text-align: center;"| '''TV-OUT'''| style="text-align: center;"| '''<span style="color:#FF0000">NO</span>'''| style="text-align: center;"| '''<span style="color:# The website for downloading the English version isFF0000">NO</span>'''|}
[http://www.orangepi.org/downloadresources/ '''http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service<span id="the-format-of-andlinux-support/Orangecommands-Piin-Zerothis-3.html''']manual"></span>
<ol start="2" style="list-style-type: decimal;"><li><p>The information mainly includes</p><ol styleformat of linux commands in this manual =="list-style-type: lower-alpha;"><li><p>'''Android''' '''source code''': Save on Google Drive</p></li><li><p>'''Linux''' '''source code''':Save on Github</p></li><li><p>'''Android''' '''source code''':Save on Google Drive</p></li><li><p>'''Ubuntu''' '''source code''':Save on Google Drive</p></li><li><p>'''Debian''' '''source code''':Save on Google Drive</p></li><li><p>'''User Manual and Schematic:'''Chip-related data sheets will also be placed here</p></li><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>
<span id="method-of-burning-linux-image-# In this manual, all commands that need to-tf-card-based-on-windows-pc"></span>== Method of burning be entered in the Linux image to TF card based on Windows PC ==system will be marked with the following box
'''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.'''::{| class="wikitable" style="width:800px;height: 50px;" |-|
<span id="how-to-use-balenaetcher-to-burn-linux-image"></span>=== How to use balenaEtcher to burn Linux image ===|}
# First prepare a TF card with a capacity of 8GB or more. The transmission speed of the TF card must be '''class 10 or above'''. It is recommended to use a TF card of SanDisk and other brands# Then use the card reader to insert ::As shown below, the TF card into content in the computer# Download yellow box indicates the Linux operating system image file compression package content that you want to burn from the Orange Pi data download pageneeds special attention, and then use except for the decompression software to decompress commands in it. Among the decompressed files, the file ending with &quot;.img&quot; 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
[https://www.balena.io/etcher/ '''https://www.balena.io/etcher/''']{| class="wikitable" style="background-color:#ffffdc;width:800px;height: 50px;" |-|
|}<ol start="52" style="list-style-type: decimal;"><li>After entering <p>Description of the prompt type in front of the balenaEtcher download page, click command</p><ol style="list-style-type: lower-alpha;"><li>The prompt in front of the green download button to jump command refers to the place where content of the red part in the software box below, which is downloadednot 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></ol>
[[File{| class="wikitable" style="width:800px;" |-| '''<span style="color:media#FF0000">orangepi@orangepi:~$</image27.png|456x219px]]span> sudo apt update'''
'''<ol start="6" span style="list-style-typecolor: decimal;#FF0000">root@orangepi:~#<li/span>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<''' '''vim /li><boot/ol>boot.cmd'''
'''<span style="color:#FF0000">test@test:~$</span> ssh [[Filemailto:media/image28root@192.168.1.36 root@192.168.1.png|468x173px]]xxx'''
'''<span style="color:#FF0000">root@test:~#</span> ls'''|}</ol><ol start="72" style="list-style-type: decimallower-alpha;"><li>If <p>'''<span style="color:#FF0000">root@orangepi:~$</span>''' The prompt indicates that this command is entered in the downloaded version '''linux system of balenaEtcher needs 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 be installedadd '''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, 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>'''<span style="color:#FF0000">test@test:~$</span>''' The prompt indicates that this command is entered in the Ubuntu PC or Ubuntu virtual machine, please install it before using itnot in the linux system of the development board. If you downloaded The '''<span style="color:#FF0000">$</span>''' at the end of the prompt indicates that the Portable version current user of balenaEtcherthe system is an ordinary user. When executing privileged commands, just double-click '''sudo''' needs to open itbe added</p></li><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 opened balenaEtcher interface '''<span style="color:#FF0000">#</span>''' at the end of the prompt indicates that the current user of the system is shown in the figure belowroot user and can execute any command you want</p></li></ol></li></ol><!-- --><ol start="3" style="list-style-type: decimal;"><li><p>What are the commands that need to be entered?</p><olstyle="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>{| class="wikitable" style="width:800px;" |-[[File| root@orangepi:media~# '''cat /image29boot/orangepiEnv.png|335x211px]]txt'''
'''When opening balenaEtcher, if the following error is prompted<span style="color:#FF0000">verbosity=7</span>'''
[[File:media/image30.png|206x162px]]bootlogo=false
'''Please select balenaEtcher, right<span style="color:#FF0000">console=serial</span>'''|}</ol><ol start="2" style="list-style-type: lower-clickalpha;"><li>As shown below, some commands cannot be written in one line and select Run will be placed on the next line. As long as administratorthe black and bold parts are all commands that need to be input.When these commands are entered into one line, the last &quot;\&quot; 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 \'''
'''&quot;deb [[File:media/image31.png|114x37px]]arch=$(dpkg --print-architecture) \'''
<ol start="8" style="list'''signed-style-type: decimal;"><li><p>The specific steps to use balenaEtcher to burn the Linux image are as follows</p><ol styleby="list-style-type: lower-alpha;"><li><p>First select the path of the Linux image file to be burned</p><usr/li><li><p>Then select the drive letter of the TF card<share/p><keyrings/li><li><p>Finally click Flash to start burning the Linux image to the TF card[[File:media/image32docker-archive-keyring.png|501x281px|03gpg]]</p></li></ol></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 TF card</p></li></ol>\'''
[[File'''https:media/image33/download.docker.png|506x317px]]com/linux/debian \'''
'''$(lsb_release -cs) stable&quot; | sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null'''|}</ol start="10" style="list-style-type: decimal;"></li>After burning the Linux image, balenaEtcher will also verify the image burned to the TF 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.</liol><span id="linux-system-login-instructions"></olspan>
[[File:media/image34.png|519x325px]]== Linux system login instructions ==
<ol startspan id="11" style="listlinux-system-default-login-account-styleand-type: decimal;password"><li/span>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, === Linux system default login account and then pull out the TF card and insert it into the TF card slot of the development board. .</li></ol>password ===
<div {| class="figurewikitable">style="width:800px;"|-| style="text-align: center;"| '''Account'''| style="text-align: center;"| '''password'''|-| style="text-align: center;"| '''root'''| style="text-align: center;"| '''orangepi'''|-| style="text-align: center;"| '''orangepi'''| style="text-align: center;"| '''orangepi'''|}
[[File{| class="wikitable" style="background-color:#ffffdc;width:media800px;" |-| <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</image35span>, please do not think that there is any fault, just press Enter after inputting.png|523x324px'''</big>|04]]}
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| </divbig>'''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 idstyle="how-to-use-win32diskimager-to-burn-linux-imagecolor:#FF0000">please do not suspect that the above password is wrong, but look for other reasons</span>.'''</big>=== How to use Win32Diskimager to burn Linux image ===|}
<ol stylespan id="listhow-styleto-set-automatic-type: decimal;"><li><p>First prepare a TF card with a capacity of 8GB or more. The transmission speed of the TF card must be '''class 10 or above'''. It is recommended to use a TF card of SanDisk and other brands</p></li><li><p>Then use the card reader to insert the TF card into the computer</p></li><li><p>Then format the TF card</p><ol style="listterminal-login-stylein-type: lowerlinux-alpha;system"><li>'''SD Card Formatter'''can be used to format the TF card. The download link is</li></ol></li></olspan>
[https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip '''https://www.sdcard.org/downloads/formatter/eula_windows/SDCardFormatterv5_WinEN.zip''']=== 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 '''<ol start="2" span style="list-style-typecolor: lower-alpha;#FF0000"><li><p>After downloading, unzip and install directly, and then open the software</p>orangepi</lispan><li><p>If only a TF card is inserted into the computer, the drive letter of the TF card will be displayed in the &quot; '''Select card''' &quot; column. If multiple USB storage devices are inserted into the computer, you can select the corresponding drive letter of the TF card through the drop-down box</p></li></ol>
<div class="figure">::[[File:zero3-img81.png]]
[[File<ol start="2" style="list-style-type:mediadecimal;"><li>Use the following command to set the root user to automatically log in to the terminal</image36.png|209x228px|选区_199]]li>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo auto_login_cli.sh root'''|}</divol><ol start="43" style="list-style-type: lower-alphadecimal;"><li>hen click &quot; '''Format''' &quot;, a warning box will pop up before formatting, and formatting will start after selecting &quot;Yes (Y)&quot;Use the following command to disable automatic login terminal</li></ol>
[[File{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:media/image37~$ '''sudo auto_login_cli.pngsh -d'''|304x147px]]}</ol><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>
<ol start{| class="5wikitable" style="list-style-typewidth: lower-alpha800px;">|-| orangepi@orangepi:~$ '''sudo auto_login_cli.sh orangepi'''|}<li/ol>After formatting the TF card, the message shown in the figure below will pop up, click OK</lispan id="instructions-for-automatic-login-of-linux-desktop-version-system"></olspan>
<blockquote>[[File:media/image38.png|186x149px]]</blockquote><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 &quot;.img&quot; is the image file = Instructions for automatic login of the operating linux desktop version system. The size is generally more than 1GB</p></li><li><p>Use Win32Diskimager to burn the Linux image to the TF card</p><ol style="list-style-type: lower-alpha;"><li>The download page of Win32Diskimager is</li></ol></li></ol>==
[http://sourceforge.net/projects/win32diskimager/files/Archive/ '''http://sourceforge.net/projects/win32diskimager/files/Archive/'''] <ol start="2" style="list-style-type: lower-alpha;"><li><p># After downloadingthe desktop system starts, install it directly. The interface of Win32Diskimager is as follows</p><ol style="list-style-type: lower-alpha;"><li><p>First select the path of the image file</p></li><li><p>Then confirm that the drive letter of the TF card is consistent with that displayed will automatically log in to the &quot;'''Device'''&quot; column</p></li><li><p>Finally click &quot;'''Write'''&quot; to start burning</p></li></ol></li></ol>desktop without entering a password
<div class="figure">
::[[File:media/image39zero3-img82.png|297x206px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\a8fda8737c5b0b3b38fbb75ef68acfc.pnga8fda8737c5b0b3b38fbb75ef68acfc]]
</div>
<ol start="32" style="list-style-type: lower-alphadecimal;"><li>After the image writing is completed, click Run the &quot;'''Exit'''&quot; button following command to exit, and then you can pull out prohibit the TF card and insert it desktop system from automatically logging into the development board to startdesktop</li></ol>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo disable_desktop_autologin.sh'''|}</ol><span idol start="method-of-burning-linux-image-to-tf3" style="list-cardstyle-based-on-ubuntu-pctype: decimal;"></spanli>== Method of burning 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 image system default login account and password''']] is required to TF card based on Ubuntu PC ==enter the system</li>
'''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.'''<div class="figure">
# First prepare a TF card with a capacity of 8GB or more[[File:zero3-img83. The transmission speed of the TF card must be '''class 10 or above'''. It is recommended to use a TF card of SanDisk and other brands# Then use the card reader to insert the TF card into the computer# Download the balenaEtcher software, the download address ispng]]
[https:</div></www.balena.iool><span id="the-setting-method-of-root-user-automatic-login-in-linux-desktop-version-system"></etcher/ '''https://www.balena.io/etcher/''']span>
<ol start="4" style="list-style-type: decimal;"><li>After entering the balenaEtcher download page, click the green download button to jump to the place where the software is downloaded</li></ol>= The setting method of root user automatic login in Linux desktop version system ===
[[File:media/image27.png|489x235px]]# Execute the following command to set the desktop system to automatically log in as the root user
<ol start::{| class="5wikitable" style="list-style-typewidth: decimal800px;"><li>Then choose to download the Linux version of the software</li></ol>|-| orangepi@orangepi:~$ '''sudo desktop_login.sh root'''|}
[[File<ol start="2" style="list-style-type:mediadecimal;"><li>Then restart the system, and the root user will automatically log in to the desktop</image40.png|485x184px]]li>
<ol start="6" style="list-style[[File:zero3-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 itimg84. Among the decompressed files, the file ending with &quot;'''.img'''&quot; 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></ol>png]]
test@test{| class="wikitable" style="background-color:~$ #ffffdc;width:800px;" |-| <big>'''7z x orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31Note 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.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.31Also note that this is not a bug, since pulseaudio is not allowed to run as root.sha''' # checksum file</big>|}</ol><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>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''orangepizero3_1sudo desktop_login.0.0_ubuntu_focal_desktop_linux6.1.31.imgsh orangepi''' # mirror file|}</ol><span id="the-method-of-disabling-the-desktop-in-the-linux-desktop-version-system"></span>
<ol start="7" style="list-style-type: decimal;"><li>After decompressing = The method of disabling the image, you can first use desktop in 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 TF 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></ol>Linux desktop version system ===
test@test:~$ # First enter the following command on the command line, '''sha256sum -c *.sha<span style="color:#FF0000">Please remember to add sudo permission</span>'''
orangepizero3_1.0.0_ubuntu_focal_desktop_linux6.1.31.img: :{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''successsudo systemctl disable lightdm.service'''|}
<ol start="82" style="list-style-type: decimal;"><li>Then double-click '''balenaEtcher-1.14.3-x64.AppImage''' on restart the graphical interface of Ubuntu PC to open balenaEtcher (no installation required), Linux system and you will find that the interface after balenaEtcher is opened is desktop will not be displayed as shown in the figure below</li></ol>
[[File{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo reboot'''|}</ol><ol start="3" style="list-style-type:mediadecimal;"><li>The command to reopen the desktop is as follows,'''<span style="color:#FF0000">Please remember to add sudo permission</image41.png|423x251px]]span>'''</li>
<ol start{| class="9wikitable" style="list-style-typewidth: decimal800px;"><li><p>The specific steps to use balenaEtcher to burn the Linux image are as follows</p><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>Then select the drive letter of the TF card</p></li><li><p>Finally click Flash to orangepi@orangepi:~$ '''sudo systemctl start burning the Linux image to the TF card</p></li></ol></li></ol>lightdm.service'''
orangepi@orangepi:~$ '''sudo systemctl enable lightdm.service'''|}<div class/ol><span id="figureonboard-led-light-test-instructions"></span>
[[File:media/image32.png|501x281px|03]]== Onboard LED Light Test Instructions ==
</div><ol start="10" style="list-style-type: decimal;"><li>The interface displayed in # There are two LED lights on the process of burning development board, one is green and the Linux image by balenaEtcher other is shown in red. When the figure belowsystem starts, and the progress bar displays purple, indicating that default display of the Linux image LED lights is being burned into the TF card</li></ol>as follows:
[[File:media/image42.png:{| class="wikitable" style="width:800px;text-align: center;"|-|| style="text-align: center;"| '''Green light'''| style="text-align: center;"| '''Red light'''|-| '''u-boot startup phase'''| style="text-align: center;"| '''off'''| style="text-align: center;"| '''on'''|-| '''The kernel boots into the system'''| style="text-align: center;"| '''flashing'''| style="text-align: center;"| '''off'''|-| '''GPIO interface'''| style="text-align: center;"| '''PC13'''| style="text-align: center;"| '''PC12'''|576x247px]]}
11)After burning ::{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The two LED lights on the Linux image, balenaEtcher will also verify the image burned into the TF card development board are controlled by default to ensure that there is no problem in the burning processsoftware. As shown in the figure below, a green progress bar indicates that the image has been burnt, and balenaEtcher is verifying the burnt image'''
[[File:media/image43'''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.png|576x252px]]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.'''
<ol start="12" style="list-style-type: decimal;"><li>After successful burning, '''If the display interface of balenaEtcher is as shown linux system in the figure below. If a green indicator icon SPI Flash is displayedcleared, it means that then the two LED lights on the image burning development board will not light up after the power is successful. At this time, you can exit balenaEtcher, and then pull out the TF card and insert it into turned on without inserting the TF micro SD card slot of with the development board for usesystem programmed'''</li></olbig>|}
[[File<ol start="2" style="list-style-type:mediadecimal;"><li>The method of setting the green light on/image44.png|576x340px]]off and flashing is as follows:</li>
<span id{| class="wikitable" style="howbackground-tocolor:#ffffdc;width:800px;" |-burn-android-image-to-tf-card"| <big>'''Note that the following operations should be performed under the root user.'''</spanbig>== How to burn Android image to TF card ==|}
'''The Android image of the development board can only be burned into the TF card under <ol style="list-style-type: lower-alpha;"><li>First enter the Windows platform using the PhoenixCard software, and the version setting directory of the PhoenixCard software must be PhonixCard-4.2.8.green light<br /li>Please do not use software for burning Linux images, such as Win32Diskimager or balenaEtcher, to burn Android images.'''
{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''In addition, the PhoenixCard software does not have versions for Linux and Mac platforms, so it is impossible to burn Android images to TF cards under Linux and Mac platforms.cd /sys/class/leds/green_led'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><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# First, please make sure that the Windows system has installed '''Microsoft Visual C++ 2008 Redistrbutable - x86echo none &gt; trigger'''[[File:media|}</image45.png|449x293px]]ol># If not installed '''Microsoft Visual C++ 2008 Redistrbutable <ol start="3" style="list-style-type: lower- x86''', Using PhoenixCard alpha;"><li>The command to format TF card or burn Android image will prompt set the following errorgreen light to be on is as follows</li>
{| class="wikitable" style="width:800px;" |-| root@orangepi:/sys/class/leds/green_led# '''echo default-on &gt; trigger'''|}<div class/ol><ol start="4" style="figurelist-style-type: lower-alpha;"><li>The command to set the green light to flash is as follows</li>
[[File{| class="wikitable" style="width:800px;" |-| root@orangepi:media/image46.png|522x395pxsys/class/leds/green_led# '''echo heartbeat &gt; trigger'''|NUQB$Q%(){1CV6M6WK4N`5J]]}</ol></divol>
<ol start="3" style="list-style-type: decimal;">
<li>'''Microsoft Visual C++ 2008 Redistrbutable - x86''' the installation package can be downloaded from the '''official tool''' The method of Orange Pi Zero 3, or you can go to setting the '''official website of Microsoft''' to downloadred light on/off and flashing is as follows:</li></ol>
[[File{| class="wikitable" style="background-color:#ffffdc;width:media/image47800px;" |-| <big>'''Note that the following operations should be performed under the root user.png|242x52px]] [[File:media'''</image48.pngbig>|200x95px]]}
<ol start="4" style="list-style-type: decimallower-alpha;"><li><p>Then prepare a TF card with 8GB or larger capacity. The transmission speed of the TF card must be '''class 10 or above'''. It is recommended to use a TF card of SanDisk and other brands</p></li><li><p>Then use the card reader to insert the TF card into the computer</p></li><li><p>Download First enter the Android image and PhoenixCard programming tool from the '''Orange Pi data download page'''. '''Please ensure that the version setting directory 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</p>red light</li></ol>
[[File{| class="wikitable" style="width:media800px;" |-| root@orangepi:~# '''cd /sys/class/image49.pngleds/red_led'''|575x169px]]}</ol><ol start="2" style="list-style-type: lower-alpha;"><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 &gt; trigger'''|}</ol><ol start="73" style="list-style-type: decimallower-alpha;"><li>Then use the decompression software The command to decompress the compressed package of the downloaded Android image. Among the decompressed files, the file ending with &quot;.img&quot; is the Android image file, and set the size flashing red light is more than 1GB. If you don't know how to decompress the compressed package of the Android image, you can install a '''compression software''' to decompress the image.as follows</li></ol>
[[File{| class="wikitable" style="width:media800px;" |-| root@orangepi:/sys/class/image50.pngleds/red_led# '''echo heartbeat &gt; trigger'''|438x158px]]}</ol><ol start="4" style="list-style-type: lower-alpha;"><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 &gt; trigger'''|}</ol></ol><ol start="84" style="list-style-type: decimal;"><li>Then <p>If you do not need the LED light to flash after booting, you can use decompression software the following method to decompress turn off the green light flashing</p><ol style="list-style-type: lower-alpha;"><li>First run '''PhonixCard4.2.8.ziporangepi-config''', this software does not need common users remember to be installed, just find PhoenixCard in the decompressed folder and open itadd '''sudo''' permission</li></ol>
[[File{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo orangepi-config'''|}</ol><ol start="2" style="list-style-type:medialower-alpha;"><li>Then select '''System'''</image51.png|576x113px]]li>
[[File:zero3-img85.png]]</ol><ol start="93" style="list-style-type: decimallower-alpha;"><li>After opening PhoenixCard, if the TF card is recognized normally, the drive letter and capacity of the TF card will be displayed in the middle list. Then select '''Please make sure that the displayed drive letter is consistent with the drive letter of the TF card you want to burnHardware'''. If there is no display, you can try to unplug the TF card, or click the &quot;'''Refresh Drive Letter'''&quot; button in PhoenixCard</li></ol>
[[File:media/image52zero3-img86.png|575x137px]]</ol><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>
[[File:zero3-img87.png]]</ol><ol start="105" style="list-style-type: decimallower-alpha;"><li>After confirming the drive letter, format the TF card first, and click the &quot;'''Recover CardThen selec '''&quotlt; button in PhoenixCard (if the Save&quotgt;'''Recover Card'''&quot; button is gray and cannot be pressed, you can first click the &quot;'''Refresh Drive Letter'''&quot; button)</li></ol>
[[File:zero3-img88.png]]<div class/ol><ol start="6" style="figurelist-style-type: lower-alpha;"><li>Then select '''&lt;Back&gt;'''</li>
[[File:media/image53.jpeg|575x316px|C:\Users\orangepi\Desktop\用户手册插图\Zero3\未标题zero3-1img89.jpg未标题-1png]]</ol><ol start="7" style="list-style-type: lower-alpha;"><li>Then select '''&lt;Reboot&gt;''' to restart the system for the configuration to take effect</li>
[[File:zero3-img90.png]]</divol>'''If there is a problem with formatting, please try to unplug and insert the TF card and then test again. If the problem still exists after re-plugging and inserting the TF card, you can restart the Windows computer or try another computer.''' <ol start="118" style="list-style-type: decimal;"><li><p>Then start to write the Android image into the TF card</p><ol style="list-style-type: lower-alpha;"><li><p>First select After restarting and fully entering the path of system, you can see that the Android image in the &quot;'''Firmware'''&quot; column</p></li><li><p>Select &quot;'''Activation Card'''&quot; in &quot;Card Type&quot;</p></li><li><p>Then click two LED lights on the &quot;'''burn card'''&quot; button to start burning</p>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>
[[File:media/image54.png|576x431px]]== Instructions for operating the rootfs partition capacity of the linux system in the micro SD card ==
<ol startspan id="12" style="listthe-first-startup-will-automatically-expand-the-capacity-of-the-rootfs-partition-in-the-styletf-type: decimal;card"><li/span>After burning, === The first startup will automatically expand the display capacity of PhoenixCard is as shown the rootfs partition in the figure below. At this time, click the &quot;'''Close'''&quot; button to exit PhoenixCard, and then you can pull out the TF micro SD card from the computer and insert it into the development board to start</li></ol>===
<div classol start="figure1"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:
[[File{| class="wikitable" style="background-color:#ffffdc;width:media800px;" |-| <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.'''</image55.jpeg|575x358pxbig>|1]]}
</divol style="list-style-type: lower-alpha;">'''After burning <li>First install the Android system, gparted software on the TF 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 TF 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 TF card and insert it into the development board to start it.'''Ubuntu computer</li>
[[File{| class="wikitable" style="width:media/image56.png800px;" |193x45px]]-| test@test:~$ '''After the Android system starts, use the following command to see the twenty or so partitions in the TF card:sudo apt install -y gparted'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li>Then open gparted</li>
[[File{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo gparted'''|}</ol><ol start="3" style="list-style-type:medialower-alpha;"><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</image57.png|368x131px]]li>
'''Use [[File:zero3-img91.png]]</ol><ol start="4" style="list-style-type: lower-alpha;"><li>The figure above shows the situation of the micro SD card after burning the df -h command to see Linux desktop version system. It can be seen that although the total capacity of the micro SD card is 16GB TF (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;"><li><p>Then you can insert the micro SD card that has about 11 GB of space available after burning burned the Linux system into the development board to start. When the micro SD card starts the Android Linux system (more than 20 partitions for the first time, it will not be mounted 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 Android system, focus on these to you can use the partition).'''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>
[[File{| 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:media90px;">0% /dev</image58span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">100M </span><span style="margin-right: 30px;">5.png6M </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>|391x220px]]}</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>
<span id="instructions[[File:zero3-for-using-the-micro-linux-system-in-the-onboard-spi-flash"></span>== Instructions for using the micro linux system in the onboard SPI Flash ==img92.png]]
There is {| 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 16MB SPI Flash on separate BOOT partition to store files such as the development boardkernel image, and its location so there is shown 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 figure below:-tf-card"></span>
[[File:media/image59.png|285x185px]]=== The method of prohibiting automatic expansion of the capacity of the rootfs partition in the micro SD card ===
There is a tiny # First burn the linux system programmed into SPI Flash by default, which is mainly used to prove that image of the development board can start normally. When you get to the micro SD card on the development board'''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available), you don't need to burn ''<span style="color:#FF0000">and then re-plug and insert the micro SD card</span>'''# Then the Ubuntu computer will automatically mount the system into partition of the TF micro SD card. If the automatic mounting is normal, you only need to connect the Type-C power supply to use the development board ls command to start the micro linux system in see the SPI Flash. The main functions of this system are:following output
<ol ::{| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li>|-| <p>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;<test@test:~$ '''ls /media/test/p><opi_root/li><li><p>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;'''</p></li><li><p>If the development board is connected with a USB keyboard, some simple linux commands can be bin &nbsp;&nbsp; boot &nbsp;&nbsp; dev &nbsp;&nbsp; etc &nbsp;&nbsp; home &nbsp;&nbsp; lib &nbsp;&nbsp; lost+found &nbsp;&nbsp; media &nbsp;&nbsp; mnt &nbsp;&nbsp; opt &nbsp;&nbsp; proc &nbsp;&nbsp; root &nbsp;&nbsp; run on the command line, such as ls, cd, etc.</pbr><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 TF card, and then use it.sbin &nbsp;&nbsp; selinux &nbsp;&nbsp; srv &nbsp;&nbsp; sys &nbsp;&nbsp; tmp &nbsp;&nbsp; usr &nbsp;&nbsp; var</p></li></ol>|}
<span idol start="3" style="startlist-thestyle-orange-pi-development-boardtype: decimal;"><li>Then switch the current user to the root user on the Ubuntu computer</spanli>== Start the Orange Pi development board ==
# Insert the TF card with the burned image into the TF card slot of the Orange Pi development board{| class="wikitable" style="width:800px;" # 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 hightest@test:~$ '''sudo -quality power adapter with a 5V/2A (5V/3A is also available) USB Type C interfacei'''
'''Remember not to plug in a power adapter with a voltage output greater than 5V, as this will burn out the development board.'''[sudo] password for test:
root@test:~'''Many unstable phenomena during the power<span style="color:#FF0000">#</span>'''|}</ol><ol start="4" style="list-on and startstyle-up process type: decimal;"><li>Then enter the root directory of the linux 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 in the power supply or Type C data cable micro SD card and try againcreate a new file named '''.no_rootfs_resize'''</li>
<ol start{| class="7wikitable" style="list-style-typewidth: decimal800px;"><li><p>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</p></li>|-| <li><p>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 root@test:~# '''the section on how to use the debugging serial portcd /media/test/opi_root/'''</p></li></ol>
<span id="how-to-use-the-debugging-serial-port"><root@test:/span>== How to use the debugging serial port ==media/test/opi_root/# '''cd root'''
<span id="connection-instruction-of-debugging-serial-port"><root@test:/span>=== Connection instruction of debugging serial port ===media/test/opi_root/root# '''touch .no_rootfs_resize'''
root@test:/media/test/opi_root/root# First, you need to prepare a 3'''ls .3v USB to TTL module, and then insert the USB interface end of the USB to TTL module into the USB interface of the computerno_rootfs*'''
'''.no_rootfs_resize'''|}<div class/ol><ol start="5" style="figurelist-style-type: decimal;"><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 micro SD card, indicating that the automatic expansion of rootfs is prohibited.</p></li>
[[File{| 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:media110px;">udev</image60span><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.jpeg|552x110px2M </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;"><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>
</div><ol start{| class="2wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>The corresponding relationship between GND'''Note, TX and RX pins of please execute the debugging serial port of following commands under the development board is shown in the figure belowroot user.'''</li></olbig>|}
[[File{| class="wikitable" style="width:800px;" |-| root@orangepi:media~# '''rm /root/image61.png|328x185px]]no_rootfs_resize'''
<ol start="3" style="list-style-typeroot@orangepi: decimal;"><li><p>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</p><ol style="list-style-type: lower-alpha;"><li><p>Connect the GND of the USB to TTL module to the GND of the development board</p></li><li><p>The RX of the USB to TTL module is ~# '''connected to the TX of the development board'''</p></li><li><p>Connect the TX of the USB '''to TTL module to the RX of the development boardsystemctl enable orangepi-resize-filesystem.service'''</p></li></ol></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></ol>
[[Fileroot@orangepi:media/image62.png~# '''sudo reboot'''|553x204px]]}
'''The TX and RX After restarting, enter the Linux system of the serial port need to be cross-connected. If you don’t want to carefully distinguish the order of TX development board again, and RX, you can connect see that the TX and RX rootfs partition has been expanded to the actual capacity 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.'''micro SD card
{| 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 id><span style="howmargin-toright: 30px;">Used </span><span style="margin-useright: 30px;">Avail</span><span style="margin-theright: 50px;">Use% Mounted on</span><br><span style="margin-debuggingright: 110px;">udev</span><span style="margin-serialright: 60px;">925M </span><span style="margin-portright: 50px;">0</span><span style="margin-onright: 70px;">925M </span><span style="margin-right: 90px;">0% /dev</span><br><span style="margin-right: 100px;">tmpfs </span><span style="margin-theright: 50px;">199M </span><span style="margin-ubunturight: 30px;">3.2M </span><span style="margin-platformright: 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= How to use the debugging serial port on the Ubuntu platform "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>
'''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.'''method of manually expanding the capacity of the rootfs partition in the micro SD card ===
{| class="wikitable" style="background-color:# Firstffffdc;width:800px;" |-| <big>'''If the total capacity of the micro SD card is large, insert such as 128GB, you do not want the rootfs partition of the USB-Linux system to-TTL module into use all the USB port capacity of the Ubuntu computer. If micro SD card, but only want to allocate a part of the capacity, such as 16GB, to the connection Linux system, and identification then the remaining capacity of the USB-to-TTL module is normal, micro SD card can be used for other use. Then you can see use the corresponding device node name under content introduced in this section to manually expand the capacity of the rootfs partition in TF.'''</dev''' on the Ubuntu PC. Remember this node name, and then set the serial port software will be usedbig>|}
test@test# First burn the linux image of the development board to the micro SD card on the '''<span style="color:~$ #FF0000">Ubuntu computer</span>'''ls (Windows not available), '''<span style="color:#FF0000">and then re-plug and insert the micro SD card</dev/ttyUSB*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 /devmedia/test/opi_root/ttyUSB0'''</p><p>bin &nbsp;&nbsp; boot &nbsp;&nbsp; dev &nbsp;&nbsp; etc &nbsp;&nbsp; home &nbsp;&nbsp; lib &nbsp;&nbsp; lost+found &nbsp;&nbsp; media &nbsp;&nbsp; mnt &nbsp;&nbsp; opt &nbsp;&nbsp; proc &nbsp;&nbsp; root &nbsp;&nbsp; run <br> sbin &nbsp;&nbsp; selinux &nbsp;&nbsp; srv &nbsp;&nbsp; sys &nbsp;&nbsp; tmp &nbsp;&nbsp; usr &nbsp;&nbsp; var</p>|}
<ol start="23" style="list-style-type: decimal;"><li>Then use switch the following command current user to install putty the root user on the Ubuntu PCcomputer</li></ol>
{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo apt update-i'''
test@[sudo] password for test:~$ '''sudo apt install -y putty'''
root@test:~'''<span style="color:#FF0000">#</span>'''|}</ol><ol start="34" style="list-style-type: decimal;"><li>Then run putty, enter the root directory of the linux system in the micro SD card and create a new file named '''remember to add sudo permission.no_rootfs_resize'''</li></ol>
test{| class="wikitable" style="width:800px;" |-| root@test:~$ # '''sudo puttycd /media/test/opi_root/'''
<ol start="4" style="list-style-typeroot@test: decimal;"><li>After executing the putty command, the following interface will pop up</li><media/ol>test/opi_root/# '''cd root'''
[[Fileroot@test:/media/image63test/opi_root/root# '''touch .png|332x290px]]no_rootfs_resize'''
root@test:/media/test/opi_root/root# '''ls .no_rootfs*'''
 
'''.no_rootfs_resize'''
|}
</ol>
<ol start="5" style="list-style-type: decimal;">
<li>First select Then install the setting interface of gparted software on the serial portUbuntu computer</li></ol>
{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo apt install -y gparted'''|}</ol><div classol start="6" style="figurelist-style-type: decimal;"><li>Then open gparted</li>
[[File{| class="wikitable" style="width:800px;" |-| test@test:media~$ '''sudo gparted'''|}</image64ol><ol start="7" style="list-style-type: decimal;"><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.jpeg|337x297px|9]]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]]</divol><ol start="68" style="list-style-type: decimal;"><li><p>Then set select the parameters of the serial port</p><ol style="list-style-type: lower-alpha;"><li><p>Set '''Serial line to connect to'''to as '''dev/ttyUSB0''' rootfs partition (modify to the corresponding node name, usually /dev/ttyUSB0sdc1)</p></li><li><p>Set '''Speed(baud)''' to 115200 (the baud rate of the serial port)</p></li><li><p>Set '''Flow control''' as '''None'''</p></li></ol></li></ol>
[[File:zero3-img93.png]]<div class/ol><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 micro SD card has been mounted, first you need to Umount the rootfs partition of the micro SD card</li>
[[File:media/image65zero3-img94.jpeg|398x352px|10png]]</ol><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>
[[File:zero3-img95.png]]</divol><ol start="711" style="list-style-type: decimal;"><li><p>After setting the setting interface of the serial port, return to the Session interface</p><ol style="list-style-type: lower-alpha;"><li><p>First select the '''Connection type''' as Serial<Resize/p></li><li><p>Then click the Move'''Open''' button to connect to option is turned on, the serial port</p>following setting interface will pop up</li></ol></li></ol>
[[File:zero3-img96.png]]<div class/ol><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 size(MiB)'''</li>
[[File:media/image66zero3-img97.jpeg|375x333px|11png]]</ol><ol start="13" style="list-style-type: decimal;"><li>After setting the capacity, click '''Resize/Move''' in the lower right corner</li>
[[File:zero3-img98.png]]</divol><ol start="814" style="list-style-type: decimal;"><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;"><li>Then select '''Apply''', it will officially start to expand the development board, and you can see the Log information output by capacity of the system from the opened serial port terminalrootfs partition</li> [[File:zero3-img100.png]]</ol><ol start="16" style="list-style-type: decimal;"><li>After the expansion is completed, click '''Close''' to close</li>
[[File:media/image67zero3-img101.png|376x249px]]</ol><ol start="17" style="list-style-type: decimal;"><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>
{| 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 id><span style="margin-right: 50px;">Use% Mounted on</span><br><span style="howmargin-toright: 110px;">udev</span><span style="margin-useright: 60px;">925M </span><span style="margin-theright: 50px;">0</span><span style="margin-right: 70px;">925M </span><span style="margin-debuggingright: 90px;">0% /dev</span><br><span style="margin-serialright: 100px;">tmpfs </span><span style="margin-portright: 50px;">199M </span><span style="margin-onright: 30px;">3.2M </span><span style="margin-windowsright: 70px;">196M </span><span style="margin-platformright: 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= How to use the debugging serial port on Windows platform "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>
'''There are many serial port debugging software that can be used under Windows, such as SecureCRT, MobaXterm, etc. The following demonstrates how === How to use MobaXterm. This software has a free version and can be used without buying a serial number.'''reduce the capacity of the rootfs partition in the micro SD card ===
<ol style{| class="list-style-type: decimal;wikitable"><li><p>Download MobaXterm</p><ol style="listbackground-style-typecolor:#ffffdc;width: lower-alpha800px;">|-| <libig>Download MobaXterm website as follows'''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.'''</li></olbig></li></ol>|}
[https://mobaxterm.mobatek.net/ # First insert the micro SD card you want to operate in the '''https<span style="color:#FF0000">Ubuntu computer<//mobaxterm.mobatek.net/span>'''](Windows not available)# Then install the gparted software on the Ubuntu computer
<ol start::{| class="2wikitable" style="list-style-typewidth: lower-alpha800px;"><li>After entering the MobaXterm download page, click|-| test@test:~$ '''GET XOBATERM NOW!sudo apt install -y gparted'''</li></ol>|}
[[File<ol start="3" style="list-style-type:mediadecimal;"><li>Then open gparted</image68.png|382x233px]]li>
{| class="wikitable" style="width:800px;" |-| test@test:~$ '''sudo gparted'''|}</ol><ol start="34" style="list-style-type: lower-alphadecimal;"><li>Then choose to download After opening gparted, you can select the micro SD card in the upper right corner, and then you can see the usage of the Home versionmicro SD card capacity</li></ol>
[[File:media/image69zero3-img102.png|353x231px]]</ol><ol start="5" style="list-style-type: decimal;"><li>Then select the rootfs partition (/dev/sdc1)</li>
[[File:zero3-img103.png]]</ol><ol start="46" style="list-style-type: lower-alphadecimal;"><li>Then select Click the Portable versionright mouse button again to see the operation options shown in the figure below. After downloadingIf the micro SD card has been mounted, first you don’t need to install it, just open it and use itUmount the rootfs partition of the micro SD card</li></ol>
[[File:zero3-img104.png]]<div class/ol><ol start="7" style="figurelist-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>
[[File:media/image70zero3-img105.png|322x175px|选区_232]]</ol><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>
[[File:zero3-img106.png]]</divol><ol start="29" style="list-style-type: decimal;"><li>After downloading, use decompression software Then you can directly drag the location shown in the figure below to decompress set the size of the downloaded compressed packagecapacity, or you can get set the executable software size of MobaXterm, and then double-click to openthe rootfs partition by setting the number in '''New size(MiB)'''</li></ol>
[[File:media/image71zero3-img97.png|576x83px]]</ol><ol start="10" style="list-style-type: decimal;"><li>After setting the capacity, click '''Resize/Move''' in the lower right corner</li>
[[File:zero3-img98.png]]</ol><ol start="311" style="list-style-type: decimal;"><li><p>After opening the softwareconfirming that it is correct, click the steps to set up green button shown in the serial port connection are as follows</p>figure below '''<ol span style="list-style-typecolor: lower-alpha;green"><li><p>Open the session settings interface</p></li><li><p>Select the serial port type</p></li><li><p>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</p></li><li><p>Select the baud rate of the serial port as '''115200'''</p></lispan><li><p>Finally click the &quot;'''OK'''&quot; button to complete the setup</p></li></ol></li></ol>
[[File:zero3-img99.png]]<div class/ol><ol start="12" style="figurelist-style-type: decimal;"><li>Then select '''Apply''', and the expansion of the rootfs partition will officially start</li>
[[File:media/image72zero3-img100.jpeg|553x280px|12png]]</ol><ol start="13" style="list-style-type: decimal;"><li>After the expansion is completed, click '''Close''' to close</li>
[[File:zero3-img101.png]]</divol><ol start="414" style="list-style-type: decimal;"><li>After clicking Then you can pull out the &quot;'''OK'''&quot; buttonmicro SD card, you will enter insert it into the following interfacedevelopment board and start it up. At this time, start After entering the Linux system of the development board and , if you can use the '''df -h''' command to see that the output information size of the serial portrootfs partition is the same as the size set before, it means that the size has been reduced. capacity success</li></ol>
{| 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><div classspan 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="figurenetwork-connection-test"></span>
[[File:media/image73.jpeg|628x318px|13]]== Network connection test ==
</div><span id="instructions-for-using-the-5v-pin-in-the-26pin-or-13pin-interfaceethernet-ofport-the-development-board-to-supply-powertest"></span>== Instructions for using the 5v pin in the 26pin or 13pin interface of the development board to supply power = Ethernet port test ===
'''The power supply method we recommend for <ol style="list-style-type: decimal;"><li><p>First, insert one end of the development board is to use the 5V/2A or 5V/3A Type C interface power cord to plug network cable into the Type C power Ethernet interface of the development board for power supply. If you need , and connect the other end of the network cable to use the 5V pin in router, and ensure that the network is unblocked</p></li><li><p>After the 26pin or 13pin interface system starts, it will automatically assign an IP address to power the development boardEthernet card through DHCP, please make sure that without any other configuration</p></li><li><p>The command to view the power cable used can meet IP address in the power supply requirements Linux system of the development boardis as follows:</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Please do not copy the following commands. If For example, the use network node name in debian12 is unstableend0, please switch back and the following commands need to be changed to the Type C power supplyip a s end0.'''</p></big>|}
# First, you need to prepare {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ip a power cord as shown in the figure belows eth0'''
<div class="figure">3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
[[File:medialink/image74.jpeg|223x160px|图片4]]ether 5e:ac:14:a5:93:b3 brd ff:ff:ff:ff:ff:ff
:inet '''<span style="color:#FF0000">192.168.1.16</divspan>'''The power cord shown in the picture above can be bought on Amazon, please search and buy by yourself/24 brd 192.168.'''1.255 scope global dynamic noprefixroute eth0
<ol start="2" style="list-style-type: decimal;"><li><p>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</p><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 red DuPont line 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 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.'''</p></li></ol></li></ol>valid_lft 259174sec preferred_lft 259174sec
[[File:mediainet6 240e:3b7:3240:c3a0:e269:8305:dc08:135e/image24.png|163x174px]]64 scope global dynamic noprefixroute
<span id="the-method-of-using-the-13pin-interface-of-the-development-board-to-expand-the-usb-interface"></span>== The method of using the 13pin interface of the development board to expand the USB interface ==::valid_lft 259176sec preferred_lft 172776sec
# 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:inet6 fe80::957d:bbbd:4928:3604/64 scope link noprefixroute
[[File:media/image18.png:valid_lft forever preferred_lft forever|246x162px]]}
<ol start{| class="2wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;"><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;">| <libig>First, you need '''There are three ways to prepare a 4pin 2.54mm Dupont to USB2.0 female cable (this cable can be bought on Taobao, please search and buy by yourself), as shown in check the IP address after the figure belowdevelopment board starts:</li></ol></li></ol>'''
[[File:media/image75'''1.png|208x162px]] [[File:media/image76.jpeg|237x165px|C:\Users\orangepi\Desktop\用户手册插图\Zero3\未标题-2.jpg未标题-2]]Connect the HDMI monitor, then log in to the system and use the ip a s eth0 command to view the IP address'''
<ol start="'''2" style="list-style-type: lower-alpha;"><li>The schematic diagram of . Enter the 13pin interface is shown below</li></ol>ip a s eth0 command in the debugging serial terminal to view the IP address'''
[[File:media/image19'''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.png|265x142px]] [[File:media/image77However, in this method, some people often cannot see the IP address of the development board normally.jpeg|219x152px|CIf you can't see it, the debug method looks like this:\Users\orangepi\Desktop\用户手册插图\Zero3\未标题-3.jpg未标题-3]]'''
<ol start="3" style="list-style-type: lowerupper-alpha;"><li>The wiring <p>'''First check whether the Linux system has started normally. If the green light of USB2 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>'''Check whether the network cable is plugged in tightly, or try another network cable;'''</p></li><li><p>'''Try another router (I have encountered many problems with the router, such as followsthe router cannot assign the IP address normally, or the IP address has been assigned normally but cannot be seen in the router);'''</p></li><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>
[[File:media/image78.png|256x189px]]
'''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: lower-alphadecimal;"><li><p>The wiring of USB3 command to test the network connectivity is as follows, the ping command can be interrupted through the shortcut key of '''Ctrl+C'''</lip>{| 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></olbig>|}
[[File{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:media/image79~$ '''ping www.png|255x195px]]baidu.com -I eth0'''
<ol start="5" style="list-style-typePING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 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 56(84) bytes of the USB devices can use the 5V and GND pins in the 26pin interfacedata. The location is as shown in the figure below Shown:</li></ol>
[[File64 bytes from 14.215.177.38 (14.215.177.38):media/image24icmp_seq=1 ttl=56 time=6.png|243x260px]]74 ms
<span id64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq="instructions-for-use-of-debianubuntu-server-and-xfce-desktop-system"></span>2 ttl= Instructions for use of Debian/Ubuntu Server and Xfce desktop system 56 time=6.80 ms
<span id64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq="supported-linux-image-types-and-kernel-versions"></span>== Supported linux image types and kernel versions 3 ttl=56 time=6.26 ms
{| class="wikitable"|-| style="text-align: left;"| '''Linux image type'''| style="text-align: left;"| '''kernel version'''| style="text-align: left;"| '''server version'''| style="text-align: left;"| '''desktop version'''|-| style="text-align: left;"| '''Ubuntu 2064 bytes from 14.04 - Focal'''| style="text-align: left;"| '''Linux5215.4'''| style="text-align: left;"| '''Support'''| style="text-align: left;"| '''Support'''|-| style="text-align: left;"| '''Ubuntu 22177.04 - Focal'''| style="text-align: left;"| '''Linux538 (14.4'''| style="text-align: left;"| '''Support'''| style="text-align: left;"| '''Support'''|-| style="text-align: left;"| '''Debian 11 - Bullseye'''| style="text-align: left;"| '''Linux5215.4'''| style="text-align: left;"| '''Support'''| style="text-align: left;"| '''Support'''|-| style="text-align: left;"| '''Ubuntu 22177.04 - Jammy'''| style="text-align38): left;"| '''Linux6.1'''| styleicmp_seq="text-align: left;"| '''Support'''| style4 ttl="text-align: left;"| '''Support'''|-| style56 time="text-align: left;"| '''Debian 11 - Bullseye'''| style="text-align: left;"| '''Linux6.1'''| style="text-align: left;"| '''Support'''| style="text-align: left;"| '''Support'''|-| style="text-align: left;"| '''Debian 12 - Bookworm'''| style="text-align: left;"| '''Linux67.1'''| style="text-align: left;"| '''Support'''| style="text-align: left;"| '''Support'''|}27 ms
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.^C
[[File:media/image80--- www.png|207x123px]]a.shifen.com ping statistics ---
The naming rules of Linux images are as follows:4 packets transmitted, 4 received, 0% packet loss, time 3002ms
'''Development board model_version number_Linux distribution type_release code name_server or desktop_kernel version''' <ol stylertt min/avg/max/mdev ="list-style-type: lower-alpha;"><li><p>'''The model of the development board''':Both are '''orangepizero3'''6. The model names of different development boards are generally different260/6. Before burning the image, please make sure that the model name of the selected image matches the development board770/7.</p><275/li><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 number0.</p></li>373 ms<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''': 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''':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></liol><li><p>'''Kernel version''':Used to indicate the version number of the linux kernel, currently supports '''linux5.4''' and '''linux6.1.'''</pspan id="wifi-connection-test"></li></olspan>
<span id="linux-kernel-driver-adaptation"></span>== Linux kernel driver adaptation WIFI connection test ===
{| class="wikitable"|-| style="text-align: left;"| '''Function'''| style="text-align: left;"| '''Linux5.4'''| style="text-align: left;"| '''Linux6.1'''|-| style="text-align: left;"| '''HDMI video'''| style="text-align: left;"| '''OK'''| style="textbackground-aligncolor: left#ffffdc;"| '''OK'''|-| style="text-align: left;"| '''HDMI audio'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''USB2.0 x 3'''| style="text-align: left;"| '''OK'''| style="text-alignwidth: left800px;"| '''OK'''
|-
| style="text-align: left;"| '''TF card start'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''Gigabit Ethernet'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''Infrared receiver'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| <big>'''Please do not connect to WIFI by modifying the /etc/network/interfaces configuration file. There will be problems connecting to the WIFInetwork in this way.'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''Bluetooth'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''headphone audio'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''usb camera'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''LED light'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''26pin GPIO'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''26pin I2C'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''26pin SPI1'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''26pin UART'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''PWM'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''Temperature Sensor'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''hardware watchdog'''| style="text-align: left;"| '''OK'''| style="text-align: left;"| '''OK'''|-| style="text-align: left;"| '''Mali GPU'''| style="text-align: left;"| '''NO'''| style="text-align: left;"| '''NO'''|-| style="text-align: left;"| '''Video codec'''| style="text-align: left;"| '''NO'''| style="text-align: left;"| '''NO'''|-| style="text-align: left;"| '''TV-OUT'''| style="text-align: left;"| '''NO'''| style="text-align: left;"| '''NO'''</big>
|}
<span id="the-formatserver-ofimage-linuxconnects-commandsto-inwifi-thisthrough-manualcommands"></span>==== The format of linux server image connects to WIFI through commands in this manual ====
{| class="wikitable" style="background-color:# In this manualffffdc;width:800px;" |-| <big>'''When the development board is not connected to Ethernet, not connected to HDMI display, but only connected to the serial port, all it is recommended to use the commands that need demonstrated in this section to be entered 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 Linux system will be marked with commands demonstrated in this section to connect to the following boxWIFI network.'''</big>|}
As shown below<ol style="list-style-type: decimal;"><li><p>First log in to the linux system, there are the content in the yellow box indicates following three ways</p><ol style="list-style-type: lower-alpha;"><li>If the content that needs special attentiondevelopment board is connected with a network cable, except for the commands in it.[[Orange Pi Zero 3#SSH remote login development board under Ubuntu|'''SSH remote login development board under Ubuntu''']]</li></ol>
<!-- --><ol start="2" style="list-style-type: decimallower-alpha;"><li><p>Description of If the development board is connected to the debugging serial port, you can use the prompt type serial port terminal to log in front of to the commandLinux system</p><ol style="list-style-type: lower-alpha;"/li><li>The prompt in front of <p>If the command refers development board is connected to the content of the red part in the box below, which is not part of the linux commandHDMI display, so when entering the command you can log in to the linux system, please do not enter through the content of terminal displayed on the red font part.HDMI</p></li></ol>
</li></ol>
'''orangepi@orangepi<!-- --><ol start="2" style="list-style-type:~$ sudo apt update'''decimal;"> '''root@orangepi:~#''' <li>First use the '''vim /boot/boot.cmdnmcli dev wifi'''command to scan the surrounding WIFI hotspots
'''test{| class="wikitable" style="width:800px;" |-| orangepi@testorangepi:~$ ssh [mailto:root@192.168.1.36 root@192.168.1.]xxx'''nmcli dev wifi'''|}
'''root@test:~# ls'''<div class="figure">
<ol start="2" style="list-style-type[[File: lowerzero3-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>'''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>'''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>'''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 boardimg107. 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>png]]
<!-- --/div></li></ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>What are Then use the commands that need '''nmcli''' command to be entered?connect to the scanned WIFI hotspot, where:</p>
<ol style="list-style-type: lower-alpha;">
<li>As shown below, <p>'''the black bold partwifi_name''' is the command that needs Need to be input, and the content below the command is replace it with the output content (some commands have output, some may not), and this part name of the content does not need WIFI hotspot you want to connect to be input</lip></olli><li><p>'''wifi_passwd''' Need to change to the password of the WIFI hotspot you want to connect to</lip></olli>
root{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# $ '''cat sudo nmcli dev wifi connect <span style="color:#FF0000">wifi_name</bootspan> password <span style="color:#FF0000">wifi_passwd</orangepiEnv.txtspan>'''
Device 'wlan0'successfully activated with 'verbositycf937f88-ca1e-4411-bb50-61f402eef293'.|}</ol></li></ol><ol start=7"3" style="list-style-type: decimal;"><li>You can view the IP address of wifi through the '''ip addr show wlan0'''command</li>
bootlogo{| class=false"wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''ip a s wlan0'''
'''console=serial'''11: wlan0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
<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 &quot;\&quot; 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<link/li></ol>ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff
orangepi@orangepi:~$ inet '''echo \<span style="color:#FF0000">192.168.1.11</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
'''&quot;deb [arch=$(dpkg --print-architecture) \'''::valid_lft 259192sec preferred_lft 259192sec
'''signed-by=:inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/usr/share/keyrings/docker-archive-keyring.gpg] \'''64 scope global dynamic noprefixroute
'''https://download.docker.com/linux/debian \''':valid_lft 259192sec preferred_lft 172792sec
'''$(lsb_release -cs) stable&quot; | sudo tee :inet6 fe80::42f1:6019:a80e:4c31/etc/apt/sources.list.d/docker.list &gt; /dev/null'''64 scope link noprefixroute
<span id="linux-system-login-instructions">::valid_lft forever preferred_lft forever|}</spanol><ol start== Linux system login instructions == <span id"4" style="linuxlist-systemstyle-default-login-account-and-passwordtype: 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'''</spanli>=== Linux system default login account and password ===
{| class="wikitable" style="width:800px;"
|-
| style="text-align: left;"| '''Account'''| style="text-align: left;"| '''password'''|-| style="text-align: left;"| '''root'''| style="text-align: left;"| '''orangepi'''|-| style="text-align@orangepi: left;"| ~$ '''ping www.orangepi'''| style="text.org -align: left;"| '''orangepiI wlan0'''|}
'''Note that when entering the password, the specific content PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of the entered password will not be displayed on the screen, please do not think that there is any fault, just press Enter after inputtingdata.'''
'''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 reasons64 bytes from 182.'''92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms
<span id64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq="how-to-set-automatic-terminal-login-in-linux-system"></span>2 ttl=52 time=41.3 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time= How to set automatic terminal login in linux system 44.9 ms 64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms
# The Linux system automatically logs in to the terminal by default, and the default login user name is '''orangepi'''64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms
[[File:media/image81.png|475x240px]]^C
<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></ol>- www.orangepi.org ping statistics ---
orangepi@orangepi:~$ '''sudo auto_login_cli.sh root'''5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms|}</ol start><span id="3" style="listthe-server-image-connects-to-wifi-in-a-stylegraphical-type: decimal;way"><li>Use the following command to disable automatic login terminal</li></olspan>
orangepi@orangepi:~$ '''sudo auto_login_cli.sh -d'''==== The server image connects to WIFI in a graphical way ====
<ol startstyle="4list-style-type: decimal;" ><li><p>First log in to the linux system, there are the following three ways</p><ol style="list-style-type: decimallower-alpha;"><li>Use <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 following command serial port terminal to log in to set the orangepi user 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 automatically the HDMI display, you can log in to the linux system through the HDMI display terminal again</p></li></ol></li><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 auto_login_cli.sh orangepinmtui'''|}</li></ol><ol start="3" style="list-style-type: decimal;"><li>Enter the nmtui command to open the interface as shown below</li>
[[File:zero3-img108.png]]<span id/ol><ol start="instructions-for-automatic4" style="list-loginstyle-of-linux-desktop-version-systemtype: decimal;"><li>Select '''Activate a connect''' and press Enter</spanli>=== Instructions for automatic login of linux desktop version system ===
# After [[File:zero3-img109.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>Then you can see all the desktop system starts, it will automatically log in to the desktop without entering a passwordsearched WIFI hotspots</li>
<div class="figure">
[[File:media/image82zero3-img110.png|576x324px|1]] </div></ol><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>
</div><ol startclass="2figure" style="list-style-type: decimal;"><li>Run the following command to prohibit the desktop system from automatically logging into the desktop</li></ol>
orangepi@orangepi[[File:~$ '''sudo disable_desktop_autologinzero3-img111.sh'''png]]
</div></ol><ol start="37" style="list-style-type: decimal;"><li>Then restart the system and a login dialog box for entering a password will appearpop up, at which point a enter the corresponding password in '''passwordPassword''' is required and press Enter to enter the systemstart connecting to WIFI</li></ol>
<div class="figure">
[[File:media/image83zero3-img112.png|569x320px|IMG_256]]
</div></ol><span idol start="the-setting-method-of8" style="list-rootstyle-user-automatic-login-in-linux-desktop-version-systemtype: decimal;"><li>After the WIFI connection is successful, a &quot;*&quot; will be displayed in front of the connected WIFI name</spanli>=== 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<div class="figure">
orangepi@orangepi[[File:~$ '''sudo desktop_loginzero3-img113-2.sh root'''png]]
</div></ol><ol start="29" style="list-style-type: decimal;"><li>Then restart You can view the system, and IP address of wifi through the root user will automatically log in to the desktop'''ip a s wlan0''' command</li></ol>
[[File{| class="wikitable" style="width:media/image84.png800px;" |294x123px]]-| orangepi@orangepi:~$ '''ip a s wlan0'''
'''Note that if you log in to the desktop system as the root user11: wlan0: &lt;BROADCAST, you cannot use pulseaudio in the upper right corner to manage audio devices.'''MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
'''Also note that this is not a bug, since pulseaudio is not allowed to run as root.''':link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff
:inet '''<ol start="3" span style="list-style-typecolor: decimal;#FF0000"><li>Execute the following command to set the desktop system to log in automatically with the orangepi user again192.168.1.11</lispan><'''/ol>24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
orangepi@orangepi:~$ '''sudo desktop_login.sh orangepi''':valid_lft 259069sec preferred_lft 259069sec
<span id="the-method-of-disabling-the-desktop-in-the-linux-desktop-version-system"><:inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/span>=== The method of disabling the desktop in the Linux desktop version system ===64 scope global dynamic noprefixroute
# First enter the following command on the command line, '''Please remember to add sudo permission'''::valid_lft 259071sec preferred_lft 172671sec
orangepi@orangepi:~$ '''sudo systemctl disable lightdm.service'''inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute
::valid_lft forever preferred_lft forever|}</ol><ol start="210" style="list-style-type: decimal;"><li>Then restart Use the '''ping''' command to test the connectivity of the Linux system wifi network, and you will find that the desktop will not '''ping''' command can be displayedinterrupted through the shortcut key '''Ctrl+C'''</li></ol>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo rebootping www.orangepi.org -I wlan0'''
<ol start="3" style="list-style-typePING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: decimal;"><li>The command to reopen the desktop is as follows,'''Please remember to add sudo permission'''</li></ol>56(84) bytes of data.
orangepi@orangepi64 bytes from 182.92.236.130 (182.92.236.130):~$ '''sudo systemctl start lightdmicmp_seq=1 ttl=52 time=43.service'''5 ms
orangepi@orangepi64 bytes from 182.92.236.130 (182.92.236.130):~$ '''sudo systemctl enable lightdmicmp_seq=2 ttl=52 time=41.service'''3 ms
<span id64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq="onboard-led-light-test-instructions"></span>== Onboard LED Light Test Instructions 3 ttl=52 time=44.9 ms
# There are two LED lights on the development board, one is green and the other is red64 bytes from 182. When the system starts, the default display of the LED lights is as follows92.236.130 (182.92.236.130):icmp_seq=4 ttl=52 time=45.6 ms
{| class="wikitable"|-|| style="text-align64 bytes from 182.92.236.130 (182.92.236.130): left;"| '''Green light'''| styleicmp_seq="text-align: left;"| '''Red light'''|-| '''u-boot startup phase'''| style5 ttl="text-align: left;"| '''off'''| style52 time="text-align: left;"| '''on'''|-| '''The kernel boots into the system'''| style="text-align: left;"| '''闪烁'''| style="text-align: left;"| '''off'''|-| '''GPIO interface'''| style="text-align: left;"| '''PC13'''| style="text-align: left;"| '''PC12'''|}48.8 ms
'''The two LED lights on the development board are controlled by software.'''^C
'''When you get the development board, you may find that even if the TF 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--- www. This is because the 16MB on the development board SPI Flash will burn a miniature linux system by default when leaving the factoryorangepi. This system will light up the red light during the uorg ping statistics ---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 cleared5 packets transmitted, then the two LED lights on the development board will not light up after the power is turned on without inserting the TF card with the system programmed'''5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms|}</ol start><span id="2" style="listtest-method-of-styledesktop-type: decimal;image"><li>The method of setting the green light on and off and flashing is as follows:</li></olspan>
'''Note that the following operations should be performed under the root user.'''==== Test method of desktop image ====
<ol style="list-style-type: lower-alpha;"><li>First enter # Click the setting directory network configuration icon in the upper right corner of the green light</li></ol>desktop (please do not connect the network cable when testing WIFI)
root@orangepi:~# '''cd /sys/class/leds/green_led''':[[File:zero3-img114.png]]
<ol start="2" style="list-style-type: lower-alphadecimal;"><li>The command Click '''More networks''' in the pop-up drop-down box to set see all scanned WIFI hotspots, and then select the green light WIFI hotspot you want to connect to stop flashing is as follows</li></ol>
root@orangepi[[File:zero3-img115.png]]</sys/class/leds/green_led# ol><ol start="3" style="list-style-type: decimal;"><li>Then enter the password of the WIFI hotspot, and then click '''echo none &gt; triggerConnect'''to start connecting to WIFI</li>
[[File:zero3-img116.png]]</ol><ol start="34" style="list-style-type: lower-alphadecimal;"><li>The command After connecting to set WIFI, you can open the green light browser to be on check whether you can access the Internet. The entrance of the browser is as followsshown in the figure below</li></ol>
root@orangepi[[File:zero3-img117.png]]</sys/class/leds/green_led# '''echo defaultol><ol start="5" style="list-style-on &gttype: decimal; trigger'''"><li>If you can open other web pages after opening the browser, it means that the WIFI connection is normal</li>
[[File:zero3-img118.png]]</ol start><span id="4" style="listthe-method-of-creating-wifi-stylehotspot-type: lowerthrough-alpha;create_ap"><li>The command to set the green light to flash is as follows</li></olspan>
root@orangepi:/sys/class/leds/green_led# '''echo heartbeat &gt; trigger'''=== The method of creating WIFI hotspot through create_ap ===
<ol start{| class="3wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>The method of setting the red light '''create_ap is a script that helps quickly create WIFI hotspots on Linux, and supports bridge and off NAT modes. It can automatically combine hostapd, dnsmasq and flashing iptables to complete the setting of WIFI hotspots, avoiding complex configuration for users. The github address is as follows:</li></ol>'''
[https://github.com/oblique/create_ap '''Note that the following operations should be performed under the root userhttps://github.com/oblique/create_ap''']</big>|}
<ol {| class="wikitable" style="listbackground-style-typecolor:#ffffdc;width: lower-alpha800px;">|-| <libig>First enter '''The Linux image released by OPi has pre-installed the setting directory create_ap script. You can create a WIFI hotspot through the create_ap command. The basic command format of the red light</li></ol>create_ap is as follows:'''
root@orangepi:~# '''cd /sys/class/leds/red_led'''
<ol start="2" style="list'''create_ap [options] &lt;wifi-styleinterface&gt; [&lt;interface-type: lowerwith-alphainternet&gt;] [&lt;access-point-name&gt; [&lt;passphrase&gt;"><li>The command to set the red light to be on is as follows</li></ol>]]'''
root@orangepi:/sys/class/leds/red_led# '''echo default-on &gt; trigger'''
<ol start="3" style="list-style-type'''* options: lower-alpha;"><li>The command ''' '''You can use this parameter to set specify the flashing red light is as follows</li></ol>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'''
root@orangepi:/sys/class/leds/red_led# '''echo heartbeat &gt; trigger* wifi-interface:The name of the wireless network card'''
<ol start="4" style="list'''* interface-stylewith-typeinternet: lower-alpha;"><li>''' '''The command name of the network card that can be connected to set the red light to stop flashing is as follows</li></ol>Internet, generally eth0'''
root@orangepi:/sys/class/leds/red_led# '''echo none &gt; trigger* access-point-name: hotspot name'''
<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><ol style="list-style-type: lower-alpha;"><li>First run '''orangepi-config* passphrase:hotspot password''', common users remember to add '''sudo''' permission</li></olbig></li></ol>|}
orangepi@orangepi:~$ '''sudo orangepi<span id="create_ap-config'''method-to-create-wifi-hotspot-in-nat-mode"></span>==== create_ap method to create WIFI hotspot in NAT mode ====
<ol start="2" style="list-style-type: lower-alphadecimal;"><li>Then select <p>Enter the following command to create a WIFI hotspot named '''orangepi''' and password '''Systemorangepi'''in NAT mode</li></olp[[File:media/image85.png{|398x194px]] <ol startclass="3wikitable" style="listbackground-style-typecolor:#ffffdc;width: lower-alpha800px;"|-| <big><lip>Then select '''HardwareNote that in the following commands, Debian12 needs to change eth0 to end0.'''</lip></olbig>|}
[[File{| class="wikitable" style="width:media800px;" |-| orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt'''|}</image86.png|393x202px]]li></ol><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>
<ol start{| class="4wikitable" style="list-style-typewidth: lower-alpha800px;"><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 |-| orangepi@orangepi:~$ '''disablesudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-ledsvirt'''</li></ol>
[[FileConfig dir:media/image87tmp/create_ap.wlan0.conf.png|397x35px]]TQkJtsz1
<ol start="5" style="list-style-typePID: lower-alpha;"><li>Then selec '''&lt;Save&gt;'''</li></ol>26139
[[File:media/image88Network Manager found, set wlan0 as unmanaged device.png|397x92px]].. DONE
<ol start="6" style="list-style-typeSharing Internet using method: lower-alpha;"><li>Then select '''&lt;Back&gt;'''</li></ol>nat
[[Filehostapd command-line interface:mediahostapd_cli -p /image89tmp/create_ap.wlan0.conf.png|395x91px]]TQkJtsz1/hostapd_ctrl
<ol start="7" style="list-style-typewlan0: lowerinterface state UNINITIALIZED-alpha;"><li>Then select '''&lt;Reboot&gt;'''to restart the system for the configuration to take effect</li></ol>ENABLED
[[Filewlan0:media/image90.png|374x187px]]AP-ENABLED
<ol start="8" style="list-style-typewlan0: 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>STA ce:bd:9a:dd:a5:86 IEEE 802.11: associated
<span id="instructionswlan0: AP-forSTA-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 TF card ==CONNECTED ce:bd:9a:dd:a5:86
<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 TF card ===wlan0: STA ce:bd:9a:dd:a5:86 RADIUS: starting accounting session D4FBF7E5C604F169
# After burning the Linux image of the development board into the TF card, you can check the capacity usage of the TF card on the '''Ubuntu computer''', the steps are as followswlan0:STA ce:bd:9a:dd:a5:86 WPA: pairwise key handshake completed (RSN)
wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86|}</ol><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'Note that this step does not affect the automatic expansion of the Linux system of '' created by the development board. Here I just want in the searched WIFI list, and then you can click '''orangepi''' to explain how connect to check the capacity of hotspot, the TF card after burning the Linux image on the TF card.password is set above '''orangepi'''</li>
[[File:zero3-img119-1.png]]</ol><ol start="4" style="list-style-type: lower-alphadecimal;"><li>First install After the gparted software on connection is successful, the Ubuntu computerdisplay is as shown in the figure below</li></ol>
test@test[[File:~$ zero3-img120-1.png]]</ol><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>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''sudo apt install -y gpartedNote that in the following commands, Debian12 needs to change eth0 to end0.'''</p></big>|}
<ol start{| class="2wikitable" style="list-style-typewidth: lower-alpha800px;"><li>Then open gparted</li></ol>|-| orangepi@orangepi:~$ '''sudo ifconfig eth0'''
test@testeth0:~$ '''sudo gparted'''flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500
::inet '''<ol start="3" span style="list-style-typecolor: lower-alpha;#FF0000"><li>After opening gparted, you can select the TF card in the upper right corner, and then you can see the usage of the TF card capacity</li>192.168.1.150</olspan>''' netmask 255.255.255.0 broadcast 192.168.1.255
[[File:media/image91.png|575x210px]]:inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20&lt;link&gt;
<ol start="4" style="list-style-type: lower-alpha;"><li>The figure above shows the situation of the TF card after burning the Linux desktop version system. It can be seen that although the total capacity of the TF card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition :ether 4a:a0:c8:25:42:82 txqueuelen 1000 (/dev/ sdc1Ethernet) actually allocated only 4.05GiB, leaving 10.79GiB unallocated</li></ol>
<!-- --><ol start="::RX packets 25370 bytes 2709590 (2" style="list-style-type: decimal;"><li><p>Then you can insert the TF card that has burned the Linux system into the development board to start. When the TF 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'''</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 TF card, it means that the automatic expansion is running correctly.</p></li></ol>7 MB)
orangepi@orangepi:~$ '''df -h''':RX errors 0 dropped 50 overruns 0 frame 0
Filesystem Size Used Avail Use% Mounted on::TX packets 3798 bytes 1519493 (1.5 MB)
udev 430M ::TX errors 0 430M dropped 0 overruns 0 carrier 0 collisions 0% /dev
tmpfs 100M 5.6M 95M 6% /run::device interrupt 83|}
By default, the DHCP service of the development board will assign an IP address of '''192.168.12.0/dev/mmcblk0p1 15G 915M 14G 7% /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'''
tmpfs 500M 0 500M 0% /dev/shm[[File:zero3-img120-1.png]]
[[File:zero3-img121-2.png]]</li></ol><ol start="46" style="list-style-type: decimal;"><li>After starting the Linux system If you want to specify a different network segment for the first timeconnected device, we you can also remove the TF card from the development board and reinsert specify it into through the '''Ubuntu computer'''-g parameter, and then use gparted to check such as specifying the status network segment of the TF card again, access point AP through the -g parameter as shown in the figure below, the rootfs partition (/dev/ The capacity of sdc1) has been expanded to 14192.168.2.69GiB1</li></ol>
[[File{| class="wikitable" style="background-color:media#ffffdc;width:800px;" |-| <big>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</image92.pngbig>|575x211px]]}
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''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 sudo create_ap -m nat wlan0 eth0 orangepi orangepi -g 192.168.2.1 --no problem of expanding the BOOT partition.-virt'''|}
<span id="At this time, after connecting to the-method-of-prohibiting-automatic-expansion-of-hotspot through the-capacity-of-mobile phone, click on the-rootfs-partition-in-connected WIFI hotspot '''orangepi''', and then you can see that the-tf-card"></span>=== The method IP address of prohibiting automatic expansion of the capacity of the rootfs partition in the TF card ===mobile phone is '''192.168.2.X'''.
# First burn the linux image of the development board to the TF card on the '''Ubuntu computer''' (Windows not available), '''and then re[[File:zero3-plug and insert the TF card'''# Then the Ubuntu computer will automatically mount the partition of the TF cardimg120-1. If the automatic mounting is normal, use the ls command to see the following outputpng]]
test@test[[File:~$ zero3-img122-2.png]]</ol><ol start="7" style="list-style-type: decimal;"><li><p>If the '''--freq-band''ls /media/test/opi_root' 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>{| 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>|}
bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var{| class="wikitable" style="width:800px;" |-| 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;"><li><p>If you need to hide the SSID, you can specify the '''--hidden''' parameter, the specific command is as follows</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>|}
<ol start{| class="3wikitable" style="list-style-typewidth: decimal800px;"><li>Then switch the current user to the root user on the Ubuntu computer</li></ol>|-| orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --hidden --no-virt'''|}
test@test:~$ '''sudo -i'''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.
[sudo[File:zero3-img123-1.png] test 的密码:]</li></ol><span id="create_ap-method-to-create-wifi-hotspot-in-bridge-mode"></span>
root@test:~'''#'''==== create_ap method to create WIFI hotspot in bridge mode ====
<ol start="4" style="list-style-type: decimal;"><li>Then enter <p>Enter the root directory of the linux system in the TF card and following command to create a new file WIFI hotspot named '''orangepi''' and password '''orangepi''' in bridge mode</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.no_rootfs_resize'''</lip></olbig>|}
root{| class="wikitable" style="width:800px;" |-| orangepi@testorangepi:~# $ '''cd sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt'''|}</mediali></testol><ol start="2" style="list-style-type: decimal;"><li>If the following information is output, it means that the WIFI hotspot is created successfully</opi_root/'''li>
root{| class="wikitable" style="width:800px;" |-| orangepi@testorangepi:/media/test/opi_root/# ~$ '''cd rootsudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt'''
root@testConfig dir:/mediatmp/test/opi_root/root# '''touch create_ap.wlan0.conf.no_rootfs_resize'''zAcFlYTx
root@testPID:/media/test/opi_root/root# '''ls .no_rootfs*'''27707
'''Network Manager found, set wlan0 as unmanaged device.no_rootfs_resize'''.. DONE
<ol start="5" style="list-style-typeSharing Internet using method: decimal;"><li><p>Then you can uninstall the TF card, and then pull out the TF 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 TF card, indicating that the automatic expansion of rootfs is prohibited.</p></li></ol>bridge
orangepi@orangepi:~$ '''df -h'''Create a bridge interface... br0 created.
Filesystem Size Used Avail Use% Mounted onhostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlan0.conf.zAcFlYTx/hostapd_ctrl
udev 925M 0 925M 0% /devwlan0: interface state UNINITIALIZED-&gt;ENABLED
tmpfs 199M 3.2M 196M 2% /runwlan0: AP-ENABLED
'''/dev/mmcblk0p1 4wlan0: STA ce:bd:9a:dd:a5:86 IEEE 802.0G 3.2G 686M 83% /'''11: associated
<ol start="7" style="listwlan0: AP-styleSTA-typeCONNECTED ce:bd:9a:dd: decimal;"><li>If you need to re-expand the capacity of the rootfs partition in the TF card, just execute the following command, and then restart the Linux system of the development board.</li></ol>a5:86
'''Note, please execute the following commands under the root user.'''wlan0: STA ce:bd:9a:dd:a5:86 RADIUS: starting accounting session 937BF40E51897A7B
root@orangepiwlan0:~# '''rm /root/.no_rootfs_resize'''STA ce:bd:9a:dd:a5:86 WPA: pairwise key handshake completed (RSN)
root@wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86|}</ol><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:~# '''systemctl enable to connect to the hotspot, and the password is the '''orangepi-resize-filesystem.service'''set above</li>
root@orangepi[[File:~# '''sudo reboot'''zero3-img119-1.png]]</ol><ol start="4" style="list-style-type: decimal;"><li>After the connection is successful, the display is as shown in the figure below</li>
After restarting[[File:zero3-img120-1.png]]</ol><ol start="5" style="list-style-type: decimal;"><li>In bridge mode, enter the Linux system wireless device connected to the hotspot of the development board again, and you can see that also requests an IP address from the DHCP service of the main router (the rootfs partition has been expanded router connected to the actual capacity development board), for example, the IP of the TF carddevelopment board is '''192.168.1.X'''</li>
root{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# $ '''df -hsudo ifconfig eth0'''
Filesystem Size Used Avail Use% Mounted oneth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500
udev 925M ::inet '''<span style="color:#FF0000">192.168.1.150</span>''' netmask 255.255.255.0 925M 0% /devbroadcast 192.168.1.255
tmpfs 199M 3.2M 196M 2% /run::inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20&lt;link&gt;
'''/dev/mmcblk0p1 15G 3.2G 12G 23% /'''::ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet)
<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 TF card ===::RX packets 25370 bytes 2709590 (2.7 MB)
'''If the total capacity of the TF card is large, such as 128GB, you do not want the rootfs partition of the Linux system to use all the capacity of the TF 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 TF 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.'''::RX errors 0 dropped 50 overruns 0 frame 0
# First burn the linux image of the development board to the TF card on the '''Ubuntu computer''' ::TX packets 3798 bytes 1519493 (Windows not available1.5 MB), '''and then re-plug and insert the TF card'''# Then the Ubuntu computer will automatically mount the partition of the TF card. If the automatic mounting is normal, use the ls command to see the following output
test@test:~$ '''ls /media/test/opi_root/''':TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var::device interrupt 83|}
<ol start="3" style="list-style-type: decimal;"><li>Then switch The IP of the current user device connected to the root user 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 Ubuntu computer</li></ol>connected WIFI hotspot orangepi, and then you can see the IP address of the mobile phone also '''192.168.1.X'''.
test@test[[File:~$ '''sudo zero3-i'''img120-1.png]]
[sudo[File:zero3-img124-1.png]] test 的密码: root@test:~'''#'''</ol><ol start="46" style="list-style-type: decimal;"><li>Then enter the root directory of the linux system in the TF card and create a new file named '''.no_rootfs_resize'''</li></olproot@test:~# If the '''cd /media/test/opi_root/--freq-band''' root@test:/media/test/opi_root/# y band. If you want to create a hotspot in the 5G frequency band, you can specify the '''cd root''' root@test:/media/test/opi_root/root# --freq-band 5'''touch parameter.no_rootfs_resize''' root@test:The specific command is as follows</media/test/opi_root/root# '''ls .no_rootfs*'''p> '''.no_rootfs_resize''' <ol start{| class="5wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>Then install the gparted software on the Ubuntu computer</lip></ol> test@test:~$ '''sudo apt install -y gpartedNote that in the following commands, Debian12 needs to change eth0 to end0.''' <ol start="6" style="list-style-type: decimal;"><li>Then open gparted</lip></olbigtest@test:~$ '''sudo gparted'''|}
{| class="wikitable" style="width:800px;"
|-
|
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;">
<li>After opening gparted, <p>If you can select the TF card in need to hide the upper right cornerSSID, and then you can see specify the usage of '''--hidden''' parameter, the TF card capacity. The figure below shows the situation of the TF card after burning the Linux desktop version system. It can be seen that although the total capacity of the TF card specific command is 16GB (displayed as 14.84GiB follows</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that in GParted), the rootfs partition (/dev/sdc1) Only 4.05GiB were actually allocatedfollowing commands, leaving 10Debian12 needs to change eth0 to end0.79GiB unallocated'''</lip></olbig>|}
[[File{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:media/image91.png~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --hidden --no-virt'''|575x210px]]}
<ol start="8" style="list-style-type: decimal;"><li>Then select At this time, the rootfs partition (/dev/sdc1)</li></ol>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:media/image93zero3-img123-1.png|575x211px]]</li></ol><span id="how-to-set-static-ip-address"></span>
<ol start="9" style="list-style-type: decimal;"><li>Click the right mouse button again = How to see the operation options shown in the figure below. If the TF card has been mounted, first you need to Umount the rootfs partition of the TF card</li></ol>set static IP address ===
[[File{| class="wikitable" style="background-color:#ffffdc;width:media800px;" |-| <big>'''Please do not set a static IP address by modifying the /image94etc/network/interfaces configuration file.png'''</big>|436x298px]]}
<ol startspan id="10" style="listuse-the-nmtui-command-to-set-a-static-styleip-type: decimal;address"><li/span>Then select the rootfs partition again, click ==== Use the right mouse button, and select '''Resize/Move''' nmtui command to start expanding the size of the rootfs partition</li></ol>set a static IP address ====
[[File:media/image95.png|444x302px]] <ol start="11" style="list-style-type: decimal;"><li>After <p>First run the '''nmtui''' command</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo nmtui'''</p>|}</li><li><p>Then select '''Edit a connection''' and press Enter</p><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><p>[[File:zero3-img126.png]]</p></li><li><p>Then select '''Edit''' with the '''Tab''' key and press the Enter key</p><p>[[File:zero3-img127.png]]</p></li><li><p>Then use the Tab key to move the cursor to the '''Resize&lt;Automatic&gt;''' position shown in the figure below to configure IPv4</p><p>[[File:zero3-img128.png]]</Movep></li><li><p>Then press Enter, select ''' option Manual''' through the up and down arrow keys, and press Enter to confirm</p><p>[[File:zero3-img129.png]]</p></li><li><p>The display after selection is turned onshown in the figure below</p><p>[[File:zero3-img130.png]]</p></li><li><p>Then move the cursor to '''&lt;Show&gt;''' via the Tab key</p><p>[[File:zero3-img131.png]]</p></li><li><p>Then press Enter, the following setting interface will pop upafter entering</p><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), '''<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:zero3-img133.png]]</p></li><li><p>After setting, move the cursor to '''&lt;OK&gt;''' in the lower right corner, and press Enter to confirm</p><p>[[File:zero3-img134.png]]</p></li><li><p>Then click '''&lt;Back&gt;''' to return to the previous selection interface</p><p>[[File:zero3-img135.png]]</p></li><li><p>Then select '''Activate a connection''', then move the cursor to '''&lt;OK&gt;''', and finally click Enter</p><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 &lt;Deactivate&gt;, and press the Enter key to disable '''Wired connection 1'''</p><p>[[File:zero3-img137.png]]</p></olli><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:mediazero3-img138.png]]</p></li><li><p>Then you can exit nmtui through the '''&lt;Back&gt;''' and '''Quit''' buttons</image96p><p>[[File:zero3-img139.png]] [[File:zero3-img140.png|315x193px]]</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>{| 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>3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; 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>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>inet6 241e:3b8:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute</p>::<p>valid_lft 259149sec preferred_lft 172749sec</p>:<p>inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute</p>::<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>{| 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>PING 192.168.1.47 (192.168.1.47) from 192.168.1.188 eth0: 56(84) bytes of data.</p><p>64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=0.233 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=2 ttl=64 time=0.263 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=3 ttl=64 time=0.273 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=4 ttl=64 time=0.269 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=5 ttl=64 time=0.275 ms</p><p>^C</p><p>--- 192.168.1.47 ping statistics ---</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>
<ol startspan id="12" style="listuse-the-nmcli-stylecommand-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 sieze(MiB)'''</li-a-static-ip-address"></olspan>
[[File:media/image97.png|320x191px]]==== Use the nmcli command to set a static IP address ====
<ol style="list-style-type: decimal;"><li><p>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 startto set the static IP address</p></li><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;"><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>{| 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="13margin-right: 50px;" >eth0</span><br>|}</li></ol></li><li><p>Then enter the following command, where</p><ol style="list-style-type: decimallower-alpha;"><li>After setting <p>'''&quot;Wired connection 1&quot;''' 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 capacitystatic IP address to be set, click which can be modified to the value you want to set</p></li><li><p>'''ipv4.gateway''' represents the address of the gateway</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo nmcli con mod &quot;Wired connection 1&quot; \</p><p>ipv4.addresses &quot;192.168.1.110&quot; \'''</p><p>'''ipv4.gateway &quot;192.168.1.1&quot; \'''</p><p>'''ipv4.dns &quot;8.8.8.8&quot; \'''Resize</Movep><p>'''ipv4.method &quot;manual&quot;''' in </p>|}</li></ol></li><li><p>Then restart the lower right cornerlinux system</p>{| 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>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''ip addr show eth0'''</p><p>3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; 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>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>inet6 240e:3b7:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute</p>::<p>valid_lft 259183sec preferred_lft 172783sec</p>:<p>inet6 fe80::3312:861a:a589:d3c/64 scope link noprefixroute</p>::<p>valid_lft forever preferred_lft forever</p>|}</li></ol>
[[File:media<span id="the-method-of-setting-the-linux-system-to-automatically-connect-to-the-network-for-the-first-time"></image98.png|327x196px]]span>
<ol start="14" style="list-style-type: decimal;"><li>14) After confirming that it is correct, click = The method of setting the green button shown in Linux system to automatically connect to the figure below'''√'''</li></ol>network for the first time ===
[[File{| class="wikitable" style="background-color:#ffffdc;width:media/image99800px;" |-| <big>'''The development board has an Ethernet port.png|392x270px]]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.'''
<ol start="15" style="list-style-type: decimal;"><li>15) Then select'''Apply'''The development board also has wireless WIFI. If you want to remotely log in to the Linux system of the development board through WIFI, It will officially start you need to remotely log in to expand the capacity Linux system through the IP address of the rootfs partition</li></ol>Ethernet port ssh and then connect to WIFI through commands, or through commands on the HDMI screen or serial port. Connect to WIFI.'''
[[File:media'''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.'''</image100.pngbig>|399x116px]]}
<ol start{| class="16wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>After the expansion is completed, click '''CloseTo 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.''' to close</li></ol>
[[File:media'''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.'''</image101.pngbig>|399x172px]]}
<ol start{| class="17wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>Then '''If you can pull out the TF card, insert it into the development board and start want to modify it up. After entering in the Linux Windows system of the development board, if you can see use the software Paragon ExtFS for Windows. Since this software needs to be paid, and there is no similar free software that the size of the rootfs partition is the same as the size set beforeeasy to use, I will not demonstrate it means manual Expansion succeeded</li></ol>here.'''
root@orangepi:~# '''df -hIn addition, if you have any problems with Paragon ExtFS for Windows software, please solve it yourself, we will not answer questions.'''</big>|}
Filesystem Size Used Avail Use<ol style="list-style-type: decimal;"><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 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 &quot;media&quot;'''</p><p>/dev/sdd1 &nbsp;&nbsp; 1.4G &nbsp;&nbsp; 1.2G &nbsp;&nbsp; 167M &nbsp;&nbsp; 88% Mounted '''<span style="color:#FF0000">/media/test/opi_root</span>'''</p><p>test@test:~$ '''ls /media/test/opi_root'''</p><p>bin &nbsp;&nbsp; boot &nbsp;&nbsp; dev &nbsp;&nbsp; etc &nbsp;&nbsp; home &nbsp;&nbsp; lib &nbsp;&nbsp; lost+found &nbsp;&nbsp; media &nbsp;&nbsp; mnt &nbsp;&nbsp; opt &nbsp;&nbsp; proc &nbsp;&nbsp; root &nbsp;&nbsp; run <br> sbin &nbsp;&nbsp; selinux &nbsp;&nbsp; srv &nbsp;&nbsp; sys &nbsp;&nbsp; tmp &nbsp;&nbsp; usr &nbsp;&nbsp; var</p>|}</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 onthe 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>{| 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>{| class="wikitable" style="width:800px;" udev 925M |-| <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><ol style="list-style-type: lower-alpha;"><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 925M 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 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 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 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 WIFI hotspot you want to connect to</p></li><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 static IP address of WIFI or Ethernet port</p></li><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, please set it according to your actual situation</p></li></ol></li><li><p>The following demonstrates several specific setting examples:</p><ol style="list-style-type: lower-alpha;"><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: none;"><li><p>a) Set '''FR_net_change_defaults''' to '''1'''</p></li><li><p>b) Set '''FR_net_wifi_enabled''' to '''1'''</p></li><li><p>c) Set '''FR_net_wifi_ssid''' to the name of the WIFI hotspot you want to connect to</p></li><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><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: none;"><li><p>a) Set '''FR_net_change_defaults''' to '''1'''</p></li><li><p>b) Set '''FR_net_wifi_enabled''' to '''1'''</p></li><li><p>c) Set '''FR_net_wifi_ssid''' to the name of the WIFI hotspot you want to connect to</p></li><li><p>d) Set '''FR_net_wifi_key''' to the password of the WIFI hotspot you want to connect to</p></li><li><p>e) Set '''FR_net_use_static''' to '''1'''</p></li><li><p>f) Set '''FR_net_static_ip''' to the desired IP address</p></li><li><p>g) Set '''FR_net_static_gateway''' to the corresponding gateway address</p></li></ol></li><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: none;"><li><p>a) Set '''FR_net_change_defaults''' to '''1'''</p></li><li><p>b) Set '''FR_net_ethernet_enabled''' to '''1'''</p></li><li><p>c) Set '''FR_net_use_static''' to '''1'''</p></li><li><p>d) Set '''FR_net_static_ip''' to the desired IP address</p></li><li><p>e) Set '''FR_net_static_gateway''' to the corresponding gateway address</p></li></ol></li></devol></li>tmpfs 199M 3<li><p>After modifying the orangepi_first_run.2M 196M 2% 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</runp>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''/dev/mmcblk0p1 7After 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.7G 3txt configuration file will be reset, and then the Linux system of the development board will be restarted, orangepi_first_run.2G 4The 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.4G 42% /'''</big>|}</li></ol><span id="ssh-remote-login-development-board"></span>
<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 TF card =SSH remote login development board ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''After configuring Linux systems enable ssh remote login by default and allow the application program or other development environment root user to log in to the Linux system of the TF card. Before logging in with ssh, if you want first need to back up ensure that the Linux system in the TF cardEthernet or wifi network is connected, you can and then use the method in this section ip addr command or check the router to reduce obtain the size IP address of the rootfs partition first, and then start the backupdevelopment board.'''</big>|}
# First insert the TF card you want to operate in the '''Ubuntu computer''' (Windows not available)<span id="ssh-remote-login-development-board-under-ubuntu"></span># Then install the gparted software on the === SSH remote login development board under Ubuntu computer===
test@test:~$ '''sudo apt install -y gparted'''# Obtain the IP address of the development board# Then you can remotely log in to the linux system through the ssh command
<ol start::{| class="3wikitable" style="list-style-typewidth: decimal800px;"><li>Then opengparted</li></ol>|-| test@test:~$ '''ssh [mailto:root@192.168.1.36 orangepi@192.168.1.]xxx''' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Need to be replaced with the IP address of the development board)
testorangepi@test192.168.1.xx's password:~$ '''sudo gparted'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Enter the password here, the default password is orangepi)|}
<ol start::{| class="4wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>After opening gparted, you can select the TF card in '''Note that when entering the upper right cornerpassword, and then you can see <span style="color:#FF0000">the usage specific content of the TF card capacityentered password will not be displayed on the screen</li></olspan>, please do not think that there is any fault, just press Enter after inputting.'''
[[File'''If you are prompted to refuse the connection, as long as you are using the image provided by Orange Pi, <span style="color:media#FF0000">please do not suspect that the password orangepi is wrong</image102span>, but find other reasons.png'''</big>|575x217px]]}
<ol start="53" style="list-style-type: decimal;"><li>Then select <p>After successfully logging in to the system, the display is as shown in the rootfs partition (figure below</devp><p>[[File:zero3-img141.png]]</sdc1)p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| </libig><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:'''</olp>
[[Fileroot@orangepi:media/image103~# '''reset_ssh.png|575x217px]]sh'''
<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 TF card has been mountedit still doesn't work, first you need try to Umount reset the rootfs partition of the TF cardsystem.'''</big>|}</li></ol>
[[File:media<span id="ssh-remote-login-development-board-under-windows"></image104.png|400x274px]]span>
<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></ol>= SSH remote login development board under Windows ===
[[File<ol style="list-style-type:mediadecimal;"><li><p>First obtain the IP address of the development board</image105.png|399x273px]]p></li><li><p>Under Windows, you can use MobaXterm to remotely log in to the development board, first create a new ssh session</p><ol style="list-style-type: lower-alpha;"><li><p>Open '''Session'''</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 '''Remote host'''</p></li><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><div class="figure">
<ol start="8" style="list[[File:zero3-style-type: decimal;"><li>After the'''Resize/Move''' option is turned on, the following setting interface will pop up</li></ol>img142.png]]
[[File</div></li></ol></li><li><p>Then you will be prompted to enter a password. The default passwords for root and orangepi users are orangepi</p>{| class="wikitable" style="background-color:media#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</image106span>, please do not think that there is any fault, just press Enter after inputting.png'''</p></big>|315x188px]]}<div class="figure">
<ol start="9" style="list[[File:zero3-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 sieze(MiB)'''</li></ol>img143.png]]
</div></li><li><p>The display after successfully logging in to the system is shown in the figure below</p><p>[[File:media/image97zero3-img144.png|318x190px]]</p></li></ol>
<ol startspan id="10" style="listhdmi-style-type: decimal;test"><li>After setting the capacity, click'''Resize/Move''' in the lower right corner</li></olspan>
[[File:media/image98.png|327x196px]]== HDMI test ==
<ol startspan id="11" style="listhdmi-styledisplay-type: decimal;test"><li>After confirming that it is correct, click the green button shown in the figure below'''√'''</li></olspan>=== HDMI display test ===
<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><p>[[File:media/image99zero3-img13.png|392x270px]]</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>
<ol start{| class="12wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>Then select '''Apply'''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 expansion HDMI output of other devices cannot be displayed on the rootfs partition will officially start</li></ol>notebook screen.'''
[[File:media'''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.'''</image100.pngbig>|365x106px]]}
<ol start{| class="13wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>'''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 expansion connection, you can change a different screen and try to see if it is completed, click displayed.'''Close''' to close</big>|}</li></ol><span id="hdmi-to-vga-display-test"></span>
[[File:media/image101.png|379x164px]]=== HDMI to VGA display test ===
<ol startstyle="14list-style-type: decimal;" ><li><p>First you need to prepare the following accessories</p><ol style="list-style-type: decimallower-alpha;"><li>Then you can pull out the TF card<p>HDMI to VGA converter</p><p>[[File:zero3-img145.png]]</p></li><li><p>A VGA cable and a Micro HDMI male to HDMI female conversion cable</p><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><li><p>HDMI to VGA display test as shown below</p><p>[[File:zero3-img148.png]]</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''When using HDMI to VGA display, insert it into the development board and start it up. After entering the Linux system of the development boarddo not need to make any settings, if you can use only the '''df -h''' command to see that the size Micro HDMI interface of the rootfs partition development board can display normally. So if there is a problem with the same as test, please check whether there is a problem with the size set beforeHDMI to VGA converter, it means that the size has been reducedVGA cable and monitor. capacity success'''</p></big>|}</li></ol>
root@orangepi:~# '''df <span id="how-h'''to-set-hdmi-resolution-in-linux5.4-system"></span>
Filesystem Size Used Avail Use% Mounted on=== How to set HDMI resolution in Linux5.4 system ===
udev 925M 0 925M 0% /dev{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-tmpfs 199M 3.2M 196M 2% /run| <big>'''/dev/mmcblk0p1 7.7G 3Note: This method is only applicable to systems with linux5.2G 4kernel.4G 42% /''' <span id="network-connection-test"></spanbig>== Network connection test == <span id="ethernet-port-test"></span>=== Ethernet port test ===|}
<ol style="list-style-type: decimal;">
<li><p>First, insert one end There is a disp_mode variable in '''/boot/orangepiEnv.txt''' of the network cable into linux system, which can be used to set the Ethernet interface resolution of the development board, and connect the other end HDMI output. The default resolution of the network cable to the router, and ensure that the network linux system is unblocked1080p60</p></li>{| class="wikitable" style="width:800px;" |-| <lip>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p>After the system starts, it will automatically assign an IP address to the Ethernet card through DHCP, without any other configuration</p>verbosity=1</lip><li><p>The command to view the IP address in the Linux system of the development board is as follows:console=both</p><p>disp_mode='''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.<span style="color:#FF0000">1080p60</span>'''</p><p>fb0_width=1920</p><p>fb0_height=1080</p>|}</li><li><p>The values supported by the disp_mode variable are shown in the table below</olp>
orangepi@orangepi{| class="wikitable" style="width:800px;"|-| style="text-align: center;"| '''Supported values for disp_mode'''| style="text-align: center;"| '''HDMI resolution'''| style="text-align: center;"| '''HDMI refresh rate'''|-| style="text-align: center;"| '''480i'''| style="text-align: center;"| '''720x480'''| style="text-align: center;"| '''60'''|-| style="text-align: center;"| '''576i'''| style="text-align: center;"| '''720x480'''| style="text-align: center;"| '''50'''|-| style="text-align: center;"| '''480p'''| style="text-align: center;"| '''720x480'''| style="text-align: center;"| '''60'''|-| style="text-align: center;"| '''576p'''| style="text-align: center;"| '''720x576'''| style="text-align: center;"| '''60'''|-| style="text-align: center;"| '''720p50'''| style="text-align: center;"| '''1280x720'''| style="text-align: center;"| '''50'''|-| style="text-align: center;"| '''720p60'''| style="text-align: center;"| '''1280x720'''| style="text-align: center;"| '''60'''|-| style="text-align: center;"| '''1080i50'''| style="text-align: center;"| '''1920x1080'''| style="text-align:~$ center;"| '''ip a s eth050'''|-3| style="text-align: eth0center;"| '''1080i60'''| style="text-align: &ltcenter;BROADCAST,MULTICAST,UP,LOWER_UP&gt"| '''1920x1080'''| style="text-align: center; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000"| '''60'''|-link/ether 5e| style="text-align:accenter;"| '''1080p24'''| style="text-align:14center;"| '''1920x1080'''| style="text-align:a5center;"| '''24'''|-| style="text-align:93center;"| '''1080p50'''| style="text-align:b3 brd ffcenter;"| '''1920x1080'''| style="text-align: center;"| '''50'''|-| style="text-align:ffcenter;"| '''1080p60'''| style="text-align:ffcenter;"| '''1920x1080'''| style="text-align:ffcenter;"| '''60'''|}{| class="wikitable" style="background-color:ff#ffffdc;width:ff800px;" |-inet | <big>'''192Note: Linux systems currently do not support 4K resolution.168'''</big>|}</li></ol><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>The method of viewing the HDMI output resolution is as follows.1If the displayed resolution is the same as the set resolution, it means that the setting of the development board is correct.16</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo cat /sys/class/disp/disp/attr/24 brd 192sys'''</p>|}<p>[[File:zero3-img149.168.1.255 scope global dynamic noprefixroute eth0png]]</p></li></ol>
valid_lft 259174sec preferred_lft 259174sec<span id="how-to-modify-the-framebuffer-width-and-height-of-linux5.4-system"></span>
inet6 240e:3b7:3240:c3a0:e269:8305:dc08:135e/64 scope global dynamic noprefixroute=== How to Modify the Framebuffer Width and Height of Linux5.4 System ===
valid_lft 259176sec preferred_lft 172776sec{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note: This method is only applicable to systems with linux5.4 kernel.'''</big>|}
inet6 fe80::957d:bbbd:4928:3604There are two variables fb0_width and fb0_height in the '''/64 scope link noprefixrouteboot/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.
valid_lft forever preferred_lft forever{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
'''There are three ways to check the IP address after the development board starts:'''verbosity=1
# '''Connect the HDMI monitor, then log in to the system and use the ip a s eth0 command to view the IP address'''# '''Enter the ip a s eth0 command in the debugging serial terminal to view the IP address'''# '''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:'''console=both
<!-- --><ol styledisp_mode="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>'''Check whether the network cable is plugged in tightly, or try another network cable;'''</p></li><li><p>'''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);'''</p></li><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>1080p60
'''In addition, it should be noted that the development board DHCP automatically assigns an IP address without any settings.<span style="color:#FF0000">fb0_width=1920</span>'''
'''<ol start="4" span style="list-style-typecolor: decimal;#FF0000">fb0_height=1080<li/span><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></li></ol>|}
orangepi@orangepi:~$ The '''ping www.baidu.com -I eth0reference'''values corresponding to different resolutions of fb0_width and fb0_height are as follows:
PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0{| class="wikitable" style="width: 56(84) bytes of data.800px;"|-| style="text-align: center;"| '''HDMI resolution'''| style="text-align: center;"| '''fb0_width'''| style="text-align: center;"| '''fb0_height'''|-| style="text-align: center;"| '''480p'''| style="text-align: center;"| '''720'''| style="text-align: center;"| '''480'''|-| style="text-align: center;"| '''576p'''| style="text-align: center;"| '''720'''| style="text-align: center;"| '''576'''|-| style="text-align: center;"| '''720p'''| style="text-align: center;"| '''1280'''| style="text-align: center;"| '''720'''|-| style="text-align: center;"| '''1080p'''| style="text-align: center;"| '''1920'''| style="text-align: center;"| '''1080'''|}
64 bytes from 14Under 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.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<span id=2 ttl=56 time=6.80 ms"framebuffer-cursor-setting"></span>
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 msFramebuffer Cursor Setting ===
64 bytes from 14<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>{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~# '''echo <span style="color:#FF0000">1</span> &gt; /sys/class/graphics/fbcon/cursor_blink &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #cursor blinking'''</p><p>root@orangepi:~# '''echo <span style="color:#FF0000">0</span> &gt; /sys/class/graphics/fbcon/cursor_blink &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #cursor not blinking'''</p>|}</li><li><p>If you need to hide the cursor, you can add '''vt.215global_cursor_default=0''' in the '''extraargs''' variable of '''/boot/orangepiEnv.177.38 txt''' (the value of extraargs will be assigned to the '''bootargs''' environment variable and finally passed to the kernel) (14if '''vt.215.177.38global_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: icmp_seq~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>verbosity=1</p><p>console=both</p><p>disp_mode=4 ttl1080p60</p><p>fb0_width=56 time1920</p><p>fb0_height=71080</p><p>'''<span style="color:#FF0000">extraargs=vt.27 msglobal_cursor_default=0</span>'''</p>|}</li></ol>
^C<span id="how-to-use-bluetooth"></span>
--- www.a.shifen.com ping statistics ---== How to use Bluetooth ==
4 packets transmitted, 4 received, 0% packet loss, time 3002ms<span id="test-method-of-desktop-image-1"></span>=== Test method of desktop image ===
rtt min<ol style="list-style-type: decimal;"><li><p>Click the Bluetooth icon in the upper right corner of the desktop</avgp><p>[[File:zero3-img150.png]]</maxp></mdev = 6li><li><p>Then select the adapter</p><p>[[File:zero3-img151.png]]</p></li><li><p>If there is a prompt on the following interface, please select '''Yes'''</p><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><p>[[File:zero3-img153.png]]</p></li><li><p>Then open the configuration interface of the Bluetooth device</p><p>[[File:zero3-img154.png]]</p></li><li><p>Click '''Search''' to start scanning the surrounding Bluetooth devices</p><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><p>[[File:zero3-img156.260png]]</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</6p><p>[[File:zero3-img157.770png]]</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</7p><p>[[File:zero3-img158.275png]]</p></li><li><p>The interface for sending pictures is as follows</0p><p>[[File:zero3-img159.373 mspng]]</p></li></ol>
<span id="wifihow-connectionto-use-test"></span>=== 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.''' <span id="the-server-image-connects-to-wifi-through-commands"></span>==== The How to use 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.'''
<ol style="list-style-type: decimal;">
<li><p>First log in to After entering the linux system, you can first check whether there are is a Bluetooth device node through the following three ways'''hciconfig''' command. If it exists, it means that the Bluetooth initialization is normal.</p><ol {| class="wikitable" style="listwidth:800px;" |-style-type| <p>orangepi@orangepi: lower~$ '''sudo apt update &amp;&amp; sudo apt install -alpha;"y bluez'''</p><lip>If the development board is connected with a network cable, orangepi@orangepi:~$ '''you can remotely log in to the Linux system through sshhciconfig -a'''</lip><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>UP RUNNING</p>:<p>RX bytes:925 acl:0 sco:0 events:72 errors:0</olp>:<p>TX bytes:5498 acl:0 sco:0 commands:72 errors:0</p>:<!-- --p>Features: 0xbf 0xff 0x8d 0xfe 0xdb 0x3d 0x7b 0xc7</p>:<ol style="list-style-p>Packet type: lower-alpha;"DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3</p>:<p>Link policy: RSWITCH SNIFF<li/p>:<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 systemLink mode: SLAVE ACCEPT</p>:<p>Name: 'orangepi'</lip>:<lip>Class: 0x3c0000</p>:<p>If the development board is connected to the HDMI displayService Classes: Rendering, Capturing, Object Transfer, you can log in to the linux system through the terminal displayed on the HDMIAudio</p>:<p>Device Class: Miscellaneous,</lip>:<p>HCI Version: 5.0 (0x9) Revision: 0x400</olp>:<p>LMP Version: 5.0 (0x9) Subversion: 0x400</lip>:<p>Manufacturer: Spreadtrum Communications Shanghai Ltd (492)</olp>|}<!-- --/li># First use the <li><p>Use '''nmcli dev wifibluetoothctl'''command to scan the surrounding WIFI hotspotsbluetooth devices</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''nmcli dev wifisudo bluetoothctl'''</p><div class="figure"p> [NEW] Controller 10:11:12:13:14:15 orangepizero3 [File:media/image107.png|575x250px|选区_011default]] </divp><ol start="2" style="list-style-type: decimal;"p>Agent registered<li/p><p>Then use the [bluetooth]# '''nmclipower on #enable controller''' command to connect to the scanned WIFI hotspot, where:</p><ol style="list-style-type: lower-alpha;"p>Changing power on succeeded<li/p><p>[bluetooth]# '''wifi_namediscoverable on #Make the controller discoverable''' Need to replace it with the name of the WIFI hotspot you want to connect to</p><p>Changing discoverable on succeeded</lip><lip>[CHG] Controller 10:11:12:13:14:15 Discoverable: yes</p><p>[bluetooth]# '''wifi_passwdpairable on #Set the controller as pairable'''Need to change to the password of the WIFI hotspot you want to connect to</p><p>Changing pairable on succeeded</lip><p>[bluetooth]# '''scan on #Start scanning for nearby Bluetooth devices'''</olp><p>Discovery started</lip><p>[CHG] Controller 10:11:12:13:14:15 Discovering: yes</olp><p>[NEW] Device 76:60:79:29:B9:31 76-60-79-29-B9-31</p>orangepi@orangepi<p>[NEW] Device 9C:2E:A1:42:71:~$ 11 MiPhone</p><p>'''sudo nmcli dev wifi connect wifi_name password wifi_passwd[NEW] Device DC:72:9B:4C:F4:CF orangepi'''</p> Device <p>[bluetooth]# ''wlan0' successfully activated with 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''cf937f88-ca1e-4411-bb50-61f402eef293'.</p><p>Discovery stopped</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>|}<ol start/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>{| class="3wikitable" style="list-style-typewidth: decimal800px;">|-| <lip>You can view [bluetooth]# '''pair DC:72:9B:4C:F4:CF''' '''#Use the IP MAC address of wifi through the scanned Bluetooth device for pairing'''ip addr show wlan0''' command</lip><p>Attempting to pair with DC:72:9B:4C:F4:CF</p><p>[CHG] Device DC:72:9B:4C:F4:CF Connected: yes</olp><p>Request confirmation</p>orangepi@orangepi<p>[leeb1m[agent] Confirm passkey 764475 (yes/no):~$ '''ip a s wlan0yes''' '''#Enter yes here, and you need to confirm on the mobile phone'''</p><p>[CHG] Device DC:72:9B:4C:F4:CF Modalias: bluetooth:v010Fp107Ed1436</p>11<p>[CHG] Device DC:72:9B:4C:F4: wlan0CF UUIDs: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 0000046a-0000-1000-8000-00805f9b34fb</p> link/ether 23<p>[CHG] Device DC:72:9B:8c4C:d6F4:aeCF ServicesResolved:76yes</p><p>[CHG] Device DC:bb brd ff72:ff9B:ff4C:ffF4:ffCF Paired:ffyes</p> inet <p>'''192.168.1.11Pairing successful #Prompt that the pairing is successful'''</24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0p> valid_lft 259192sec preferred_lft 259192sec inet6 240e<p>[CHG] Device DC:3b772:32409B:c3a04C:c401F4:a445CF ServicesResolved:5002:ccddno</64 scope global dynamic noprefixroutep> valid_lft 259192sec preferred_lft 172792sec inet6 fe80<p>[CHG] Device DC:72:9B:42f14C:6019F4:a80eCF Connected:4c31no</64 scope link noprefixroutep>|}valid_lft forever preferred_lft forever</li><li><p>After the pairing is successful, the Bluetooth interface of the mobile phone will be displayed as follows</p><ol 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 startthe '''pulseaudio''' service</p>{| class="4wikitable" style="list-style-typewidth: decimal800px;"|-| <p>orangepi@orangepi:~$ '''sudo apt update'''</p><lip>Use the orangepi@orangepi:~$ '''pingsudo''' command to test the connectivity of the wifi network, and the '''pingapt -y install pulseaudio-module-bluetooth''' command can be interrupted through the shortcut key </p><p>orangepi@orangepi:~$ '''Ctrl+pulseaudio --start'''</p>|}</li><li><p>How to connect to a Bluetooth device</olp>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''ping www.sudo bluetoothctl'''</p><p>Agent registered</p><p>[bluetooth]# '''paired-devices #View the MAC address of the paired Bluetooth device'''</p><p>Device DC:72:9B:4C:F4:CF orangepi</p><p>[bluetooth]# '''connect DC:72:9B:4C:F4:CF #Connect to bluetooth device using MAC address'''</p><p>Attempting to connect to DC:72:9B:4C:F4:CF</p><p>[CHG] Device DC:72:9B:4C:F4:CF Connected: yes</p><p>Connection successful</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>'''[orangepi.org -I wlan0]# #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><div class="figure">
PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0[[File: 56(84) bytes of datazero3-img161.png]]
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms</div></li></ol>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq<span id=2 ttl=52 time=41.3 ms"usb-interface-test"></span>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 timeUSB interface test ==44.9 ms
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq{| class=4 ttl"wikitable" style=52 time=45"background-color:#ffffdc;width:800px;" |-| <big>'''The USB interface can be connected to a USB hub to expand the number of USB interfaces.6 ms'''</big>|}
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq<span id="connect-usb-mouse-or-keyboard-to-test"></span>=== Connect USB mouse or keyboard to test =5 ttl=52 time=48.8 ms
^C# 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)
<span id="connect-usb-storage- www.orangepi.org ping statistics --device-test"></span>=== Connect USB storage device test ===
5 packets transmitted# First insert the U disk or USB mobile hard disk into the USB interface of the Orange Pi development board# Execute the following command, 5 receivedif you can see the output of sdX, 0% packet loss, time 4006msit means that the U disk is recognized successfully
rtt min::{| class="wikitable" style="width:800px;"|-|orangepi@orangepi:~$ '''cat /proc/avgpartitions | grep &quot;sd*&quot;'''<br><span style="margin-right: 30px;">major </maxspan><span style="margin-right: 40px;">minor </mdev span><span style= 41.321"margin-right: 30px;">#blocks</44.864span><span style="margin-right: 50px;">name</48.834span><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><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'''</2.484 msspan><br>|}
<span idol start="the3" style="list-serverstyle-image-connects-to-wifi-in-a-graphical-waytype: decimal;"></spanli>==== The server image connects Use the mount command to mount the U disk to WIFI '''/mnt''', and then you can view the files in a graphical way ====the U disk</li>
<ol style{| class="list-style-type: decimal;wikitable"><li><p>First log in to the linux system, there are the following three ways</p><ol style="list-style-typewidth: lower-alpha800px;"><li><p>If the development board is connected with a network cable'|-| orangepi@orangepi:~$ '', you can remotely log in to the Linux system through ssh'''<sudo mount /p><dev/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)<sda1 /p><mnt/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><li><p>Then enter the nmtui command in the command line to open the wifi connection interface</p></li></ol>'''
orangepi@orangepi:~$ '''sudo nmtuils /mnt/''' <ol start="3" style="list-style-type: decimal;"><li>Enter the nmtui command to open the interface as shown below</li></ol> [[File:media/image108.png|345x215px]]
test.txt
|}
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>Select After mounting, you can view the capacity usage and mount point of the U disk through the '''Activate a connectdf -h''' and press Entercommand</li></ol>
[[File{| class="wikitable" style="width:800px;" |-|orangepi@orangepi:media/image109.png~$ '''df -h |349x216px]]grep &quot;sd&quot;'''
/dev/sda1 &nbsp;&nbsp;&nbsp; 29G &nbsp;&nbsp; 208K &nbsp;&nbsp; 29G &nbsp;&nbsp; 1% /mnt|}</ol start><span id="5" style="listusb-ethernet-stylecard-type: decimal;test"><li>Then you can see all the searched WIFI hotspots</li></olspan>
<div class="figure">== USB Ethernet card test ===
[[File:media/image110# The usable USB Ethernet cards that '''have been tested''' so far are as follows.jpeg|426x270px|16]]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
</div>::{| class="wikitable" style="width:800px;"|-| style="text-align: center;"| serial number| style="text-align: center;"| model|-| style="text-align: center;"| 1<ol start| style="6text-align: center;" | RTL8152B USB 100M network card|-| style="listtext-align: center;"| 2| style="text-typealign: decimalcenter;">| RTL8153 USB Gigabit LAN<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></ol>|}
<div 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>{| class="figurewikitable"style="width:800px;" |-| <p>orangepi@orangepi:~$ '''dmesg | tail'''</p><p>[ 121.985016] usb 3-1: USB disconnect, device number 2</p><p>[ 126.873772] sunxi-ehci 5311000.ehci3-controller: ehci_irq: highspeed device connect</p><p>[ 127.094054] usb 3-1: new high-speed USB device number 3 using sunxi-ehci</p><p>[ 127.357472] usb 3-1: reset high-speed USB device number 3 using sunxi-ehci</p><p>[ 127.557960] r8152 3-1:1.0 eth1: v1.08.9</p><p>[ 127.602642] r8152 3-1:1.0 enx00e04c362017: renamed from eth1</p><p>[ 127.731874] IPv6: ADDRCONF(NETDEV_UP): enx00e04c362017: link is not ready</p><p>[127.763031] IPv6: ADDRCONF(NETDEV_UP): enx00e04c362017: link is not ready</p><p>[File129.892465] r8152 3-1:media1.0 enx00e04c362017: carrier on</image111p><p>[ 129.jpeg892583] 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>{| class="wikitable" style="width:800px;" |474x298px-|<p>orangepi@orangepi:~$ '''sudo ifconfig'''</p><p>'''enx00e04c362017''': flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500</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&lt;link&gt;</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 errors 0 dropped 125 overruns 0 frame 0</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><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>PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data.</p><p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=56 time=6.74 ms</p><p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=56 time=6.80 ms</p><p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 ms</p><p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=56 time=7.27 ms</p><p>^C</p><p>--- www.a.shifen.com ping statistics ---</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>
</div><ol startspan id="7" style="listusb-stylecamera-type: decimal;test"><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></olspan>
<div class="figure">== USB camera test ===
[[File:media/image112.jpeg|480x308px|18]] </div><ol start="8" style="list-style-type: decimal;"><li>After <p>First insert the USB camera into the WIFI connection is successful, a &quot;*&quot; will be displayed in front USB port of the connected WIFI nameOrange Pi development board</p></li><li><p>Then through the lsmod command, you can see that the kernel has automatically loaded the following modules</olp<div {| class="figurewikitable">style="width:800px;" |-|[[File<p>orangepi@orangepi:media~$ '''lsmod'''</image113.jpeg|443x283px|19]]p><span style="margin-right: 100px;">Module </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 45px;">Used by</divspan><br><ol startspan style="9margin-right: 80px;" >uvcvideo </span><span style="listmargin-right: 70px;">106496 </span><span style="margin-typeright: decimal60px;">0</span><br>|}</li>You <li><p>Through the v4l2-ctl command, you can view see that the IP address device node information of wifi through the USB camera is /dev/video0</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''ip a s wlan0sudo apt update''' command</lip><p>orangepi@orangepi:~$ '''sudo''' '''apt install -y v4l-utils'''</olp<p>orangepi@orangepi:~$ '''ip a s wlan0v4l2-ctl --list-devices'''</p><p>USB 2.0 Camera (usb-sunxi-ehci-1):</p>11: wlan0<p>/dev/video0</p>|}{| class="wikitable" style="background-color: &lt#ffffdc;BROADCASTwidth:800px;" |-| <big><p>'''Note that the l in v4l2 is a lowercase letter l,MULTICASTnot the number 1.'''</p><p>'''In addition,UPthe serial number of the video is not necessarily video0,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000please refer to what you actually see.'''</p></big>|}</li>link<li><p>Use fswebcam to test the USB camera</ether 24p><ol style="list-style-type:8clower-alpha;"><li><p>Install fswebcam</p>{| class="wikitable" style="width:d3800px;" |-| <p>orangepi@orangepi:aa~$ '''sudo''' '''apt update'''</p><p>orangepi@orangepi:76~$ '''sudo apt-get install -y fswebcam'''</p>|}</li><li><p>After installing fswebcam, you can use the following command to take pictures</p><ol style="list-style-type:bb brd ffnone;"><li><p>a) -d option is used to specify the device node of the USB camera</p></li><li><p>b) --no-banner is used to remove the watermark of the photo</p></li><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:ff800px;" |-| <p>orangepi@orangepi:ff~$ '''sudo''' '''fswebcam -d /dev/video0 \'''</p><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:ff:ff:ff800px;" |-| inet <p>orangepi@orangepi:~$ '''scp image.jpg [mailto:test@192.168.1.11'''55:/home/24 brd test test@192.168.1.255 scope global dynamic noprefixroute wlan055:/home/test] (Modify the IP address and path according to the actual situation)'''</p>|}valid_lft 259069sec preferred_lft 259069sec</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><li><p>Use mjpg-streamer to test USB camera</p>inet6 240e<ol style="list-style-type:3b7lower-alpha;"><li><p>Download mjpg-streamer</p><ol style="list-style-type:3240none;"><li><p>a) Github download address:c4a0</p>{| class="wikitable" style="width:c401800px;" |-| <p>orangepi@orangepi:a445~$ '''git clone https:5002//github.com/jacksonliam/mjpg-streamer'''</p>|}</li><li><p>b) The image download address of Gitee is:ccdd</64 scope global dynamic noprefixroutep>{| class="wikitable" style="width:800px;" valid_lft 259071sec preferred_lft 172671sec|-| inet6 fe80<p>orangepi@orangepi:~$ '''git clone https:42f1:6019:a80e:4c31/64 scope link noprefixroute/gitee.com/leeboby/mjpg-streamer'''</p>|}</li></ol>valid_lft forever preferred_lft forever</li><li><p>Install dependent packages</p><ol start="10" style="list-style-type: decimalnone;"><li>Use the <p>a) Ubuntu system</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''pingsudo apt-get install -y cmake libjpeg8-dev''' command to test the connectivity of the wifi network, and the </p>|}</li><li><p>b) Debian system</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''pingsudo apt-get install -y cmake libjpeg62-turbo-dev''' command can be interrupted through the shortcut key </p>|}</li></ol></li><li><p>Compile and install mjpg-streamer</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''Ctrl+Ccd mjpg-streamer/mjpg-streamer-experimental'''</lip><p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''make -j4'''</olp<p>orangepi@orangepi:~/mjpg-streamer/mjpg-streamer-experimental$ '''ping www.orangepi.org -I wlan0sudo make install'''</p>|}PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0</li><li><p>Then enter the following command to start mjpg_streamer</p>{| class="wikitable" style="background-color:#ffffdc;width: 56(84) bytes 800px;" |-| <big><p>'''Note that the serial number of datathe video is not necessarily video0, please refer to what you actually see.'''</p></big>|}
64 bytes from 182{| 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$ '''sudo .92/mjpg_streamer -i &quot;.236/input_uvc.130 (182so -d \'''</p><p>'''/dev/video0 -u -f 30&quot; -o &quot;.92/output_http.236so -w .130)/www&quot;'''</p>|}</li><li><p>Then enter '''[the IP address of the development board: icmp_seq8080]''' 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=1 ttl=52 time=43.5 ms"figure">
64 bytes from 182.92.236.130 (182.92.236.130)[[File: icmp_seq=2 ttl=52 time=41zero3-img162.3 mspng]]
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms</div></li></ol></li></ol>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq<span id=4 ttl=52 time=45.6 ms"audio-test"></span>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 timeAudio Test ==48.8 ms
^C<span id="how-to-play-audio-using-the-command-line"></span>=== How to play audio using the command line ===
<span id="headphone-jack-playback- www.orangepi.org ping statistics --audio-test"></span>==== Headphone jack playback audio test ====
5 packets transmitted<ol style="list-style-type: decimal;"><li><p>First, 5 receivedyou need to insert the 13pin expansion board into the 13pin interface of the Orange Pi development board, 0% packet loss, time 4006msand then insert the earphone into the audio interface</p><div class="figure">
rtt min/avg/max/mdev = 41[[File:zero3-img163.321/44.864/48.834/2.484 mspng]]
<span id/div></li><li><p>Through the '''aplay -l''' command, you can view the sound card devices supported by the Linux system</p><ol style="testlist-method-ofstyle-desktoptype: lower-imagealpha;"><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</spanp>{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~# '''aplay -l'''</p><p>**** List of PLAYBACK Hardware Devices ****</p><p>'''card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sun50iw9-codec-0 []'''</p>:<p>'''Subdevices: 1/1'''</p>:<p>'''Subdevice #0: subdevice #0'''</p>|}</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= Test method "width:800px;" |-| <p>root@orangepi:~# '''aplay -l'''</p><p>**** List of desktop image PLAYBACK Hardware Devices ****</p><p>'''card 0: audiocodec [audiocodec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]'''</p>:<p>'''Subdevices: 1/1'''</p>:<p>'''Subdevice #0: subdevice #0'''</p>|}</li></ol></li><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>Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo</p>|}{| 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>
# Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI)<span id="hdmi-audio-playback-test"></span>
[[File:media/image114.png|275x121px]]==== HDMI audio playback test ====
<ol start="2" style="list-style-type: decimal;"><li>Click '''More networks''' in <p>First use the pop-up drop-down box Micro HDMI to HDMI cable to see all scanned WIFI hotspots, and then select connect the WIFI hotspot you want Orange Pi development board to connect the TV (other HDMI monitors need toensure 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</olp>{| class="wikitable" style="width:800px;" |-[[File| <p>root@orangepi:~# '''aplay -D hw:media2,0 /image115usr/share/sounds/alsa/audio.pngwav'''</p>|576x353px]]}</li></ol>
<ol startspan id="3" style="listtesting-audio-methods-on-styledesktop-type: decimal;systems"><li>Then enter the password of the WIFI hotspot, and then click '''Connect'''to start connecting to WIFI</li></olspan>
[[File:media/image116.png|288x147px]]=== Testing audio methods on desktop systems ===
<ol start="4" style="list-style-type: decimal;"><li>After connecting to WIFI, you can <p>First open the browser to check whether you can access the Internetfile manager</p><p>[[File:zero3-img164. The entrance of png]]</p></li><li><p>Then find the browser following file (if there is shown no audio file in the figure belowsystem, you can upload an audio file to the system yourself)</lip></oldiv class="figure">
[[File:media/image117zero3-img165.png|465x249px]]
</div></li><li><p>Then select the audio.wav file, right click and select open with vlc to start playing</p><p>[[File:zero3-img166.png]]</p></li><li><p>How to switch between different audio devices such as HDMI playback and headphone playback</p><ol start="5" style="list-style-type: decimallower-alpha;"><li>If you can <p>First open other web pages after opening the browservolume control interface</p><p>[[File:zero3-img167.png]]</p></li><li><p>When playing audio, it means the audio device options that the WIFI connection is normalplayback software can use will be displayed in '''Playback''', as shown in the figure below, where you can set which audio device to play to</lip></oldiv class="figure">
[[File:media/image118zero3-img168.png|576x222px]]
<span id="the-method-of-creating-wifi-hotspot-through-create_ap"/div></spanli></ol>=== The method of creating WIFI hotspot through create_ap ===</li></ol>
'''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:'''<span id="infrared-receiving-test"></span>
[https://github.com/oblique/create_ap '''https://github.com/oblique/create_ap''']== Infrared receiving test ==
'''The Linux image released by OPi has pre<ol style="list-installed style-type: decimal;"><li><p>First, you need to insert the 13pin expansion board into the 13pin interface of the create_ap scriptOrange Pi development board. You After inserting the expansion board, the development board can create a WIFI hotspot through use the create_ap command. The basic command format of create_ap is as follows:'''infrared receiving function</p><div class="figure">
'''create_ap [options] &lt;wifi-interface&gt; [&lt;interface-with-internet&gt;] [&lt;access-pointFile:zero3-name&gt; [&lt;passphrase&gt;img163.png]]'''
'''* 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 </div></li><li><p>Install ir-h'''keytable infrared testing software</p></li>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo''' '''* wifi-interface:The name of the wireless network cardapt update'''
orangepi@orangepi:~$ '''* interface-with-internet:sudo''' '''The name of the network card that can be connected to the Internet, generally eth0apt-get install -y ir-keytable'''|}</ol><ol start="3" style="list-style-type: decimal;"><li><p>Then execute ir-keytable to view the information of the infrared device</p><ol style="list-style-type: lower-alpha;"><li>linux5.4 system output is as follows</li>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''* access-pointir-name: hotspot namekeytable'''
'''* passphrase:hotspot password'''Found /sys/class/rc/rc0/ (/dev/input/event1) with:
<span id="create_ap::Driver: sunxi-methodrc-to-create-wifi-hotspot-in-nat-mode"></span>==== create_ap method to create WIFI hotspot in NAT mode ====recv, table: rc_map_sunxi
<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><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p><:lirc device: /li><dev/ol>lirc0
orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt''':Supported protocols: lirc nec
<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></ol>:Enabled protocols: lirc nec
orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --no-virt''':Name: sunxi_ir_recv
Config dir: :bus: 25, vendor/tmp/create_ap.wlan0.conf.TQkJtsz1product: 0001:0001, version: 0x0100
PID: 26139:Repeat delay = 500 ms, repeat period = 125 ms|}</ol><ol start="2" style="list-style-type: lower-alpha;"><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>Found /sys/class/rc/rc0/ with:</p>:<p>Name: sunxi-ir</p>:<p>Driver: sunxi-ir</p>:<p>Default keymap: rc-empty</p>:<p>Input device: /dev/input/event5</p>:<p>LIRC device: /dev/lirc0</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>Enabled kernel protocols: lirc</p>:<p>bus: 25, vendor/product: 0001:0001, version: 0x0100</p>:<p>Repeat delay = 500 ms, repeat period = 125 ms</p>|}</li></ol></li></ol><!-- --><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, '''<span style="color:#FF0000">other remote controllers do not support it</span>'''</p><div class="figure">
Network Manager found, set wlan0 as unmanaged device[[File:zero3-img169... DONEpng]]
Sharing Internet using method</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><ol style="list-style-type: natlower-alpha;"><li>linux5.4 system output is as follows</li>
hostapd command{| class="wikitable" style="width:800px;" |-line interface| orangepi@orangepi: hostapd_cli ~$ '''sudo ir-keytable -p /tmp/create_ap.wlan0.conf.TQkJtsz1/hostapd_ctrlt'''
wlan0: interface state UNINITIALIZEDTesting events. Please, press CTRL-&gt;ENABLEDC to abort.
wlan01598339152.260376: AP-ENABLEDevent type EV_MSC(0x04): scancode = 0xfb0413
wlan0: STA ce:bd1598339152.260376:9a:dd:a5:86 IEEE 802event type EV_SYN(0x00).11: associated
wlan01598339152.914715: APevent type EV_MSC(0x04): scancode = 0xfb0410|}</ol><ol start="2" style="list-STAstyle-CONNECTED cetype:bdlower-alpha;"><li><p>linux6.1 system output is as follows</p>{| class="wikitable" style="width:9a800px;" |-| <p>orangepi@orangepi:dd:a5:86~$ '''sudo ir-keytable -c -p NEC -t'''</p><p>Old keytable cleared</p>wlan0: STA ce:bd:9a:dd:a5:86 RADIUS: starting accounting session D4FBF7E5C604F169<p>Protocols changed to nec</p><p>Testing events. Please, press CTRL-C to abort.</p>wlan0<p>202.063219: STA celirc protocol(nec):bdscancode = 0x45c</p><p>202.063249:9aevent type EV_MSC(0x04):dd:a5:86 WPAscancode = 0x45c</p><p>202.063249: pairwise key handshake completed event type EV_SYN(RSN0x00).</p>|}</li></ol></li></ol>wlan0: EAPOL<span id="temperature-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86sensor"></span>
<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></ol>Temperature sensor ==
[[File<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:media/image119.png|230x183px]]
<ol start{| class="4wikitable" 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: decimallower-alpha;"><li>After sensor0: CPU temperature sensor, the connection first command is successfulused to view the type of temperature sensor, and the display second command is as shown in used to view the value of the figure belowtemperature sensor</li></ol>
[[File{| class="wikitable" style="width:media800px;" |-| orangepi@orangepi:~$ '''cat /image120.png|233x111px]]sys/class/thermal/thermal_zone0/type'''
<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><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.cpu'''</p></li></ol>_thermal_zone
orangepi@orangepi:~$ '''sudo ifconfig eth0cat /sys/class/thermal/thermal_zone0/temp'''
eth0'''57734'''|}</ol><ol start="2" style="list-style-type: lower-alpha;"><li><p>sensor1: flagsDDR 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=4163&lt"width:800px;UP" |-| <p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/type'''</p><p>'''ddr'''_thermal_zone</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/temp'''</p><p>'''57410'''</p>|}</li><li><p>sensor2: GPU temperature sensor,BROADCASTthe 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>'''gpu'''_thermal_zone</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/temp'''</p><p>'''59273'''</p>|}</li><li><p>sensor3: VE temperature sensor,RUNNINGthe first command is used to view the type of temperature sensor,MULTICAST&gtand 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>'''ve'''_thermal_zone</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/temp'''</p><p>'''58949'''</p>|}</li></ol></ol><!-- --><ol start="2" style="list-style-type: decimal; mtu 1500"><li>The system with Linux6.1 kernel can also use the '''sensors''' command to view the current temperature of the system</li>
inet {| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''192.168.1.150sensors''' netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20&lt;link&gt;cpu_thermal-virtual-0
ether 4aAdapter:a0:c8:25:42:82 txqueuelen 1000 (Ethernet)Virtual device
RX packets 25370 bytes 2709590 temp1: +'''<span style="color:#FF0000">47.4°C</span>''' (2crit = +110.7 MB0°C)
RX errors 0 dropped 50 overruns 0 frame 0
TX packets 3798 bytes 1519493 (1.5 MB)gpu_thermal-virtual-0
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Adapter: Virtual device
device interrupt 83temp1: +'''<span style="color:#FF0000">48.7°C</span>''' (crit = +110.0°C)
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:media/image120.png|271x129px]]ddr_thermal-virtual-0
[[FileAdapter:media/image121.png|274x155px]]Virtual device
temp1: +'''<ol start="6" span style="list-style-typecolor: decimal;#FF0000"><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.247.18°C</li></olspan>''' (crit = +110.0°C)
'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''
orangepi@orangepi:~$ '''sudo create_ap ve_thermal-m nat wlan0 eth0 orangepi orangepi virtual-g 192.168.2.1 --no-virt'''0
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'''.Adapter: Virtual device
[[Filetemp1:media+'''<span style="color:#FF0000">47.2°C</image120span>''' (crit = +110.png0°C)|286x137px]]}</ol>
[[File:media<span id="pin-description-of-the-pin-expansion-board-interface"></image122.png|302x174px]]span>
<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><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></li></ol> orangepi@orangepi:~$ '''sudo create_ap -m nat wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt''' <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><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></li></ol> 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 13 Pin Description of the WIFI hotspot and enter the password to connect to the WIFI hotspot. [[File:media/image123.png|237x198px]] <span id="create_ap-method-to-create-wifi-hotspot-in-bridge-mode"></span>==== create_ap method to create WIFI hotspot in bridge mode ==Pin Expansion Board Interface ==
<ol style="list-style-type: decimal;">
<li><p>Enter Please refer to the figure below for the order of the interface pins of the 13 pin expansion board on the following command to create a WIFI hotspot named '''orangepi''' and password '''orangepi''' in bridge modedevelopment board</p><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></li></oldiv class="figure">
orangepi@orangepi[[File:~$ '''sudo create_ap zero3-m bridge wlan0 eth0 orangepi orangepi --no-virt'''img170.png]]
</div></li><li><p>The schematic diagram of the 13pin interface of the development board is as follows</p><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><ol startstyle="2list-style-type: lower-alpha;" ><li><p>When the 13pin pin is connected to the expansion board, it can be provided additionally</p><ol style="list-style-type: decimalnone;"><li>If <p>a) 2个USB 2.0 Host</p></li><li><p>b) Audio output of the left and right audio channels of the earphones</p></li><li><p>c) TV-OUT video output</p></li><li><p>d) Infrared receiving function</p></li><li><p>e) After the following information expansion board is outputconnected, pins 10, 11 and 12 of the 13pin interface cannot be used</p></li><li><p>f) '''In addition, it means should be noted that the WIFI hotspot is created successfullyMIC on the 13pin expansion board cannot be used on the Orange Pi Zero 3'''</p></li></ol></li><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>
orangepi@orangepi{| class="wikitable" style="width:~$ 800px;" |-| style="text-align: center;"| '''GPIO serial number'''| style="text-align: center;"| '''Function'''| style="text-align: center;"| '''Pin'''|-| style="text-align: center;"|| style="text-align: center;"| '''5V'''| style="text-align: center;"| '''1'''|-| style="text-align: center;"|| style="text-align: center;"| '''GND'''| style="text-align: center;"| '''2'''|-| style="text-align: center;"|| style="text-align: center;"| '''USB2-DM'''| style="text-align: center;"| '''3'sudo create_ap ''|-m bridge wlan0 eth0 orangepi orangepi | style="text-align: center;"|| style="text-align: center;"| '''USB2-noDP'''| style="text-virtalign: center;"| '''4'''|-| style="text-align: center;"|| style="text-align: center;"| '''USB3-DM'''| style="text-align: center;"| '''5'''|-| style="text-align: center;"|| style="text-align: center;"| '''USB3-DP'''| style="text-align: center;"| '''6'''|-| style="text-align: center;"|| style="text-align: center;"| '''LINEOUTR'''| style="text-align: center;"| '''7'''|-| style="text-align: center;"|| style="text-align: center;"| '''LINEOUTL'''| style="text-align: center;"| '''8'''|-| style="text-align: center;"|| style="text-align: center;"| '''TV-OUT'''| style="text-align: center;"| '''9'''|-| style="text-align: center;"| '''<span style="color:#FF0000">65</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">PC1</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">10</span>'''|-| style="text-align: center;"| '''<span style="color:#FF0000">272</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">PI16</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">11</span>'''|-| style="text-align: center;"| '''<span style="color:#FF0000">262</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">PI6</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">12</span>'''|-| style="text-align: center;"| '''<span style="color:#FF0000">234</span>'''| style="text-align: center;"| '''IR-RX/<span style="color:#FF0000">PH10</span>'''| style="text-align: center;"| '''<span style="color:#FF0000">13</span>'''|}</ol></li></ol><span id="pin-interface-pin-description"></span>
Config dir: /tmp/create_ap.wlan0.conf.zAcFlYTx== 26 Pin Interface Pin Description ==
PID<ol style="list-style-type: 27707decimal;"> Network Manager found<li><p>For the order of the 26-pin interface pins on the Orange Pi Zero 3 development board, set wlan0 as unmanaged device... DONEplease refer to the silkscreen diagram on the development board</p> Sharing Internet using method<p>[[File: bridge Create a bridge interface... br0 created. hostapd commandzero3-line interface: hostapd_cli img171-2.png]]</p ></tmp/create_ap.wlan0.conf.zAcFlYTx/hostapd_ctrlli> wlan0: <li><p>The functions of the 26 pin interface state UNINITIALIZED-&gt;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:86pins on the development board are shown in the table below</p>
<div style="display: flex;">
{| class="wikitable" style="width:380px;margin-right: 20px;"
|-
| style="text-align: center;"| '''GPIO S/N'''
| style="text-align: center;"| '''GPIO'''
| style="text-align: center;"| '''Function'''
| style="text-align: center;"| '''Pin'''
|-
| style="text-align: center;"|
| style="text-align: center;"|
| style="text-align: center;"| '''3.3V'''
| style="text-align: center;"| '''1'''
|-
| style="text-align: center;"| '''229'''
| style="text-align: center;"| '''PH5'''
| style="text-align: center;"| '''TWI3-SDA'''
| style="text-align: center;"| '''3'''
|-
| style="text-align: center;"| '''228'''
| style="text-align: center;"| '''PH4'''
| style="text-align: center;"| '''TWI3-SCK'''
| style="text-align: center;"| '''5'''
|-
| style="text-align: center;"| '''73'''
| style="text-align: center;"| '''PC9'''
| style="text-align: center;"| '''PC9'''
| 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: center;"| '''8'''
| style="text-align: center;"| '''UART5_TX'''
| style="text-align: center;"| '''PH2'''
| style="text-align: center;"| '''226'''
|-
| style="text-align: center;"| '''10'''
| style="text-align: center;"| '''UART5_RX'''
| style="text-align: center;"| '''PH3'''
| style="text-align: center;"| '''227'''
|-
| style="text-align: center;"| '''12'''
| style="text-align: center;"| '''PC11'''
| style="text-align: center;"| '''PC11'''
| style="text-align: center;"| '''75'''
|-
| style="text-align: center;"| '''14'''
| style="text-align: center;"| '''GND'''
| style="text-align: center;"|
| style="text-align: center;"|
|-
| style="text-align: center;"| '''16'''
| style="text-align: center;"| '''PC15'''
| style="text-align: center;"| '''PC15'''
| style="text-align: center;"| '''79'''
|-
| style="text-align: center;"| '''18'''
| style="text-align: center;"| '''PC14'''
| style="text-align: center;"| '''PC14'''
| style="text-align: center;"| '''78'''
|-
| style="text-align: center;"| '''20'''
| style="text-align: center;"| '''GND'''
| style="text-align: center;"|
| style="text-align: center;"|
|-
| style="text-align: center;"| '''22'''
| style="text-align: center;"| '''PC7'''
| style="text-align: center;"| '''PC7'''
| style="text-align: center;"| '''71'''
|-
| style="text-align: center;"| '''24'''
| style="text-align: center;"| '''SPI1_CS'''
| style="text-align: center;"| '''PH9'''
| style="text-align: center;"| '''233'''
|-
| style="text-align: center;"| '''26'''
| style="text-align: center;"| '''PC10'''
| style="text-align: center;"| '''PC10'''
| style="text-align: center;"| '''74'''
|}
</div>
</li></ol>
<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 There are a total of 17 GPIO ports in the searched WIFI list26pin interface, and then you can click '''orangepi''' to connect to the hotspot, and the password voltage of all GPIO ports is the '''orangepi<span style="color:#FF0000">3.3v</span>''' set above</li></ol>
[[File:media<span id="how-to-install-wiringop"></image119.png|265x211px]]span>
<ol start="4" style="list-style-type: decimal;"><li>After the connection is successful, the display is as shown in the figure below</li></ol>How to install wiringOP ==
[[File:media/image120.png{|273x130px]] <ol startclass="5wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>In bridge mode, '''Note that wiringOP has been pre-installed in the wireless device connected to linux image released by Orange Pi. Unless the hotspot code of the development board also requests an IP address from the DHCP service of the main router (the router connected wiringOP is updated, there is no need to the development board)re-download, for examplecompile and install, the IP of the development board is '''192just use it directly.168.1.X'''</li></ol>
orangepi@orangepi:~$ '''sudo ifconfig eth0'''
eth0'''The storage path of the compiled wiringOP deb package in orangepi-build is: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500'''
inet '''192<span style="color:blue">orangepi-build/external/cache/debs/arm64/wiringpi_x.168xx.1.150deb</span>''' netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20&lt;link&gt;
ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet)'''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>
RX packets 25370 bytes 2709590 (2[[File:zero3-img172.7 MB)png|780px|center]]
RX errors 0 dropped 50 overruns 0 frame 0<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>|}
TX packets 3798 bytes 1519493 (<ol style="list-style-type: decimal;"><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 install -y git'''</p><p>orangepi@orangepi:~$ '''git clone https://github.com/orangepi-xunlong/wiringOP.git -b next'''</p>|}{| 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>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''cd wiringOP'''</p><p>orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''</p><p>orangepi@orangepi:~/wiringOP$ '''sudo ./build'''</p>|}</li><li><p>Test the output of the gpio readall command as follows</p><ol style="list-style-type: lower-alpha;"><li><p>There is a one-to-one correspondence between pins 1.5 MB)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 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 33 corresponds to pin 13 of 13pin on the development board</p></li>TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0<li><p>'''<span style="color:#FF0000">Pins 28, 30, 32, and 34 are empty, please ignore them</span>'''</p><p>[[File:zero3-img172.png]]</p></li></ol>device interrupt 83</li></ol>
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 <span id="pin-interface-gpio-i2c-uart-spi-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'''。-pwm-test"></span>
[[File:media/image120.png|284x136px]]== 26pin interface GPIO, I2C, UART, SPI and PWM test ==
[[File:media<span id="pin-gpio-port-test"></image124.png|282x159px]]span>=== 26pin GPIO port test ===
<ol start="6" style="list-style-type: decimal;"><li><p>If 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: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>{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''--freq-bandgpio mode <span style="color:#FF0000">2</span> out''' y band</p>|}</li><li><p>Then set the GPIO port to output a low level. If After setting, you want can use a multimeter to create a hotspot in measure the voltage value of the 5G frequency bandpin. If it is 0v, you can specify it means that the low level is set successfully</p>{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''--freq-band 5gpio write 2 <span style="color:#FF0000">0</span>''' parameter</p>|}<p>Use gpio readall to see that the value (V) of pin 7 has changed to 0</p><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. The specific command 3v, it means that the high level is as followsset successfully.</p>{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio write 2 <span style="color:#FF0000">1</span>'''Note </p>|}<p>Use gpio readall to see that in the following commandsvalue (V) of pin 7 has changed to 1</p><p>[[File:zero3-img175.png]]</p></li><li><p>The setting method of other pins is similar, Debian12 needs just modify the serial number of wPi to change eth0 to end0.'''the corresponding serial number of the pin</p></li></ol>
orangepi@orangepi:~$ '''sudo create_ap <span id="how-m bridge wlan0 eth0 orangepi orangepi to-set-freqthe-band 5 pull-down-noresistance-virt'''of-pin-gpio-port"></span>
<ol start="7" style="list-style-type: decimal;"><li><p>If you need = How to hide the SSID, you can specify the '''set pull-up and pull-hidden''' parameter, the specific command is as follows</p><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></li></ol>down resistors on 26 pin GPIO ports ===
<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><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>{| 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>{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~$ /wiringOP# '''sudo create_ap 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>{| class="wikitable" style="width:800px;" |-m bridge wlan0 eth0 orangepi | <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>{| class="wikitable" style="width:800px;" |-hidden | <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>{| class="wikitable" style="width:800px;" |-no-virt| <p>root@orangepi:~/wiringOP# '''gpio read <span style="color:#FF0000">2</span>'''</p><p>'''0'''</p>|}</li></ol>
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.<span id="pin-spi-test"></span>
[[File:media/image123.png|228x191px]] <span id="how-to-set-static-ip-address"></span>=== How to set static IP address === '''Please do not set a static IP address by modifying the /etc/network/interfaces configuration file.''' <span id="use-the-nmtui-command-to-set-a-static-ip-address"></span>==== Use the nmtui command to set a static IP address =26pin SPI test ===
<ol style="list-style-type: decimal;">
<li><p>First run According to the schematic diagram of the 26pin interface, the '''nmtui''' command</p><p>orangepi@orangepi:~$ '''sudo nmtui'''</p></li><li><p>Then select '''Edit a connection''' and press Enteravailable spi is spi1</p><p>[[File:media/image125zero3-img176.png|227x247px]]</p></li><li><p>Then select The spi1 is disabled by default in the network interface that Linux system and needs to set a static IP address, for example, be manually enabled before it can be used. The steps to set the static IP address of the '''Ethernet''' interface, select '''Wired connection 1'''.open are as follows:</p><p>[[Fileol style="list-style-type:media/image126.png|310x149px]]</p></lilower-alpha;"><li><p>Then select First run '''Editorangepi-config''' with the , normal users remember to add '''Tabsudo''' key and press the Enter keypermission</p><p>[[File{| class="wikitable" style="width:media/image127.png800px;" |-|316x144px]]</p></li><li><p>Then use the Tab key to move the cursor to the orangepi@orangepi:~$ '''&lt;Automatic&gt;sudo orangepi-config''' position shown in the figure below to configure IPv4</p><p>[[File:media/image128.png|575x240px]]</p>}</li><li><p>Then press Enter, select '''ManualSystem''' through the up and down arrow keys, and press Enter to confirm</p><p>[[File:media/image129.png|576x237px]]</p></li><li><p>The display after selection is shown in the figure below</p><p>[[File:media/image130zero3-img85.png|575x240px]]</p></li><li><p>8) Then move the cursor to select '''&lt;Show&gt;Hardware''' via the Tab key</p><p>[[File:media/image131zero3-img86.png|576x241px]]</p></li><li><p>Then press Enter, use the following setting interface will pop up after entering</p><p>[[File:media/image132.png|575x450px]]</p></li><li><p>Then you can set arrow keys on the IP address (Addresses), gateway (Gateway) and DNS server address in keyboard to navigate to the position shown in the figure below (there are many other setting options in it, please explore by yourself), and then use the '''please set according to your specific needs, The values set in the image below are just an examplespace'''</p><p>[[File:media/image133.png|576x233px]]</p></li><li><p>After setting, move the cursor to select '''&lt;OK&gt;spi1-cs1-spidev''' in the lower right corner, and press Enter to confirm</p><p>[[File:media/image134zero3-img177.png|576x116px]]</p></li><li><p>Then click select '''&lt;BackSave&gt;''' to return to the previous selection interfacesave</p><p>[[File:media/image135zero3-img88.png|330x325px]]</p></li><li><p>Then select '''Activate a connection''', then move the cursor to '''&lt;OKBack&gt;''', and finally click Enter</p><p>[[File:media/image136zero3-img89.png|331x248px]]</p></li><li><p>Then select the network interface that needs to be set, such as '''Wired connection 1''', then move the cursor to &lt;DeactivateReboot&gt;, and press the Enter key to disable '''Wired connection 1'''</p><p>[[File:media/image137.png|576x224px]]</p></li><li><p>Then please do not move to restart the cursor, and then press the Enter key system to re-enable '''Wired connection 1''', so that make the static IP address set earlier will configuration take effect</p><p>[[File:media/image138.png|576x224px]]</p></li><li><p>Then you can exit nmtui through the '''&lt;Back&gt;''' and '''Quit''' buttons</p><p>[[File:media/image139.png|300x253px]] [[File:media/image140zero3-img90.png|227x252px]]</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><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p><p>orangepi@orangepi:~$ '''ip a s eth0'''</p><p>3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; 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>inet '''192.168.1.177'''/24 brd 192.168.1.255 scope global noprefixroute eth0</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>valid_lft 259149sec preferred_lft 172749sec</p><p>inet6 fe80::957d:bbbe:4928:3604/64 scope link noprefixroute</p><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><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</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>64 bytes from 192.168.1.47: icmp_seq=1 ttl=64 time=0.233 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=2 ttl=64 time=0.263 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=3 ttl=64 time=0.273 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=4 ttl=64 time=0.269 ms</p><p>64 bytes from 192.168.1.47: icmp_seq=5 ttl=64 time=0.275 ms</p><p>^C</p><p>--- 192.168.1.47 ping statistics ---</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> <span id="use-the-nmcli-command-to-set-a-static-ip-address"></span>==== Use the nmcli command to set a static IP address ==== <ol style="list-style-type: decimal;"><li><p>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</p></li><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;"><li><p>'''orangepi''' is the name of the WIFI network interface (the name &gt; is not necessarily the same)</p></li><li><p>'''Wired connection 1''' is the name of the Ethernet interface</p><p>orangepi@orangepi:~$ '''nmcli con show'''</p><p>NAME UUID TYPE DEVICE</p><p>'''orangepi''' cfc4f922-ae48-46f1-84e1-2f19e9ec5e2a wifi wlan0</p><p>'''Wired connection 1''' 9db058b7-7701-37b8-9411-efc2ae8bfa30 ethernet eth0</p></li></ol>
</li>
<li><p>Then enter the following command, where</p><ol style="list-style-type: lower-alpha;"><li><p>check whether there is a '''&quot;Wired connection spidev1.1&quot;''' means to set the static IP address of &gt; device node in the Ethernet portLinux system. If you need to set the static IP address of &gt; the WIFIit exists, please modify it to means that the corresponding name configuration of the &gt; WIFI network interface (you can get it through the '''nmcli con &gt; show''' command)SPI1 has taken effect</p></li><li><p>'''ipv4.addresses''' is followed by the static IP address to be &gt{| class="wikitable" style="width:800px; 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>| <p>orangepi@orangepi:~$ '''sudo nmcli con mod &quot;Wired connection 1&quot; \<br ls /dev/>ipv4.addresses &quot;192.168.1.110&quot; \spidev1*'''</p><p>'''ipv4.gateway &quot;192.168/dev/spidev1.1.1&quot; \'''</p><p>'''ipv4.dns &quot;8.8.8.8&quot; \'''</p><p>'''ipv4.method &quot;manual&quot;'''</p></li></ol>|}
</li>
<li><p>Then restart 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 linux systemdata of TX and RX are inconsistent</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo rebootspidev_test -v -D /dev/spidev1.1'''</p><p>spi mode: 0x0</p><p>bits per word: 8</lip><lip>max speed: 500000 Hz (500 KHz)</p><p>Then re-enter the linux system and use the TX | FF FF FF FF FF FF '''ip addr show eth0<span style="color:#FF0000">40 00 00 00 00 95</span>''' command to see that the IP address has been set to the desired valueFF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p><p>orangepi@orangepi:~$ RX | FF FF FF FF FF FF '''ip addr show eth0<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>3: eth0: &lt;BROADCASTThen short the two pins of mosi (the 19th pin in the 26pin interface) and miso (the 21st pin in the 26pin interface) of SPI1,MULTICASTand then run the output of spidev_test as follows,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000you can see the sending and receiving same data</p><p>link/ether 5e{| class="wikitable" style="width:ae:14:a5:91:b3 brd ff:ff:ff:ff:ff:ff</p>800px;" |-| <p>inet orangepi@orangepi:~$ '''192.168sudo spidev_test -v -D /dev/spidev1.1.110'''/32 brd 192.168.1.110 scope global noprefixroute eth0</p><p>valid_lft forever preferred_lft foreverspi mode: 0x0</p><p>inet6 240e:3b7bits per word:3240:c3a0:97de:1d01:b290:fe3a/64 scope global dynamic noprefixroute8</p><p>valid_lft 259183sec preferred_lft 172783secmax speed: 500000 Hz (500 KHz)</p><p>inet6 fe80TX | FF FF FF FF FF FF '''<span style="color::3312:861a:a589:d3c#FF0000">40 00 00 00 00 95</64 scope link noprefixroutespan>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@.…▒..................▒.</p><p>valid_lft forever preferred_lft foreverRX | 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="thepin-methodi2c-of-setting-the-linux-system-to-automatically-connect-to-the-network-for-the-first-timetest"></span>=== 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 TF 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.'''=== 26pin I2C test ===
<ol style="list-style-type: decimal;">
<li><p>First burn the Linux image of the development board you want to use into the TF card, and then use a card reader According to insert the TF card that has burned the Linux image schematic diagram 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 TF card is inserted into the Ubuntu computer26pin, the Ubuntu computer will generally automatically mount the partition of the Linux root file system in the TF card. You can know from the following command that '''/media/test/opi_root''' available i2c is the Linux root file in the TF card The path where the system is mountedi2c3</p><p>test@test[[File:~$ '''df zero3-h | grep &quot;media&quot;'''</p><p>/dev/sdd1 1img178.4G 1.2G 167M 88% '''/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 varpng]]</p></li><li><p>Then enter the '''/boot''' directory of i2c3 is disabled by default in the Linux system burned in the TF card</p><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 and it needs to automatically connect to a WIFI hotspot when be manually enabled before it starts for the first time, and you can also set the WIFI or Ethernet portbe used. 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><li><p>You can The steps to open the orangepi_first_run.txt file with the following command, and then you can view and modify the contents</p><p>test@testare as follows:/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>
<ol style="list-style-type: lower-alpha;">
<li><p>First run '''FR_general_delete_this_file_after_completionorangepi-config''' variable is &gt; used to set whether to delete the orangepi_first_run.txt file &gt; after the first startup. The default is 1, that is, delete. If &gt; it is set normal users remember to 0, orangepi_first_run.txt will be renamed to &gt; orangepi_first_run.txt after the first startup .old, generally &gt; keep the default value</p></li><li><p>add '''FR_net_change_defaultssudo''' variable is used to set whether to &gt; change the default network settings, this must be set to 1, &gt; otherwise all network settings will not take effectpermission</p></li><li><p>'''FR_net_ethernet_enabled''' variable is used to control whether &gt; to enable the configuration of the Ethernet port. If you need &gt{| class="wikitable" style="width:800px; to set the static IP address of the Ethernet port, please set &gt; it to 1</p></li>" <li><p>'''FR_net_wifi_enabled''' variable is used to control whether to &gt; enable WIFI configuration. If you need to set the development &gt; board to automatically connect to WIFI hotspots, you must set &gt; it to 1. In addition, please note that if this variable is set &gt; to 1, the setting of the Ethernet port will be will fail. That &gt; is to say, the WIFI and Ethernet ports cannot be set at the &gt; 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 &gt; WIFI hotspot you want to connect to</p></li><li><p>'''FR_net_wifi_key''' variable is used to set the password of the &gt; WIFI hotspot you want to connect to</p></li><li><p>'''FR_net_use_static''' variable is used to set whether to set the &gt; static IP address of WIFI or Ethernet port</p></li>| <li><p>orangepi@orangepi:~$ '''FR_net_static_ipsudo orangepi-config''' variable is used to set static IP address, &gt; please set according to your actual situation</p></li><li><p>'''FR_net_static_gateway''' variable is used to set the gateway, &gt; please set it according to your actual situation</p></li></ol>|}
</li>
<li><p>The following demonstrates several specific setting examples:Then select '''System'''</p><ol style="list-style-typep>[[File: lowerzero3-alpha;"img85.png]]</p></li><li><p>For example, if you want the Linux system of the development &gt; board to automatically connect to the WIFI hotspot after the &gt; first startup, you can set it like this:Then select '''Hardware'''</p><ol style="list-style-typep>[[File: lowerzero3-alpha;"img86.png]]</p></li><li><p>Set Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''FR_net_change_defaultsspace''' to select '''1ph-i2c3'''</p><p>[[File:zero3-img179.png]]</p></li><li><p>Set Then select '''FR_net_wifi_enabled&lt;Save&gt;''' to '''1'''save</p><p>[[File:zero3-img88.png]]</p></li><li><p>Set Then select '''FR_net_wifi_ssid&lt;Back&gt;''' to the name of the WIFI hotspot you &gt; want to connect to</p><p>[[File:zero3-img89.png]]</p></li><li><p>Set Then select '''FR_net_wifi_key&lt;Reboot&gt;''' to restart the password of system to make the WIFI hotspot &gt; you want to connect toconfiguration take effect</p><p>[[File:zero3-img90.png]]</p></li></ol>
</li>
<li><p>For example, if you want After starting the Linux linux system of the development &gt; board to automatically connect to the WIFI hotspot after the &gt; , first startup, and set the IP address of the WIFI to a &gt; specific static IP address (so confirm that when the Linux system there is &gt; started, you can directly use the set static IP address to ssh &gt; remotely Log in to the development board without checking the &gt; IP address of the development board through the background of &gt; the router), you can set it like this:an i2c3 device node under /dev</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>Set '''FR_net_change_defaults''' to '''1'''</p></li>|-<li><p>Set '''FR_net_wifi_enabled''' to '''1'''</p></li>| <li><p>Set orangepi@orangepi:~$ '''FR_net_wifi_ssid''' to the name of the WIFI hotspot you &gt; want to connect to<ls /p><dev/li><li><p>Set '''FR_net_wifi_keyi2c-3''' to the password of the WIFI hotspot &gt; you want to connect to</p></li><li><p>Set '''FR_net_use_static''' to '''1'''</p><dev/li><li><p>Set i2c-3'''FR_net_static_ip''' to the desired IP address</p></li><li><p>Set '''FR_net_static_gateway''' to the corresponding gateway &gt; address</p></li></ol>|}
</li>
<li><p>For exampleThen start testing i2c, if you want to automatically set the IP address of &gt; the Ethernet port to the desired static IP address after the &gt; Linux system of the development board starts for the first &gt; time, you can set it like this:install i2c-tools</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>Set '''FR_net_change_defaults''' to '''1'''</p></li>|-<li><p>Set '''FR_net_ethernet_enabled''' to '''1'''</p></li>| <li><p>Set orangepi@orangepi:~$ '''FR_net_use_static''' to '''1sudo apt-get update'''</p></li><li><p>Set orangepi@orangepi:~$ '''FR_net_static_ipsudo apt-get install -y i2c-tools''' to the desired IP address</p></li><li><p>Set '''FR_net_static_gateway''' to the corresponding gateway &gt; address</p></li></ol></li></ol>|}
</li>
<li><p>After modifying the orangepi_first_run.txt file, you can exit Then connect an i2c device to the /boot directory i2c3 pin of the development board Linux system in the TF card, uninstall the TF card, and then insert the TF card into the development board to start26pin connector</p></li>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <libig><p>If you have not set a static IP address, you still need to check '''Please select the IP address through the background of the router5V and 3. If you have set a static IP address, you can ping 3V pins according to 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 correctlyspecific i2c device, and then you can use the set IP address ssh to remotely log in to the Linux system of the development boardvoltage value required by different i2c devices may be different.'''</p></li></olbig>|}
{| class="wikitable" style="width:800px;" |-| style="text-align: center;"| '''After the Linux system of the development board is started for the first time, orangepi_first_runsda pin'''| style="text-align: center;"| '''Corresponding to pin 3 in 26pin'''|-| style="text-align: center;"| '''sck pin'''| style="text-align: center;"| '''Corresponding to pin 5 in 26pin'''|-| style="text-align: center;"| '''5v pin'''| style="text-align: center;"| '''Corresponding to pin 2 in 26pin'''|-| style="text-align: center;"| '''3.txt will be deleted or renamed 3v pin'''| style="text-align: center;"| '''Corresponding to pin 1 in 26pin'''|-| style="text-align: center;"| '''gnd pin'''| style="text-align: center;"| '''Corresponding to orangepi_first_run.txt.old. At this time, pin 6 in 26pin'''|}</li></ol><ol start="6" style="list-style-type: decimal;"><li><p>Then use the orangepi_first_run.txt configuration file will be reset'''i2cdetect -y 3''' command, and then if the Linux system address of the development board will connected i2c device can be detected, it means that i2c can be restartedused normally</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Different i2c device addresses are different, orangepi_first_run. The configuration the address 0x50 in txt will not take effect again, because this configuration will only be effective when the Linux system figure below is started for the first time after burning, please pay special attention just an example. Please refer to this pointwhat you actually see.'''</p></big>|}<div class="figure">
<span id="ssh[[File:zero3-remote-login-development-board"></span>== SSH remote login development board ==img180.png]]
'''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.'''</div></li></ol>
<span id="sshpin-remoteuart-login-development-board-under-ubuntutest"></span>=== 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=== 26pin UART test ===
test<ol style="list-style-type: decimal;"><li><p>According to the schematic diagram of the 26pin interface, the available uart is uart5</p><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><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@testorangepi:~$ '''ssh sudo orangepi-config'''</p>|}</li><li><p>Then select '''System'''</p><p>[mailto[File:root@192zero3-img85.168png]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:zero3-img86.1png]]</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.36 orangepi@192png]]</p></li><li><p>Then select '''&lt;Save&gt;''' to save</p><p>[[File:zero3-img88.168.1png]]</p></li><li><p>Then select '''&lt;Back&gt;'''</p><p>[[File:zero3-img89.png]]xxx</p></li><li><p>Then select '''&lt;Reboot&gt;''' (Need to be replaced with restart the IP address of system to make the development board)configuration take effect</p><p>[[File:zero3-img90.png]]</p></li></ol>orangepi@192.168.1.xx's password: (Enter </li><li><p>After entering the password herelinux system, the default password first confirm whether there is orangepi)a uart5 device node under '''/dev'''</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><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 linux5.4 system is any fault, just press Enter after inputting/dev/ttyAS5.'''</p></big>|}{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''ls /dev/ttyS5'If you are prompted ''</p><p>/dev/ttyS5</p>|}</li><li><p>Then start to refuse test the connectionuart5 interface, as long as you are using first use the DuPont line to short the image provided by Orange Pi, please do not suspect that rx and tx of the password orangepi is wrong, but find other reasons.'''uart5 interface to be tested</p></li> {| class="wikitable" style="width:800px;text-align: center;" |-|| style="text-align: center;"| uart5|-| tx pin| style="text-align: center;"| Corresponding to pin 8 of 26pin|-| rx pin| style="text-align: center;"| Corresponding to pin 10 of 26pin|}</ol><ol start="35" style="list-style-type: decimal;"><li><p>After successfully logging Use the '''gpio''' command in wiringOP to test the system, loopback function of the display is serial port as shown in below. If you can see the following print, it means that the figure belowserial port communication is normal</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media~$ '''gpio serial /image141dev/ttyS5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # linux-6.png|575x273px]]1 test command'''</p><p>orangepi@orangepi:~$ '''If ssh fails to log in to the gpio serial /dev/ttyAS5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # linux system normally, first check whether the IP address of the development board can be pinged-5. 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 4 test command on the development board and try again. Is it possible to connect:'''</p></li></ol>
root@orangepi:~# '''reset_ssh.sh'''
'''If it still doesn't work, try to reset the system.'''<p>Out: 0: -&gt; 0</p><p>Out: 1: -&gt; 1</p><p>Out: 2: -&gt; 2</p><p>Out: 3: -&gt; 3^C</p>|}</li></ol>
<span id="sshpwm-remotetest-login-development-board-under-windowsmethod"></span>=== SSH remote login development board under Windows ===
<ol style="list-style-type: decimal;"><li><p>First obtain the IP address of the development board</p></li><li><p>Under Windows, you can use MobaXterm to remotely log in to the development board, first create a new ssh session</p><ol style="list-style-type: lower-alpha;"><li><p>Open '''Session'''</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 &gt; '''Remote host'''</p></li><li><p>Then enter the user name root or orangepi of the linux system in &gt; '''Specify username'''</p></li><li><p>Finally click '''OK'''</p><div class="figure">PWM test method ===
[[File{| class="wikitable" style="background-color:media/image142.jpeg#ffffdc;width:800px;" |553x280px-|14]]<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:zero3-img183-1.png|center]]|} <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><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</divp>|}</li><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 the configuration corresponding to pwm</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <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 '''&lt;Save&gt;''' to save</p><p>[[File:zero3-img88.png]]</p></li><li><p>Then select '''&lt;Back&gt;'''</p><p>[[File:zero3-img89.png]]</p></li><li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the configuration take effect</p><p>[[File:zero3-img90.png]]</p></li></ol></li><li><p>After restarting, the PWM test can be started</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Please execute the following commands under the root user.'''</p></big>|}<olstyle="list-style-type: lower-alpha;"><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 &gt; /sys/class/pwm/pwmchip0/export'''</p><p>root@orangepi:~# '''echo 20000000 &gt; /sys/class/pwm/pwmchip0/pwm1/period'''</p><p>root@orangepi:~# '''echo 1000000 &gt; /sys/class/pwm/pwmchip0/pwm1/duty_cycle'''</p><p>root@orangepi:~# '''echo 1 &gt; /sys/class/pwm/pwmchip0/pwm1/enable'''</p>|}
</li>
<li><p>Then you will be prompted Enter the following command on the command line to enter make pwm2 output a password. The default passwords for root and orangepi users are orangepi50Hz square wave</p><p/li>{| class="wikitable" style="width:800px;" |-| root@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.echo 2 &gt; /sys/class/pwm/pwmchip0/export'''</p><div class="figure">
[[Fileroot@orangepi:media~# '''echo 20000000 &gt; /image143.jpeg|553x151px|15]]sys/class/pwm/pwmchip0/pwm2/period'''
<root@orangepi:~# '''echo 1000000 &gt; /div><sys/li><li><p>The display after successfully logging in to the system is shown in the figure below</p><p>[[File:mediaclass/image144.png|559x388px]]<pwm/p><pwmchip0/li><pwm2/ol>duty_cycle'''
root@orangepi:~# '''echo 1 &gt; /sys/class/pwm/pwmchip0/pwm2/enable'''|}</ol><span idol start="hdmi3" style="list-style-type: lower-testalpha;"><li>Enter the following command on the command line to make pwm3 output a 50Hz square wave</spanli>{| class="wikitable" style= HDMI test =="width:800px;" |-| root@orangepi:~# '''echo 3 &gt; /sys/class/pwm/pwmchip0/export'''
<span id="hdmi-display-test"><root@orangepi:~# '''echo 20000000 &gt; /span>=== HDMI display test ===sys/class/pwm/pwmchip0/pwm3/period'''
<ol style="list-style-typeroot@orangepi: decimal~# '''echo 1000000 &gt;"><li><p>Use a Micro HDMI to HDMI cable to connect the Orange Pi development board and HDMI display</p><p>[[File:media/image13.png|167x172px]]<sys/p><class/li><li><p>After starting the linux system, if the HDMI monitor has image output, it means that the HDMI interface is working normally<pwm/p><pwmchip0/li><pwm3/ol>duty_cycle'''
root@orangepi:~# '''Note that although many laptops have an HDMI interface, echo 1 &gt; /sys/class/pwm/pwmchip0/pwm3/enable'''|}</ol><ol start="4" style="list-style-type: lower-alpha;"><li>Enter the HDMI interface of following command on the notebook generally only has the output function, and does not have the function of HDMI in, that is command line to say, the HDMI make pwm4 output of other devices cannot be displayed on the notebook screen.a 50Hz square wave</li>{| class="wikitable" style="width:800px;" |-| root@orangepi:~# '''echo 4 &gt; /sys/class/pwm/pwmchip0/export'''
root@orangepi:~# '''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.echo 20000000 &gt; /sys/class/pwm/pwmchip0/pwm4/period'''
root@orangepi:~# '''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.echo 1000000 &gt; /sys/class/pwm/pwmchip0/pwm4/duty_cycle'''
<span id="hdmi-to-vga-display-test"><root@orangepi:~# '''echo 1 &gt; /span>sys/class/pwm/pwmchip0/pwm4/enable'''=== HDMI to VGA display test ===|}
<ol stylediv class="list-style-type: decimal;figure"><li><p>First you need to prepare the following accessories</p><ol style="list-style-type: lower-alpha;"><li><p>HDMI to VGA converter</p><p>[[File:media/image145.png|155x104px]]</p></li><li><p>A VGA cable and a Micro HDMI male to HDMI female conversion &gt; cable</p><p>[[File:media/image146.png|148x133px]] [[File:media/image147.jpeg|157x139px|IMG_6140(20220104-134930)]]</p></li><li><p>A monitor or TV that supports VGA interface</p></li></ol></li><li><p>HDMI to VGA display test as shown below</p><p>[[File:media/image148.png|574x336px]]</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>
<span id="how[[File:zero3-to-set-hdmi-resolution-in-linux5.4-system"></span>=== How to set HDMI resolution in Linux5img185.4 system ===png]]
'''Note: This method is only applicable </div></ol></li></ol><span id="how-to systems with linux5.4 kernel.'''-install-and-use-wiringop-python"></span>
<ol style="list-style= How to install and use wiringOP-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><p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>verbosity=1</p><p>console=both</p><p>disp_mode='''1080p60'''</p><p>fb0_widthPython =1920</p><p>fb0_height=1080</p></li><li><p>The values supported by the disp_mode variable are shown in the table below</p></li></ol>
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| style="text-align: left;"| '''Supported values for disp_mode'''| style="text-align: left;"| '''HDMI resolution'''| style="text-align: left;"| '''HDMI refresh rate'''|-| style="text-align: left;"| '''480i'''| style="text-align: left;"| '''720x480'''| style="text-align: left;"| '''60'''|-| style="text-align: left;"| '''576i'''| style="text-align: left;"| '''720x480'''| style="text-align: left;"| '''50'''|-| style="text-align: left;"| '''480p'''| style="text-align: left;"| '''720x480'''| style="text-align: left;"| '''60'''|-| style="text-align: left;"| '''576p'''| style="text-align: left;"| '''720x576'''| style="text-align: left;"| '''60'''|-| style="text-align: left;"| '''720p50'''| style="text-align: left;"| '''1280x720'''| style="text-align: left;"| '''50'''|-| style="text-align: left;"| '''720p60'''| style="text-align: left;"| '''1280x720'''| style="text-align: left;"| '''60'''|-| style="text-align: left;"| '''1080i50'''| style="text-align: left;"| '''1920x1080'''| style="text-align: left;"| '''50'''|-| style="text-align: left;"| '''1080i60'''| style="text-align: left;"| '''1920x1080'''| style="text-align: left;"| <big>'''60'''|-| style="textwiringOP-align: left;"| '''1080p24Python 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.'''| style="text-align: left;"| '''1920x1080'''| style="text-align: left;"| '''24'''|-| In addition, please note that all the following commands are operated under the <span style="text-aligncolor: left;"| '''1080p50'''| style=#FF0000"text-align: left;"| '''1920x1080'''| style="text-align: left;"| '''50'''|-| style="text-align: left;"| '''1080p60'''| style="text-align: left;"| '''1920x1080'''| style="text-align: left;"| '''60>root</span> user.'''</big>
|}
'''Note: Linux systems currently do not support 4K resolution.'''<span id="how-to-install-wiringop-python"></span>=== How to install wiringOP-Python ===
<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 First install the system, HDMI will output the set resolutiondependency package</p></li><li>{| class="wikitable" style="width:800px;" |-| <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.root@orangepi:~# '''sudo apt-get update'''</p><p>orangepiroot@orangepi:~$ # '''sudo cat /sys/class/disp/disp/attr/sysapt-get -y install git swig python3-dev python3-setuptools'''</p>|}</li><li><p>[[FileThen use the following command to download the source code of wiringOP-Python</p>{| class="wikitable" style="background-color:#ffffdc;width:media/image149.png800px;" |-|575x84px]]</pbig></lip>'''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.'''</olp>
<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 ===
<p>'''NoteIf 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:~# '''cd wiringOP-Python'''</p><p>root@orangepi: This method is only applicable ~/wiringOP-Python# '''git submodule update --init --remote'''</p>|}</li><li><p>Then use the following command to systems with linux5compile 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:~/wiringOP-Python# '''python3 generate-bindings.py &gt; bindings.4 kerneli'''</p><p>root@orangepi:~/wiringOP-Python# '''sudo python3 setup.py install'''</p>|}</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>
There are two variables fb0_width and fb0_height in the {| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP-Python# '''/boot/orangepiEnv.txtpython3 -c &quot;import wiringpi; help(wiringpi)&quot;''' 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@orangepiHelp on module wiringpi:~$ '''sudo vim /boot/orangepiEnv.txt'''
verbosity=1
console=bothNAME
disp_mode=1080p60:wiringpi
'''fb0_width=1920'''
'''fb0_height=1080'''DESCRIPTION
The '''reference''' values corresponding to different resolutions of fb0_width and fb0_height are as follows:# This file was automatically generated by SWIG (http://www.swig.org).
{| class="wikitable"|-| style="text-align: left;"| '''HDMI resolution'''| style="text-align: left;"| '''fb0_width'''| style="text-align: left;"| '''fb0_height'''|-| style="text-align: left;"| '''480p'''| style="text-align: left;"| '''720'''| style="text-align: left;"| '''480'''|-| style="text-align: left;"| '''576p'''| style="text-align: left;"| '''720'''| style="text-align: left;"| '''576'''|-| style="text-align: left;"| '''720p'''| style="text-align: left;"| '''1280'''| style="text-align: left;"| '''720'''|-| style="text-align: left;"| '''1080p'''| style="text-align: left;"| '''1920'''| style="text-align: left;"| '''1080'''|}# Version 4.0.2
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.: #
<span id="framebuffer: # Do not make changes to this file unless you know what you are doing-cursor-setting"></span>=== Framebuffer Cursor Setting ===modify
: # the SWIG interface file instead.|}</ol ><ol start="5" style="list-style-type: decimal;"><li><p>The softcursor used by Framebuffer, the method of setting the cursor steps to blink or not test whether wiringOP-Python is successfully installed under the python command line are as follows</p><p>root@orangepi:~# '''echo 1 &gt; /sys/class/graphics/fbcon/cursor_blink #cursor blinking'''</p><p>root@orangepiol style="list-style-type:~# '''echo 0 &gtlower-alpha; /sys/class/graphics/fbcon/cursor_blink #cursor not blinking'''</p></li"><li><p>If you need First use the python3 command to hide enter the cursor, you can add '''vt.global_cursor_default=0''' in the '''extraargs''' variable command line mode 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 disappearedpython3</pli><p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>verbosity{| class=1</p><p>console"wikitable" style=both</p>"width:800px;" <p>disp_mode=1080p60</p>|-<p>fb0_width=1920</p>| <p>fb0_height=1080</p><p>root@orangepi:~# '''extraargs=vt.global_cursor_default=0python3'''</p></li></ol>|}
<span idol start="how2" style="list-tostyle-usetype: lower-bluetoothalpha;"><li>Then import the python module of wiringpi</li></spanol>== How to use Bluetooth ==
{| class="wikitable" style="width:800px;" |-| &gt;&gt;&gt; '''import wiringpi;'''|}<span id/ol><ol start="test3" style="list-methodstyle-oftype: lower-desktop-image-1alpha;"><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</spanli>=== Test method of desktop image ===
<ol {| class="wikitable" style="list-style-typewidth: decimal800px;"><li><p>Click the Bluetooth icon in the upper right corner of the desktop</p><p>[[File:media/image150.png|314x122px]]</p></li>-<li><p>Then select the adapter</p><p>[[File:media/image151.png|318x140px]]</p></li><li><p>If there is a prompt on the following interface, please select '''Yes'''</p><p>[[File:media/image152.png|248x85px]]</p></li><li><p>Then set the '''Visibility Setting''' to '''Always visible''' in the Bluetooth adapter setting interface, and then close it</p><p>[[File:media/image153.png|196x183px]]</p></li><li><p>Then open the configuration interface of the Bluetooth device</p><p>[[File:media/image154.png|438x179px]]</p></li><li><p>Click &gt;&gt;&gt; '''Searchhelp(wiringpi)''' to start scanning the surrounding Bluetooth devices</p><p>[[File:media/image155.png|311x210px]]</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><p>[[File:media/image156.png|311x242px]]</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><p>[[File:media/image157.png|411x150px]]</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><p>[[File:media/image158.png|405x239px]]</p></li><li><p>The interface for sending pictures is as follows</p><p>[[File:media/image159.png|399x231px]]</p></li></ol>
<span id="how-to-use-the-server-image"></span>=== How to use the server image ===Help on module wiringpi:
<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>
<p>orangepi@orangepi:~$ '''sudo apt update &amp;&amp; sudo apt install -y bluez'''</p>
<p>orangepi@orangepi:~$ '''hciconfig -a'''</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>UP RUNNING</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>Features: 0xbf 0xff 0x8d 0xfe 0xdb 0x3d 0x7b 0xc7</p>
<p>Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3</p>
<p>Link policy: RSWITCH SNIFF</p>
<p>Link mode: SLAVE ACCEPT</p>
<p>Name: 'orangepi'</p>
<p>Class: 0x3c0000</p>
<p>Service Classes: Rendering, Capturing, Object Transfer, Audio</p>
<p>Device Class: Miscellaneous,</p>
<p>HCI Version: 5.0 (0x9) Revision: 0x400</p>
<p>LMP Version: 5.0 (0x9) Subversion: 0x400</p>
<p>Manufacturer: Spreadtrum Communications Shanghai Ltd (492)</p></li>
<li><p>Use '''bluetoothctl''' to scan bluetooth devices</p>
<p>orangepi@orangepi:~$ '''sudo bluetoothctl'''</p>
<p>[NEW] Controller 10:11:12:13:14:15 orangepizero3 [default]</p>
<p>Agent registered</p>
<p>[bluetooth]# '''power on #enable controller'''</p>
<p>Changing power on succeeded</p>
<p>[bluetooth]# '''discoverable on #Make the controller discoverable'''</p>
<p>Changing discoverable on succeeded</p>
<p>[CHG] Controller 10:11:12:13:14:15 Discoverable: yes</p>
<p>[bluetooth]# '''pairable on #Set the controller as pairable'''</p>
<p>Changing pairable on succeeded</p>
<p>[bluetooth]# '''scan on #Start scanning for nearby Bluetooth devices'''</p>
<p>Discovery started</p>
<p>[CHG] Controller 10:11:12:13:14:15 Discovering: yes</p>
<p>[NEW] Device 76:60:79:29:B9:31 76-60-79-29-B9-31</p>
<p>[NEW] Device 9C:2E:A1:42:71:11 MiPhone</p>
<p>'''[NEW] Device DC:72:9B:4C:F4:CF orangepi'''</p>
<p>[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'''</p>
<p>Discovery stopped</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>
<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>
<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>[CHG] Device DC:72:9B:4C:F4:CF Connected: yes</p>
<p>Request confirmation</p>
<p>[leeb1m[agent] Confirm passkey 764475 (yes/no): '''yes''' '''#Enter yes here, and you need to confirm on the mobile phone'''</p>
<p>[CHG] Device DC:72:9B:4C:F4:CF Modalias: bluetooth:v010Fp107Ed1436</p>
<p>[CHG] Device DC:72:9B:4C:F4:CF UUIDs: 0000046a-0000-1000-8000-00805f9b34fb</p>
<p>[CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: yes</p>
<p>[CHG] Device DC:72:9B:4C:F4:CF Paired: yes</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 Connected: no</p></li>
<li><p>After the pairing is successful, the Bluetooth interface of the mobile phone will be displayed as follows</p>
<p>[[File:media/image160.png|189x167px]]</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>
<p>orangepi@orangepi:~$ '''sudo apt update'''</p>
<p>orangepi@orangepi:~$ '''sudo''' '''apt -y install pulseaudio-module-bluetooth'''</p>
<p>orangepi@orangepi:~$ '''pulseaudio --start'''</p></li>
<li><p>How to connect to a Bluetooth device</p>
<p>orangepi@orangepi:~$ '''sudo bluetoothctl'''</p>
<p>Agent registered</p>
<p>[bluetooth]# '''paired-devices #View the MAC address of the paired Bluetooth device'''</p>
<p>Device DC:72:9B:4C:F4:CF orangepi</p>
<p>[bluetooth]# '''connect DC:72:9B:4C:F4:CF #Connect to bluetooth device using MAC address'''</p>
<p>Attempting to connect to DC:72:9B:4C:F4:CF</p>
<p>[CHG] Device DC:72:9B:4C:F4:CF Connected: yes</p>
<p>Connection successful</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>'''[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>
<div class="figure">
[[FileNAME :mediawiringpi  DESCRIPTION : # This file was automatically generated by SWIG (http://image161www.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 :builtins.jpegobject ::GPIO ::I2C ::Serial ::nes  :class GPIO(builtins.object) :|223x232pxGPIO(pinmode=0) :|Screenshot_20201205_142413]] 
&gt;&gt;&gt;|}</divol></li></ol><span id="pin-gpio-port-test-1"></span>
<span id="usb-interface-test"></span>== USB interface 26pin GPIO port test ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''The USB interface wiringOP-Python is the same as wiringOP, you can be connected also determine which GPIO pin to a USB hub operate by specifying the wPi number, because there is no command to expand check the wPi number of USB interfacesin wiringOP-Python, so you can only check the board wPi number and physical Correspondence between pins.'''</big>[[File:zero3-img172.png]]|}
<span id="connect-usb-mouse-or-keyboard-to-test"></span>=== 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) <span id="connect-usb-storage-device-test"></span>=== 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 &quot;sd*&quot;''' major minor #blocks name 8 0 30044160 '''sda''' 8 1 30043119 '''sda1''' <ol start="3" style="list-style-type: decimal;"><li>Use the mount command <p>The following takes pin 7—the corresponding GPIO is PC9—the corresponding wPi number is 2—as an example to demonstrate how to mount set the U disk to '''/mnt''', high and then you can view the files in low levels of the U diskGPIO port</lip></olporangepi@orangepi[[File:~$ '''sudo mount zero3-img173.png]]</devp></sda1 /mnt/'''li> orangepi@orangepi<li><p>The steps to test directly with the command are as follows:~$ '''ls </mnt/''' test.txtp><ol start="4" style="list-style-type: decimallower-alpha;"><li>After mounting<p>First set the GPIO port to output mode, you can view where the capacity usage and mount point first parameter of the U disk through the '''df -hpinMode''' command</li></ol> orangepi@orangepi:~$ '''df -h | grep &quot;sd&quot;''' /dev/sda1 29G 208K 29G 1% /mnt <span id="usb-ethernet-card-test"></span>=== 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 function is inserted into the USB 2.0 Host interface serial number of the development boardwPi corresponding to the pin, but and the speed cannot reach Gigabit. Please note thatsecond parameter is the GPIO mode</p>{| class="wikitable" style="width:800px;"
|-
| <p>root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''</p><p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ; \'''</p><p>'''wiringpi.pinMode(<span style="text-aligncolor: left#FF0000">2, GPIO.OUTPUT</span>) ;"&quot;'''</p>| serial number}</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="text-alignwidth: left800px;"| model
|-
| <p>root@orangepi:~/wiringOP-Python# '''python3 -c &quot;import wiringpi; \'''</p><p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;\'''</p><p>'''wiringpi.digitalWrite(2, <span style="text-aligncolor: left#FF0000">GPIO.LOW</span>)&quot;"'''</p>| 1}</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="text-alignwidth: left800px;"| RTL8152B USB 100M network card
|-
| style="text<p>root@orangepi:~/wiringOP-Python# '''python3 -align: leftc &quot;import wiringpi; \'''</p><p>'''from wiringpi import GPIO; wiringpi.wiringPiSetup() ;"| \'''</p><p>'''wiringpi.digitalWrite(2| , <span style="text-aligncolor: left#FF0000">GPIO.HIGH</span>)&quot;"| RTL8153 USB Gigabit LAN'''</p>
|}
</li></ol>
</li>
<li><p>The steps to test in the command line of python3 are as follows:</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First use the python3 command to enter the command line mode of python3</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>root@orangepi:~# '''python3'''</p>
|}
</li>
<li><p>Then import the python module of wiringpi</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>&gt;&gt;&gt; '''import wiringpi'''</p>
<p>&gt;&gt;&gt; '''from wiringpi import GPIO'''</p>
|}
</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>&gt;&gt;&gt; '''wiringpi.wiringPiSetup()'''</p>
<p>0</p>
<p>&gt;&gt;&gt; '''wiringpi.pinMode(<span style="color:#FF0000">2, GPIO.OUTPUT</span>)'''</p>
|}
</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>&gt;&gt;&gt; '''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>&gt;&gt;&gt; '''wiringpi.digitalWrite(2, <span style="color:#FF0000">GPIO.HIGH</span>)'''</p>
|}
</li></ol>
</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>
{| class="wikitable" style="width:800px;"
|-
|
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p>
<p>root@orangepi:~/wiringOP-Python/examples# '''ls blink.py'''</p>
<p>'''blink.py'''</p>
<p>root@orangepi:~/wiringOP-Python/examples'''# python3 blink.py'''</p>
|}
</li></ol>
 
<span id="pin-spi-test-1"></span>
 
=== 26pin SPI test ===
<ol start="2" style="list-style-type: decimal;"><li><p>First insert According to the USB network card into schematic diagram of the USB 26pin 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 available spi is recognized normally.</p><p>orangepi@orangepi:~$ '''dmesg | tail'''spi1</p><p>[ 121.985016] usb 3-1: USB disconnect, device number 2</p><p>[ 126.873772] sunxi-ehci 5311000.ehci3-controller: ehci_irq: highspeed device connect</p><p>[ 127.094054] usb 3-1File: new highzero3-speed USB device number 3 using sunxi-ehci</p><p>[ 127img176.357472png] usb 3-1: reset high-speed USB device number 3 using sunxi-ehci</p><p>[ 127.557960] r8152 3-1:1.0 eth1: v1.08.9</p><p>[ 127.602642] r8152 3-1:1.0 enx00e04c362017: renamed from eth1</p><p>[ 127.731874] 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.892583] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c362017: link becomes ready</p></li><li><p>Then you can see The spi1 is disabled by default in the device node of the USB network card Linux system and the automatically assigned IP address through the ifconfig command</p><p>orangepi@orangepi:~$ '''sudo ifconfig'''</p><p>'''enx00e04c362017''': flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500</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&lt;link&gt;</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 errors 0 dropped 125 overruns 0 frame 0</p><p>TX packets 33 bytes 2834 (2needs to be manually enabled before it can be used.8 KB)</p><p>TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</p></li><li><p>The command steps to test network connectivity is open are as follows</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>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=56 time=6.74 ms</p><p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=56 time=6.80 ms</p><p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=56 time=6.26 ms</p><p>64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=56 time=7.27 ms</p><p>^C</p><p>--- www.a.shifen.com ping statistics ---</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> <span id="usb-camera-test"></span>=== USB camera test === <ol style="list-style-type: decimal;"><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><p>orangepi@orangepi:~$ '''lsmod'''</p><p>Module Size Used by</p><p>'''uvcvideo 106496 0'''</p></li><li><p>3) Through the v4l2-ctl command, you can see that the device node information of the USB camera is /dev/video0</p><p>orangepi@orangepi:~$ '''sudo apt update'''</p><p>orangepi@orangepi:~$ '''sudo''' '''apt install -y v4l-utils'''</p><p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</p><p>USB 2.0 Camera (usb-sunxi-ehci-1):</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><li><p>Use fswebcam to test the USB camera</p>
<ol style="list-style-type: lower-alpha;">
<li><p>Install fswebcam</p><p>orangepi@orangepi:~$ First run '''sudoorangepi-config''' '''apt update'''</p><p>orangepi@orangepi:~$ , normal users remember to add '''sudo apt-get install -y fswebcam'''</p></li><li><p>After installing fswebcam, you can use the following command to &gt; take picturespermission</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>|-d option is used to specify the device node of the USB &gt; camera</p></li><li><p>--no-banner is used to remove the watermark of the photo</p></li><li><p>-r option is used to specify the resolution of the photo</p></li><li><p>-S option is used to set the number of previous frames to &gt; skip</p></li><li><p>./image.jpg is used to set the name and path of the &gt; generated photo</p>| <p>orangepi@orangepi:~$ '''sudo''' '''fswebcam orangepi-d /dev/video0 \config'''</p><p>'''--no-banner -r 1280x720 -S 5 ./image.jpg'''</p></li></ol>|}
</li>
<li><p>In 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 server version of arrow keys on the linux systemkeyboard to navigate to the position shown in the figure below, you can and then use the scp '''space''' to select '''spi1-cs1-spidev'''</p><p>[[File:zero3-img177.png]]</p></li><li><p>Then select '''&gtlt; command to transfer the taken pictures to the Ubuntu PC for Save&gt; mirror viewing after taking pictures''' to save</p><p>orangepi@orangepi[[File:~$ zero3-img88.png]]</p></li><li><p>Then select '''&lt;Back&gt;'''然后选择'''&lt;Back&gt;''scp image.jpg '</p><p>[[mailtoFile:test@192zero3-img89.168.1.55:/home/test test@192.168.1.55:/home/testpng]] (Modify the IP address and path according to the actual situation)'''</p></li><li><p>In the desktop version of the linux system, you can directly Then select '''&lt;Reboot&gt; view ''' to restart the captured pictures through system to make the HDMI displayconfiguration take effect</p><p>[[File:zero3-img90.png]]</p></li></ol>
</li>
<li><p>Use mjpgThen 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;" |-streamer | <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 USB camerathe 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;">
<li><p>Download mjpg-streamer</p><ol style="list-style-type: lower-alpha;"><li><p>Github download address:</p><p>orangepi@orangepi:~$ '''git clone https://github.com/jacksonliam/mjpg-streamer-channel''': Specify the channel number of SPI</p></li><li><p>The image download address of Gitee is:</p><p>orangepi@orangepi:~$ '''git clone https://gitee.com/leeboby/mjpg-streamer-port''': Specify the port number of SPI</p></li></ol>
</li>
<li><p>Install dependent packages</p><ol style="list-style-type: lower-alpha;"><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:~$ '''sudo aptDo not short-get install -y cmake libjpeg62-turbo-dev'''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></ol>
</li>
<li><p>Compile and install mjpg-streamer</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$ '''sudo make install'''</p></li>
<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>
<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 &quot;./input_uvc.so -d \'''</p>
<p>'''/dev/video0 -u -f 30&quot; -o &quot;./output_http.so -w ./www&quot;'''</p></li>
<li><p>Then enter '''[the IP address of the development board: 8080]''' &gt; in the browser of the Ubuntu PC or Windows PC or mobile phone &gt; on the same LAN as the development board to see the video &gt; output by the camera</p>
<div class="figure">
[[File{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p> root@orangepi:media~/image162wiringOP-Python/examples# '''python3 spidev_test.jpeg|575x278px|图片9]]py \'''
</div></li></ol></li></ol>'''--channel 1 --port 1'''
<span id="audio-test"></span>== Audio Test ==spi mode: 0x0
<span id="how-to-play-audio-using-the-command-line"></span>=== How to play audio using the command line ===max speed: 500000 Hz (500 KHz)
<span id="headphone-jack-playback-audio-test"><Opening device /span>==== Headphone jack playback audio test ====dev/spidev1.1
TX | FF FF FF FF FF FF '''<ol span style="list-style-typecolor: decimal;#FF0000"><li><p>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 interface40 00 00 00 00 95</p><div class="figure"span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|
[[FileRX | FF FF FF FF FF FF '''<span style="color:media#FF0000">FF FF FF FF FF FF</image163span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |.............….jpeg|126x125px|IMG_256]]}</ol><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>
</div></li><li><p>Through the '''aplay -l''' command, you can view the sound card devices supported by the Linux system</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>The output of the linux5.4 system is as follows, where '''card 0: &gt; audiocodec''' is the sound card device required for earphone &gt; playback</p><p>root@orangepi:~# '''aplay -l'''</p><p>**** List of PLAYBACK Hardware Devices ****</p><p>'''card 0: audiocodec [audiocodec], device 0: SUNXI|-CODEC sun50iw9-codec-0 []'''</p><p>'''Subdevices: 1/1'''</p><p>'''Subdevice #0: subdevice #0'''</p></li><li><p>The output of the linux6.1 system is as follows, where &gt; '''audiocodec''' is the sound card device required for earphone &gt; playback</p>| <p>root@orangepi:~# '''aplay -l'''</p><p>**** List of PLAYBACK Hardware Devices ****</p><p>'''card 0: audiocodec [audiocodec], device 0: CDC PCM CodecwiringOP-0 [CDC PCM Codec-0]'''</p><p>'''Subdevices: 1/1'''</p><p>'''Subdevice Python#0: subdevice #0'''</p></li></ol></li><li><p>Then use the cd examples'''aplay''' command to play the audio, and the headset can hear the sound</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></li></ol>
root@orangepi:~/wiringOP-Python/examples# '''If there is noise in the earphone test, please pull out some earphones, do not insert all the earphonespython3 spidev_test.py \'''
<span id="hdmi'''-audio-playbackchannel 1 -test"></span>==== HDMI audio playback test ====-port 1'''
<ol style="list-style-typespi mode: decimal;"><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><p>root@orangepi:~# '''aplay -D hw:2,0 /usr/share/sounds/alsa/audio.wav'''</p></li></ol>0x0
<span id="testing-audio-methods-on-desktop-systems"></span>=== Testing audio methods on desktop systems ===max speed: 500000 Hz (500 KHz)
<ol style="list-style-type: decimal;"><li><p>First open the file manager<Opening device /p><p>[[File:mediadev/image164spidev1.png|257x126px]]</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><div class="figure">1
[[FileTX | FF FF FF FF FF FF '''<span style="color:media#FF0000">40 00 00 00 00 95</image165span>''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......jpeg|236x186px@.......…|图片10]]
RX | FF FF FF FF FF FF '''</divspan style="color:#FF0000">40 00 00 00 00 95</lispan><li><p>Then select the audio''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......wav file, right click and select open with vlc to start playing</p>…|<p>[[File:media/image166.png|241x195px]]</p></li>}<li><p>How to switch between different audio devices such as HDMI playback and headphone playback</pol><ol stylespan id="listpin-stylei2c-type: lowertest-alpha;1"><li><p>First open the volume control interface</p><p>[[File:media/image167.png|294x161px]]</p></li><li><p>When playing audio, the audio device options that the playback &gt; software can use will be displayed in '''Playback''', as shown &gt; in the figure below, where you can set which audio device to &gt; play to</p><div class="figure"span>
[[File:media/image168.png|576x324px|4]] </div></li></ol></li></ol> <span id="infrared-receiving-test"></span>== Infrared receiving 26pin I2C test ===
<ol style="list-style-type: decimal;">
<li><p>According to the schematic diagram of 26pin, the available i2c is i2c3</p><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><ol style="list-style-type: lower-alpha;"><li><p>Firstrun '''orangepi-config''', you need normal users remember to add '''sudo''' permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p>|}</li><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 insert the 13pin expansion board into position shown in the figure below, and then use the '''space''' to select '''ph-i2c3'''</p><p>[[File:zero3-img179.png]]</p></li><li><p>Then select '''&lt;Save&gt;''' to save</p><p>[[File:zero3-img88.png]]</p></li><li><p>Then select '''&lt;Back&gt;'''</p><p>[[File:zero3-img89.png]]</p></li><li><p>Then select '''&lt;Reboot&gt;''' to restart the 13pin interface of system to make the Orange Pi development boardconfiguration take effect</p><p>[[File:zero3-img90. png]]</p></li></ol></li><li><p>After inserting starting the expansion boardlinux system, the development board can use the infrared receiving functionfirst 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>'''/dev/i2c-3'''</p>|}</li><li><div p>Then start testing i2c, first install i2c-tools</p>{| class="figurewikitable" style="width:800px;"|-| <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p><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><p>[[File:zero3-img186.png]]</p>
[[File{| class="wikitable" style="width:800px;"|-| style="text-align: center;"| '''Pins of the RTC module'''| style="text-align: center;"| '''The pin corresponding to the 26pin of the development board'''|-| style="text-align: center;"| '''5V'''| style="text-align: center;"| '''Pin 2'''|-| style="text-align: center;"| '''GND'''| style="text-align: center;"| '''Pin 6'''|-| style="text-align: center;"| '''SDA'''| style="text-align: center;"| '''Pin 3'''|-| style="text-align: center;"| '''SCL'''| style="text-align:media/image163.jpegcenter;"|164x163px'''Pin 5'''|IMG_256]]}</li></ol><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>
[[File:zero3-img187.png]]</ol><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>{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 ds1307.py --device \'''</p><p>'''&quot;/dev/i2c-3&quot;'''</divp><p>Thu 2022-06-16 04:35:46</lip><lip>Thu 2022-06-16 04:35:47</p><p>Install irThu 2022-keytable infrared testing software06-16 04:35:48</p><p>^C</p><p>exit</p>|}</li></ol>
orangepi@orangepi:~$ '''sudo''' '''apt update'''<span id="pin-uart-test-1"></span>
orangepi@orangepi:~$ '''sudo''' '''apt-get install -y ir-keytable'''=== 26pin UART test ===
<ol start="3" style="list-style-type: decimal;"><li><p>Then execute ir-keytable According to view the information schematic diagram of the infrared device26pin interface, the available uart is uart5</p><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>
<ol style="list-style-type: lower-alpha;">
<li><p>First run '''orangepi-config''', normal users remember to add '''sudo''' permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p>|}</li><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 '''&lt;Save&gt;''' to save</p><p>[[File:zero3-img88.png]]</p></li><li><p>Then select '''&lt;Back&gt;'''</p><p>[[File:zero3-img89.png]]</p></li><li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the configuration take effect</p><p>[[File:zero3-img90.png]]</p></li></ol></li><li><p>After entering the linux system, first confirm whether there is a uart5 device node under '''/dev'''</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that the linux5.4 system output is as follows/dev/ttyAS5.'''</p></big>|}{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''ls /dev/ttyS5'''</p><p>/dev/ttyS5</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" style="width:800px;text-align: center;"|-|| style="text-align: center;"| '''uart5'''|-| '''tx pin'''| style="text-align: center;"| '''Corresponding to pin 8 in 26pin'''|-| '''rx pin'''| style="text-align: center;"| '''Corresponding to pin 10 in 26pin'''|}</li></ol><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>{| class="wikitable" style="width:800px;text-align: center;" |-| <p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device &quot;/dev/ttyS5&quot; # linux6.1使用'''</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device &quot;/dev/ttyAS5&quot; # linux5.4使用'''</p><p>Out: 0: -&gt; 0</p><p>Out: 1: -&gt; 1</p><p>Out: 2: -&gt; 2</p><p>Out: 3: -&gt; 3</p><p>Out: 4:^C</p><p>exit</p>|}
</li></ol>
orangepi@orangepi:~$ '''ir<span id="hardware-keytable'''watchdog-test"></span>
Found /sys/class/rc/rc0/ (/dev/input/event1) with:== Hardware Watchdog Test ==
Driver: sunxiThe watchdog_test program is pre-rc-recvinstalled in the linux system released by Orange PI, table: rc_map_sunxiwhich can be tested directly.
lirc deviceThe method of running the watchdog_test program is shown below: /dev/lirc0
Supported protocols<ol style="list-style-type: lirc neclower-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>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>open success</p><p>options is 33152,identity is sunxi-wdt</p><p>put_usr return,if 0,success:0</p><p>The old reset time is: 16</p><p>return ENOTTY,if -1,success:0</p><p>return ENOTTY,if -1,success:0</p><p>put_user return,if 0,success:0</p><p>put_usr return,if 0,success:0</p><p>keep alive</p><p>keep alive</p><p>keep alive</p>|}</li></ol>
Enabled protocols: lirc nec<span id="check-the-chipid-of-the-h618-chip"></span>
Name: sunxi_ir_recv== Check the chipid of the H618 chip ==
bus: 25The command of the H618 chip Chipid is shown below. The chipid of each chip is different, vendor/product: 0001:0001, version: 0x0100so you can use Chipid to distinguish multiple development boards.
Repeat delay {| class= 500 ms, repeat period "wikitable" style= 125 ms"width:800px;" |-| orangepi@orangepi:~$ '''cat /sys/class/sunxi_info/sys_info | grep &quot;chipid&quot;'''
<ol start="2" style="list-style-typesunxi_chipid : lower-alpha;">338020004c0048080147478824681ed1<li><p>The output of the linux6.1 system is as follows</p><p>orangepi@orangepi:~$ '''ir-keytable'''</p><p>Found /sys/class/rc/rc0/ with:</p><p>Name: sunxi-ir</p><p>Driver: sunxi-ir</p><p>Default keymap: rc-empty</p><p>Input device: /dev/input/event5</p><p>LIRC device: /dev/lirc0</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>Enabled kernel protocols: lirc</p><p>bus: 25, vendor/product: 0001:0001, version: 0x0100</p><p>Repeat delay = 500 ms, repeat period = 125 ms</p></li></ol>|}
<!-- --><ol start="4" stylespan id="listpython-stylerelated-type: decimal;instructions"><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><div class="figure"span>
[[File:media/image169.jpeg|140x131px|IMG_256]]== Python related instructions ==
</div></li><li><p>Then enter the '''irspan id="python-keytable source-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-stylecompilation-and-type: lowerinstallation-alpha;method"><li>linux5.4 system output is as follows</li></olspan></li></ol>=== Python source code compilation and installation method ===
orangepi@orangepi{| class="wikitable" style="background-color:~$ #ffffdc;width:800px;" |-| <big>'''sudo ir-keytable -tIf 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.'''
Testing events'''The following demonstration is the latest version of the compilation and installation of Python3. Please9. If you want to compile and install other versions of Python, press CTRL-C the method is the same (need to download the source code corresponding to the Python you want to abortinstall).'''</big>|}
1598339152<ol style="list-style-type: decimal;"><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 install -y build-essential zlib1g-dev \'''</p><p>'''libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev \'''</p><p>'''libreadline-dev libffi-dev curl libbz2-dev'''</p>|}</li><li><p>Then download the latest version of the Python3.2603769 source code and decompress it</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi: event type EV_MSC(0x04)~$ '''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>orangepi@orangepi:~$ '''tar xvf Python-3.9.10.tgz'''</p>|}</li><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:~$ '''./configure --enable-optimizations'''</p>|}</li><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:~$ '''sudo make altinstall'''</p>|}</li><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>'''Python 3.9.10'''</p>|}</li><li><p>Then update pip</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi: scancode ~$ '''/usr/local/bin/python3.9 -m pip install --upgrade pip'''</p>|}</li></ol> <span id= 0xfb0413"python-to-replace-the-pip-source-method"></span>
1598339152.260376: event type EV_SYN(0x00).=== Python to replace the pip source method ===
1598339152.914715{| class="wikitable" style="background-color: event type EV_MSC(0x04)#ffffdc;width: scancode = 0xfb0410800px;" |-| <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 startstyle="list-style-type: decimal;"><li><p>First install '''python3-pip'''</p>{| class="2wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo apt-get update'''</p><p>orangepi@orangepi:~$ '''sudo apt-get install -y python3-pip'''</p>|}</li><li><p>Method of permanent replacement of pip source under Linux</p><ol style="list-style-type: lower-alpha;"><li><p>linux6Create a new'''~/.1 system output is pip''' directory first, then add the '''pip.conf''' configuration file, and set the source of the pip as followsTsinghua source</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo ir-keytable -c mkdir -p NEC -t~/.pip'''</p><p>orangepi@orangepi:~$ '''cat &lt;&lt;EOF &gt; ~/.pip/pip.conf'''</p><p>Old keytable cleared'''[global]'''</p><p>Protocols changed to nec'''timeout = 6000'''</p><p>Testing events'''index-url = https://pypi. Please, press CTRLtuna.tsinghua.edu.cn/simple'''</p><p>'''trusted-C to aborthost = pypi.tuna.tsinghua.edu.cn'''</p><p>202.063219: lirc protocol(nec): scancode = 0x45c'''EOF'''</p>|}</li><li><p>Then install the Python library with pip3, it will be fast</p></li></ol></li><li><p>The method of temporarily replacing the pip source under Linux, the '''&lt;packagename&gt;''' needs to be replaced with a specific package name</p>202.063249{| class="wikitable" style="width: event type EV_MSC(0x04)800px;" |-| <p>orangepi@orangepi: scancode = 0x45c~$ '''pip3 install &lt;packagename&gt; -i \'''</p><p>202'''https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.063249: event type EV_SYN(0x00)tuna.tsinghua.edu.cn'''</p>|}</li></ol>
<span id="temperaturethe-sensormethod-of-installing-the-docker"></span>== Temperature sensor ==
# H618 has a total of 4 temperature sensors, the command to view the temperature is as follows:== 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'The displayed temperature value needs '' script to enable the docker service, and then you can start using the docker command, and the docker service will be divided by 1000, automatically activated at the next start of the unit is Celsiussystem.'''
<ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li>sensor0|-| orangepi@orangepi: CPU temperature sensor, the first command is used to view &gt; the type of temperature sensor, and the second command is used to &gt; view the value of the temperature sensor</li></ol>~$ '''enable_docker.sh'''|}
orangepi@orangepi:~$ You can use the following command to test the docker,If you can run '''cat /sys/class/thermal/thermal_zone0/typehello-world'''to indicate that docker can be used normally..
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''cpudocker run hello-world'''_thermal_zone
orangepi@orangepiUnable to find image 'hello-world:~$ '''cat /sys/class/thermal/thermal_zone0/temp''latest'locally
'''57734'''latest: Pulling from library/hello-world
<ol start="2" style="list-style-type256ab8fe8778: lower-alpha;"><li><p>sensor1: DDR temperature sensor, the first command is used to view &gt; the type of temperature sensor, and the second command is used to &gt; view the value of the temperature sensor</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/type'''</p><p>'''ddr'''_thermal_zone</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone1/temp'''</p><p>'''57410'''</p></li><li><p>sensor2: GPU temperature sensor, the first command is used to view &gt; the type of temperature sensor, the second command is used to view &gt; the value of the temperature sensor</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/type'''</p><p>'''gpu'''_thermal_zone</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/temp'''</p><p>'''59273'''</p></li><li><p>sensor3: VE temperature sensor, the first command is used to view &gt; the type of temperature sensor, and the second command is used to &gt; view the value of the temperature sensor</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/type'''</p><p>'''ve'''_thermal_zone</p><p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/temp'''</p><p>'''58949'''</p></li></ol>Pull complete
<!-- --><ol start="2" style="list-style-typeDigest: decimal;"><li>The system with Linux6.1 kernel can also use the '''sensors''' command to view the current temperature of the system</li></ol>sha256:7f0a9f93b4aa3022c3a4c147a449ef11e0941a1fd0bf4a8e6c9408b2600777c5
orangepi@orangepiStatus:~$ '''sensors'''Downloaded newer image for hello-world:latest
cpu_thermal-virtual-0
Adapter'''<span style="color: Virtual device#FF0000">Hello from Docker!</span>'''
temp1: +'''47<span style="color:#FF0000">This message shows that your installation appears to be working correctly.4°C</span>''' (crit = +110.0°C)
gpu_thermal-virtual-0'''.….'''|}
Adapter: Virtual deviceWhen 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.
temp1{| class="wikitable" style="width:800px;" |-| orangepi@orangepi: +~$ '''48.7°Csudo usermod -aG docker $USER''' (crit = +110.0°C)|}
ddr_thermal{| class="wikitable" style="background-virtualcolor:#ffffdc;width:800px;" |-0| <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>|}
Adapter: Virtual device<span id="how-to-install-home-assistant"></span>
temp1: +'''47.8°C''' (crit = +110.0°C)= How to install Home Assistant ==
ve_thermal{| class="wikitable" style="background-virtualcolor:#ffffdc;width:800px;" |-0| <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>|}
Adapter: Virtual device temp1: +'''47.2°C''' (crit = +110.0°C) <span id="pin-description-of-the-pin-expansioninstall-boardvia-interfacedocker"></span>== 13 Pin Description of the Pin Expansion Board Interface = Install via docker ===
<ol style="list-style-type: decimal;">
<li><p>Please First of all, please install docker and make sure that docker can run normally. The Method Of Installing The Docker, please refer to the figure below for the order of the interface pins of instructions in the 13 pin expansion board section on the development board</p><div class="figure"> [[File:media/image170.jpeg|245x133px|C:\Users\orangepi\Desktop\用户手册插图\Zero3\未标题-Orange Pi Zero 3.jpg未标题-3]] </div></li><li><p>#The Method Of Installing The schematic diagram of the 13pin interface of the development board is as follows</p><p>[[File:media/image19.pngDocker|359x193px'''how to install Docker''']].</p></li><li><p>The function description of Then you can search for the 13 pin expansion board interface pins docker image of the development board is as followsHome Assistant</p><ol style{| class="list-style-type: lower-alpha;wikitable"><li><p>When the 13pin pin is connected to the expansion board, it can &gt; be provided additionally</p><ol style="list-style-typewidth: lower-alpha800px;"><li><p>2个USB 2.0 Host</p></li><li><p>Audio output of the left and right audio channels of the &gt; earphones</p></li><li><p>TV|-OUT video output</p></li><li><p>Infrared receiving function</p></li>| <li><p>After the expansion board is connected, pins 10, 11 and 12 &gt; of the 13pin interface cannot be used</p></li><li><p>orangepi@orangepi:~$ '''In addition, it should be noted that the MIC on the 13pin expansion board cannot be used on the Orange Pi Zero 3docker search homeassistant'''</p></li></ol>|}
</li>
<li><p>When pin 13 is not connected Then use the following command to download the docker image of Home Assistant to the expansion board, pins 10local. The size of the image is about 1GB, &gt; 11, 12 and 13 can the download time will be used as ordinary GPIO portsrelatively long. Please wait patiently for the download to complete</p></li></ol></li></ol> {| class="wikitable" style="width:800px;"
|-
| style="text-align<p>orangepi@orangepi: left;"| ~$ '''GPIO serial numberdocker pull homeassistant/home-assistant'''</p><p>Using default tag: latest</p>| style="text<p>latest: Pulling from homeassistant/home-alignassistant</p><p>be307f383ecc: left;"| Downloading</p><p>5fbc4c07ac88: Download complete</p><p>'''Function...... (omit some output)'''</p><p>3cc6a1510c9f: Pull complete</p><p>7a4e4d5b979f: Pull complete</p><p>Digest: sha256:81d381f5008c082a37da97d8b08dd8b358dae7ecf49e62ce3ef1eeaefc4381bb</p><p>Status: Downloaded newer image for homeassistant/home-assistant:latest</p><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>{| class="wikitable" style="text-alignwidth: left800px;"| '''Pin'''
|-
| style="text<p>orangepi@orangepi:~$ '''docker images homeassistant/home-align: leftassistant'''</p><p>REPOSITORY &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TAG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CREATED &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"|SIZE</p>| <p>homeassistant/home-assistant &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latest &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bfa0ab9e1cf5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 months ago &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<span style="text-aligncolor: left;#FF0000"| '''5V>1.17GB</span>'''</p>|}</li><li><p>Now you can run the docker container of Home Assistant</p>{| class="wikitable" style="text-alignwidth: left800px;"| '''1'''
|-
| style<p>orangepi@orangepi:~$ '''docker run -d \'''</p>:<p>'''--name homeassistant \'''</p>:<p>'''--privileged \'''</p>:<p>'''--restart=unless-stopped \'''</p>:<p>'''-e TZ="textAsia/Shanghai \'''</p>:<p>'''-v /home/orangepi/home-alignassistant: left;"|/config \'''</p>| style:<p>'''--network="text-alignhost \'''</p>: left;"| <p>'''GNDhomeassistant/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>{| class="wikitable" style="textbackground-aligncolor:#ffffdc;width: left800px;"| '''2'''
|-
| <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><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><p>[[File:zero3-img190-1.png]]</p></li><li><p>Then click Next</p><p>[[File:zero3-img191-1.png]]</p></li><li><p>Then click Finish</p><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><p>[[File:zero3-img193-1.png]]</p></li><li><p>How to stop the Home Assistant container</p><ol style="textlist-alignstyle-type: leftlower-alpha;"|><li><p>The command to view the docker container is as follows</p>{| styleclass="text-align: left;wikitable"| '''USB2-DM'''| style="text-alignwidth: left800px;"| '''3'''
|-
| style="text-align: left;"|| style="text-align<p>orangepi@orangepi: left;"| ~$ '''USB2docker ps -DPa'''</p>| }</li><li><p>The command to stop the Home Assistant container is as follows</p>{| class="wikitable" style="text-alignwidth: left800px;"| '''4'''
|-
| style="text-align: left;"|| style="text-align<p>orangepi@orangepi: left;"| ~$ '''USB3-DMdocker stop homeassistant'''</p>|}</li><li><p>The command to delete the Home Assistant container is as follows</p>{| class="wikitable" style="text-alignwidth: left800px;"| '''5'''
|-
| style="text-align: left;"|| style="text-align: left;"| '''USB3-DP'''| style="text-align: left;"| '''6'''|-| style="text-align: left;"|| style="text-align: left;"| '''LINEOUTR'''| style="text-align: left;"| '''7'''|-| style="text-align: left;"|| style="text-align: left;"| '''LINEOUTL'''| style="text-align: left;"| '''8'''|-| style="text-align: left;"|| style="text-align: left;"| '''TV-OUT'''| style="text-align: left;"| '''9'''|-| style="text-align: left;"| '''65'''| style="text-align: left;"| '''PC1'''| style="text-align: left;"| '''10'''|-| style="text-align: left;"| '''272'''| style="text-align<p>orangepi@orangepi: left;"| ~$ '''PI16docker rm homeassistant'''| style="text-align: left;"| '''11'''|-| style="text-align: left;"| '''262'''| style="text-align: left;"| '''PI6'''| style="text-align: left;"| '''12'''|-| style="text-align: left;"| '''234'''| style="text-align: left;"| '''IR-RX</PH10'''| style="text-align: left;"| '''13'''p>
|}
</li></ol>
</li></ol>
<span id="pininstall-interfacevia-pin-descriptionpython"></span>== 26 Pin Interface Pin Description ==
<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><p>[[File:media/image171.png|389x125px]]</p></li><li><p>The functions of the 26 pin interface pins on the development board are shown in the table below</p></li></ol>== Install via python ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| style="text-align: left;"| ''<big>'GPIO S/N'''| style="text-align: left;"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| '''GPIOhow to replace the pip source with Python'''| style="text-align: left;"| '''Function]].'''</big>| style="text-align: left;"| '''Pin'''}|| <ol style="textlist-align: left;"| '''Pin'''| style="text-aligntype: leftdecimal;"| '''Function'''><li><p>First install the dependency package</p>{| styleclass="text-align: left;wikitable"| '''GPIO'''| style="text-alignwidth: left800px;"| '''GPIO S/N'''
|-
| style="text-align: left;"|| style="text-align: left;"|| style="text-align<p>orangepi@orangepi: left;"| ~$ '''3.3Vsudo apt-get update'''</p>| style="text-align<p>orangepi@orangepi: left;"| ~$ '''1sudo apt-get install -y python3 python3-dev python3-venv \'''</p>|| style="text-align: left;"| <p>'''2python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \'''</p>| style="text-align: left;"| <p>'''5Vlibopenjp2-7 libtiff5 libturbojpeg0-dev tzdata'''</p>| style}{| class="text-align: left;wikitable"|| style="textbackground-aligncolor:#ffffdc;width: left800px;"|
|-
| style="text-align: left;"| <big><p>'''229If it is debian12, please use the following command:'''</p></big>| style="text-align <p>orangepi@orangepi: left;"| ~$ '''PH5sudo apt-get update'''</p>| style="text-align<p>orangepi@orangepi: left;"| ~$ '''TWI3sudo apt-get install -y python3 python3-dev python3-SDAvenv \'''</p>| style="text-align: left;"| <p>'''3python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential \'''</p>|| style="text-align: left;"| <p>'''4libopenjp2-7 libturbojpeg0-dev tzdata'''</p>| style="text-align: left;"}</li><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| '''5Vhow to compile and install Python source code''']]</p>{| styleclass="text-align: left;wikitable"|| style="textbackground-aligncolor: left#ffffdc;width:800px;"|
|-
| style="text-align: left;"| <big><p>'''228The default Python version of Debian Bullseye is Python3.9, so there is no need to compile and install.'''</p>| style="text-align: left;"| <p>'''PH4The default Python version of Ubuntu Jammy is Python3.10, so there is no need to compile and install.'''</p>| style="text-align: left;"| <p>'''TWI3-SCKThe default Python version of Debian Bookworm is Python3.11, so there is no need to compile and install.'''</p></big>| style="text-align: left;"| '''5'''}|</li>| style="text-align: left;"| '''6'''<li><p>Then create a Python virtual environment</p>{| styleclass="text-align: left;wikitable"| '''GND'''| style="textbackground-aligncolor: left#ffffdc;"|| style="text-alignwidth: left800px;"|
|-
| style="text-align: left;"| '''73'''| style="text-align: left;"| '''PC9'''| style="text-align: left;"| '''PC9'''| style="text-align: left;"| '''7'''|| style="text-align: left;"| <big><p>'''8Debian Bookworm is python3.11, please remember to replace the corresponding command.'''</p></big>| style="text-align: left;"| '''UART5_TX'''}{| styleclass="text-align: left;wikitable"| '''PH2'''| style="text-alignwidth: left800px;"| '''226'''
|-
| style="text-align: left;"|| style="text-align: left;"|| style="text-align: left;"| '''GND'''| style="text-align<p>orangepi@orangepi: left;"| ~$ '''9sudo mkdir /srv/homeassistant'''</p>|| style="text-align<p>orangepi@orangepi: left;"| ''~$ '10'''| style="text-alignsudo chown orangepi: left;"| '''UART5_RXorangepi /srv/homeassistant'''</p>| style="text-align<p>orangepi@orangepi: left;"| ~$ '''PH3cd /srv/homeassistant'''</p>| style="text-align<p>orangepi@orangepi: left;"| ~$ '''227'''|-| style="text-align: left;"| '''70'''| style="textpython3.9 -align: left;"| '''PC6m venv .'''</p>| style="text-align<p>orangepi@orangepi: left;"| ~$ '''PC6source bin/activate'''</p>| style="text-align<p>(homeassistant) orangepi@orangepi: left;"| '''11'''/srv/homeassistant$</p>|}| style="text-align: left;"| '''12'''</li>| style="text-align: left;"| '''PC11'''<li><p>Then install the required Python package</p>{| styleclass="text-align: left;wikitable"| '''PC11'''| style="text-alignwidth: left800px;"| '''75'''
|-
| style="text-align: left;"| '''69'''| style="text-align: left;"| '''PC5'''| style="text-align<p>(homeassistant) orangepi@orangepi: left;"| '/srv/homeassistant$ ''PC5'''| style="textpython3 -align: left;"| '''13m pip install wheel'''</p>|}| style="text-align: left;"| '''14'''</li>| style="text-align: left;"| '''GND'''<li><p>Then you can install Home Assistant Core</p>{| styleclass="text-align: left;wikitable"|| style="text-alignwidth: left800px;"|
|-
| style="text-align: left;"| '''72'''| style="text-align<p>(homeassistant) orangepi@orangepi: left;"| /srv/homeassistant$ '''PC8pip3 install homeassistant'''</p>| style="text-align: left;"| '''PC8'''}| style="text-align: left;"| '''15'''</li>|<li><p>Then enter the following command to run Home Assistant Core</p>{| styleclass="text-align: left;"| '''16'''| style="text-align: left;"| '''PC15'''| style="text-align: left;wikitable"| '''PC15'''| style="text-alignwidth: left800px;"| '''79'''
|-
| style="text-align: left;"|| style="text-align<p>(homeassistant) orangepi@orangepi: left;"|| style="text-align: left;"| /srv/homeassistant$ '''3.3Vhass'''</p>| style="text-align: left;"| '''17'''}|</li>| style="text-align: left;"| <li><p>Then enter '''18[IP address of the development board: 8123]'''in the browser to see the interface of Home Assistant</p>{| styleclass="text-align: left;wikitable"| '''PC14'''| style="textbackground-aligncolor: left#ffffdc;"| '''PC14'''| style="text-alignwidth: left800px;"| '''78'''
|-
| style="text-align: left;"| '''231'''| style="text-align: left;"| '''PH7'''| style="text-align: left;"| '''SPI1_MOSI'''| style="text-align: left;"| '''19'''|| style="text-align: left;"| '''20'''| style="text-align: left;"| '''GND'''| style="text-align: left;"|| style="text-align: left;"||-| style="text-align: left;"| '''232'''| style="text-align: left;"| '''PH8'''| style="text-align: left;"| '''SPI1_MISO'''| style="text-align: left;"| '''21'''|| style="text-align: left;"| '''22'''| style="text-align: left;"| '''PC7'''| style="text-align: left;"| '''PC7'''| style="text-align: left;"| '''71'''|-| style="text-align: left;"| '''230'''| style="text-align: left;"| '''PH6'''| style="text-align: left;"| '''SPI1_CLK'''| style="text-align: left;"| '''23'''|| style="text-align: left;"| '''24'''| style="text-align: left;"| '''SPI1_CS'''| style="text-align: left;"| '''PH9'''| style="text-align: left;"| '''233'''|-| style="text-align: left;"|| style="text-align: left;"|| style="text-align: left;"| '''GND'''| style="text-align: left;"| '''25'''|| style="text-align: left;"| '''26'''| style="text-align: left;"| '''PC10'''| style="text-align: left;"| '''PC10'''| style="text-align: left;"| <big><p>'''74When 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>
<ol startspan id="3" style="listopencv-styleinstallation-type: decimal;method"><li>3) There are a total of 17 GPIO ports in the 26pin interface, and the voltage of all GPIO ports is '''3.3v'''</li></olspan>
<span id="how-to-install-wiringop"></span>== How to install wiringOP OpenCV installation method ==
'''Note that wiringOP has been pre<span id="use-apt-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:''' '''orangepi-buildopencv"></external/cache/debs/arm64/wiringpi_x.xx.deb''' '''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.''' [[File:media/image172.png|575x365px]]span> '''wiringOP is currently mainly adapted === Use apt 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.'''install OpenCV ===
<ol style="list-style-type: decimal;">
<li><p>Download the code of wiringOPThe 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 install -y git'''</p><p>orangepi@orangepi:~$ '''git clone https://github.com/orangepilibopencv-xunlong/wiringOP.git dev python3-b nextopencv'''</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><li><p>Compile and install wiringOP</p><p>orangepi@orangepi:~$ '''cd wiringOP'''</p><p>orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''</p><p>orangepi@orangepi:~/wiringOP$ '''sudo ./build'''</p></li><li><p>Test Then use the following command to print the output of the gpio readall command as followsversion number of OpenCV, indicating that the installation of OpenCV is successful</p>
<ol style="list-style-type: lower-alpha;">
<li><p>There The version of OpenCV in ubuntu22.04 is a oneshown below:</p>{| class="wikitable" style="width:800px;" |-to| <p>orangepi@orangepi:~$ '''python3 -one correspondence between pins 1 to 26 and 26 c &quot;import cv2; print(cv2.__version__)&gtquot; Pins on the development board'''</p><p>'''4.5.4'''</p>|}</li><li><p>Pin 27 corresponds to pin 10 The version of 13pin on the development boardOpenCV in Ubuntu 20.04 is shown below:</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''python3 -c &quot;import cv2; print(cv2.__version__)&quot;'''</lip><li><p>Pin 29 corresponds to pin 11 of 13pin on the development board'''4.2.0'''</p>|}</li><li><p>Pin 31 corresponds to pin 12 The version of 13pin on the development boardOpenCV in Debian11 is shown below:</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''python3 -c &quot;import cv2; print(cv2.__version__)&quot;'''</lip><li><p>Pin 33 corresponds to pin 13 of 13pin on the development board'''4.5.1'''</p>|}</li><li><p>The version of OpenCV in Debian12 is shown below:</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''Pins 28, 30, 32, and 34 are empty, please ignore thempython3 -c &quot;import cv2; print(cv2.__version__)&quot;'''</p><p>[[File:media/image172'''4.6.png|575x365px]]0'''</p>|}</li></ol>
</li></ol>
<span id="pinthe-interfaceinstallation-gpiomethod-i2cof-uartthe-spiaapanel-andlinux-pwm-testpanel"></span>== 26pin interface GPIO, I2C, UART, SPI and PWM test ==
<span id="pin-gpio-port-test"></span>=== 26pin GPIO port test =The installation method of the aapanel Linux panel ==
<ol {| class="wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;"><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:media/image173.png|576x128px]]</p></li><libig><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'''<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/p><monitoring/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<website/p><p>root@orangepi:~FTP/wiringOP# '''gpio write 2 0'''<database/p><p>Use gpio readall to see that the value Java (V) of pin 7 has changed to 0</p><p>[excerpted from [Filehttps:media/image174.png|575x128px]]</p></li><li><p>Then set the GPIO port to output a high levelwww. After setting, you can use a multimeter to measure the voltage value of the pinbt. If it is 3.3v, it means that the high level is set successfully.<cn/p><p>root@orangepi:~new/wiringOP# '''gpio write 2 1index.html Baota official website])'''</pbig><p>Use gpio readall to see that the value (V) of pin 7 has changed to 1</p><p>[[File:media/image175.png|575x130px]]</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> <span id="how-to-set-the-pull-down-resistance-of-pin-gpio-port"></span>=== 26 How to set the pull-down resistance of pin GPIO port ===}
<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 First of all, you need to demonstrate how expand the'''/tmp''' memory. After setting, you need to set <span class="mark">'''<span style="color:#FF0000">restart the linux system of the pull-up development board,</span>'''and pull-down resistors of the GPIO portcommand is shown below</span>:</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media~$ '''sudo sed -i 's/nosuid/&amp;,size=2G/image173.png|576x128px]]' /etc/fstab'''</p><p>orangepi@orangepi:~$ '''sudo reboot'''</p>|}</li><li><p>FirstAfter restarting, you need to set the GPIO port to the input mode, and the third parameter needs to be can see that the serial number size of the wPi corresponding to the input pin'''/tmp''' space has become 2G</p>{| class="wikitable" style="width:800px;" |-| <p>rootorangepi@orangepi:~$ '''df -h | grep &quot;/wiringOP# tmp&quot;'''</p><p>tmpfs &nbsp;&nbsp;&nbsp; 2.0G &nbsp;&nbsp;&nbsp; 12K &nbsp;&nbsp;&nbsp; '''gpio mode <span style="color:#FF0000">2 in.0G</span>'''&nbsp;&nbsp;&nbsp; 1% /tmp</p>|}</li><li><p>After setting to input mode, execute Then enter the following command in the Linux system to set start the installation of the GPIO port to pull-up modeaapanel</p>{| class="wikitable" style="width:800px;" |-| <p>rootorangepi@orangepi:~/wiringOP# $ '''gpio mode 2 upsudo install_bt_panel.sh'''</p>|}</li><li><p>Then enter the following command aapanel installation program reminds whether to read install the level of '''Bt-Panel''' to the GPIO port'''/www''' folder, if the level is 1, it means that the pulland enter Y at this time</p>{| class="wikitable" style="width:800px;" |-| <p>+----------------------------------------------------------------------</p><p>| Bt-WebPanel FOR CentOS/Ubuntu/Debian</p><p>+----------------------------------------------------------------------</p><p>| Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.</p><p>+----------------------------------------------------------------------up mode is set successfully</p><p>root@orangepi| The WebPanel URL will be http://SERVER_IP:~8888 when installed.</p><p>+----------------------------------------------------------------------</p><p>Do you want to install Bt-Panel to the /www directory now?(y/wiringOP# n): '''gpio read 2<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><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 ''1'password'''displayed in the corresponding position to log in to the aapanel<br />[[File:zero3-img196.png|1200px]]</p></li><li><p>Then execute After successfully logging in to the aapanel, the following command welcome interface will pop up. First, please take the intermediate user notice to read to set the GPIO port to pull-down modebottom, and then you can choose &quot;I have agreed and read&quot; User Agreement &quot;, and then click&quot; Enter the panel &quot; You can enter the aapanel</p><p>root@orangepi[[File:~zero3-img197.png|1200px]]</p></wiringOP# 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's official website ('''gpio mode 2 downhttps://www.bt.cn''') to register one</p><p>[[File:zero3-img198.png|1200px]]</p></li><li><p>Then enter The final display interface is shown in the following command to read the level figure below. You can intuitively see some status information of the GPIO portdevelopment board Linux system, such as load state, CPU usage, if memory usage and storage space usage</p><p>[[File:zero3-img199.png|1200px]]</p></li><li><p>For more functions of the level is 0aapanel, please refer to the pullfollowing information to explore by yourself</p>{| class="wikitable" style="width:800px;" |-down mode is set successfully| <p>Use manual: [http://docs.bt.cn '''http://docs.bt.cn''']</p><p>root@orangepiForum website: [https:~/wiringOP# /www.bt.cn/bbs '''gpio read 2https://www.bt.cn/bbs''']</p><p>GitHub Link: '''0https://github.com/aaPanel/BaoTa'''</p>|}</li></ol> <span id="face_recognition-the-installation-and-testing-method-of-the-face-recognition-library"></span> == "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 idstyle="pin-spi-testcolor:#FF0000">desktop version</span>=== 26pin SPI test ===, so please make sure that the system used by the development board is a desktop version system.'''
<ol style="list-style-type: decimal;"><li><p>According to the schematic diagram of the 26pin interface'''In addition, the available spi is spi1</p><p>[[File:media/image176.png|565x209px]]</p></li><li><p>The spi1 installation test below 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>performed under <ol span style="list-style-typecolor: lower-alpha;#FF0000">OrangePi<li><p/span>First run '''orangepi-config''', normal users remember to add &gt; '''sudo''' permission</p><p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li><li><p>Then select '''System'''</p><p>[[File:media/image85.png|398x194px]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:media/image86.png|393x202px]]</p></li><li><p>d. Then use the arrow keys on the keyboard to navigate to the &gt; position shown in Please keep the figure below, and then use the '''space''' &gt; to select '''spi1-cs1-spidev'''</p><p>[[File:media/image177.png|392x57px]]</p></li><li><p>Then select '''&lt;Save&gt;''' to save</p><p>[[File:media/image88.png|397x92px]]</p></li><li><p>Then select '''&lt;Back&gt;'''</p><p>[[File:media/image89environment consistent.png|395x91px]]</p></li><li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect</p><p>[[File:media/image90.png|374x187px]]</p></li></ol></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><p>orangepi@orangepi:~$ '''ls /dev/spidev1*'''</p><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><p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev1.1'''</p><p>spi mode: 0x0</p><p>bits per word: 8</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>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><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><p>orangepi@orangepi:~$ '''sudo spidev_test -v -D /dev/spidev1.1'''</p><p>spi mode: 0x0</p><p>bits per word: 8</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>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>
<span id="pin-i2c-test"></span>
=== 26pin I2C test ===
<ol style="list-style-type: decimal;"><li><p>According to the schematic diagram of 26pin, the available i2c is i2c3</p><p>[[File:media/image178.png|575x204px]]</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><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add &gt; '''sudo''' permission</p><p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li><li><p>Then select '''System'''</p><p>[[File:media/image85.png|390x190px]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:media/image86.png|393x202px]]</p></li><li><p>d. Then use the arrow keys on the keyboard to navigate to the &gt; position shown in the figure below, and then use the '''space''' &gt; to select '''ph-i2c3'''</p><p>[[File:media/image179.png|392x57px]]</p></li><li><p>Then select '''&lt;Save&gt;''' to save</p><p>[[File:media/image88.png|395x91px]]</p></li><li><p>Then select '''&lt;Back&gt;'''</p><p>[[File:media/image89Debian12 is currently not adapted.png|395x91px]]</p></li><li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect</pbig><p>[[File:media/image90.png|374x187px]]</p></li></ol></li><li><p>After starting the linux system, first confirm that there is an i2c3 device node under /dev</p><p>orangepi@orangepi:~$ '''ls /dev/i2c-3'''</p><p>'''/dev/i2c-3'''</p></li><li><p>Then start testing i2c, first install i2c-tools</p><p>orangepi@orangepi:~$ '''sudo apt-get update'''</p><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><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></li></ol>}
{| class="wikitable"|-| style="textbackground-aligncolor: left#ffffdc;"| '''sda pin'''| style="text-align: left;"| '''Corresponding to pin 3 in 26pin'''|-| style="text-align: left;"| '''sck pin'''| style="text-alignwidth: left800px;"| '''Corresponding to pin 5 in 26pin'''
|-
| style="text-align: left;"| '''5v pin'''| style="text-align: left;"| '''Corresponding to pin 2 in 26pin'''|-| style="text-align: left;"| '''3.3v pin'''| style="text-align: left;"| <big>'''Corresponding to pin 1 in 26pin'''|-| style="text-alignThe address of the source code warehouse of Face_recognition is: left;"| '''gnd pin'''| style="text-align: left;"| '''Corresponding to pin 6 in 26pin'''|}
<ol start="6" style="list-style-type[https: decimal;"><li><p>Then use the //github.com/ageitgey/face_recognition '''i2cdetect -y 3''' command, if the address of the connected i2c device can be detected, it means that i2c can be used normally<https://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 seegithub.com/ageitgey/face_recognition'''</p><div class="figure">]
[[File'''Face_recognition Chinese version of the explanation document is:media/image180.png|383x151px|选区_460]]'''
<'''https://github.com/ageitgey/face_recognition/blob/div><master/li>README_Simplified_Chinese.md'''</olbig>|}
<span id="pinthe-uartmethod-testof-using-script-to-automatically-install-face_recognition"></span>=== 26pin UART test The method of using script to automatically install face_recognition ===
<ol style="list-style-type: decimal;">
<li><p>According to First open a terminal on the schematic diagram of the 26pin interfacedesktop''', the available uart is uart5then download face_recognition_install.sh'''</p><p>[[File:media/image181.png{|575x203px]]</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><ol class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>First run '''orangepi|-config''', normal users remember to add &gt; '''sudo''' permission</p>| <p>orangepi@orangepi:~/Desktop$ '''sudo orangepi-config'''</p></li><li><p>Then select '''Systemwget \'''</p><p>[[File:media/image85.png|398x194px]]</p></li><li><p>Then select '''Hardware'''</p><p>[[Filehttps:media/image86.png|393x202px]]</p></li><li><p>Then use the arrow keys on the keyboard to navigate to the &gt; position shown in the figure below, and then use the '''space''' &gt; to select '''ph-uart5'''</p><p>[[File:media/image182gitee.png|400x60px]]<com/p><leeboby/li><li><p>Then select '''&lt;Save&gt;''' to save<face_recognition_install/p><p>[[File:mediaraw/image88.png|397x92px]]</p></li><li><p>Then select '''&lt;Back&gt;'''<master/p><p>[[File:media/image89face_recognition_install.png|395x91px]]</p></li><li><p>Then select '''&lt;Reboot&gt;sh''' to restart the system to make the &gt; configuration take effect</p><p>[[File:media/image90.png|374x187px]]</p></li></ol>}
</li>
<li><p>After entering Then execute the linux system, first confirm whether there is a uart5 device node under '''/dev'''</p><p>'''Note that following command to start the linux5.4 system is /dev/ttyAS5.'''</p><p>orangepi@orangepi:~$ installation '''ls /dev/ttyS5face_recognition'''</p><p>/dev/ttyS5</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></li></ol> {| class="wikitable" style="width:800px;"
|-
|| style="text-align<p>orangepi@orangepi: left;"| uart5|-| tx pin| style="text-align: left;"| Corresponding to pin 8 of 26pin|-| rx pin| style="text-align: left;"| Corresponding to pin 10 of 26pin~/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>
<p>[[File:zero3-img200.png]]</p></li></ol>
<ol startspan id="5" style="listmanually-styleinstall-type: decimal;face_recognition"><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><p>orangepi@orangepi:~$ '''gpio serial /dev/ttyAS5 # linux-5.4 test command'''</p><p>Out: 0: -&gt; 0</p><p>Out: 1: -&gt; 1</p><p>Out: 2: -&gt; 2</p><p>Out: 3: -&gt; 3^C</p></li></olspan>
<span id="pwm-test-method"></span>==Manually install face_recognition = 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:''' [[File:media/image183.png|388x180px]]
<ol style="list-style-type: decimal;">
<li><p>In the Linux systemFirst create a new '''~/.pip''' directory, then add the pwm is closed by default'''pip.conf''' configuration file, and set the mirror source of pip to Tsinghua source in it needs , the commands to be opened manually to use it. The steps to open executed are as follows:</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li>|-| <p>First run orangepi@orangepi:~$ '''orangepimkdir -config''', normal users remember to add &gt; '''sudop ~/.pip''' permission</p><p>orangepi@orangepi:~$ '''sudo orangepi-configcat &lt;&lt;EOF &gt; ~/.pip/pip.conf'''</p><p>'''[global]'''</lip><li><p>Then select '''Systemtimeout = 6000'''</p><p>[[File'''index-url = https:media/image85/pypi.tuna.tsinghua.edu.png|398x194px]]cn/simple'''</p></li><li><p>Then select '''Hardwaretrusted-host = pypi.tuna.tsinghua.edu.cn'''</p><p>[[File:media/image86.png|393x202px]]'''EOF'''</p>|}</li><li><p>Then use the arrow keys on the keyboard to navigate to the &gt; position shown in the figure below, and then use the space to &gt; select the configuration corresponding to pwminstall dependencies</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''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).sudo apt update'''</p><p>orangepi@orangepi:~$ '''PWM3, PWM4 and the TX and RX pins in the debug serial port are multiplexed, so when using PWM3 and PWM4 (need to select phsudo apt install -y python3-pwm34), please turn off the configuration of UART0 (need to select disablepip libopencv-uart0), after turning off UART0 The debug serial port cannot be used.dev \'''</p><p>[[File:media/image184.png|402x156px]]'''python3-opencv imagemagick python3-scipy python3-setuptools python3-wheel \'''</p></li><li><p>Then select '''&lt;Save&gt;python3-dev cmake python3-testresources''' to save</p><p>[[File:media/image88.png|397x92px]]</p>}</li><li><p>Then select '''&lt;Back&gt;'''update pip3</p><p>[[File{| class="wikitable" style="width:media/image89.png800px;" |-|395x91px]]</p></li><li><p>Then select orangepi@orangepi:~$ '''&lt;Reboot&gt;python3 -m pip install -U pip setuptools wheel''' to restart the system to make the &gt; configuration take effect</p><p>[[File:media/image90.png|374x187px]]</p></li></ol>}
</li>
<li><p>After restartingBefore installing '''face_recognition''', you first need to install the '''dlib''' library. Since the PWM test 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 be startedinstall it directly after downloading. The download address of the dlib whl file is as follows:</p>{| class="wikitable" style="width:800px;" |-| <p>'''Please execute the following commands under the root userhttps://gitee.com/leeboby/python_whl'''</p>|}
<ol style="list-style-type: lower-alpha;">
<li><p>Enter First download the following command on python_whl warehouse to the command line to make pwm1 &gt; output a 50Hz rectangular waveLinux system of the development board</p>{| class="wikitable" style="width:800px;" |-| <p>rootorangepi@orangepi:~# $ '''echo git clone --depth=1 &gt; https:/sys/classgitee.com/pwmleeboby/pwmchip0/exportpython_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>root@orangepi {| class="wikitable" style="width:800px;"|-| style="text-align:~# center;"| '''Ubuntu20.04'''echo 20000000 &gt| style="text-align: center; /sys/class/pwm/pwmchip0/pwm1/period"| '''dlib-19.24.0-cp38-cp38-linux_aarch64.whl'''</p><p>root@orangepi|-| style="text-align:~# center;"| '''Ubuntu22.04'''echo 1000000 &gt| style="text-align: center; /sys/class/pwm/pwmchip0/pwm1/duty_cycle"| '''dlib-19.24.0-cp310-cp310-linux_aarch64.whl'''</p><p>root@orangepi|-| style="text-align:~# center;"| '''Debian11'''echo 1 &gt| style="text-align: center; /sys/class/pwm/pwmchip0/pwm1/enable"| '''dlib-19.24.0-cp39-cp39-linux_aarch64.whl'''</p></li><li><p>Enter the following command on the command line to make pwm2 &gt; output a 50Hz square wave</p></li></ol>|}
</li></ol>
 
root@orangepi:~# '''echo 2 &gt; /sys/class/pwm/pwmchip0/export'''
 
root@orangepi:~# '''echo 20000000 &gt; /sys/class/pwm/pwmchip0/pwm2/period'''
 
root@orangepi:~# '''echo 1000000 &gt; /sys/class/pwm/pwmchip0/pwm2/duty_cycle'''
 
root@orangepi:~# '''echo 1 &gt; /sys/class/pwm/pwmchip0/pwm2/enable'''
 
<ol start="3" style="list-style-type: lower-alpha;">
<li>Enter <p>Then you can start installing dlib, the following command on is as follows</p><ol style="list-style-type: none;"><li><p>a) Ubuntu20.04</p>{| class="wikitable" style="width:800px;" |-| <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><li><p>b) Ubuntu22.04</p>{| class="wikitable" style="width:800px;" |-| <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><li><p>c) Debian11</p>{| class="wikitable" style="width:800px;" |-| <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></li><li><p>After installation, if the version number of dlib can be printed normally by using the following command line to make pwm3 output , it means that dlib is installed correctly</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~/python_whl$ '''python3 -c &quot;import dlib; print(dlib.__version__)&gtquot; a 50Hz rectangular wave'''</p><p>'''19.24.0'''</p>|}</li></ol></li></ol><!-- --><ol start="5" style="list-style-type: decimal;"><li><p>Then install '''face_recognition_models-0.3.0-py2.py3-none-any.whl'''</p>{| 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>root{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''python3 -m pip install face_recognition'''</p>|}</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'echo 3 &gt''</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></sysli><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'''</pwmp><p>/pwmchip0usr/exportlocal/bin/face_detection</p><p>orangepi@orangepi:~$ '''which face_recognition'''</p><p>/usr/local/bin/face_recognition</p>|}
root@orangepi:~# '''echo 20000000 &gt; /sys/class/pwm/pwmchip0/pwm3/period''<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
root{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~# $ '''echo 1000000 &gt; export PATH=/syshome/classorangepi/pwm.local/pwmchip0/pwm3/duty_cyclebin:$PATH'''|}</li></li></ol></li></ol><span id="the-test-method-of-face_recognition"></span>
root@orangepi:~# '''echo 1 &gt; /sys/class/pwm/pwmchip0/pwm3/enable'''=== The test method of face_recognition ===
<ol start{| class="4wikitable" style="list-style-type: lowerbackground-alpha;"><li>Enter the following command on the command line to make pwm4 output &gt; a 50Hz square wave</li></ol> root@orangepi:~# '''echo 4 &gt; /sys/class/pwm/pwmchip0/export''' root@orangepi:~# '''echo 20000000 &gt; /sys/class/pwm/pwmchip0/pwm4/period''' root@orangepicolor:~# '''echo 1000000 &gtffffdc; /sys/class/pwm/pwmchip0/pwm4/duty_cycle''' root@orangepiwidth:~# '''echo 1 &gt800px; /sys/class/pwm/pwmchip0/pwm4/enable''' <div class="figure">|-[[File:media/image185.jpeg|574x344px|69D96433378187B10005CDD2A52881B0]] </divbig><span id="how-to-install-and-use-wiringop-python"></span>== How to install and use wiringOP-Python == '''wiringOP-Python is Note that the following operations are demonstrated on the Python language version of wiringOPdesktop, which is used to operate so please connect the hardware resources of the development board, such as GPIO, I2C, SPI and UARTHDMI monitor first, or use NoMachine/VNC to remotely log in to the Python program.''' '''In addition, please note that all the following commands are operated under the root userLinux desktop to test.''' <span id="how-to-install-wiringop-python"></spanbig>=== How to install wiringOP-Python ===|}
<ol style="list-style-type: decimal;">
<li><p>First install There are some sample codes in the source code of '''face_recognition''', which we can use directly for testing. The download address of the dependency packagesource code of face_recognition is as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>GitHub official download address</p>{| class="wikitable" style="width:800px;" |-| <p>rootorangepi@orangepi:~# $ '''sudo apt-get updategit clone https://github.com/ageitgey/face_recognition.git'''</p>|}</li><li><p>Gitee image download address</p>{| class="wikitable" style="width:800px;" |-| <p>rootorangepi@orangepi:~# $ '''sudo apt-get -y install git swig python3-dev python3-setuptoolsclone [https://github.com/ageitgey/face_recognition https://gitee.com/leeboby/face_recognition.git]'''</p>|}</li></ol></li><li><p>Then use the following command The path to download the source face_recognition sample code of wiringOP-Pythonis as follows</p>{| class="wikitable" style="width:800px;" |-| <p>'''Note that the following git clone --recursive command will automatically download the source code face_recognition/examples'''</p>|}</li><li><p>The Chinese description document link of wiringOPface_recognition is as follows, because wiringOPplease read it carefully before using face_recognition</p>{| class="wikitable" style="width:800px;" |-Python depends on wiringOP| <p>[https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md '''https://github. Please make sure that the download process does not report errors due to network problemscom/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md''']</p>|}</li><li><p>'''If you have problems downloading find_faces_in_picture.py''' is used to locate the position of the face in the code from GitHubpicture, you can directly use the wiringOPtest steps are as follows</p><ol style="list-Python source code that comes with style-type: lower-alpha;"><li><p>Open a terminal on the desktop, then enter the Linux image'''face_recognition/examples''' directory, and then execute the storage location isfollowing command</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi: ~$ '''cd face_recognition/usr/src/wiringOP-Pythonexamples'''</p><p>rootorangepi@orangepi:~# /face_recognition/examples$ '''python3 find_faces_in_picture.py'''</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'''git clone </p>|}</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--recursive https:img201.png]]</p></li></ol></githubli><li><p>'''find_facial_features_in_picture.compy''' is used to identify the key points of the face in a single picture, and the test steps are as follows</orangepip><ol style="list-xunlong/wiringOPstyle-Python type: lower-b nextalpha;"><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>rootorangepi@orangepi:~# $ '''cd wiringOP-Pythonface_recognition/examples'''</p><p>rootorangepi@orangepi:~/wiringOP-Python# face_recognition/examples$ '''git submodule update --init --remotepython3 find_facial_features_in_picture.py'''</p>|}</li><li><p>Then use After waiting for a while, the following command to compile wiringOP-Python picture will pop up, and install it into you can see that the Linux system outline of the development boardface is marked</p><p>root@orangepi[[File:~# zero3-img202.png]]</p></li></ol></li><li><p>'''identify_and_draw_boxes_on_faces.py'''cd wiringOPis used to identify faces and mark them with boxes. The test steps are as follows</p><ol style="list-style-type: lower-Pythonalpha;"><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>rootorangepi@orangepi:~/wiringOP-Python# $ '''python3 generate-bindings.py &gt; bindings.icd face_recognition/examples'''</p><p>rootorangepi@orangepi:~/wiringOP-Python# face_recognition/examples$ '''sudo python3 setupidentify_and_draw_boxes_on_faces.py install'''</p>|}</li><li><p>Then enter After waiting for a while, the following commandpicture will pop up. You can see that the faces in the picture are marked with boxes, if there is help information output, it means that wiringOPand the names of the characters are displayed correctly</p><p>[[File:zero3-Python img203.png]]</p></li></ol></li><li><p>'''face_distance.py''' is installed successfullyused to compare whether two faces belong to the same person at different precisions. First open a terminal, press then enter the '''qface_recognition/examples''' key directory, and then execute the following command to exit see the help information interfaceoutput of the test</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''cd face_recognition/li>examples'''</olproot<p>orangepi@orangepi:~/wiringOP-Pythonface_recognition/examples$ '''python3 face_distance.py'''</p><p>'''The test image has a distance of 0.35 from known image # 0'''</p><p>'''python3 -c &quot;import wiringpi; help(wiringpi)&quot;With a normal cutoff of 0.6, would the test image match the known image? True'''</p> Help on module wiringpi:<p>'''- With a very strict cutoff of 0.5, would the test image match the known image? True'''</p>
NAME
wiringpi DESCRIPTION <p>'''The test image has a distance of 0.82 from known image # This file was automatically generated by SWIG (http:1'''</p><p>'''- With a normal cutoff of 0.6, would the test image match the known image? False'''</www.swig.org).p> # Version 4.<p>'''- With a very strict cutoff of 0.25, would the test image match the known image? False'''</p>|}#</li> # Do not make changes <li><p>'''recognize_faces_in_pictures.py''' is used to this file unless 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 know what you are doing--modify # can see the SWIG interface file instead.test results after waiting for a while</p> <ol start{| class="5wikitable" style="list-style-typewidth: decimal800px;"|-| <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</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 Obama? True'''</p><p>'''Is the unknown face a new person that we've never seen before? False'''</p>|}</li><li><p>The steps '''facerec_from_webcam_faster.py''' is used to recognize the face in the USB camera, the test whether wiringOP-Python is successfully installed under the python command line steps are as follows:</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First , please insert the USB camera into the USB interface of the development board, and then use the python3 '''v4l2-ctl''' ('''<span style="color:#FF0000">note that l in v4l2 is a lowercase letter l, not the number 1</span>''') command to enter check the command line mode serial number of the device node of &gtthe USB camera</p>{| class="wikitable" style="width:800px; python3" |-| <p>orangepi@orangepi:~$ '''sudo apt update'''</p><p>orangepi@orangepi:~$ '''sudo apt install -y v4l-utils'''</lip><p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</olp><p>cedrus (platform:cedrus):</lip>::<p>/dev/video0</olp>
root<p>USB2.0 UVC PC Camera: USB2.0 UV (usb-5311000.usb-1):</p>::<p>'''<span style="color:#FF0000">/dev/video1</span>'''</p>::<p>/dev/video2</p>|}</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:~/face_recognition/examples$ '''vim facerec_from_webcam_faster.py'''</p><p>'''video_capture = cv2.VideoCapture(<span style="color:# FF0000">1</span>)'''</p>|}</li><li><p>Then execute the following command to run '''facerec_from_webcam_faster.py'''</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~/face_recognition/examples$ '''python3facerec_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 start="2" 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>root@orangepi:~/face_recognition/examples$ '''python3 web_service_example.py'''</p><p>* Serving Flask app 'web_service_example' (lazy loading)</p><p>* Environment: production</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>* Debug mode: on</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>* 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>* Restarting with stat</p><p>* Debugger is active!</p><p>* Debugger PIN: 500-161-390</p>|}</li><li><p>Then import open another terminal and run the following command to return the python module result of wiringpiimage 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>'''&quot;file=@obama2.jpg&quot; http://127.0.0.1:5001'''</p><p>'''{'''</p>:<p>'''&quot;face_found_in_image&quot;: true,'''</p>:<p>'''&quot;is_picture_of_obama&quot;: true'''</p><p>'''}'''</p>|}</li><li><p>We can also copy the picture '''face_recognition/examples/olobama2.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 &quot;file=@obama2.jpg&gtquot;http://192.168.1.79:5001'''</p><p>'''{'''</p>:<p>'''&gtquot;face_found_in_image&gtquot; : true,'''</p>:<p>'''import wiringpi&quot;is_picture_of_obama&quot;: true'''</p><p>'''}'''</p>|}</li><li><p>The method to test using the browser is as follows:</p><ol start="3" style="list-style-type: lower-alphanone;"><li>Finally<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 command page</p><p>[[File:zero3-img206.png]]</p></li><li><p>b) Then copy obama2.jpg to view the help information of &gtdesktop</p>{| class="wikitable" style="width:800px; wiringOP" |-Python, and press | <p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2.jpg /home/orangepi/Desktop/'''</p>|}</li><li><p>c) Then select the q key picture you just copied in your browser</p><p>[[File:zero3-img207.png]]</p></li><li><p>d) Then click '''Upload''' to exit upload the help information &gt; interfacepicture 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><li><p>'''face_detection''' command test example</p>&gt<ol style="list-style-type: lower-alpha;&gt;&gt"><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(wiringpi)'''</p><p>Usage: face_detection [OPTIONS] IMAGE_TO_CHECK</p>
Help on module wiringpi:
NAME<p>Options:</p>:<p>--cpus INTEGER number of CPU cores to use in parallel. -1 means &quot;use all in system&quot;</p>
wiringpi
DESCRIPTION:<p>--model TEXT Which face detection model to use. Options are &quot;hog&quot; or &quot;cnn&quot;.</p>
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4:<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:~/face_recognition/examples$ '''face_detection obama2.jpg'''</p><p>obama2.jpg,302,474,611,164</p>|}</li><li><p>An example of using multiple cores to detect multiple images in parallel is shown below:</p><ol style="list-style-type: none;"><li><p>a) First enter the '''face_recognition/examples''' folder</p></li><li><p>b) Then create a new test folder</p></li><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$ '''cp *.jpg test'''</p><p>orangepi@orangepi:~/face_recognition/examples$ '''face_detection --cpus -1 test'''</p><p>test/obama-240p.jpg,29,261,101,189</p><p>test/obama_small.jpg,65,215,169,112</p><p>test/obama2.jpg,302,474,611,164</p><p>test/two_people.jpg,62,394,211,244</p><p>test/two_people.0jpg,95,941,244,792</p><p>test/obama.2jpg,136,624,394,366</p><p>test/obama-480p.jpg,65,507,189,383</p><p>test/obama-720p.jpg,94,751,273,572</p><p>test/obama-1080p.jpg,136,1140,394,882</p><p>test/biden.jpg,233,749,542,439</p>|}</li></ol></li></ol>#</li><li><p>'''face_recognition''' command test example</p><ol style="list-style-type: lower-alpha;"># Do not make changes <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 this file unless you know what you are doingview the help information of the face_recognition command</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''face_recognition --help'''</p><p>Usage: face_recognition [OPTIONS] KNOWN_PEOPLE_FOLDER IMAGE_TO_CHECK</p><p>Options:</p>:<p>--cpus INTEGER &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number of CPU cores to use in parallel (can speed up processing lots of images). -modify1 means &quot;use all in system&quot;</p>
# the SWIG interface file instead.
CLASSES:<p>--tolerance FLOAT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tolerance for face comparisons. Default is 0.6. Lower this if you get multiple matches for the same person.</p>
builtins.object
GPIO:<p>--show-distance BOOLEAN &nbsp;&nbsp; Output face distance. Useful for tweaking tolerance setting.</p>
I2C
Serial:<p>--help &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Show this message and exit.</p>|}nes</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 GPIO(builtins="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p><p>orangepi@orangepi:~/face_recognition/examples$ '''mkdir known_people'''</p><p>orangepi@orangepi:~/face_recognition/examples$ '''cp biden.object)jpg obama.jpg known_people'''</p><p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2.jpg unkown.jpg'''</p>| GPIO(pinmode}</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=0)"width:800px;" |-| <p>orangepi@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p><p>'''unkown.jpg'''</p><p>unkown.jpg,obama</p>|}</li><li><p>If we identify an irrelevant image, unknown_person will be displayed</p>&gt{| class="wikitable" style="width:800px;&gt;&gt" |-| <p>root@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p><p>'''alex-lacamoire.png'''</p><p>alex-lacamoire.png,unknown_person</p>|}</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$ '''cp *.jpg *.png test'''</p><p>orangepi@orangepi:~/face_recognition/examples$ '''face_recognition --cpus -1 \'''</p><p>'''known_people test'''</p><p>test/obama-240p.jpg,obama</p><p>test/alex-lacamoire.png,unknown_person</p><p>test/obama_small.jpg,obama</p><p>test/unkown.jpg,obama</p><p>test/obama2.jpg,obama</p><p>test/lin-manuel-miranda.png,unknown_person</p><p>test/two_people.jpg,biden</p><p>test/two_people.jpg,obama</p><p>test/obama-720p.jpg,obama</p><p>test/obama.jpg,obama</p><p>test/obama-480p.jpg,obama</p><p>test/biden.jpg,biden</p><p>test/obama-1080p.jpg,obama</p>|}</li></ol></li></ol> <span id="pinsetting-gpiochinese-portenvironment-testand-installing-chinese-input-1method"></span> === 26pin GPIO port test =Setting Chinese environment and installing Chinese input method ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''wiringOP-Python is Note, please make sure that the same as wiringOP, you can also determine which GPIO pin to operate Linux system used by specifying the wPi number, because there development board is no command to check the wPi number in wiringOP-Python, so you can only check a desktop system before installing the board wPi number and physical Correspondence between pinsChinese input method.'''</big>|}
[[File:media<span id="how-to-install-debian-system"></image172.png|575x365px]]span>=== How to install Debian system ===
<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 First set the high and low levels of the GPIO port</p><p>[[File:media/image173.png|576x128px]]</p></li><li><p>The steps default '''locale''' to test directly with the command are as follows:Chinese</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First set Enter the GPIO port following command to output mode, where the first &gt; parameter of start configuring the '''pinModelocale''' function is the serial number of &gt; the wPi corresponding to the pin, and the second parameter is &gt; the GPIO mode</p>{| class="wikitable" style="width:800px;" |-| <p>rootorangepi@orangepi:~/wiringOP-Python# $ '''python3 sudo dpkg-c &quot;import wiringpi; \reconfigure locales'''</p>|}</li><li><p>Then select '''from wiringpi import GPIO; wiringpizh_CN.wiringPiSetupUTF-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 '''&lt;OK&gt; \'''through the Tab key, and then press Enter.)</p><p>'''wiringpi[[File:zero3-img210.pinMode(2, GPIO.OUTPUT) ; &quot;'''png|1200px]]</p></li><li><p>Then set the GPIO port to output low level. After setting, you &gt; can use a multimeter to measure the voltage value of the pin. &gt; If it is 0v, it means that the low level is set successfully.</p><p>root@orangepi:~/wiringOP-Python# default '''python3 -c &quot;import wiringpi; \locale'''</p><p>to '''from wiringpi import GPIO; wiringpizh_CN.wiringPiSetup() ;\UTF-8'''</p><p>'''wiringpi.digitalWrite(2, GPIO[[File:zero3-img211.LOW)&quot;'''png|1200px]]</p></li><li><p>Then set After exiting the interface, the GPIO port to output a high level. After '''locale''' settingwill start, &gt; you can use a multimeter to measure and the voltage value of the &gt; pin. If it is 3.3v, it means that output displayed on the high level command line is set &gt; successfully.as follows</p>{| class="wikitable" style="width:800px;" |-| <p>rootorangepi@orangepi:~/wiringOP-Python# $ '''python3 sudo dpkg-c &quot;import wiringpi; \reconfigure locales'''</p><p>'''from wiringpi import GPIO; wiringpi.wiringPiSetupGenerating locales (this might take a while) ;\'''...</p>:<p>en_US.UTF-8... done</p>:<p>'''wiringpizh_CN.UTF-8...digitalWrite(2, GPIOdone</p><p>Generation complete.HIGH)&quot;'''</p>|}</li></ol>
</li>
<li><p>The steps to test in Then open the command line of python3 are as follows:'''Input Method'''</p><ol style="list-style-typep>[[File: lowerzero3-alpha;"img212.png]]</p></li><li><p>First use the python3 command to enter the command line mode of &gt; python3Then choose '''OK'''</p><p>root@orangepi[[File:~# zero3-img213.png]]</p></li><li><p>Then choose '''python3Yes'''</p><p>[[File:zero3-img214.png]]</p></li><li><p>Then import the python module of wiringpichoose '''fcitx'''</p><p>[[File:zero3-img215.png]]</p></li><li><p>&gt;&gt;&gt; Then choose '''import wiringpiOK'''</p><p>&gt;&gt;&gt; [[File:zero3-img216.png]]</p></li><li><p>'''from wiringpi import GPIO<span style="color:#FF0000">Then restart the Linux system to make the configuration take effect</span>'''</p></li><li><p>Then set the GPIO port to output mode, where the first parameter &gt; of the open '''pinModeFcitx configuration''' function is </p><p>[[File:zero3-img217.png]]</p></li><li><p>Then click the serial number of + sign in the wPi &gt; corresponding to position shown in the pin, and the second parameter is the GPIO &gt; modefigure below</p><p>[[File:zero3-img218.png]]</p></li><li><p>&gt;&gt;&gt; Then search '''Google Pinyin''' and click '''wiringpi.wiringPiSetup()OK'''</p><p>0[[File:zero3-img219-1.png]]</p></li><li><p>&gt;&gt;&gt; Then bring '''wiringpi.pinMode(2, GPIO.OUTPUT)Google Pinyin'''to the front</p><p>[[File:zero3-img220.png]]</p><p>[[File:zero3-img221.png]]</p></li><li><p>Then set open the GPIO port '''Geany''' editor to output low level. After setting, you &gt; can use a multimeter to measure test the voltage value of the pinChinese input method</p><p>[[File:zero3-img222. &gt; If it png]]</p></li><li><p>The Chinese input method test is 0v, it means that the low level is set successfullyas follows</p><p>[[File:zero3-img223.png]]</p></li><li><p>&gt;&gt;&gt; The Chinese and English input methods can be switched through the '''wiringpi.digitalWrite(2, GPIO.LOW)Ctrl+Space'''shortcut key</p></li><li><p>Then set If the GPIO port entire system needs to output a high level. After settingbe displayed in Chinese, &gt; you can use a multimeter set the variables in '''/etc/default/locale''' to measure the voltage value of the &gt; pin'''zh_CN. If it is 3.3v, it means that the high level is set &gtUTF-8'''</p>{| class="wikitable" style="width:800px; successfully" |-| <p>orangepi@orangepi:~$ '''sudo vim /etc/default/locale'''</p><p># File generated by update-locale</p><p>LC_MESSAGES='''<span style="color:#FF0000">zh_CN.UTF-8</span>'''</p><p>&gt;&gt;&gt; LANG='''wiringpi<span style="color:#FF0000">zh_CN.digitalWrite(2, GPIO.HIGH)UTF-8</span>'''</p><p>LANGUAGE='''<span style="color:#FF0000">zh_CN.UTF-8</lispan>'''</olp>|}
</li>
<li><p>The method of wiringOP-Python to set GPIO high and low levels in python code can refer to the Then '''blink.py''' test program in <span style="color:#FF0000">restart 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.system</p><pspan>root@orangepi:~/wiringOP-Python# '''cd examples'''and you can see that the system is displayed in Chinese</p><p>root@orangepi[[File:~/wiringOPzero3-Python/examples# '''ls blinkimg224.py'''png]]</p><p/li>'''blink.py'''</pol> <p>root@orangepi:~/wiringOPspan id="how-to-install-ubuntu-Python/examples'''# python3 blink20.py'''</p04-system"></li></olspan>
<span id="pin-spi-test-1"></span>=== 26pin SPI test How to install Ubuntu 20.04 system ===
<ol style="list-style-type: decimal;">
<li><p>According to the schematic diagram of the 26pin interface, the available spi is spi1</p><p>[[File:media/image176.png|565x209px]]</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 First open are as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add &gt; '''sudo''' permission</p><p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li><li><p>Then select '''SystemLanguage Support'''</p><p>[[File:media/image85.png|398x194px]]</p></li><li><p>Then select '''Hardware'''</p><p>[[File:media/image86zero3-img225.png|393x202px]]</p></li><li><p>Then use the arrow keys on the keyboard to navigate to the &gt; position shown in the figure below, and then use find the '''space''' &gt; to select '''spi1-cs1-spidev'''</p><p>[[File:media/image177.png|392x57px]]</p></li><li><pspan class="mark">Then select '''&lt;Save&gt;Chinese (China''' to save)</p><pspan>[[File:media/image88.png|397x92px]]</p></li><li><p>Then select '''&lt;Back&gt;'''然后选择'''&lt;Back&gt;'''option</p><p>[[File:media/image89.png|395x91px]]</p></li><li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect</p><p>[[File:media/image90zero3-img226.png|374x187px]]</p></li></ol></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><p>orangepi@orangepi:~$ '''ls /dev/spidev1*'''</p><p>/dev/spidev1.1</p></li><li><p>Then you can please use the '''spidev_test.py''' program in the examples left mouse button to test the loopback function of the SPI. The '''spidev_test.pyselect ''' program needs to specify the following two parameters:</p><ol stylespan class="list-style-type: lower-alpha;mark"><li><p>'''--channel''': Specify the channel number of SPI</p>Chinese (China)</li><li><pspan>'''--port''': specify and hold it down, then drag it up to the port number of SPI</p></li></ol></li><li><p>Do not short-circuit the mosi and miso pins of SPI1initial position, the output result of running spidev_test.py display after dragging is as follows, you can see that shown in the data of TX and RX are inconsistentfigure below:</p><p>root@orangepi[[File:~/wiringOPzero3-Python# '''cd examples'''img227.png]]</p></li></ol>
root@orangepi{| 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;"><li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire system</p><p>[[File:~zero3-img228.png]]</wiringOPp></li><li><p>Then set'''Keyboard input method system''' to '''fcitx'''</p><p>[[File:zero3-Pythonimg229.png]]</p></examplesli><li><p>'''<span style="color:# FF0000">Then restart the Linux system to make the configuration take effect</span>'''python3 spidev_test</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><p>[[File:zero3-img230.py \png]]</p></li><li><p>Then you can see that the desktop is displayed in Chinese</p><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><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><p>[[File:zero3-img233.png]]</p></li></ol>
'''<span id="how-to-channel 1 install-ubuntu-port 1'''22.04-system"></span>
spi mode: 0x0=== How to install Ubuntu 22.04 system ===
max speed<ol style="list-style-type: 500000 Hz decimal;"><li><p>First open '''Language Support'''</p><p>[[File:zero3-img225.png]]</p></li><li><p>Then find the '''<span class="mark">Chinese (China)</span>''' option</p><p>[[File:zero3-img234.png]]</p></li><li><p>Then please use the left mouse button to select '''<span class="mark">Chinese (500 KHzChina)</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:zero3-img235.png]]</p>
Opening device /dev/spidev1.1{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-TX | FF FF FF FF FF FF <big>'''40 00 00 00 00 95Note that this step is not easy to drag, please be patient and try a few more times.''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…|</big>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 |.............….|}</li></ol><ol start="64" style="list-style-type: decimal;"><li><p>Then use select '''Apply System-Wide''' to apply the Dupont wire Chinese settings to shortthe entire system</p><p>[[File:zero3-circuit img236.png]]</p></li><li><p>'''<span style="color:#FF0000">Then restart the two pins of txd (pin 19 in Linux system to make the configuration take effect</span>'''</p></li><li><p>After re-entering the 26pin interface) and rxd (pin 21 system, please choose '''<span class="mark">not to ask me again</span>''' in the 26pin following interface) of SPI1 , and then run please decide whether the output of spidev_teststandard folder should also be updated to Chinese according to your preferences</p><p>[[File:zero3-img230.py as follows, png]]</p></li><li><p>Then you can see The data sent and received are the same, indicating that the SPI1 loopback test desktop is normaldisplayed in Chinese</p><p>root@orangepi[[File:~zero3-img231.png]]</p></li><li><p>Then open the Fcitx5 configuration program</wiringOPp><p>[[File:zero3-Python# '''cd examples'''img237.png]]</p></li><li><p>Then choose to use Pinyin input method</olp><div class="figure">
root@orangepi[[File:~/wiringOPzero3-Python/examples# '''python3 spidev_testimg238.py \'''png]]
</div></li><li><p>The interface after selection is as shown below, and then click OK</p><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><p>[[File:zero3--channel 1 --port 1img232.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><p>[[File:zero3-img240.png]]</p></li></ol>
spi mode: 0x0<span id="how-to-remotely-log-in-to-the-desktop-of-linux-system"></span>
max speed: 500000 Hz (500 KHz)== How to Remotely Log In to the Desktop of Linux System ==
Opening device <span id="remote-login-using-nomachine"></dev/spidev1.1span>=== Remote login using NoMachine ===
TX {| FF FF FF FF FF FF class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''40 00 00 00 00 95Make 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:''' 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 95https://knowledgebase.nomachine.com/DT10R00166''' FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.......…</big>|}
<span id{| class="wikitable" style="pinbackground-i2ccolor:#ffffdc;width:800px;" |-test| <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>|} {| class="wikitable" style="background-1color:#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'''</spanbig>=== 26pin I2C test ===|}
<ol style="list-style-type: decimal;">
<li><p>According to First download the schematic diagram installation package of 26pin, the available i2c is i2c3</p>NoMachine software Linux '''<p>[[Filespan style="color:media/image178.png|575x204px]]</p#FF0000">arm64</lispan><li><p>i2c3 is disabled by default in ''' deb version, and then install it into the Linux system, and it needs to be manually enabled before it can be used. The steps to open are as follows:of the development board</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First run '''orangepi-config'''Since H618 is a SOC of the ARMV8 architecture, the system we use is Ubuntu or Debian, normal users remember so you need to add &gt; download the '''sudoNoMachine for ARM ARMv8 DEB''' permission</p><p>orangepi@orangepiinstallation package. The download link is shown below:~$ '''sudo orangepi-config'''</p></li><li><p>Then select '''System'''</p><p>[[File:media/image85.png{|398x194px]]</p></li><li><p>Then select '''Hardware'''</p><p>[[Fileclass="wikitable" style="background-color:media/image86.png|393x202px]]</p></li><li><p>d. Then use the arrow keys on the keyboard to navigate to the &gt; position shown in the figure below, and then use the '''space''' &gt#ffffdc; to select '''ph-i2c3'''</p><p>[[Filewidth:media/image179.png|401x59px]]</p></li><li><p>Then select '''&lt800px;Save&gt;''' to save</p>" <p>[[File:media/image88.png|397x92px]]</p></li>-<li><p>Then select '''&lt;Back&gt;'''</p><p>[[File:media/image89.png|395x91px]]</p></li><li><pbig>Then select '''&lt;Reboot&gt;''' to restart Note that this download link may change, please look for the system to make deb package of the &gt; configuration take effect<Armv8/p><p>[[File:media/image90Arm64 version.png|374x187px]]</p></li></ol></li><li><p>After starting the linux system, first confirm that there is an i2c3 device node under /dev</p><p>orangepi@orangepi:~$ '''ls /dev/i2c-3'''</p><p>'''/dev/i2c-3'''</p></li><li><p>Then start testing i2c, first install i2c-tools</p><p>orangepi@orangepi:~$ '''sudo apt-get update'''</p><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</pbig><p>[[File:media/image186.png|180x153px]]</p></li></ol>}
{| class="wikitable" style="width:800px;"
|-
| '''https://downloads.nomachine.com/download/?id=118&amp;distro=ARM'''|} [[File:zero3-img241.png]]</ol><ol start="2" style="textlist-style-aligntype: leftlower-alpha;"| ><li><p>In addition, the installation package of '''NoMachine'''Pins of can also be downloaded in the RTC module'''official tool'''</p>| style<p>[[File:zero3-img242.png]]</p><p>First enter the '''<span class="textmark">remote login software-alignNoMachine</span>''' folder</p><p>[[File: left;"| zero3-img243.png]]</p><p>Then download the arm64 version of the deb installation package</p><p>[[File:zero3-img244.png]]</p></li><li><p>Then upload the downloaded '''nomachine_x.x.x_x_arm64.deb'''The pin corresponding to the 26pin Linux system of the development board'''</p></li>|-| style="text-align: left;"| <li><p>Then use the following command to install '''5VNoMachine'''in the Linux system of the development board</p>{| class="wikitable" style="text-alignwidth: left800px;"| '''Pin 2'''
|-
| style="text-align<p>orangepi@orangepi: left;"| ~$ '''GNDsudo dpkg -i nomachine_x.x.x_x_arm64_arm64.deb'''</p>| }</li></ol></li></ol><!-- --><ol start="2" style="textlist-alignstyle-type: leftdecimal;"><li>Then download the installation package of the Windows version of the NoMachine software, the download address is as follows</li> {| '''Pin 6'''class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
| style="text-align: left;"| <big>'''SDANote that this download link may change.'''</big>| } {| class="wikitable" style="text-alignwidth: left800px;"| '''Pin 3'''
|-
| style="text-align: left;"| '''SCL'''| stylehttps://downloads.nomachine.com/download/?id="text-align: left;"| '''Pin 59'''
|}
[[File:zero3-img245.png]]</ol><ol start="63" style="list-style-type: decimal;"><li><p>Then use install NoMachine in Windows, '''please restart the computer after installation'''i2cdetect -y 3</p></li><li><p>Then open '''NoMachine''' commandin Window</p><p>[[File:zero3-img246.png]]</p></li><li><p>After Nomachine starts, if it will automatically scan other devices installed in the address local area network. After entering the main interface of Nomachine, you can see that the development board is already in the connected i2c 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:zero3-img247.png]]</p></li><li><p>Then click '''OK'''</p><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><div class="figure"> [[File:zero3-img249.png]] </div></li><li><p>Then click OK in the next interface</p></li><li><p>Finally, you can be detected, it means that see the desktop of the i2c device is connected correctlydevelopment board Linux system</p><p>[[File:zero3-img250.png]]</p></li></ol> <span id="log-in-remotely-using-vnc"></span> === Log in remotely using VNC ===
[[File{| class="wikitable" style="background-color:media/image187#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.png|388x203px]]'''
<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>
<p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p>
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 ds1307.py --device \'''</p>
<p>'''&quot;/dev/i2c-3&quot;'''</p>
<p>Thu 2022-06-16 04:35:46</p>
<p>Thu 2022-06-16 04:35:47</p>
<p>Thu 2022-06-16 04:35:48</p>
<p>^C</p>
<p>exit</p></li></ol>
'''<span idstyle="pin-uart-test-1color:#FF0000">Ubuntu20.04 has many problems testing VNC, please do not use this method</span>'''</big>=== 26pin UART test ===|}
<ol style="list-style-type: decimal;">
<li><p>According to the schematic diagram of the 26pin interface, the available uart is uart5</p><p>[[File:media/image181.png|575x203px]]</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><ol style="list-style-type: lower-alpha;"><li><p>First run the '''orangepi-configset_vnc.sh'''script to set up vnc, normal users remember to add &gt; '''<span style="color:#FF0000">add sudopermission</span>''' permission</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo orangepi-configset_vnc.sh'''</p></li><li><p>Then select '''System'''You will require a password to access your desktops.</p><p>[[FilePassword:media/image85.png|398x194px]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''</pspan style="color:#FF0000">#Set the vnc password here, 8 -bit characters</li><lispan><p>Then select '''Hardware'''</p><p>[[FileVerify:media/image86.png|393x202px]]</p></li><li><p>d. Then use the arrow keys on the keyboard to navigate to the &gtnbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; position shown in the figure below, and then use the '''space''' &gtnbsp; to select '''ph-uart5'''</p><p>[[Filespan style="color:media/image182.png|400x60px]]</p#FF0000">#Set the vnc password here, 8 characters</li><li><pspan>Then select '''&lt;Save&gt;''' to save</p><p>[[File:mediaWould you like to enter a view-only password (y/image88.png|397x92px]]</p></li><li><p>Then select '''&lt;Back&gt;n)? '''</p><p>[[Filespan style="color:media/image89.png|395x91px]]</p#FF0000">n</li><li><pspan>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect</p><p>[[Filexauth:mediafile /root/image90.png|374x187px]]Xauthority does not exist</p></li></ol></li><li><p>After entering the linux system, first confirm whether there is a uart5 device node under '''/dev'New 'X'desktop is orangepi:1</p>  <p>'''Note that the linux5.4 system is Creating default startup script /devroot/ttyAS5.'''vnc/xstartup</p><p>orangepi@orangepi:~$ '''ls Starting applications specified in /root/dev.vnc/ttyS5'''xstartup</p><p>Log file is /devroot/ttyS5<.vnc/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 testedorangepi:1.log</p></li></ol>
{| class="wikitable"
|-
|
| style="text-align: left;"| '''uart5'''
|-
| '''tx pin'''
| style="text-align: left;"| '''Corresponding to pin 8 in 26pin'''
|-
| '''rx pin'''
| style="text-align: left;"| '''Corresponding to pin 10 in 26pin'''
|}
<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><p>root@orangepi:~/wiringOP-Python# '''cd examples'''</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device &quot;/dev/ttyS5&quot; # linux6.1使用'''</p><p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device &quot;/dev/ttyAS5&quot; # linux5.4使用'''</p><p>Out: 0: -&gt; 0Killing Xtightvnc process ID 3047</p><p>Out: 1: -&gt; 1</p><p>Out: 2: -&gt; 2</p><p>Out: 3: -&gt; 3</p><p>Out: 4:^C</p><p>exit</p></li></ol>
<span id="hardware-watchdog-test"></span>
== Hardware Watchdog Test ==
The watchdog_test program <p>New 'X' desktop is pre-installed in the linux system released by Orange PI, which can be tested directly.。orangepi:1</p>
The method of running the watchdog_test program is shown below:
<p>Starting applications specified in /root/.vnc/xstartup</p>
<p>Log file is /root/.vnc/orangepi:1.log</p>
|}
</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;">
<li><p>The second parameter 10 indicates the counting of the door dog. If the dog is not fed in this timeFirst click on Session, 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 fedthen select VNC, then fill in the program will print a line IP address and port of Keep Alive to indicate that the dog is successful.</p><p>orangepi@orangepi:~$ '''sudo watchdog_test 10'''</p><p>open success</p><p>options is 33152development board,identity is sunxi-wdt</p><p>put_usr return,if 0,success:0</p><p>The old reset time is: 16</p><p>return ENOTTY,if -1,success:0</p><p>return ENOTTY,if -1,success:0</p><p>put_user return,if 0,success:0</p><p>put_usr return,if 0,success:0</p><p>keep alive</p><p>keep alive</p><p>keep alive</p>and finally click OK to confirm</li></ol>
<span iddiv class="check-the-chipid-of-the-h618-chipfigure"></span>== 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[[File:zero3-img251.png]]
orangepi@orangepi</div></ol><ol start="2" style="list-style-type:~$ '''cat lower-alpha;"><li><p>Then enter the VNC password set earlier</sysp><p>[[File:zero3-img252.png]]</classp></sunxi_infoli><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</sys_info | grep &quot;chipid&quot;'''p></li>
sunxi_chipid [[File: 338020004c0048080147478824681ed1zero3-img253.png]]</ol></li></ol><span id="how-to-install-qt"></span>
<span id="python-related-instructions"></span>== Python related instructions == <span id="python-source-code-compilation-and-installation-method"></span>=== Python source code compilation and installation method =How to install QT == '''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).'''
<ol style="list-style-type: decimal;">
<li><p>First install Use the dependency package required script below to compile Pythoninstall QT5 and QT Creator</p><p>orangepi@orangepi{| class="wikitable" style="width:~$ '''sudo apt800px;" |-get update'''</p>| <p>orangepi@orangepi:~$ '''sudo apt-get install -y build-essential zlib1g-dev \install_qt.sh'''</p><p>'''libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev \'''</p>|}<p>'''libreadline-dev libffi-dev curl libbz2-dev'''</p></li><li><p>Then download After installation, the latest version number of the Python3.9 source code and decompress itQT will be automatically printed</p><pol style="list-style-type: lower-alpha;">orangepi@orangepi:~$ '''wget \'''</pli><p>[https://wwwThe qt version that comes with Ubuntu 20.python.org/ftp/python/3.9.10/Python-3.9.10.tgz 04 is '''https://www5.python12.org/ftp/python/3.9.10/Python-3.9.10.tgz8''']</p><p>orangepi@orangepi{| class="wikitable" style="width:~$ '''tar xvf Python800px;" |-3.9.10.tgz'''</p></li><li><p>Then run the configuration command</p>| <p>orangepi@orangepi:~$ '''cd Python-3install_qt.9.10sh'''</p><p>orangepi@orangepi:~$ '''./configure --enable-optimizations'''.....</p></li><li><p>Then compile and install python3QMake version 3.9, the compilation time takes about half an hour1</p><p>orangepi@orangepi:~$ '''make -j4Using Qt version '''</pspan style="color:#FF0000">5.12.8<p/span>orangepi@orangepi:~$ '''sudo make altinstall'''<in /p><usr/li><li><p>After installation, you can use the following command to view the Python version number just installed<lib/p><p>orangepi@orangepi:~$ '''python3.9 aarch64-linux-version'''gnu</p><p>'''Python 3.9.10'''</p>|}</li><li><p>Then update pip</p><p>orangepi@orangepi:~$ The QT version that comes with Ubuntu 22.04 is '''/usr/local/bin/python35.15.9 -m pip install --upgrade pip3'''</p></li></ol> <span id{| class="python-to-replace-the-pip-source-methodwikitable"></span>=== 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''' <ol style="list-style-typewidth: decimal800px;"><li><p>First install '''python3|-pip'''</p><p>orangepi@orangepi:~$ '''sudo apt-get update'''</p>| <p>orangepi@orangepi:~$ '''sudo apt-get install -y python3-pipinstall_qt.sh'''</p></li><li><p>Method of permanent replacement of pip source under Linux</p><ol style="list-style-type: lower-alpha;"><li><p>Create a new'''~/.pip''' directory first, then add the &gt; '''pip.conf''' configuration file, and set the source of the pip &gt; as Tsinghua source</p><p>orangepi@orangepi:~$ '''mkdir -p ~/.pip'''</p><p>orangepi@orangepi:~$ '''cat &lt;&lt;EOF &gt; ~/.pip/pip.conf'''.</p><p>'''[global]'''QMake version 3.1</p><p>'''timeout = 6000Using Qt version '''</p><p>'''index-url span style= https"color://pypi#FF0000">5.tuna15.tsinghua.edu.cn/simple'''3</p><pspan>'''trusted-host = pypi.tuna.tsinghua.edu.cn'''<in /p><p>'''EOF'''<usr/p><lib/li><li><p>Then install the Python library with pip3, it will be fastaarch64-linux-gnu</p></li></ol>|}
</li>
<li><p>The method of temporarily replacing the pip source under Linux, the QT version that comes with Debian11 is '''&lt;packagename&gt;5.15.2''' needs to be replaced with a specific package name</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''pip3 install &lt;packagename&gt; -i \install_qt.sh'''</p><p>......</p><p>QMake version 3.1</p><p>Using Qt version '''https<span style="color:#FF0000">5.15.2</span>''' in /usr/lib/aarch64-linux-gnu</pypip>|}</li><li><p>The QT version that comes with Debian12 is '''5.tuna15.8'''</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''install_qt.sh'''</p><p>.tsinghua.edu.cn...</simple --trusted-host pypip><p>QMake version 3.tuna1</p><p>Using Qt version '''<span style="color:#FF0000">5.tsinghua15.edu.cn8</span>'''in /usr/lib/aarch64-linux-gnu</p>|}</li></ol></li><span idli><p>Then you can see the QT Creator startup icon in '''Applications'''</p><p>[[File:zero3-img254.png]]</p><p>You can also use the following command to open QT Creator</p>{| class="wikitable" style="thewidth:800px;" |-method| <p>orangepi@orangepi:~$ '''qtcreator'''</p>|}</li><li><p>The interface after QT Creator is opened is as follows</p><p>[[File:zero3-img255.png]]</p></li><li><p>The version ofQT Creator is as follows</p><ol style="list-installingstyle-thetype: lower-dockeralpha;"><li><p>The default version of QT Creator in '''Ubuntu20.04''' is as follows</p><p>[[File:zero3-img256.png]]</p></li><li><p>The default version of QT Creator in '''Ubuntu22.04''' is as follows</p><p>[[File:zero3-img257.png]]</spanp></li>== <li><p>The Method Of Installing default version of QT Creator in '''Debian11''' is as follows</p><p>[[File:zero3-img258.png]]</p></li><li><p>The Docker =default version of QT Creator in '''Debian12''' is as follows</p><p>[[File:zero3-img259.png]]</p></li></ol></li><li><p>Then set up QT</p><ol style="list-style-type: lower-alpha;"><li><p>First open '''Help'''-&gt;'''About Plugins.…'''</p><p>[[File:zero3-img260.png]]</p></li>Orange Pi<li><p>Then remove the tick of '''ClangCodeModel'''s Linux image has been pre</p><p>[[File:zero3-installed with Dockerimg261.png]]</p></li><li><p>'''<span style="color:#FF0000">After setting, but you need to restart QT Creator</span>'''</p></li><li><p>Then make sure the Docker service has not been opened GCC compiler used by QT Creator, if the default. Use Eis Clang, please modify it to GCC</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''enable_dockerDebian12 please skip this step.sh''' script to enable the docker service, and then </p></big>|}<p>[[File:zero3-img262.png]]</p><p>[[File:zero3-img263.png]]</p></li></ol></li><li><p>Then you can start using open a sample code</p><p>[[File:zero3-img264.png]]</p></li><li><p>After clicking the docker commandsample code, and the docker service corresponding instruction document will be opened automatically activated at , you can read the next start instructions carefully</p><p>[[File:zero3-img265.png]]</p></li><li><p>Then click '''Configure Project'''</p><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><p>[[File:zero3-img267.png]]</p></li><li><p>After waiting for a period of time, the systeminterface shown in the figure below will pop up, which means that QT can compile and run normally</p><p>[[File:zero3-img268.png]]</p></li><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://download.qt.io/archive/qtcreator '''https://download.qt.io/archive/qtcreator''']</p>orangepi@orangepi<p>[https:~$ //download.qt.io/archive/qt '''enable_dockerhttps://download.shqt.io/archive/qt''']</p>|}</li></ol>
You can use the following command <span id="how-to test the docker,If you can run '''hello-world''' to indicate that docker can be used normally.。install-ros"></span>
orangepi@orangepi:~$ == How to install ROS == <span id="how-to-install-ros-1-noetic-on-ubuntu-20.04"></span>=== 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 '''docker run hello-worldNoetic Ninjemys'''
Unable to find image 'hello:[[File:zero3-world:latest' locallyimg269.png]]
latest: Pulling from library/hello[[File:zero3-worldimg270.png]]
256ab8fe8778: Pull complete:{| class="wikitable" style="width:800px;" |-| [http://docs.ros.org/ '''http://docs.ros.org''']
Digest'''https: sha256:7f0a9f93b4aa3022c3a4c147a449ef11e0941a1fd0bf4a8e6c9408b2600777c5//wiki.ros.org/Distributions'''|}
Status<ol start="2" style="list-style-type: decimal;"><li><p>ROS 1 '''Noetic Ninjemys''' official installation documentation link is as follows:</p>{| class="wikitable" style="width:800px;" |-| <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>[[File:zero3-img271.png]]</p></li><li><p>Then use the script below to install ros1</p>{| class="wikitable" style="width: Downloaded newer image for hello800px;" |-world| <p>orangepi@orangepi:latest~$ '''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>'''Hello from Docker!<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>'''
'''This message shows that your installation appears to be working correctly.'''
'''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.'''
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 https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-aG docker $USERhomebrew.yaml'''
'''NoteHit https: You need to log out of the system and log in again to take effect, and restarting the system is also OK//raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml'''
'''<span idstyle="how-to-install-home-assistantcolor:#FF0000">ERROR: error loading sources list:</span>== 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。<span style="color:#FF0000">The read operation timed out</span>'''</big>|}
<span id{| class="installwikitable" style="width:800px;" |-via-docker"><| orangepi@orangepi:~$ '''source /opt/ros/noetic/span>=== Install via docker ===setup.bash'''
<ol style="list-style-type: decimal;"><li><p>First of all, please install docker and make sure that docker can run normally. '''For the installation steps of docker''', please refer to the instructions in the section on how to install Docker。</p></li><li><p>Then you can search for the docker image of Home Assistant</p><p>orangepi@orangepi:~$ '''docker search homeassistantsudo rosdep init'''</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><p>orangepi@orangepi:~$ '''docker pull homeassistantWrote /home-assistant'''<etc/p><p>Using default tag: latest<ros/p><p>latest: Pulling from homeassistantrosdep/home-assistant</p><p>be307f383ecc: Downloading</p><p>5fbc4c07ac88: Download complete</p><p>'''sources.list..... (omit some output)'''<d/p><p>3cc6a1510c9f: Pull complete</p><p>7a4e4d5b979f: Pull complete</p><p>Digest: sha256:81d381f5008c082a37da97d8b08dd8b358dae7ecf49e62ce3ef1eeaefc4381bb</p><p>Status: Downloaded newer image for homeassistant/home20-assistant:latest</p><p>dockerdefault.io/homeassistant/home-assistant:latest</p></li>list<li><p>Then you can use the following command to view the docker image of Home Assistant just downloaded</p><p>orangepi@orangepiRecommended:~$ '''docker images homeassistant/home-assistant'''</p><p>REPOSITORY TAG IMAGE ID CREATED SIZE</p><p>homeassistant/home-assistant latest bfa0ab9e1cf5 2 months ago '''1.17GB'''</p></li><li><p>Now you can run the docker container of Home Assistant</p><p>orangepi@orangepi:~$ '''docker please run -d \'''</p><p>'''--name homeassistant \'''</p><p>'''--privileged \'''</p><p>'''--restart=unless-stopped \'''</p><p>'''-e TZ=Asia/Shanghai \'''</p><p>'''-v /home/orangepi/home-assistant:/config \'''</p><p>'''--network=host \'''</p><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>rosdep update<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><p>[[File:media/image188.png|576x209px]]</p></li><li><p>Then enter '''your name''', '''user name''' and '''password''' and click '''Create Account'''</p><p>[[File:media/image189.png|220x279px]]</p></li><li><p>Then follow the interface prompts to set according to your preferences, and then click Next</p><p>[[File:media/image190.png|575x297px]]</p></li><li><p>Then click Next</p><p>[[File:media/image191.png|576x185px]]</p></li><li><p>Then click Finish</p><p>[[File:media/image192.png|576x117px]]</p></li><li><p>The final main interface displayed by Home Assistant is shown in the figure below</p><p>[[File:media/image193.png|574x294px]]</p></li><li><p>How to stop the Home Assistant container</p><ol style="list-style-type: lower-alpha;"><li><p>The command to view the docker container is as follows</p><p>orangepi@orangepi:~$ '''docker ps -a'''</p></li><li><p>The command to stop the Home Assistant container is as follows</p><p>orangepi@orangepi:~$ '''docker stop homeassistantrosdep update'''</p></li><li><p>The command to delete the Home Assistant container is as follows</p><p>orangepi@orangepi:~$ '''docker rm homeassistant'''</p></li></ol></li></ol>
<span id="install-via-python"><reading in sources list data from /span>=== Install via python ===etc/ros/rosdep/sources.list.d
'''Before installation, please replace the source of pip with a domestic source to speed up the installation of the Python packageHit https://raw. For the configuration method, see the instructions in the section on how to replace the pip source with Pythongithubusercontent.。'''com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
<ol style="list-style-typeHit https: decimal;"><li><p>First install the dependency package</p><p>orangepi@orangepi:~$ '''sudo apt-get update'''</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>'''libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata'''</p><p>'''If it is debian12, please use the following command:'''</p><p>orangepi@orangepi:~$ '''sudo apt-get update'''</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>'''libopenjp2-7 libturbojpeg0-dev tzdata'''</p></li><li><p>Then you need to compile and install Python3raw.9githubusercontent. For the method, please refer to the section on '''how to compile and install Python source code'''<com/p><p>'''The default Python version of Debian Bullseye is Python3.9, so there is no need to compile and install。'''<ros/p><p>'''The default Python version of Ubuntu Jammy is Python3.10, so there is no need to compile and install。'''<rosdistro/p><p>'''The default Python version of Debian Bookworm is Python3.11, so there is no need to compile and install。'''<master/p><rosdep/li><li><p>Then create a Python virtual environment</p><p>'''Debian Bookworm is python3base.11, please remember to replace the corresponding command。'''</p>yaml<p>orangepi@orangepi:~$ '''sudo mkdir /srv/homeassistant'''</p><p>orangepi@orangepiHit https:~$ '''sudo chown orangepi:orangepi /srv/homeassistant'''</p><p>orangepi@orangepi:~$ '''cd /srv/homeassistant'''</p><p>orangepi@orangepi:~$ '''python3raw.9 -m venv githubusercontent.'''<com/p><p>orangepi@orangepi:~$ '''source binros/activate'''<rosdistro/p><p>(homeassistant) orangepi@orangepi:master/srvrosdep/homeassistant$</p></li>python.yaml<li><p>Then install the required Python package</p><p>(homeassistant) orangepi@orangepiHit https:/srv/homeassistant$ '''python3 -m pip install wheel'''<raw.githubusercontent.com/p><ros/li><li><p>Then you can install Home Assistant Core<rosdistro/p><p>(homeassistant) orangepi@orangepi:master/srvrosdep/homeassistant$ '''pip3 install homeassistant'''</p></li>ruby.yaml<li><p>Then enter the following command to run Home Assistant Core</p><p>(homeassistant) orangepi@orangepiHit https:/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>'''When running the hass command for the first time, you will download and install and cache some necessary libraries and dependencies to runraw. This process may take a few minutesgithubusercontent. Note that at this time, the interface of Home Assistant cannot be seen in the browser. Please wait for a while before refreshing。'''<com/p><p>[[File:mediaros/image194.png|576x203px]]<rosdistro/p><master/li><releases/ol>fuerte.yaml
<span id="opencv-installationQuery rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-method"></span>== OpenCV installation method ==v4.yaml
<span id="useSkip end-aptof-to-install-opencv"></span>=== Use apt to install OpenCV ===life distro &quot;ardent&quot;
<ol style="listSkip end-style-type: decimal;"><li><p>The installation command is shown below</p><p>orangepi@orangepi:~$ '''sudo apt-get update'''</p><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><ol style="list-style-type: lower-alpha;"><li><p>The version of OpenCV in ubuntu22.04 is shown below:</p><p>orangepi@orangepi:~$ '''python3 -c &quot;import cv2; print(cv2.__version__)&quot;'''</p><p>'''4.5.4'''</p></li><li><p>The version of OpenCV in Ubuntu 20.04 is shown below:</p><p>orangepi@orangepi:~$ '''python3 -c &quot;import cv2; print(cv2.__version__)life distro &quot;'''</p><p>'''4.2.0'''</p></li><li><p>The version of OpenCV in Debian11 is shown below:</p><p>orangepi@orangepi:~$ '''python3 -c &quot;import cv2; print(cv2.__version__)&quot;'''</p><p>'''4.5.1'''</p></li><li><p>The version of OpenCV in Debian12 is shown below:</p><p>orangepi@orangepi:~$ '''python3 -c &quot;import cv2; print(cv2.__version__)bouncy&quot;'''</p><p>'''4.6.0'''</p></li></ol></li></ol>
<span id="the-installation-methodSkip end-of-the-aapanel-linux-panel"></span>== The installation method of the aapanel Linux panel ==life distro &quot;crystal&quot;
'''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 Skip end-click LAMP/LNMP/cluster/monitoring/website/FTP/database/Java (extracted from the official website of the aapanel)'''-life distro &quot;dashing&quot;
<ol style="listSkip end-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>:</p><p>orangepi@orangepi:~$ '''sudo sed -i 's/nosuid/&amp;,size=2G/' /etc/fstab'''</p><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><p>orangepi@orangepi:~$ '''df -h | grep life distro &quot;/tmpeloquent&quot;'''</p><p>tmpfs 2.0G 12K '''2.0G''' 1% /tmp</p></li><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><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>+----------------------------------------------------------------------</p><p>| Bt-WebPanel FOR CentOS/Ubuntu/Debian</p><p>+----------------------------------------------------------------------</p><p>| Copyright © 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.</p><p>+----------------------------------------------------------------------</p><p>| The WebPanel URL will be http://SERVER_IP:8888 when installed.</p><p>+----------------------------------------------------------------------</p><p>Do you want to install Bt-Panel to the /www directory now?(y/n): '''y'''</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><p>[[File:media/image195.png|576x233px]]</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 />[[File:media/image196.png|575x281px]]</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 Add distro &quot;I have agreed and readfoxy&quot; User Agreement &quot;, and then click&quot; Enter the panel &quot; You can enter the aapanel</p><p>[[File:media/image197.png|575x317px]]</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 ’s official website ('''https://www.bt.cn''') to register one</p><p>[[File:media/image198.png|576x300px]]</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><p>[[File:media/image199.png|575x306px]]</p></li><li><p>For more functions of the aapanel, please refer to the following information to explore by yourself</p><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>== face_recognition The installation and testing method of the face recognition library ==Add distro &quot;galactic&quot;
'''Note that the contents Skip end-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。'''-life distro &quot;groovy&quot;
'''In addition, the installation test below is performed under OrangePi users. Please keep the environment consistent.'''Add distro &quot;humble&quot;
'''Debian12 is currently not adapted.'''Skip end-of-life distro &quot;hydro&quot;
'''The address Skip end-of the source code warehouse of Face_recognition is:'''-life distro &quot;indigo&quot;
[https://github.com/ageitgey/face_recognition '''https://github.com/ageitgey/face_recognition''']Skip end-of-life distro &quot;jade&quot;
'''Face_recognition Chinese version Skip end-of the explanation document is:'''-life distro &quot;kinetic&quot;
'''https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md'''Skip end-of-life distro &quot;lunar&quot;
<span id="the-method-of-using-script-to-automatically-install-face_recognition"></span>=== The method of using script to automatically install face_recognition ===Add distro &quot;melodic&quot;
<ol style="list-style-type: decimalAdd distro &quot;noetic&quot;"><li><p>First open a terminal on the desktop''', then download face_recognition_install.sh'''</p><p>orangepi@orangepi:~/Desktop$ '''wget \'''</p><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><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><p>[[File:media/image200.png|576x324px]]</p></li></ol>
<span id="manually-install-face_recognition"></span>=== Manually install face_recognition ===Add distro &quot;rolling&quot;
<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 updated cache in it, the commands to be executed are as follows:</p><p>orangepi@orangepi:~$ '''mkdir -p ~home/.pip'''</p><p>orangepi@orangepi:~$ '''cat &lt;&lt;EOF &gt; ~/.pip/pip.conf'''</p><p>'''[global]'''</p><p>'''timeout = 6000'''</p><p>'''index-url = https:ros/rosdep/pypi.tuna.tsinghua.edusources.cn/simple'''</p>cache<p>'''trusted-host = pypi.tuna.tsinghua.edu.cn'''</p>|}<p>'''EOF'''</p></li><li><p>Then install dependencies</pol><p>orangepi@orangepi:~$ '''sudo apt update'''</p><p>orangepi@orangepi:~$ '''sudo apt install ol start="6" style="list-y python3style-pip libopencv-dev \'''</p><p>'''python3-opencv imagemagick python3-scipy python3-setuptools python3-wheel \'''</p><p>'''python3-dev cmake python3-testresources'''</p></litype: decimal;"><li><p>Then update pip3</p><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 open a command line terminal window on the development board is relatively slow, I saved a compiled dlib whl file on '''giteedesktop''', and you can install it directly after downloading. The download address of use the dlib whl file is as follows:</p><p>'''https://gitee.com/leeboby/python_whl'''</p><ol stylespan class="list-style-type: lower-alpha;mark"><li><p>First download the python_whl warehouse to the Linux system of &gt; the development boardtest_ros.sh</pspan><p>orangepi@orangepi:~$ '''git clone --depth=1 https://gitee.com/leeboby/python_whl'''</p></li><li><p>In the python_whl folder, you script to start a small turtle routine to test whether ROS can see that there are multiple &gt; versions of dlib installation packages. The Linux systems &gt; corresponding to different versions of dlib are as follows:be used normally</p></li></ol></li></ol> {| class="wikitable" style="width:800px;"
|-
| style="text-align: left;"| '''Ubuntu20.04'''| style="text-align: left;"| '''dlib-19.24.0-cp38-cp38-linux_aarch64.whl'''|-| style="text-align<p>orangepi@orangepi: left;"| ~$ '''Ubuntu22.04'''| style="text-align: left;"| '''dlib-19.24.0-cp310-cp310-linux_aarch64.whl'''|-| style="text-align: left;"| '''Debian11'''| style="text-align: left;"| '''dlib-19.24.0-cp39-cp39-linux_aarch64test_ros.whlsh'''</p>
|}
 
<ol start="3" style="list-style-type: lower-alpha;">
<li><p>Then you can start installing dlib, the command is as follows</p>
<ol style="list-style-type: lower-alpha;">
<li><p>Ubuntu20.04</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>
<li><p>Ubuntu22.04</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>
<li><p>Debian11</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>
</li>
<li><p>After installationrunning the '''test_ros.sh''' script, if the version number of dlib can be printed &gt; normally by using a little turtle as shown in the following command, it means that dlib is &gt; installed correctlyfigure below will pop up</p><p>orangepi@orangepi[[File:~/python_whl$ '''python3 zero3-c &quot;import dlib; print(dlibimg272.__version__)&quot;'''png]]</p></li><li><p>'''19.24.0'''Then please keep the terminal window you just opened on top</p></li></ol>
<!-- --><ol startdiv class="5figure" style="list-style-type: decimal;"><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><li><p>Then install '''face_recognition'''</p><p>orangepi@orangepi:~$ '''python3 -m pip install face_recognition'''</p></li><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: lower-alpha;"><li><p>The face_recognition command is used to recognize whose face is &gt; in a single image or a folder of images.</p></li><li><p>The face_detection command is used to locate the face in a &gt; single picture or a picture folder</p><p>orangepi@orangepi:~$ '''which face_detection'''</p><p>/usr/local/bin/face_detection</p><p>orangepi@orangepi:~$ '''which face_recognition'''</p><p>/usr/local/bin/face_recognition</p></li></ol></li></ol>
If you can't find the above two commands after reopening the terminal, please try to manually import environment variables, and then test again[[File:zero3-img273.png]]
orangepi@orangepi</div></ol><ol start="9" style="list-style-type:~$ '''export PATH=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</homep><p>[[File:zero3-img274.png]]</orangepip></.localli></bin:$PATH'''ol>
<span id="thehow-testto-methodinstall-ofros-face_recognition2-galactic-on-ubuntu-20.04"></span>=== The test method of face_recognition ===
'''Note that the following operations are demonstrated === How to install ROS 2 Galactic on the desktop, so please connect the HDMI monitor first, or use NoMachine/VNC to remotely log in to the Linux desktop to test。'''Ubuntu 20.04 ===
<ol style="list-style-type: decimal;">
<li><p>There are some sample codes in The currently active version of ROS 2 is shown below, and the source code of recommended version is '''face_recognitionGalactic Geochelone''', 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-typep>[[File: lowerzero3-alpha;"img275.png]]</p><li><p>GitHub official download address[[File:zero3-img276.png]]</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi[http:~$ //docs.ros.org/ '''git clone httpshttp://githubdocs.com/ageitgey/face_recognitionros.gitorg''']</p></li><li><p>Gitee image download address</p><p>orangepi@orangepi:~$ '''git clone [httpshttp://githubdocs.com/ageitgey/face_recognition https:ros.org/en/gitee.com/leebobygalactic/face_recognitionReleases.git]html'''</p></li></ol>|}
</li>
<li><p>The path link to the face_recognition sample code is as follows</p><p>official ROS 2 '''face_recognition/examplesGalactic Geochelone'''</p></li><li><p>The Chinese description document link of face_recognition installation documentation 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><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 {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li>|-| <p>Open a terminal on the desktop, then enter the &gt; '''face_recognitiondocs.ros.org/en/galactic/examplesInstallation.html''' directory, and then execute the &gt; following command</p><p>orangepi@orangepi:~$ '''cd face_recognitionhttp://examples'''<docs.ros.org/p><p>orangepi@orangepi:~en/face_recognitiongalactic/examples$ '''python3 find_faces_in_picture.py'''<Installation/p><p>'''I found 1 face(s) in this photographUbuntu-Install-Debians.html'''</p><p>'''A face is located at pixel location Top: 241, Left: 419, Bottom: 562, Right: 740'''</p></li><li><p>Wait for a while and the following picture will pop up, which is &gt; the face located in the test picture</p><p>[[File:media/image201.png|575x311px]]</p></li></ol>}
</li>
<li><p>In the official ROS 2 '''find_facial_features_in_picture.pyGalactic Geochelone''' is installation document, Ubuntu Linux recommends using Ubuntu 20.04, so please make sure that the system used to identify by the key points of development board is the face in a single picture, and the test steps are as follows'''</p><ol span style="list-style-typecolor: lower-alpha;#FF0000">Ubuntu 20.04 desktop system<li><p/span>Open a terminal on the desktop, then enter the &gt; '''face_recognition/examples. There are several ways to install ROS 2. The following demonstrates how to install ROS 2 ''' directory, and then execute the &gt; following command</pspan class="mark">Galactic Geochelone<p/span>orangepi@orangepi:~$ '''cd face_recognition/examplesthrough '''</pspan class="mark">Debian packages<p/span>orangepi@orangepi:~/face_recognition/examples$ '''python3 find_facial_features_in_picture.py'''</p></li><li><p>After waiting for a while, the following picture will pop up, &gt; and you Ros2 can see that be installed using the outline of the face is marked'''install_ros.sh''' script</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media/image202~$ '''install_ros.png|575x302px]]sh ros2'''</p></li></ol>|}
</li>
<li><p>The '''identify_and_draw_boxes_on_facesinstall_ros.pysh''' 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 used to identify faces and mark them with boxes. The test steps are as followscomplete</p><ol {| class="wikitable" style="listwidth:800px;" |-style-type| <p>usage: lowerros2 [-alphah] Call `ros2 &lt;"command&gt; -h` for more detailed usage. ...</p>  <p>ros2 is an extensible command-line tool for ROS 2.<li/p>  <p>Open a terminal on the desktop, then enter the &gt; '''face_recognitionoptional arguments:</examples''' directoryp>:<p>-h, --help show this help message and then execute the &gt; following commandexit</p>  <p>Commands:</p>:<p>action Various action related sub-commands</p>:<p>bag Various rosbag related sub-commands</p>:<p>component Various component related sub-commands</p>orangepi@orangepi:~$ '''cd face_recognition<p>daemon Various daemon related sub-commands</p>:<p>doctor Check ROS setup and other potential issues</examples'''p>:<p>interface Show information about ROS interfaces</p>:<p>orangepi@orangepilaunch Run a launch file</p>:~<p>lifecycle Various lifecycle related sub-commands</face_recognitionp>:<p>multicast Various multicast related sub-commands</examples$ '''python3 identify_and_draw_boxes_on_faces.py'''p>:<p>node Various node related sub-commands</p>:<p>param Various param related sub-commands</lip>:<lip>pkg Various package related sub-commands</p>:<p>After waiting for run Run a while, the following picture will pop up. &gt; You can see that the faces in the picture are marked with &gt; boxes, and the names of the characters are displayed correctlypackage specific executable</p>:<p>[[Filesecurity Various security related sub-commands</p>:media<p>service Various service related sub-commands</image203.png|461x250px]]p>:<p>topic Various topic related sub-commands</p>:<p>wtf Use `wtf` as alias to `doctor`</lip>  :<p>Call `ros2 &lt;command&gt; -h` for more detailed usage.</olp>|}
</li>
<li><p>Then you can use the '''face_distancetest_ros.pysh''' is used script to compare test 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><p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</p><p>orangepi@orangepi:~/face_recognition/examples$ '''python3 face_distance.py'''</p><p>'''The test image has a distance of 0.35 from known image #0'''</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>'''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 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 ROS 2 isinstalled successfully. First open a terminal, then enter the '''face_recognition/examples''' directory, and then execute the following command, and If you can see the test results after waiting for a while</p><p>orangepi@orangepi:~$ '''cd face_recognition/examples'''</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 Obama? True'''</p><p>'''Is the unknown face a new person following print, it means that we've never seen before? False'''ROS 2 can run normally</p></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 {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>First, please insert the USB camera into the USB interface of &gt; the development board, and then use the '''v4l2|-ctl''' ('''note &gt; that l in v4l2 is a lowercase letter l, not the number 1''') &gt; command to check the serial number of the device node of the &gt; USB camera</p>| <p>orangepi@orangepi:~$ '''sudo apt updatetest_ros.sh'''</p><p>orangepi@orangepi[INFO] [1671174101.200091527] [talker]: Publishing:~$ '''sudo apt install -y v4l-utils''Hello World: 1'</p><p>orangepi@orangepi[INFO] [1671174101.235661048] [listener]:~$ '''v4l2-ctl --list-devices'''</p><p>cedrus (platformI heard:cedrus)[Hello World:1]</p><p>/dev/video0</p><p>USB2[INFO] [1671174102.0 UVC PC Camera199572327] [talker]: USB2.0 UV (usb-5311000.usb-1)Publishing:</p><p>'''/dev/video1''Hello World: 2'</p><p>/dev/video2</p></li><li><p>Then open a terminal on the desktop, enter the &gt; '''face_recognition/examples''' directory, and first modify the &gt; device serial number of the camera used in &gt; '''facerec_from_webcam_faster[INFO] [1671174102.py.''' For example, through the &gt; '''v4l2-ctl --list-devices''' command above, you can see that &gt; the USB camera is '''/dev/video1''', then modify the '''0''' in &gt; '''cv2.VideoCapture(0)''' to '''1'''</p><p>orangepi@orangepi204196299] [listener]:~$ '''cd face_recognition/examples'''</p><p>orangepi@orangepiI heard:~/face_recognition/examples$ '''vim facerec_from_webcam_faster.py'''</p><p>'''video_capture = cv2.VideoCapture(1)'''</p></li><li><p>Then execute the following command to run &gt; '''facerec_from_webcam_faster.py'''</p><p>orangepi@orangepi[Hello World:~/face_recognition/examples$ '''python3 facerec_from_webcam_faster.py'''</p></li><li><p>Wait for a while and the camera display screen will pop up2]</p><p>[INFO] [File:media/image2041671174103.png|314x245px199580322][talker]</p></li><li><p>At this point, you can point the camera at yourself. When the &gt; camera detects a face, it will frame the detected face with a &gt; square. '''Note that when detecting a face, the image displayed &gt; by the camera will be relatively slow, please do not move too &gt; fast': Publishing: 'Hello World: 3'</p></li><li><p>You can also open a picture of Obama, and then use the camera to &gt; point at the opened picture[INFO] [1671174103. You can see that not only the &gt; face can be marked, but also the name of the detected face can &gt; be displayed correctly. '''Note that when detecting a face, the &gt; image displayed by the camera will be relatively slow, please &gt; do not move too fast'''</p><p>204019965] [listener]: I heard: [FileHello World:media/image205.png|358x284px]3]</p></li></ol>|}
</li>
<li><p>'''web_service_example.py''' is a very simple case of using a web service Run the following command 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 rviz2</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li><p>Open a terminal on the desktop, then enter the &gt; '''face_recognition/examples''' directory, and then execute the &gt; following command ('''if face_recognition is automatically &gt; installed using a script, then there is no need to install &gt; flask''')</p>|-| <p>orangepi@orangepi:~$ '''python3 -m pip install flasksource /opt/ros/galactic/setup.bash'''</p><p>orangepi@orangepi:~$ '''cd face_recognition/examplesros2 run rviz2 rviz2'''</p>|}<p>root@orangepi[[File:~/face_recognition/examples$ '''python3 web_service_examplezero3-img277.py'''png]]</p><p>* Serving Flask app 'web_service_example' (lazy loading)</pli><p>* Environment: production</pli><p>WARNING: This is a development server. Do not For how to use it in a production deployment.ROS, please refer to the documentation of ROS 2</p><p>Use a production WSGI server instead.</p><p>* Debug mode{| class="wikitable" style="width: on</p>800px;" <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>* Running on [http://127.0docs.0ros.1:5001<org/p><p>* Running on http:en/galactic/192Tutorials.168.1.79:5001 (Press CTRL+C to quit)</p><p>* Restarting with stat</p><p>* Debugger is active!</p><p>* Debugger PIN: 500-161-390</p></li><li><p>Then open another terminal and run the following command to &gt; return the result of image recognition (note that the &gt; execution path of the following command is &gt; '''face_recognition/examples''')</p><p>orangepi@orangepi:~/face_recognition/examples$ '''curl -XPOST -F \'''</p><p>html '''&quot;file=@obama2.jpg&quot; http://127docs.0ros.0.1:5001'''<org/p><p>'''{'''<en/p><p>'''&quot;face_found_in_image&quot;: true,'''<galactic/p><p>'''&quot;is_picture_of_obama&quot;: trueTutorials.html''']</p><p>'''|}'''</pli></liol> <li><p>We can also copy the picture &gt; '''face_recognition/examples/obama2.jpg''' span id="how-to other Linux &gt; computers. Of course, we can also prepare a picture named &gt; '''obama2.jpg''' by ourselves, and then use the following &gt; command -install-ros-2-humble-on the Linux computer to remotely Use the service &gt; running on the development board to recognize faces ('''note &gt; that the IP address in the command needs to be replaced with &gt; the IP address of the development board, and the file name &gt; after file needs to be replaced with the name of the picture &gt; you want to test''').</p><p>test@test:~$ '''curl -XPOST ubuntu-F &quot;file=@obama222.jpg&quot; http://192.168.1.79:5001'''</p><p>'''{'''</p04"><p>'''&quot;face_found_in_image&quot;: true,'''</pspan><p>'''&quot;is_picture_of_obama&quot;: true'''</p><p>'''}'''</p></li>=== How to install ROS 2 Humble on Ubuntu 22.04 ===<li><p>The method to test using the browser is as follows:</p><ol style="list-style-type: lower-alphadecimal;"><li><p>First open the browser, then enter Ros2 can be installed using the '''<span class="mark">IP address of the &gt; development board: 5001</span>install_ros.sh''' in the address bar of &gt; the browser, and then you can see the following pagescript</p><p>[[File{| class="wikitable" style="width:media/image206.png800px;" |575x150px]]</p></li>-<li><p>Then copy obama2.jpg to the desktop</p>| <p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2install_ros.jpg /home/orangepi/Desktop/sh ros2'''</p></li><li><p>Then select the picture you just copied in your browser</p><p>[[File:media/image207.png|575x217px]]</p></li><li><p>Then click '''Upload''' to upload the picture you just &gt; selected for face recognition</p><p>[[File:media/image208.png|575x145px]]</p></li><li><p>After waiting for a while, the detection result will be &gt; displayed</p><p>[[File:media/image209.png|314x149px]]</p></li></ol></li></ol>}
</li>
<li><p>The '''install_ros.sh''' script will automatically run the '''face_detectionros2 -h''' command test exampleafter installing ros2. If you can see the following print, it means that the ros2 installation is complete</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li>|-| <p>The face_detection commandusage: ros2 [-line tool can locate the face h] Call `ros2 &gtlt; position (output pixel coordinates) in a single picture or a command&gt; picture folder-h` for more detailed usage. ... Use '''face_detection </p>  <p>ros2 is an extensible command--help''' to view the &gt; help information of the face_detection commandline tool for ROS 2.</p>  <p>optional arguments:</p>orangepi@orangepi:~$ '''face_detection <p>-h, --help'''show this help message and exit</p>  <p>UsageCommands: face_detection [OPTIONS] IMAGE_TO_CHECK</p>:<p>Options:action Various action related sub-commands</p>:<p>bag Various rosbag related sub--cpus INTEGER number of CPU cores to use in parallel. -1 means &quot;use all incommands</p>:<p>system&quot;component Various component related sub-commands</p>:<p>daemon Various daemon related sub--model TEXT Which face detection model to use. Options are &quot;hog&quot; orcommands</p>:<p>&quot;cnn&quot;.doctor Check ROS setup and other potential issues</p>:<p>--help interface Show this message and exit.information about ROS interfaces</p>:<p>launch Run a launch file</lip><li>:<p>An example of detecting a single image is shown below:lifecycle Various lifecycle related sub-commands</p>:<p>orangepi@orangepi:~$ '''cd face_recognition/examples'''multicast Various multicast related sub-commands</p>:<p>orangepi@orangepi:~/face_recognition/examples$ '''face_detection obama2.jpg'''node Various node related sub-commands</p>:<p>obama2.jpg,302,474,611,164param Various param related sub-commands</p>:<p>pkg Various package related sub-commands</lip><li>:<p>An example of using multiple cores to detect multiple images in &gt; parallel is shown below:run Run a package specific executable</p><ol style="list-style-type: lower-alpha;"><lip>security Various security related sub-commands</p>First enter the '''face_recognition/examples''' folder:</p>service Various service related sub-commands</lip>:<lip>topic Various topic related sub-commands</p>Then create a new test folder:</p>wtf Use `wtf` as alias to `doctor`</lip><li> :<p>Then copy the jpg images to the test folderCall `ros2 &lt;command&gt; -h` for more detailed usage.</p>|}</li><li><p>Then you can use all cpus to run the '''face_detectiontest_ros.sh''' in parallel script to &gt; check the pictures in test whether ROS 2 is installed successfully. If you can see the test folderfollowing print, where '''--cpus &gt; -1''' it means to use all cpusthat ROS 2 can run normally</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''cd face_recognition/examplestest_ros.sh'''</p><p>orangepi@orangepi[INFO] [1671174101.200091527] [talker]: Publishing:~/face_recognition/examples$ '''mkdir test''Hello World: 1'</p><p>orangepi@orangepi[INFO] [1671174101.235661048] [listener]: I heard: [Hello World:~/face_recognition/examples$ '''cp *.jpg test'''1]</p><p>orangepi@orangepi[INFO] [1671174102.199572327] [talker]: Publishing:~/face_recognition/examples$ '''face_detection --cpus -1 test''Hello World: 2'</p><p>test/obama-240p[INFO] [1671174102.jpg,29,261,101,189204196299] [listener]: I heard: [Hello World: 2]</p><p>test/obama_small[INFO] [1671174103.jpg,65,215,169,112199580322] [talker]: Publishing: 'Hello World: 3'</p><p>test/obama2[INFO] [1671174103.jpg,302,474,611,164204019965] [listener]: I heard: [Hello World: 3]</p>|}</li><li><p>test/two_people.jpg,62,394,211,244Run the following command to open rviz2</p>{| class="wikitable" style="width:800px;" |-| <p>testorangepi@orangepi:~$ '''source /opt/ros/humble/two_peoplesetup.jpg,95,941,244,792bash'''</p><p>test/obama.jpg,136,624,394,366orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p>|}<p>test/obama[[File:zero3-480pimg278.jpg,65,507,189,383png]]</p></li><li><p>test/obama-720p.jpg,94,751,273,572Reference documents</p>{| class="wikitable" style="width:800px;" |-| <p>test'''http://docs.ros.org/en/humble/obama-1080pindex.jpg,136,1140,394,882html'''</p><p>test'''http://bidendocs.jpg,233,749,542,439<ros.org/en/humble/p><Installation/li>Ubuntu-Install-Debians.html'''</olp>|}
</li></ol>
 
<span id="how-to-install-the-kernel-header-file"></span>
 
== How to install the kernel header file ==
 
{| 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;">
<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>/opt/linux-headers-xxx-sun50iw9_x.x.x_arm64.deb</p>
|}
</li>
<li><p>'''face_recognition''' command test example</p><ol style="list-style-type: lower-alpha;"><li><p>'''face_recognition''' command-line tool can recognize whose face &gt; is in a single picture or a picture folder. Use &gt; '''face_recognition --help''' to view the help information of &gt; the face_recognition command</p><p>orangepi@orangepi:~$ '''face_recognition --help'''</p><p>Usage: face_recognition [OPTIONS] KNOWN_PEOPLE_FOLDER IMAGE_TO_CHECK</p><p>Options:</p><p>--cpus INTEGER number of CPU cores to use in parallel (can speed</p><p>up processing lots of images). -1 means &quot;use all in</p><p>system&quot;</p><p>--tolerance FLOAT Tolerance for face comparisons. Default is 0.6.</p><p>Lower this if you get multiple matches for the same</p><p>person.</p><p>--show-distance BOOLEAN Output face distance. Useful for tweaking tolerance</p><p>setting.</p><p>--help Show this message and exit.</p></li><li><p>First create a new face picture folder '''known_people''' with a &gt; known name, then copy two pictures to '''known_people''', and &gt; then copy '''obama2.jpg''' to '''unknown.jpg''', which is the &gt; picture we want to identify</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$ '''cp biden.jpg obama.jpg known_people'''</p><p>orangepi@orangepi:~/face_recognition/examples$ '''cp obama2.jpg unkown.jpg'''</p></li><li><p>Then you can use the following command to identify install the name deb package of &gt; the person in the '''unknown.jpg''' picture, and you can see &gt; that the unknown.jpg picture is recognized as obamakernel header file</p><p>orangepi@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p><p>'''unkown.jpg'''</p><p>unkown.jpg,obama</p></li><li><p>If we identify an irrelevant image, unknown_person will be &gt; displayed</p><p>root@orangepi:~/face_recognition/examples$ '''face_recognition known_people \'''</p><p>'''alex-lacamoire.png'''</p><p>alex-lacamoire.png,unknown_person</p></li><li><p>We can also create a new test folder and put multiple pictures &gt; in it, and then we can use all the CPUs to recognize all the &gt; pictures in parallel</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$ '''face_recognition --cpus -1 \'''</p><p>'''known_people test'''</p><p>test/obama-240p.jpg,obama</p><p>test/alex-lacamoire.png,unknown_person</p><p>test/obama_small.jpg,obama</p><p>test/unkown.jpg,obama</p><p>test/obama2.jpg,obama</p><p>test/lin-manuel-miranda.png,unknown_person</p><p>test/two_people.jpg,biden</p><p>test/two_people.jpg,obama</p><p>test/obama-720p.jpg,obama</p><p>test/obama.jpg,obama</p><p>test/obama-480p.jpg,obama</p><p>test/biden.jpg,biden</p><p>test/obama-1080p.jpg,obama</p></li></ol></li></ol> <span id{| class="setting-chinese-environment-and-installing-chinese-input-methodwikitable"></span>== 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。''' <span id="how-to-install-debian-system"></span>=== How to install Debian system === <ol style="list-style-typewidth: decimal800px;"><li><p>First set the default '''locale''' to Chinese</p><ol style="list-style-type: lower|-alpha;"><li><p>Enter the following command to start configuring the '''locale'''</p>| <p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''<i /p><opt/li><li><p>Then select '''zh_CN.UTFlinux-8 UTF-8''' in the pop-up interface (move &gt; up and down through the up and down direction keys on the &gt; keyboard, select through the space bar, and finally move the &gt; cursor to '''&lt;OK&gt;'''through the Tab key, and then press &gt; Enter.)</p><p>[[File:media/image210headers*.png|575x296px]]</p></li><li><p>Then set the default '''locale''' to '''zh_CN.UTF-8deb'''</p><p>[[File:media/image211.png|575x160px]]</p></li><li><p>After exiting the interface, the '''locale''' setting will start, &gt; and the output displayed on the command line is as follows</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><p>zh_CN.UTF-8... done</p><p>Generation complete.</p></li></ol>}
</li>
<li><p>Then open After installation, you can see the folder where the kernel header files are located under '''Input Method/usr/src'''</p><p>[[File{| class="wikitable" style="width:media/image212.png800px;" |-|575x361px]]</p></li><li><p>Then choose orangepi@orangepi:~$ '''OKls /usr/src'''</p><p>[[File:media/image213linux-headers-x.x.png|295x212px]]x</p>|}</li><li><p>Then chooseyou 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 '''Yes/usr/src/hello'''. After entering this directory, use the make command to compile.</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media~$ '''cd /usr/image214.png|303x192px]]src/hello/'''</p></li><li><p>Then chooseorangepi@orangepi:/usr/src/hello$ '''fcitxsudo make'''</p><p>[[File:mediamake -C /lib/modules/image2155.png|307x220px]]4.125/build M=/usr/src/hello modules</p></li><li><p>Then choose'''OK'make[1]: Entering directory '/usr/src/linux-headers-5.4.125'</p>:<p>CC [[File:mediaM] /usr/src/hello/image216hello.png|305x216px]]o</p></li><li>:<p>'''Then restart the Linux system to make the configuration take effect'''Building modules, stage 2.</p></li><li>:<p>Then open '''Fcitx configuration'''MODPOST 1 modules</p>:<p>CC [[File:mediaM] /usr/src/hello/image217hello.mod.png|575x376px]]o</p></li><li>:<p>Then click the + sign in the position shown in the figure belowLD [M] /usr/src/hello/hello.ko</p><p>make[[File1]:mediaLeaving directory '/image218usr/src/linux-headers-5.png|280x187px]]4.125'</p>|}</li><li><p>Then search After compiling, the '''Google Pinyinhello.ko''' and click kernel module will be generated</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:/usr/src/hello$ '''OKls *.ko'''</p><p>[[File:media/image219hello.png|291x196px]]ko</p>|}</li><li><p>Then bring Using the '''insmod''' command, you can insert the '''Google Pinyinhello.ko''' to kernel module into the frontkernel</p><p>[[File{| class="wikitable" style="width:media/image220.png800px;" |-|299x202px]]</p><p>[[Fileorangepi@orangepi:media/image221usr/src/hello$ '''sudo insmod hello.png|300x202px]]ko'''</p>|}</li><li><p>Then open use the '''Geanydemsg''' editor command to test view the output of the '''hello.ko''' kernel module. If you can see the Chinese input methodoutput instructions below, the '''hello.ko''' kernel module is loaded correctly</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media/image222.png|349x212px]]<usr/p><src/li><li><p>The Chinese input method test is as followshello$ '''dmesg | grep &quot;Hello&quot;'''</p><p>[[File:media/image2232871.png|575x325px893988]]</p></li><li><p>The Chinese and English input methods can be switched through the '''Ctrl+SpaceHello Orange Pi -- init''' shortcut key</p>|}</li><li><p>If Use the entire system needs to be displayed in Chinese, you can set the variables in '''/etc/default/localermmod''' command to uninstall the '''zh_CNhello.UTF-8ko'''kernel module</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~/usr/src/hello$ '''sudo vim /etc/default/localermmod hello'''</p><p># File generated by update-locale<orangepi@orangepi:/usr/src/p><p>LC_MESSAGES=hello$ '''zh_CN.UTF-8dmesg | grep &quot;Hello&quot;'''</p><p>LANG='''zh_CN[ 2871.UTF893988] Hello Orange Pi --8'''init</p><p>LANGUAGE=[ 3173.800892] '''zh_CN.UTFHello Orange Pi --8exit'''</p></li><li><p>Then '''restart the system''' and you can see that the system is displayed in Chinese</p>|}<p>[[File:media/image224.png|576x356px]]</p></li></ol>
<span id="howsome-toprogramming-installlanguage-ubuntutests-20.04supported-by-linux-system"></span>=== How to install Ubuntu 20.04 system ===
<ol style="list-style-type: decimal;"><li><p>First open '''Language Support'''</p><p>[[File:media/image225.png|575x351px]]</p></li><li><p>Then find the <span class="mark">'''Chinese (China''')</span> option</p><p>[[File:media/image226.png|318x311px]]</p></li><li><p>Then please use the left mouse button to select '''<span classSome programming language tests supported by Linux system =="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:media/image227.png|324x320px]]</p></li></ol>
'''Note that this step is not easy to drag, please be patient and try a few more times.''' <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><p>[[File:media/image228.png|321x316px]]</p></li><li><p>Then set'''Keyboard input method system''' to '''fcitx'''</p><p>[[File:media/image229.png|327x320px]]</p></li><li><p>'''Then restart the Linux system to make the configuration take effect'''</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><p>[[File:media/image230.png|303x247px]]</p></li><li><p>Then you can see that the desktop is displayed in Chinese</p><p>[[File:media/image231.png|575x383px]]</p></li><li><p>Then we can open '''Geany''' to test the Chinese input method, as shown in the figure below</p><p>[[File:media/image232.png|576x292px]]</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><p>[[File:media/image233.png|575x308px]]</p></li></ol> <span id="howdebian-to-install-ubuntu-22.04bullseye-system"></span>=== How to install Ubuntu 22.04 system Debian Bullseye System ===
<ol style="list-style-type: decimal;">
<li><p>First open '''Language Support'''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</p><ol style="list-style-type: lower-alpha;"><li><p>[[FileThe version of gcc is as follows</p>{| class="wikitable" style="width:media/image225.png800px;" |-|575x351px]]</p>orangepi@orangepi:~$ '''gcc --version'''</lip><lip>gcc (Debian 10.2.1-6) 10.2.1 20210110</p>Then find the '''<span class="mark"p>Chinese Copyright (ChinaC)2020 Free Software Foundation, Inc.</spanp>''' option<p>This is free software; see the source for copying conditions. There is NO</p><p>[[File:media/image234warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.png|249x242px]]</p>|}</li><li><p>Then please use Write the left mouse button to select '''hello_world.c''' program in C language<span /p>{| class="markwikitable" style="width:800px;">Chinese (China)|-| </spanp>orangepi@orangepi:~$ '''vim hello_world.c''' 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:media/image235#include &lt;stdio.png|267x262px]]h&gt;</p></li></ol>
'''Note that this step is not easy to drag, please be patient and try a few more times。'''
<ol start="4" style="list-style-type: decimal;"><li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire systemint main(void)</p><p>[[File:media/image236.png|287x282px]]{</p></li><li><p>'''Then restart the Linux system to make the configuration take effect'''</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><p>[[File:media/image230.png|303x247px]]</p></li><li><p>Then you can see that the desktop is displayed in Chinese</p><p>[[File:media/image231.png|575x383px]]printf(&quot;Hello World!\n&quot;);</p></li><li><p>Then open the Fcitx5 configuration program</p><p>[[File:media/image237.png|575x349px]]</p></li><li><p>Then choose to use Pinyin input method</p><div class="figure">
[[File:media/image238.jpeg|338x267px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-11.jpg未标题-11]]
:</divp>return 0;</lip><li><p>The interface after selection is as shown below, and then click OK}</p><p>[[File:media/image239.png|366x290px]]</p>}</li><li><p>Then we can open compile and run '''Geanyhello_world.c''' to test the Chinese input method, the opening method is shown in the figure below</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media/image232~$ '''gcc -o hello_world hello_world.png|576x292px]]c'''</p></li><li><p>After opening orangepi@orangepi:~$ '''Geany''', the default is English input method, we can switch to Chinese input method through ''./hello_world'Ctrl+Space''' shortcut key, and then we can input Chinese</p><p>[[File:media/image240.png|434x308px]]Hello World!</p>|}</li></ol> <span id="how-to-remotely-log-in-to-the-desktop-of-linux-system"></spanli>== How to Remotely Log In to the Desktop of Linux System == <span id="remote-login-using-nomachine"li></spanp>=== Remote login using NoMachine === '''Make sure the Ubuntu or Debian system Bullseye comes with Python3 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:''' '''https://knowledgebase.nomachine.com/DT10R00166''' '''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''' <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 boardby default</p>
<ol style="list-style-type: lower-alpha;">
<li>Since H618 <p>The specific version of Python is a SOC of the ARMV8 architectureas follows</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''python3'''</p><p>'''Python 3.9.2''' (default, Feb 28 2021, 17:03:44)</p><p>[GCC 10.2.1 20210110] on linux</p><p>Type &quot;help&quot;, &quot;copyright&quot;, the system we use &quot;credits&quot; or &quot;license&quot; for more information.</p><p>&gt;&gt;&gt; </p>|}{| 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>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''vim hello_world.py'''</p><p>print('Hello World!')</p>|}</li><li><p>The result of running '''hello_world.py''' is Ubuntu or as follows</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p><p>Hello World!</p>|}</li></ol></li><li><p>Debian Bullseye does not install Java compilation tools and runtime environment by default</p><ol style="list-style-type: lower-alpha;"><li><p>You can use the following command to install openjdk, the latest version in DebianBullseye is openjdk-17</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p>|}</li><li><p>After installation, so you need to download can check the version of Java</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''java --version'''</p>|}</li><li><p>Edit '''hello_world.java of java version'''NoMachine </p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''vim hello_world.java'''</p><p>public class hello_world</p><p>{</p>:<p>public static void main(String[] args)</p>:<p>{</p>::<p>System.out.println(&quot;Hello World!&gtquot;); for ARM ARMv8 DEB</p>:<p>}</p><p>}</p>|}</li><li><p>Then compile and run''' installation packagehello_world. The download link is &gtjava'''</p>{| class="wikitable" style="width:800px; shown below:" |-| <p>orangepi@orangepi:~$ '''javac hello_world.java'''</p><p>orangepi@orangepi:~$ '''java hello_world'''</p><p>Hello World!</p>|}</li></ol>
</li></ol>
'''Note that this download link may change, please look for the deb package of the Armv8/Arm64 version。''' [https://www.nomachine.com/download/download&<span id=112&s=ARM '''https://downloads.nomachine.com/download"debian-bookworm-system"></?id=118&amp;distro=ARM''']span>
[[File:media/image241.png|575x227px]]=== Debian Bookworm System ===
<ol start="2" style="list-style-type: lower-alphadecimal;"><li><p>In additionDebian Bookworm is installed with a gcc compilation tool chain by default, which can directly compile C language programs in the installation package Linux system of '''NoMachine''' can also be &gt; downloaded in the '''official tool'''development board</p><ol style="list-style-type: lower-alpha;"><li><p>[[File:media/image242.png|66x102px]]The version of gcc is as follows</p>{| class="wikitable" style="width:800px;" |-| <p>First enter the orangepi@orangepi:~$ '''<span class="mark">remote login softwaregcc --NoMachine</span>version''' folder</p><p>[[File:media/image243gcc (Debian 12.2.0-14) 12.2.png|271x43px]]0</p><p>Then download the arm64 version of the deb installation packageCopyright (C) 2022 Free Software Foundation, Inc.</p><p>[[File:media/image244This is free software; see the source for copying conditions.png|180x109px]]There is NO</p></li><li><p>Then upload the downloaded '''nomachine_x.xwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.x_x_arm64.deb''' to the &gt; Linux system of the development board</p>|}</li><li><p>Then use Write the following command to install '''NoMachinehello_world.c''' program in the Linux &gt; system of the development boardC language</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo dpkg -i nomachine_x.xvim hello_world.x_x_arm64_arm64.debc'''</p></lip>#include &lt;stdio.h&gt;</olp>
<!-- -->
<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></ol>
'''Note that this download link may change。'''<p>int main(void)</p><p>{</p>:<p>printf(&quot;Hello World!\n&quot;);</p>
'''https://downloads.nomachine.com/download/?id=9'''
[[File:media/image245.png|575x163px]] <ol start="3" style="list-style-type: decimal;"><li><p>Then install NoMachine in Windows, '''please restart the computer after installation'''return 0;</p></li><li><p>Then open '''NoMachine''' in Window}</p><p>[[File:media/image246.png|76x66px]]</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><p>[[File:media/image247.png|321x92px]]</p></li><li><p>Then click compile and run '''OKhello_world.c'''</p><p>[[File:media/image248.png{|318x217px]]</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="markwikitable">OK</span>''' to start logging in</p><div classstyle="figurewidth:800px;"> [[File:media/image249.jpeg|303x204px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题-12.jpg未标题-12]]| </div></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><p>[[Fileorangepi@orangepi:media/image250.png|411x246px]]</p></li></ol> <span id="log-in-remotely-using-vnc"></span>=== 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.''' '''Ubuntu20.04 has many problems testing VNC, please do not use this method~$ ''' <ol style="list-stylegcc -type: decimal;"><li><p>First run the '''set_vnco hello_world hello_world.sh''' script to set up vnc, remember to '''add sudo permissionc'''</p><p>orangepi@orangepi:~$ '''sudo set_vnc.sh'''</p><p>You will require a password to access your desktops.</p><p>Password: '''#Set the vnc password here, 8 -bit characters'''</p><p>Verify: '''#Set the vnc password here, 8 charactershello_world'''</p><p>Would you like to enter a view-only password (y/n)? '''n'''Hello World!</p><p>xauth: file /root/.Xauthority does not exist</p><p>New 'X' desktop is orangepi:1</p><p>Creating default startup script /root/.vnc/xstartup</p><p>Starting applications specified in /root/.vnc/xstartup</p><p>Log file is /root/.vnc/orangepi:1.log</p><p>Killing Xtightvnc process ID 3047</p><p>New 'X' desktop is orangepi:1</p><p>Starting applications specified in /root/.vnc/xstartup</p><p>Log file is /root/.vnc/orangepi:1.log</p></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;"><li>First click on Session, then select VNC, then fill in the IP &gt; address and port of the development board, and finally click &gt; OK to confirm</li></ol>|}
</li></ol>
 <div class="figure"> [[File:media/image251.png|490x349px|图片1208]] </div><ol start="2" style="list-style-type: lower-alpha;"><li><p>Then enter the VNC password set earlier</p><p>[[File:media/image252.png|221x105px]]</p></li><li><p>After successful login, the interface is displayed as shown in the &gt; figure below, and then you can remotely operate the desktop of the &gt; development board linux system</p></li></ol> [[File:media/image253.png|405x293px]] <span id="how-to-install-qt"></span>== How to install QT == <ol style="list-style-type: decimal;"><li><p>Use the script below to install QT5 and QT Creator</p><p>orangepi@orangepi:~$ '''install_qt.sh'''</p></li><li><p>After installation, the version number of QT will be automatically printedDebian Bookworm has Python3 installed by default</p>
<ol style="list-style-type: lower-alpha;">
<li><p>The qt specific version that comes with Ubuntu 20.04 of Python is '''5.12.8'''as follows</p><p>orangepi@orangepi{| class="wikitable" style="width:~$ '''install_qt.sh'''</p>800px;" <p>......</p><p>QMake version 3.1</p><p>Using Qt version '''5.12.8''' in /usr/lib/aarch64|-linux-gnu</p></li><li><p>The QT version that comes with Ubuntu 22.04 is '''5.15.3'''</p>| <p>orangepi@orangepi:~$ '''install_qt.shpython3'''</p><p>Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2...0] on linux</p><p>QMake version 3Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.1</p><p>Using Qt version '''5.15.3''' in /usr/lib/aarch64-linux-gnu&gt;&gt;&gt;</p></li><li><p>The QT version that comes with Debian11 is '''5.15.2'''</p>|}<p>orangepi@orangepi{| class="wikitable" style="background-color:#ffffdc;width:~$ '''install_qt.sh'''</p>800px;" <p>......</p>|-<p>QMake version 3.1</p><p>Using Qt version '''5.15.2''' in /usr/lib/aarch64-linux-gnu</p></li>| <libig><p>The QT version that comes with Debian12 is '''5.15.8''Use the Ctrl+D shortcut to exit python'</p><p>orangepi@orangepi:~$ '''install_qts interactive mode.sh'''</p><p>......</p><p>QMake version 3.1</pbig><p>Using Qt version '''5.15.8''' in /usr/lib/aarch64-linux-gnu</p></li></ol>|}
</li>
<li><p>Then you can see the QT Creator startup icon in Write '''Applicationshello_world.py'''program in Python language</p><p>[[File{| class="wikitable" style="width:media/image254.png800px;" |576x270px]]</p>-<p>You can also use the following command to open QT Creator</p>| <p>orangepi@orangepi:~$ '''qtcreatorvim hello_world.py'''</p><p>print('Hello World!')</p>|}</li><li><p>The interface after QT Creator is opened result of running '''hello_world.py''' is as follows</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media~$ '''python3 hello_world.py'''</p><p>Hello World!</image255.pngp>|576x342px]]}</li></pol></li><li><p>The version of QT Creator is as followsDebian Bookworm does not install Java compilation tools and operating environment by default</p>
<ol style="list-style-type: lower-alpha;">
<li><p>The default You can use the following command to install openjdk, the latest version of QT Creator in '''Ubuntu20.04''' Debian Bookworm is as &gt; followsopenjdk-17</p><p>[[File{| class="wikitable" style="width:media/image256.png800px;" |-|419x224px]]</p></li><li><p>The default version of QT Creator in orangepi@orangepi:~$ '''Ubuntu22.04sudo apt install -y openjdk-17-jdk''' is as &gt; follows</p><p>[[File:media/image257.png|443x237px]]</p>}</li><li><p>The default After installation, you can check the version of QT Creator in '''Debian11''' is as followsJava</p><p>[[File{| class="wikitable" style="width:media/image258.png800px;" |-|444x238px]]</p></li><li><p>The default version of QT Creator in orangepi@orangepi:~$ '''Debian12java --version''' is as follows</p><p>[[File:media/image259.png|449x277px]]</p></li></ol>}
</li>
<li><p>Then set up QTEdit the Javaverison’s '''hello_world.java'''</p><ol {| class="wikitable" style="list-style-typewidth: lower-alpha800px;"><li>|-| <p>First open '''Help'''-&gt;orangepi@orangepi:~$ '''About Pluginsvim hello_world.java'''</p><p>[[File:media/image260.png|573x164px]]public class hello_world</p></li><li><p>Then remove the tick of '''ClangCodeModel'''{</p>:<p>public static void main(String[[File:media/image261.png|408x254px]]args)</p></li><li>:<p>'''After setting, you need to restart QT Creator'''{</p></li><li>::<p>Then make sure the GCC compiler used by QT Creator, if the System.out.println(&quot;Hello World!&gtquot;); default is Clang, please modify it to GCC</p>:<p>'''Debian12 please skip this step.'''}</p><p>[[File:media/image262.png|576x315px]]}</p><p>[[File:media/image263.png|575x307px]]</p></li></ol>}
</li>
<li><p>Then you can open a sample code</p><p>[[File:media/image264.png|575x312px]]</p></li><li><p>After clicking the sample code, the corresponding instruction document will be opened automatically, you can read the instructions carefully</p><p>[[File:media/image265.png|576x218px]]</p></li><li><p>Then click compile and run'''Configure Projecthello_world.java'''</p><p>[[File{| class="wikitable" style="width:media/image266.png|575x304px]]</p></li><li><p>Then click the green triangle in the lower left corner to compile and run the sample code</p>800px;" <p>[[File:media/image267.png|575x312px]]</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><p>[[File:media/image268.png|576x308px]]</p></li><li><p>References</p><p>[httpsorangepi@orangepi://wiki.qt.io/Install_Qt_5_on_Ubuntu ~$ '''https://wiki.qtjavac hello_world.io/Install_Qt_5_on_Ubuntujava''']</p><p>[httpsorangepi@orangepi://download.qt.io/archive/qtcreator ~$ '''https://download.qt.io/archive/qtcreatorjava hello_world''']</p><p>[https://download.qt.io/archive/qt '''https://download.qt.io/archive/qt''']Hello World!</p>|}</li></ol> <span id="how-to-install-ros"></span>== How to install ROS == <span id="how-to-install-ros-1-noetic-on-ubuntu-20.04"li></spanol>=== 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'''<span id="ubuntu-focal-system"></span>
[[File:media/image269.png|345x235px]]=== Ubuntu Focal System ===
[[File<ol style="list-style-type:mediadecimal;"><li><p>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</image270p><ol style="list-style-type: lower-alpha;"><li><p>The version of a.pnggcc is as follows</p>{|576x210px]]class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''gcc --version'''</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>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><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>#include &lt;stdio.h&gt;</p>
[http://docs.ros.org/ '''http://docs.ros.org''']
'''https:<p>int main(void)</p><p>{</wiki.ros.orgp>:<p>printf(&quot;Hello World!\n&quot;);</Distributions'''p>
<ol start="2" style="list-style-type: decimal;">
<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>
<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 '''http://wiki.ros.org/noetic/Installation''']</p>
<p>[[File:media/image271.png|312x176px]]</p></li>
<li><p>Then use the script below to install ros1</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></li></ol>
:<p>return 0;</p><p>}</p>|}</li><li><p>Then compile and run '''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 problemshello_world.c'''</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''The install_ros.sh script will try to modify /etc/hosts and run the following commands automaticallygcc -o hello_world hello_world. 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。c'''</p> <p>orangepi@orangepi:~$ '''https:./hello_world'''</raw.githubusercontent.comp><p>Hello World!</rosp>|}</rosdistroli></masterol></rosdepli><li><p>Ubuntu Focal has Python3 installed by default</osxp><ol style="list-homebrew.yamlstyle-type: lower-alpha;"><li><p>The specific version of Python3 is as follows</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ ''' python3'''Hit https</p><p>Python 3.8.10 (default, Nov 14 2022, 12:59:47)<//rawp><p>[GCC 9.githubusercontent4.com0] on linux</rosp><p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</rosdistrop><p>&gt;&gt;&gt;</master/rosdep/base.yaml'''p>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Use the Ctrl+D shortcut to exit python'ERROR: error loading sources list:s interactive mode.'''</p></big>|}</li><li><p>Write the '''The read operation timed outhello_world.py'''program in Python language</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''source vim hello_world.py'''</optp><p>print('Hello World!')</rosp>|}</noetic/setupli><li><p>The result of running '''hello_world.bashpy'''is as follows</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo rosdep initpython3 hello_world.py'''</p><p>Hello World!</p>|}Wrote </etcli></rosol></rosdepli><li><p>Ubuntu Focal does not install Java compilation tools and operating environment by default</sources.p><ol style="list.d/20-default.liststyle-type: lower-alpha;"><li><p>You can use the following command to install openjdk-17</p>Recommended{| class="wikitable" style="width: please run800px;" |-rosdep update| <p>orangepi@orangepi:~$ '''rosdep updatesudo apt install -y openjdk-17-jdk'''</p>|}reading in sources list data from </etcli><li><p>After installation, you can check the version of Java</ros/rosdep/sources.list.dp>{| class="wikitable" style="width:800px;" |-| Hit https<p>orangepi@orangepi:~$ '''java --version'''</p><p>openjdk 17.0.2 2022-01-18</rawp><p>OpenJDK Runtime Environment (build 17.0.githubusercontent2+8-Ubuntu-120.com04)</rosp><p>OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)</rosdistrop>|}</masterli><li><p>Write the Java version of '''hello_world.java'''</rosdep/osxp>{| class="wikitable" style="width:800px;" |-homebrew.yaml| Hit https<p>orangepi@orangepi://raw~$ '''vim hello_world.githubusercontent.comjava'''</rosp><p>public class hello_world</rosdistrop><p>{</masterp>:<p>public static void main(String[] args)</rosdepp>:<p>{</base.yamlp> Hit https://raw:<p>System.githubusercontentout.comprintln(&quot;Hello World!&quot;);</rosp>:<p>}</rosdistrop><p>}</masterp>|}</rosdepli><li><p>Then compile and run '''hello_world.java'''</python.yamlp>{| class="wikitable" style="width:800px;" |-| Hit https<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p><p>orangepi@orangepi:~$ '''java hello_world'''</raw.githubusercontent.comp><p>Hello World!</rosp>|}</rosdistroli></masterol></rosdepli></ruby.yamlol>
Hit https:<span id="ubuntu-jammy-system"><//raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yamlspan>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml=== Ubuntu Jammy System ===
Skip end<ol style="list-style-type: decimal;"><li><p>Ubuntu Jammy is installed with a gcc compilation tool chain by default, which can directly compile C language programs in the Linux system ofthe development board</p><ol style="list-style-type: lower-life distro &quotalpha;ardent&quot"><li><p>The version of a.gcc is as follows</p>{| class="wikitable" style="width:800px;" |-Skip end| <p>orangepi@orangepi:~$ '''gcc -of-life distro &quotversion'''</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>This is free software;bouncy&quotsee the source for copying conditions. There is NO</p><p>warranty;not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>|}</li>Skip end<li><p>Write the '''hello_world.c''' program in C language</p>{| class="wikitable" style="width:800px;" |-of-life distro | <p>orangepi@orangepi:~$ '''vim hello_world.c'''</p><p>#include &quotlt;crystalstdio.h&quotgt;</p>
Skip end-of-life distro &quot;dashing&quot;
Skip end-of-life distro <p>int main(void)</p><p>{</p>:<p>printf(&quot;eloquentHello World!\n&quot;);</p>
Add distro &quot;foxy&quot;
Add distro &quot:<p>return 0;galactic&quot</p><p>}</p>|}</li><li><p>Then compile and run '''hello_world.c'''</p>{| class="wikitable" style="width:800px;" |-| Skip end<p>orangepi@orangepi:~$ '''gcc -of-life distro &quot;groovy&quot;o hello_world hello_world.c'''</p><p>orangepi@orangepi:~$ '''./hello_world'''</p><p>Hello World!</p>|}</li></ol>Add distro &quot;humble&quot;</li><li><p>Ubuntu Jammy has Python3 installed by default</p>Skip end<ol style="list-ofstyle-type: lower-life distro &quotalpha;hydro&quot"><li><p>The specific version of Python3 is as follows</p>{| class="wikitable" style="width:800px;" |-Skip end-of-life distro &quot;indigo&quot;| <p>orangepi@orangepi:~$ '''python3'''</p>Skip end-of-life distro <p>Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux</p><p>Type &quot;jadehelp&quot; Skip end-of-life distro , &quot;kineticcopyright&quot; Skip end-of-life distro , &quot;lunarcredits&quot; Add distro or &quot;melodiclicense&quot;for more information.</p> Add distro <p>&quotgt;noetic&quotgtAdd distro &quotgt;rolling&quot; updated cache in </home/orangepi/.ros/rosdep/sources.cachep>|}<ol start{| class="6wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig><p>Then open a command line terminal window on the '''desktopUse the Ctrl+D shortcut to exit python''', and use the s interactive mode.'''<span class="mark"/p></big>test_ros.sh|}</spanli><li><p>Write the '''hello_world.py''' script to start a small turtle routine to test whether ROS can be used normallyprogram in Python language</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''test_rosvim hello_world.shpy'''</p><p>print('Hello World!')</p>|}</li><li><p>After The result of running the '''test_roshello_world.shpy''' script, a little turtle is as shown in the figure below will pop upfollows</p>{| class="wikitable" style="width:800px;" |-| <p>[[Fileorangepi@orangepi:media~$ '''python3 hello_world.py'''</image272.pngp><p>Hello World!</p>|575x291px]]}</li></pol></li><li><p>Then please keep the terminal window you just opened on topUbuntu Jammy does not install Java compilation tools and operating environment by default</p><ol style="list-style-type: lower-alpha;"></li><p>You can use the following command to install openjdk-18</olp<div {| class="figurewikitable">style="width:800px;" |-| [[File<p>orangepi@orangepi:media~$ '''sudo apt install -y openjdk-18-jdk'''</image273.jpegp>|575x269px}</li><li><p>After installation, you can check the version of Java</p>{|Cclass="wikitable" style="width:\Users\800px;" |-| <p>orangepi@orangepi\Desktop\用户手册插图\Zero3\未标题:~$ '''java --5version'''</p><p>openjdk 18.0.jpg未标题2-ea 2022-07-5]]19</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>|}</divli><ol startli><p>Write the Java version of '''hello_world.java'''</p>{| class="9wikitable" style="list-style-typewidth: decimal800px;"|-| <p>orangepi@orangepi:~$ '''vim hello_world.java'''</p><lip>public class hello_world</p><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>public static void main(String[[File] args)</p>:<p>{</p>::<p>System.out.println(&quot;Hello World!&quot;);</p>:media<p>}</p><p>}</image274p>|}</li><li><p>Then compile and run '''hello_world.pngjava'''</p>{| class="wikitable" style="width:800px;" |-|575x250px]]<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p><p>orangepi@orangepi:~$ '''java hello_world'''</p><p>Hello World!</p>|}</li></ol></li></ol> <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 == <span id="how-to-installupload-files-to-the-development-rosboard-2linux-galacticsystem-onin-ubuntu-20.04pc"></span>=== How to install ROS 2 Galactic on upload files to the development board Linux system in Ubuntu 20.04 PC === <span id="how-to-upload-files-using-the-scp-command"></span>==== How to upload files using the scp command ====
<ol style="list-style-type: decimal;">
<li><p>The currently active version Use the scp command to upload files from the Ubuntu PC to the Linux system of ROS 2 is shown below, and the recommended version is '''Galactic Geochelone'''</p><p>[[File:media/image275development board.png|576x271px]]The specific commands are as follows</p><p>[[Fileol style="list-style-type:media/image276.png|575x265px]]</plower-alpha;"><pli>[http://docs.ros.org/ '''http://docs.ros.org''']</p><p>'''httpfile_path://docs.ros.org/en/galactic/Releases.html'''Need to be replaced with the path of the file to be uploaded</p></li><li><p>The link to the official ROS 2 '''Galactic Geocheloneorangepi:''' installation documentation It is the user name of the Linux system of the development board, and it can also be replaced with other ones, such as follows:root</p><p/li>'''docs.ros.org/en/galactic/Installation.html'''</pli><p>'''http://docs192.ros168.org/en/galactic/Installation/Ubuntu-Install-Debiansxx.htmlxx:'''It is the IP address of the development board, please modify it according to the actual situation</p></li><li><p>In the official ROS 2 '''Galactic Geochelone/home/orangepi:''' installation document, Ubuntu The path in the Linux recommends using Ubuntu 20.04, so please make sure that the system used by of the development board is the '''Ubuntu 20.04 desktop system'''. There are several ways can also be modified to install ROS 2. The following demonstrates how to install ROS 2 '''other paths<span /p>{| class="markwikitable">Galactic Geochelone</span>''' through '''<span classstyle="markwidth:800px;">Debian packages</span>'''.</p></li><li><p>Ros2 can be installed using the '''install_ros.sh''' script</p>|-| <p>orangepitest@orangepitest:~$ '''install_rosscp file_path orangepi@192.sh ros2'''</p></li><li><p>The '''install_ros168.sh''' script will automatically run the '''ros2 -h''' command after installing ros2xx. If you can see the following print, it means that the ros2 installation is complete</p><p>usagexx: ros2 [-h] Call `ros2 &lt;command&gt; -h` for more detailed usage. ...</p><p>ros2 is an extensible command-line tool for ROS 2.<home/p><p>optional arguments:<orangepi/p><p>-h, --help show this help message and exit'''</p><p>Commands:</p>|}<p>action Various action related sub-commands</pli><p>bag Various rosbag related sub-commands</pol><p>component Various component related sub-commands</pli><pli>daemon Various daemon related sub-commands</p><p>doctor Check ROS setup and other potential issues</p><p>interface Show information about ROS interfaces</p><p>launch Run If you want to upload a launch file</p><p>lifecycle Various lifecycle related subfolder, you need to add the -commandsr parameter</p><p>multicast Various multicast related sub-commands</p>{| class="wikitable" style="width:800px;" <p>node Various node related sub|-commands</p><p>param Various param related sub-commands</p>| <p>pkg Various package related sub-commands</p><p>run Run a package specific executable</p><p>security Various security related sub-commands</p><p>service Various service related sub-commands</p><p>topic Various topic related sub-commands</p><p>wtf Use `wtf` as alias to `doctor`</p><p>Call `ros2 &lt;command&gt; -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>orangepi@orangepitest:~$ '''test_ros.sh'''scp </pspan style="color:#FF0000">-r<p/span>[INFO] [1671174101dir_path orangepi@192.200091527] [talker]: Publishing: 'Hello World: 1'</p><p>[INFO] [1671174101168.xx.235661048] [listener]xx: I heard: [Hello World: 1]</p><p>[INFO] [1671174102.199572327] [talker]: Publishing: 'Hello World: 2'<home/p><p>[INFO] [1671174102.204196299] [listener]: I heard: [Hello World: 2]<orangepi/p><p>[INFO] [1671174103.199580322] [talker]: Publishing: 'Hello World: 3''</p><p>[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]</p>|}</li><li><p>Run There are more usages of scp, please use the following command to open rviz2view the man manual</p><p/li>orangepi@orangepi {| class="wikitable" style="width:~$ '''source /opt/ros/galactic/setup.bash'''</p>800px;" |-| <p>orangepitest@orangepitest:~$ '''ros2 run rviz2 rviz2man scp'''</p><p>[[File:media/image277.png|576x324px]]}</p></liol><li><p>For span id="how -to use ROS, please refer to the documentation of ROS 2</p-upload-files-using-filezilla"><p>[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/galactic/Tutorials.html''']</p></li></olspan>
<span id="how-to-install-ros-2-humble-on-ubuntu-22.04"></span>=== How to install ROS 2 Humble on Ubuntu 22.04 upload files using filezilla ====
<ol style="list-style-type: decimal;">
<li><p>Ros2 can be installed using the '''install_ros.sh''' scriptFirst install filezilla in Ubuntu PC</p><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><p>usage{| class="wikitable" style="width: ros2 [-h] Call `ros2 &lt800px;command&gt; -h` for more detailed usage. ...</p>" <p>ros2 is an extensible command|-line tool for ROS 2.</p><p>optional arguments:</p><p>-h, --help show this help message and exit</p><p>Commands:</p><p>action Various action related sub-commands</p><p>bag Various rosbag related sub-commands</p><p>component Various component related sub-commands</p><p>daemon Various daemon related sub-commands</p><p>doctor Check ROS setup and other potential issues</p><p>interface Show information about ROS interfaces</p><p>launch Run a launch file</p><p>lifecycle Various lifecycle related sub-commands</p><p>multicast Various multicast related sub-commands</p><p>node Various node related sub-commands</p><p>param Various param related sub-commands</p><p>pkg Various package related sub-commands</p><p>run Run a package specific executable</p><p>security Various security related sub-commands</p><p>service Various service related sub-commands</p><p>topic Various topic related sub-commands</p><p>wtf Use `wtf` as alias to `doctor`</p><p>Call `ros2 &lt;command&gt; -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>orangepi@orangepitest:~$ '''test_ros.shsudo apt install -y filezilla'''</p><p>[INFO] [1671174101.200091527] [talker]: Publishing: 'Hello World: 1'</p>|}<p>[INFO] [1671174101.235661048] [listener]: I heard: [Hello World: 1]</p><p>[INFO] [1671174102.199572327] [talker]: Publishing: '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.204019965] [listener]: I heard: [Hello World: 3]</p></li><li><p>Run Then use the following command to open rviz2filezilla</p><p>orangepi@orangepi{| class="wikitable" style="width:~$ '''source /opt/ros/humble/setup.bash'''</p>800px;" |-| <p>orangepitest@orangepitest:~$ '''ros2 run rviz2 rviz2filezilla'''</p><p>[[File:media/image278.png|575x323px]]</p>}</li><li><p>Reference documentsThe interface after filezilla is opened is as follows, at this time, the display under the remote site on the right is empty</p><p>'''http://docs.ros.org/en/humble/index.html'''</pdiv class="figure"><p>[[httpFile://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/humble/Installation/Ubuntuzero3-Install-Debiansimg279.html'''png]]</p></li></ol>
<span id="how-to-install-the-kernel-header-file"/div></spanli>== How to install <li><p>The method of connecting the kernel header file ==development board is shown in the figure below</p>
'''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'''<div class="figure">
<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><p>orangepi@orangepi:~$ '''ls /opt/linux-headers*'''</p><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><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><p>orangepi@orangepi:~$ '''ls /usr/src'''</p><p>linux-headers-x.x.x</p></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><p>orangepi@orangepi:~$ '''cd /usr/src/hello/'''</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[1]: Entering directory '/usr/src/linux-headers-5.4.125'</p><p>CC [M] /usr/src/hello/hello.o</p><p>Building modules, stage 2.</p><p>MODPOST 1 modules</p><p>CC [M] /usr/src/hello/hello.mod.o</p><p>LD [M] /usr/src/hello/hello.ko</p><p>make[1]File: Leaving directory '/usr/src/linuxzero3-headers-5img280.4.125'</p></li><li><p>After compiling, the '''hello.ko''' kernel module will be generated</p><p>orangepi@orangepi:/usr/src/hello$ '''ls *.ko'''</p><p>hello.ko</p></li><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><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><p>orangepi@orangepi:/usr/src/hello$ '''dmesg | grep &quot;Hello&quot;'''</p><p>[ 2871.893988] '''Hello Orange Pi -- init'''</p></li><li><p>Use the '''rmmod''' command to uninstall the '''hello.ko''' kernel module</p><p>orangepi@orangepi:/usr/src/hello$ '''sudo rmmod hello'''</p><p>orangepi@orangepi:/usr/src/hello$ '''dmesg | grep &quot;Hello&quot;'''</p><p>[ 2871.893988png] Hello Orange Pi -- init</p><p>[ 3173.800892] '''Hello Orange Pi -- exit'''</p></li></ol>
<span id/div></li></ol><ol start="5" style="somelist-programmingstyle-language-tests-supported-by-linux-systemtype: decimal;"><li><p>Then choose to '''<span class="mark">save the password</span>''', and then click '''<span class="mark">OK</span>'''</p><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= Some programming language tests supported by Linux system =="mark">OK</span>'''</p>
<span iddiv class="debian-bullseye-systemfigure"></span>=== Debian Bullseye System ===
<ol style="list-style-type: decimal;"><li><p>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</p><ol style="list-style-type: lower-alpha;"><li><p>The version of gcc is as follows</p><p>orangepi@orangepi:~$ '''gcc --version'''</p><p>gcc (Debian 10.2.1-6) 10.2.1 20210110</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>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><p>orangepi@orangepi[[File:~$ '''vim hello_world.c'''</p><p>#include &lt;stdio.h&gt;</p><p>int main(void)</p><p>{</p><p>printf(&quot;Hello World!\n&quot;);</p><p>return 0;</p><p>}</p></li><li><p>Then compile and run '''hello_world.c'''</p><p>orangepi@orangepi:~$ '''gcc zero3-o hello_world hello_world.c'''</p><p>orangepi@orangepi:~$ '''./hello_world'''</p><p>Hello World!</p></li></ol></li><li><p>Debian Bullseye comes with Python3 installed by default</p><ol style="list-style-type: lower-alpha;"><li><p>The specific version of Python is as follows</p><p>orangepi@orangepi:~$ '''python3'''</p><p>'''Python 3.9img282.2''' (default, Feb 28 2021, 17:03:44)</p><p>[GCC 10.2.1 20210110png] on linux</p><p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p><p>&gt;&gt;&gt;</p><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><p>orangepi@orangepi:~$ '''vim hello_world.py'''</p><p>print('Hello World!')</p></li><li><p>The result of running '''hello_world.py''' is as follows</p><p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p><p>Hello World!</p></li></ol></li><li><p>Debian Bullseye does not install Java compilation tools and runtime environment by default</p><ol style="list-style-type: lower-alpha;"><li><p>You can use the following command to install openjdk, the latest &gt; version in Debian Bullseye is openjdk-17</p><p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li><li><p>After installation, you can check the version of Java</p><p>orangepi@orangepi:~$ '''java --version'''</p></li><li><p>Edit '''hello_world.java of java version'''</p><p>orangepi@orangepi:~$ '''vim hello_world.java'''</p><p>public class hello_world</p><p>{</p><p>public static void main(String[] args)</p><p>{</p><p>System.out.println(&quot;Hello World!&quot;);</p><p>}</p><p>}</p></li><li><p>Then compile and run'''hello_world.java'''</p><p>orangepi@orangepi:~$ '''javac hello_world.java'''</p><p>orangepi@orangepi:~$ '''java hello_world'''</p><p>Hello World!</p></li></ol></li></ol>
<span id/div></li></ol><ol start="7" style="debianlist-bookwormstyle-systemtype: decimal;"></spanli>=== Debian Bookworm System ===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
<ol style="list-style-type: decimal;"><li><p>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</p><ol stylediv class="list-style-type: lower-alpha;figure"><li><p>The version of gcc is as follows</p><p>orangepi@orangepi:~$ '''gcc --version'''</p><p>gcc (Debian 12.2.0-14) 12.2.0</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>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><p>orangepi@orangepi:~$ '''vim hello_world.c'''</p><p>#include &lt;stdio.h&gt;</p><p>int main(void)</p><p>{</p><p>printf(&quot;Hello World!\n&quot;);</p><p>return 0;</p><p>}</p></li><li><p>Then compile and run '''hello_world.c'''</p><p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p><p>orangepi@orangepi:~$ '''./hello_world'''</p><p>Hello World!</p></li></ol></li><li><p>Debian Bookworm has Python3 installed by default</p><ol style="list-style-type: lower-alpha;"><li><p>The specific version of Python is as follows</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>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p><p>&gt;&gt;&gt;</p><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><p>orangepi@orangepi:~$ '''vim hello_world.py'''</p><p>print('Hello World!')</p></li><li><p>The result of running '''hello_world.py''' is as follows</p><p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p><p>Hello World!</p></li></ol></li><li><p>Debian Bookworm does not install Java compilation tools and operating environment by default</p><ol style="list-style-type: lower-alpha;"><li><p>You can use the following command to install openjdk, the latest &gt; version in Debian Bookworm is openjdk-17</p><p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li><li><p>After installation, you can check the version of Java</p><p>orangepi@orangepi:~$ '''java --version'''</p></li><li><p>Edit the Javaverison’s '''hello_world.java'''</p><p>orangepi@orangepi:~$ '''vim hello_world.java'''</p><p>public class hello_world</p><p>{</p><p>public static void main(String[] args)</p><p>{</p><p>System.out.println(&quot;Hello World!&quot;);</p><p>}</p><p>}</p></li><li><p>Then compile and run'''hello_world.java'''</p><p>orangepi@orangepi:~$ '''javac hello_world.java'''</p><p>orangepi@orangepi:~$ '''java hello_world'''</p><p>Hello World!</p></li></ol></li></ol>
<span id="ubuntu[[File:zero3-focal-system"></span>=== Ubuntu Focal System ===img283.png]]
</div></li></ol ><ol start="8" style="list-style-type: decimal;"><li><p>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 Focal has a gcc compilation tool chain installed by defaultPC on the left side of the filezilla software, then click the right mouse button, which can directly compile C language programs in and then click the upload option to start uploading the Linux system of file to the development board. <div class="figure"> [[File:zero3-img284.png]] </div></li></pol><ol start="9" style="list-style-type: lower-alphadecimal;"><li><p>The version After the upload is complete, you can go to the corresponding path in the Linux system of a.gcc is as followsthe development board to view the uploaded files</p><p>orangepi@orangepi:~$ '''gcc --version'''</pli><pli>gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0</p><p>Copyright (C) 2019 Free Software FoundationThe method of uploading a folder is the same as that of uploading a file, Inc.so I won't go into details here</p><p/li>This is free software; see the source for copying conditions. There is NO</pol> <pspan id="how-to-upload-files-to-the-development-board-linux-system-in-windows-pc">warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p></lispan=== How to upload files to the development board Linux system in Windows PC === <lispan id="how-to-upload-files-using-filezilla-1"><p/span>Write ==== 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 ::{| class="wikitable" style="width:800px;" |-| '''hello_worldhttps://filezilla-project.c''' program in C language<org/p><p>orangepi@orangepi:~$ '''vim hello_worlddownload.cphp?type=client'''</p><p>#include &lt;stdio|} ::[[File:zero3-img285.h&gt;</p>png]]<p>int main(void)</p><p>{</p>::[[File:zero3-img286-1.png]]<p>printf(&quot;Hello World!\n&quot;);</p><p>return 0ol start="2" style="list-style-type: decimal;</p><p>}</p></li"><li><p>Then compile The downloaded installation package is as follows, and run '''hello_world.c'''then double-click to install directly</p><p>orangepi@orangepi{| class="wikitable" style="width:~$ '''gcc 800px;" |-o hello_world hello_world.c'''</p>| <p>orangepi@orangepi:~$ '''FileZilla_Server_1./hello_world5.1_win64-setup.exe'''</p><p>Hello World!</p></li></ol>|}
</li>
<li><p>Ubuntu Focal has Python3 installed by defaultDuring the installation process, please select </p><ol stylespan class="list-style-type: lower-alpha;mark"><li><p>The specific version of Python3 is as follows</p><p>orangepi@orangepi:~$ '''python3'''Decline</pspan><p>Python 3.8.10 (default, Nov 14 2022, 12:59:47)</p><p>[GCC 9.4.0] on linux</p><p>Type &quot;help&quot;the following installation interface, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.and then select </p><pspan class="mark">Next&gt;&gt;&gt;</p><p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</pspan></li><li><p>Write the '''hello_world.py''' program in Python language</p><p>orangepi@orangepi:~$ '''vim hello_world.py'''</p><p>print('Hello World!')</p></lidiv class="figure"><li><p>The result of running '''hello_world.py''' is as follows</p><p>orangepi@orangepi[[File:~$ '''python3 hello_worldzero3-img287.py'''</p>png]] <p>Hello World!</pdiv></li></ol></li><li><p>Ubuntu Focal does not install Java compilation tools and operating environment by default</p><ol start="4" style="list-style-type: lower-alphadecimal;"><li><p>You can use The interface after filezilla is opened is as follows, and the following command to install openjdk-17</p><p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p></li><li><p>After installation, you can check display under the version of Java</p><p>orangepi@orangepi:~$ '''java --version'''</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 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)</p></li><li><p>Write remote site on the Java version of '''hello_world.java'''</p>right is empty<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p><p>public div class hello_world</p><p>{</p><p>public static void main(String[] args)</p><p>{</p><p>System.out.println(&quot;Hello World!&quot;);</p><p>}</p><p>}</p></li><li><p>Then compile and run '''hello_world.java'''</p><p>orangepi@orangepi:~$ '''javac hello_world.java'''</p><p>orangepi@orangepi:~$ '''java hello_world'''</p><p>Hello World!</p></li></ol></li></ol="figure">
<span id="ubuntu[[File:zero3-jammy-system"></span>=== Ubuntu Jammy System ===img288.png]]
<ol style="list-style-type: decimal;"/div></li><p>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</pol><ol stylestart="list-style-type: lower-alpha;5"><li><p>The version of a.gcc is as follows</p><p>orangepi@orangepi:~$ '''gcc --version'''</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>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><li><p>Write the '''hello_world.c''' program in C language</p><p>orangepi@orangepi:~$ '''vim hello_world.c'''</p><p>#include &lt;stdio.h&gt;</p><p>int main(void)</p><p>{</p><p>printf(&quot;Hello World!\n&quot;);</p><p>return 0;</p><p>}</p></li><li><p>Then compile and run '''hello_world.c'''</p><p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p><p>orangepi@orangepi:~$ '''./hello_world'''</p><p>Hello World!</p></li></ol></li><li><p>Ubuntu Jammy has Python3 installed by default</p><ol style="list-style-type: lower-alphadecimal;"><li><p>The specific version method of Python3 connecting the development board is as follows</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>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p><p>&gt;&gt;&gt;</p><p>'''Use the Ctrl+D shortcut to exit python's interactive mode.'''</p></li><li><p>Write the '''hello_world.py''' program shown in Python language</p><p>orangepi@orangepi:~$ '''vim hello_world.py'''</p><p>print('Hello World!')</p></li><li><p>The result of running '''hello_world.py''' is as follows</p><p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p><p>Hello World!</p></li></ol></li><li><p>Ubuntu Jammy does not install Java compilation tools and operating environment by default</p><ol style="list-style-type: lower-alpha;"><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><li><p>After installation, you can check the version of Java</p><p>orangepi@orangepi:~$ '''java --version'''</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 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><p>orangepi@orangepifigure below:~$ '''vim hello_world.java'''</p><p>public class hello_world</p><p>{</p><p>public static void main(String[] args)</p><p>{</p><p>System.out.println(&quot;Hello World!&quot;);</p><p>}</p><p>}</p></li><li><p>Then compile and run '''hello_world.java'''</p><p>orangepi@orangepi:~$ '''javac hello_world.java'''</p><p>orangepi@orangepi:~$ '''java hello_world'''</p><p>Hello World!</p></li></ol></li></ol>
<span iddiv class="the-method-of-uploading-files-to-the-linux-system-of-the-development-boardfigure"></span>== The method of uploading files to the Linux system of the development board ==
<span id="how[[File:zero3-to-upload-files-to-the-development-board-linux-system-in-ubuntu-pc"></span>=== How to upload files to the development board Linux system in Ubuntu PC ===img280.png]]
<span id="how-to-upload-files-using-the-scp-command"/div></span>==== How to upload files using the scp command ==== <ol style="list-style-type: decimal;"><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</pol><ol start="6" style="list-style-type: lower-alphadecimal;"><li><p>''Then choose to 'file_path:'''Need to be replaced with the path of the file to &gt; be uploaded</pspan class="mark">save the password</li><li><pspan>'''orangepi:''' It is the user name of the Linux system of the &gt; development board, and it can also be replaced with other &gt; ones, such as root</p></li><li><p>'''192.168.xx.xx:''' It is the IP address of the development &gt; board, please modify it according to the actual situation</p></li><li><p>'''/home/orangepi:then click ''' The path in the Linux system of the &gt; development board can also be modified to other paths</pspan class="mark">OK<p>test@test:~$ '''scp file_path orangepi@192.168.xx.xx:/home/orangepi/'''</p></lispan></ol></li><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><li><p>There are more usages of scp, please use the following command to view the man manual</p></li></ol>
test@test:~$ '''man scp'''
 
<span id="how-to-upload-files-using-filezilla"></span>
==== How to upload files using filezilla ====
 
<ol style="list-style-type: decimal;">
<li><p>First install filezilla in Ubuntu PC</p>
<p>test@test:~$ '''sudo apt install -y filezilla'''</p></li>
<li><p>Then use the following command to open filezilla</p>
<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:media/image279zero3-img289.png|576x453px|截图 2022-12-03 19-04-40]]
</div></li></ol><ol start="7" style="list-style-type: decimal;"><li>Then select '''<pspan class="mark">The method of connecting the development board is shown in the figure belowAlways trust this host</pspan>''', and click '''</lispan class="mark">OK</olspan>'''
<div class="figure">
[[File:media/image280zero3-img290.png|575x128px|图片565]]
</div></li></ol><ol start="58" style="list-style-type: decimal;"><li><p>Then choose select the path to be uploaded to '''<span class="mark">save the password</span>'''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 '''<span class="mark">OK</span>'''</p><p>[[File:media/image281.png|249x181px]]</p></li><li><p>Then choose to '''<span class="mark">always trust this host</span>'''the right mouse button, and then click '''<span class="mark">OK</span>'''</p></li></ol>the upload option to start uploading the file to the development board.
<div class="figure">
[[File:media/image282zero3-img291.png|278x150px|IMG_256]]
</div></li></ol><ol start="79" style="list-style-type: decimal;"><li>After Then select the connection is successful, you can see path to be uploaded to the development board on the directory structure right side of the development board linux filezilla software, and then select the file system to be uploaded on the right Windows PC on the left side of the filezilla software</li></ol>, 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">
[[File:media/image283zero3-img292.png|533x330px|IMG_256]]
</div></li></ol><ol start="810" style="list-style-type: decimal;"><li>Then select <p>After the path to be uploaded upload is complete, you can go to the development board on corresponding path in the right side Linux system of the filezilla software, and then select development board to view the file to be uploaded in files</p></li><li><p>The method of uploading a folder is the Ubuntu PC on the left side same as that of the filezilla software, then click the right mouse button, and then click the upload option to start uploading the a file to the development board bingo., so I won't go into details here</p></li></ol>
<div classspan id="figureinstructions-for-using-the-switch-logo"></span>
[[File:media/image284.png|529x414px|IMG_256]]== Instructions for using the switch logo ==
</div><ol start="9" style="list-style-type: decimal;"><li><p>After the upload is completeBy default, you can go to the corresponding path switch logo will only be displayed in the Linux desktop version of the system of </p></li><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>verbosity=1</p><p>'''<span style="color:#FF0000">bootlogo=false</span>'''</p>|}</li><li><p>Set the development board '''bootlogo''' variable to '''true''' in '''/boot/orangepiEnv.txt''' to view enable the uploaded filesswitch logo</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>verbosity=1</p><p>'''<span style="color:#FF0000">bootlogo=true</span>'''</p>|}</li><li><p>The method location of uploading a folder the boot logo image in the Linux system is </p>{| class="wikitable" style="width:800px;" |-| <p>'''/usr/share/plymouth/themes/orangepi/watermark.png'''</p>|}</li><li><p>After replacing the same as that of uploading a fileboot logo picture, so I won’t go into details hereyou need to run the following command to take effect</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo update-initramfs -u'''</p>|}</li></ol>
<span id="how-to-uploadshut-filesdown-toand-restart-the-development-board-linux-system-in-windows-pc"></span>=== How to upload files to the development board Linux system in Windows PC ===
<span id="how-to-upload-files-using-filezilla-1"></span>==== How to upload files using filezilla ==shut down and restart the development board ==
# First download <ol style="list-style-type: decimal;"><li><p>During the running of the Linux system, if the power is directly unplugged, the installation file of system may lose some data. It is recommended to use the '''poweroff''' command to shut down the Windows version Linux system of the filezilla softwaredevelopment board before power off, and then unplug the download link power</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo poweroff'''</p>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that after the development board is as followsturned 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>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''sudo''' '''reboot'''</p>|}</li></ol>
[https://filezilla-project.org/download.php?type<span id=client '''https://filezilla"linux-project.org/download.php?type=client'''][[File:media/image285.jpeg|472x171px|C:\Users\orangepi\Desktop\用户手册插图\Pi5 Plus\未标题sdkorangepi-15.jpg未标题build-15]]instruction"></span>
[[File:media/image286.png|384x276px]]= '''Linux SDK——orangepi-build instruction''' =
<ol start="2" stylespan id="listcompilation-stylesystem-type: decimal;requirements"><li><p>The downloaded installation package is as follows, and then double-click to install directly</pspan><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&gt;</span></p></li></ol>Compilation system requirements ==
The Linux SDK, '''orangepi-build''', only supports running on X64 computers with '''<div classspan style="figurecolor:#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.
[[File{| class="wikitable" style="width:media/image287.png800px;" |355x279px-|IMG_256]]test@test:~$ '''lsb_release -a'''
</div><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></ol>No LSB modules are available.
<div class="figure">Distributor ID: Ubuntu
[[FileDescription:media/image288Ubuntu 22.png|451x357px|IMG_256]]04 LTS
Release: '''</div><ol start="5" span style="list-style-typecolor: decimal;#FF0000"><li>The method of connecting the development board is shown in the figure below:</li>22.04</olspan>'''
<div class="figure">Codename: '''jammy'''|}
[[FileIf 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:media#FF0000">amd64</image280.png|575x128px|图片565]]span>''' version is:
</div><ol start{| class="6wikitable" style="list-style-typewidth: decimal800px;">|-| <lip>Then choose to '''<span class="mark">save the password<https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/span>''', and then click '''<span class="mark">OK<22.04/span>ubuntu-22.04-desktop-amd64.iso'''</li></olp>|}
<div classspan id="figureget-the-source-code-of-linux-sdk"></span>
[[File:media/image289.png|207x146px|IMG_256]]== Get the source code of linux sdk ==
</div><ol startspan id="7" style="listdownload-orangepi-build-stylefrom-type: decimal;github"><li>Then select '''<span class="mark">Always trust this host</span>''', and click '''<span class=== Download orangepi-build from github ==="mark">OK</span>'''</li></ol>
<div class="figure">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:
[[File{| class="wikitable" style="width:media/image290.png800px;" |221x109px-|IMG_256]]test@test:~$ '''sudo apt-get update'''
</div><ol start="8" style="listtest@test:~$ '''sudo apt-styleget install -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></ol>y git'''
test@test:~$ '''git clone https://github.com/orangepi-xunlong/orangepi-build.git <div classspan style="figurecolor:#FF0000">-b next</span>'''|}
[[File:media/image291.jpeg{|446x329px|图片3]] </div><ol startclass="9wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig>Then select the path to be uploaded to '''Note that the development board on the right side of the filezilla software, and then select using the file H618 Soc needs to be uploaded on download the Windows PC on source code of the left side <span style="color:#FF0000">next</span> branch of the filezilla software, then click the right mouse button, and then click the upload option orangepi-build. The above git clone command needs to start uploading specify the file to branch of the development board bingo</li>orangepi-build source code as next.'''</olbig>
<div class="figure">
[[File:media/image292zero3-img294.png|461x340px780px|IMG_256center]]
</div>
<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>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{| class="wikitable" style="instructionsbackground-forcolor:#ffffdc;width:800px;" |-using| <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 thegithub account after entering the git clone command The name and password are usually entered incorrectly in the address of the orangepi-switch-logo">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.'''</spanbig>== Instructions for using the switch logo ==|}
<ol style="list-styleThe u-type: decimal;"><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><p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>verbosity=1</p><p>'''bootlogo=false'''</p></li><li><p>Set and linux kernel versions currently used by the '''bootlogo''' variable to '''true''' in '''/boot/orangepiEnv.txt''' to enable the switch logo</p><p>orangepi@orangepiH618 series development boards are as follows:~$ '''sudo vim /boot/orangepiEnv.txt'''</p><p>verbosity=1</p><p>'''bootlogo=true'''</p></li><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><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>
<span id{| class="howwikitable" style="width:800px;"|-to| style="text-shutalign: center;"| '''branch'''| style="text-downalign: center;"| '''u-andboot version'''| style="text-restartalign: center;"| '''Linux kernel version'''|-the| style="text-developmentalign: center;"| '''current'''| style="text-boardalign: center;"></span>| '''u-boot v2018.05'''| style="text-align: center;"| '''linux5.4'''|-| style= How to shut down and restart the development board "text-align: center;"| '''next'''| style="text-align: center;"| '''u-boot v2021.07'''| style="text-align: center;"| '''linux6.1'''|}
<ol {| class="wikitable" style="listbackground-style-typecolor:#ffffdc;width: decimal800px;">|-| <libig><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 branch mentioned here is not the same thing as the Linux system branch of the development board before power off, and then unplug the power</p><p>orangepi@orangepi:~$ '''sudo poweroff'''</p><p>'''Note that after the development board is turned off-build source code, the power supply needs to be re-plugged to turn please do not confuse it on.'''</p></li><li><p>Use the '''reboot''' command This branch is mainly used to restart the Linux system on the development board</p><p>orangepi@orangepi:~$ distinguish different kernel source code versions.'''sudo''' '''reboot'''</p></li></ol>
<span id="linux-sdkorangepi-build-instruction">'''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.'''</spanbig>= Linux SDK——orangepi-build instruction =|}
<span id="compilationAfter orangepi-system-requirements"></span>== Compilation system requirements ==build is downloaded, it will contain the following files and folders:
The Linux SDK, <ol style="list-style-type: lower-alpha;"><li><p>'''orangepi-build.sh''': Compile the startup script</p></li><li><p>'''external''': Contains the configuration files needed to compile the image, only supports running on X64 computers with specific scripts, and the source code of some programs, etc.</p></li><li><p>'''LICENSE''': GPL 2 license file</p></li><li><p>'''Ubuntu 22README.04md''' installed, so before downloading : orangepi-build documentation</p></li><li><p>'''scripts''': General script for compiling linux images</p>{| class="wikitable" style="width:800px;" |-| <p>test@test:~/orangepi-build, please make sure that the Ubuntu version installed on your computer is Ubuntu 22.04$ '''ls'''</p><p>'''build. The command to check the Ubuntu version installed on the computer is as followssh &nbsp;&nbsp;&nbsp; external &nbsp;&nbsp;&nbsp; LICENSE &nbsp;&nbsp;&nbsp; README. If the Release field does not display md &nbsp;&nbsp;&nbsp; scripts'''22.04</p>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''If you downloaded the code of orangepi-build from github, after downloading, it means you may find that orangepi-build does not contain the current Ubuntu version source code of u-boot and linux kernel, nor does not meet 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 requirementsaddresses will be detailed below). Please replace orangepi-build will specify the system before performing address of u-boot, linux kernel and cross-compilation toolchain in the following operationsscript 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>
test@test:~$ '''lsb_release <span id="download-a'''the-cross-compilation-toolchain"></span>
No LSB modules are available.=== Download the cross-compilation toolchain ===
Distributor ID: UbuntuWhen 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.
Description: Ubuntu 22.04 LTS<div class="figure">
Release[[File: '''22zero3-img295.04'''png|1200px]]
Codename</div>The mirror URL of the cross-compilation toolchain in China is the open source software mirror site of Tsinghua University: '''jammy'''
If the computer is installed with a Windows system and there is no computer with Ubuntu 22.04 installed, you can consider using {| class="wikitable" style="width:800px;" |-| '''VirtualBox''' or '''VMware''' to install an Ubuntu 22https://imola.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 inarmbian. The download address of the installation image of Ubuntu 22.04 com/dl/_toolchain/'''amd64''' version is:|}
[https://repo.huaweicloud.com/ubuntu-releases/21.04/ubuntu-21.04-desktop-amd64.iso After the '''https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/22.04/ubuntu-22.04-desktop-amd64.isotoolchains''']are downloaded, it will contain multiple versions of the cross-compilation toolchain:
After installing Ubuntu 22.04 on the computer or virtual machine, please set the software source of Ubuntu 22.04 to Tsinghua source (or other domestic sources that you think is fast), otherwise it is easy to make mistakes due to network reasons when installing software later. The steps to replace Tsinghua source are as follows{| class="wikitable" style="width:800px;" |-| test@test:~/orangepi-build$ '''ls toolchains/'''
<ol style="listgcc-stylearm-type: lower11.2-alpha;"><li>For the method of replacing Tsinghua source, please refer to the &gt; instructions on this web page2022.</li></ol>02-x86_64-aarch64-none-linux-gnu
[https://mirrorsgcc-linaro-4.tuna9.tsinghua4-2017.edu.cn/help/ubuntu/ '''https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/''']01-x86_64_aarch64-linux-gnu
<ol start="2" style="listgcc-stylelinaro-type: lower-alpha;"><li><p>Note that the Ubuntu version needs to be switched to 22.04.</p><p>[[File:media/image293.png|576x241px]]</p></li><li><p>The content of the '''/etc/apt/sources.list''' file that needs to be &gt; replaced is:</p><p>test@test:~$ '''sudo mv /etc/apt/sources.list cat /etc/apt/sources.list.bak'''</p><p>test@test:~$ '''sudo vim /etc/apt/sources.list'''</p><p># By default, the source image is commented to improve the speed of apt update, you can uncomment it yourself if necessary</p><p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse</p><p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse</p><p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse</p><p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse</p><p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse</p><p># deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse</p><p>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse</p><p># deb-src https://mirrors.tuna.tsinghua7.edu4.cn/ubuntu/ jammy-security main restricted universe multiverse</p><p># Pre1-release software source, not recommended to enable</p><p># deb https://mirrors.tuna.tsinghua.edu2019.cn/ubuntu/ jammy02-proposed main restricted universe multiverse</p><p># debx86_64_arm-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammylinux-proposed main restricted universe multiverse</p></li><li><p>After the replacement, you need to update the download information &gt; and make sure that there is no error.</p><p>test@test:~$ '''sudo apt-get update'''</p></li><li><p>'''In addition, since the source codes such as the kernel and U-boot &gt; are stored on GitHub, it is very important to ensure that the &gt; computer can download codes from GitHub normally when compiling &gt; the image.'''</p></li></ol>gnueabi
<span id="getgcc-thearm-source11.2-code2022.02-ofx86_64-arm-none-linux-sdk"></span>== Get the source code of linux sdk ==gnueabihf
<span id="downloadgcc-orangepilinaro-build4.9.4-from2017.01-github"></span>=== Download orangepix86_64_arm-build from github ===linux-gnueabi
The linux sdk refers to the code of orangepigcc-build. orangepilinaro-aarch64-none-elf-build is modified based on the armbian build system4. Using orangepi8-build, multiple versions of linux images can be compiled2013. Use the following command to download the orangepi-build code:11_linux
test@test:~$ '''sudo aptgcc-get update'''arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
test@test:~$ '''sudo aptgcc-get install linaro-y git'''5.5.0-2017.10-x86_64_arm-linux-gnueabihf
test@test:~$ '''git clone https://github.com/orangepigcc-linaro-arm-linux-xunlong/orangepignueabihf-build4.git 8-b next'''2014.04_linux
'''Note that the development board using the H618 Soc needs to download the source code of the next branch of orangepigcc-buildarm-9. The above git clone command needs to specify the branch of the orangepi2-build source code as next2019.'''12-x86_64-arm-none-linux-gnueabihf
<div class="figure">gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu
[[File:media/image294gcc-linaro-arm-none-eabi-4.png|576x298px8-2014.04_linux|图片6]]}
</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 orangepicross-build warehouse behind the git clone. Please check the spelling of the command carefully, instead of thinking that we forgot compilation toolchain used to provide compile the username and password of the github account.'''H618 Linux kernel source code is:
The u<ol style="list-style-type: lower-alpha;"><li><p>linux5.4</p>{| class="wikitable" style="width:800px;" |-| <p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-boot and linux kernel versions currently used by the H618 series development boards are as follows:-gnu'''</p>|}</li><li><p>linux6.1</p>{| class="wikitable" style="width:800px;"
|-
| style="text-align: left;"| <p>'''branchgcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''</p>| }</li></ol><p>The cross-compilation toolchain used to compile the H618 u-boot source code is:</p><!-- --><ol style="textlist-style-aligntype: leftlower-alpha;"| '''u-boot version'''><li><p>v2018.05</p>{| class="wikitable" style="text-alignwidth: left800px;"| '''Linux kernel version'''
|-
| style="text-align: left;"| <p>'''currentgcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi'''</p>|}</li><li><p>v2021.07</p>{| styleclass="text-align: left;wikitable"| '''u-boot v2018.05'''| style="text-alignwidth: left800px;"| '''linux5.4'''
|-
| style="text-align: left;"| ''<p>'next'''| style="textgcc-align: left;"| '''uarm-boot v202111.07'''| style="text2-align: left;"| '''linux62022.102-x86_64-aarch64-none-linux-gnu'''</p>
|}
</li></ol>
'''The branch mentioned here is not the same thing as the branch of the <span id="orangepi-build source code, please do not confuse it. This branch is mainly used to distinguish different kernel source code versions.'''-complete-directory-structure-description"></span>
'''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.'''=== orangepi-build complete directory structure description ===
After <ol style="list-style-type: decimal;"><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;"><li><p>The git warehouse where the linux kernel source code is stored is downloadedas follows, it will contain pay attention to switch the branch of the linux-orangepi warehouse to</p><ol style="list-style-type: none;"><li><p>a) Linux5.4</p>{| class="wikitable" style="width:800px;" |-| <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 following files and foldersu-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><p>b) v2021.07</p>{| class="wikitable" style="width:800px;" |-| <p>https://github.com/orangepi-xunlong/u-boot-orangepi/tree/v2021.07-sunxi</p>|}</li></ol></li></ol></li></ol>
<ol start="2" style="list-style-type: decimal;">
<li><p>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:</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''build.sh''': Compile the startup script</p></li>
<li><p>'''external''': Contains the configuration files needed to compile for compiling the &gt; image, scripts for specific scriptsfunctions, and the source code of some programs, &gt; etc.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>'''LICENSE''': GPL 2 license file</p></li>
<li><p>'''README.md''': orangepi-build documentation</p></li>
<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>'''toolchains''': Store the cross-compilation toolchain</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 the script</p>{| class="wikitable" style="width:800px;" |-|
<p>test@test:~/orangepi-build$ '''ls'''</p>
<p>'''build.sh &nbsp;&nbsp;&nbsp; external &nbsp;&nbsp;&nbsp; kernel &nbsp;&nbsp;&nbsp; LICENSE &nbsp;&nbsp;&nbsp; output &nbsp;&nbsp;&nbsp; README.md &nbsp;&nbsp;&nbsp; scripts&nbsp;&nbsp;&nbsp; toolchains &nbsp;&nbsp;&nbsp; u-boot &nbsp;&nbsp;&nbsp; userpatches'''</p>|}<p/li>'''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.'''</pol></li></ol>
<span id="downloadcompile-theu-cross-compilation-toolchainboot"></span>=== Download the cross-compilation toolchain ===
When orangepi== Compile u-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.boot ==
<ol style="list-style-type: decimal;">
<li><p>Run the build.sh script, remember to add sudo permission</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p>
|}
</li>
<li><p>Select '''U-boot package''', then press Enter</p>
<div class="figure">
[[File:media/image295zero3-img296.png|575x278px|选区_396]</div>The mirror URL of the cross-compilation toolchain in China is the open source software mirror site of Tsinghua University: [https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/ '''https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/_toolchain/'''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:
</div></li>
<li><p>Then select the model of the development board</p>
<p>[[File:zero3-img297.png]]</p></li>
<li><p>Then select the branch type of u-boot</p>
<ol style="list-style-type: lower-alpha;">
<li><p>The current branch will compile the u-boot v2018.05 code that needs to be used in the linux5.4</p><p>'''gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu'''image</p></li><li><p>The next branch will compile the u-boot v2021.07 version code that needs to be used in the linux6.1image</p><p>'''gcc-arm-11.2[[File:zero3-2022img298.02-x86_64-aarch64-none-linux-gnu'''png]]</p></li></ol></li><li><p>The cross-compilation toolchain used Then it will start to compile the H618 u-boot source code , and part of the information prompted when compiling the next branch isas follows:</p></li></ol> <!-- -->
<ol style="list-style-type: lower-alpha;">
<li><p>v2018.05u-boot source code version</p>{| class="wikitable" style="width:800px;" |-| <p>'''gcc-linaro-7[ o.4k.1] Compiling u-2019.02-x86_64_arm-linux-gnueabiboot [ '''</p></li><li><p>v2021.07</p><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>=== orangepi-build complete directory structure description === <ol style="list-style-type: decimal;"li><li><p>The orangepi-build repository does not contain the source code version 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{| class="list-style-type: lower-alpha;wikitable"><li><p>The git warehouse where the linux kernel source code is stored &gt; is as follows, pay attention to switch the branch of the &gt; linux-orangepi warehouse to</p><ol style="list-style-typewidth: lower-alpha800px;"><li><p>Linux5.4</p>|-| <p>https://github[ o.com/orangepi-xunlong/linux-orangepi/tree/'''orange-pi-5k.4-sun50iw9] Compiler version [ '''</p></li><li><p>Linux6.1</p><p>https://github.com/orangepiaarch64-xunlong/linux-orangepi/tree/'''orangegnu-pi-6.1-sun50iw9gcc 11''']</p></li></ol>|}
</li>
<li><p>The git warehouse where the u-boot source code is stored is as &gt; follows, pay attention Path to switch the branch of the &gt; generated u-boot-orangepi warehouse todeb package</p><ol style{| class="list-style-type: lower-alpha;"><li><p>v2018.05</p><p>https://github.com/orangepi-xunlong/u-boot-orangepi/tree/'''v2018.05-h618'''</p></li><li><p>v2021.07</p></li></ol></li></ol></li></ol> https://github.com/orangepi-xunlong/u-boot-orangepi/tree/'''v2021.07-sunxi''' <ol start="2wikitable" style="list-style-typewidth: decimal800px;"><li><p>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:</p><ol style="list-style-type: lower-alpha;">| <li><p>'''build[ o.sh''': Compile the startup script</p></li><li><p>'''external''': Contains the configuration files needed for &gt; compiling the image, scripts for specific functions, and the &gt; source code of some programsk. The rootfs compressed package &gt; 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>'''LICENSE''] Target directory [ ': GPL 2 license file</p></li><li><p>'''README.md''': orangepi-build documentation</p></li><li><p>'''output''': Store compiled u-boot, linux and other deb packages, &gt; compilation logs, and compiled images and other files</p></li><li><p>'''scripts''': General script for compiling linux images</p><debs/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>'''userpatches''': Store the configuration files needed to compile &gt; the script</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></li></ol> <span id="compile-u-boot"></span>== Compile u-boot == <ol style="list-style-type: decimal;"><li><p>Run the build.sh script, remember to add sudo permission</p><p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p></li><li><p>Select '''U-boot package''', then press Enter</p><div class="figure"> [[File:media/image296.png|576x132px|选区_238]] </div></li><li><p>Then select the model of the development board</p><p>[[File:media/image297.png|576x123px]]</p></li><li><p>Then select the branch type of u-boot</p><ol style="list-style-type: lower-alpha;"><li><p>The current branch will compile the u-boot v2018.05 code that &gt; 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 &gt; that needs to be used in the linux6.1 image</p><p>[[File:media/image298.png|576x77px]]</p></li></ol>}
</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>
<ol style="list-style-type: lower-alpha;">
<li><p>u-boot source code version</p>
<p>[ o.k. ] Compiling u-boot [ '''v2021.07''' ]</p></li>
<li><p>The version of the cross-compilation toolchain</p>
<p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 11''' ]</p></li>
<li><p>Path to the generated u-boot deb package</p>
<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>
{| 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>
{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] Runtime [ '''1 min''' ]</p>|}</li><li><p>Repeat the command to compile u-boot, use the following command &gt; to start compiling u-boot directly without selecting through &gt; 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><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>'''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>
<p>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to &quot;yes&quot;</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p>
<p>......</p>
<p>IGNORE_UPDATES=&quot;'''<span style="color:#FF0000">yes</span>'''&quot;</p><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>
<ol style="list-style-type: lower-alpha;">
<li><p>First upload the compiled u-boot deb package to the linux system &gt; 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/output/debs/u-boot$ '''scp \'''</p>
<p>'''linux-u-boot-next-orangepizero3_x.x.x_arm64.deb [mailto:root@192.168.1.xxx:/root root@192.168.1.xxx:/root]'''</p>|}</li>
<li><p>Install the new u-boot deb package just uploaded</p>
{| 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>
{| 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>
<p>[[File:media/image299zero3-img299.png|320x174px]]</p></li>
<li><p>After pressing the Enter key, a Warning will pop up first</p>
<p>[[File:media/image300zero3-img300.png|314x170px]]</p></li><li><p>Press the Enter key again to start updating u-boot, and the &gt; following information will be displayed after the update</p><p>[[File:media/image301zero3-img301.png|292x164px]]</p></li><li><p>Then you can restart the development board to test whether the &gt; modification of u-boot takes effect</p></li></ol>
</li></ol>
<span id="compile-the-linux-kernel"></span>
 
== Compile the linux kernel ==
<ol style="list-style-type: decimal;">
<li><p>Run the '''build.sh''' script, remember to add sudo permission</p>
{| class="wikitable" style="width:800px;" |-| <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p>|}</li>
<li><p>Select '''Kernel package''', then press Enter</p>
<div class="figure">
[[File:media/image302zero3-img302.png|575x116px|选区_240]]
</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>
<p>[[File:media/image303zero3-img303.png|576x87px]]</p></li>
<li><p>Then select the model of the development board</p>
<p>[[File:media/image297zero3-img297.png|576x123px]]</p></li>
<li><p>Then select the branch type of the kernel source code</p>
<ol style="list-style-type: lower-alpha;">
<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>
<p>[[File:media/image298zero3-img298.png|576x77px]]</p></li></ol>
</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>
<p>[[File:media/image304zero3-img304.png|575x357px]]</p></li></ol>
<!-- -->
<ol style="list-style-type: lower-alpha;">
<li><p>If you do not need to modify the configuration options of the &gt; kernel, when running the build.sh script, pass in &gt; '''KERNEL_CONFIGURE=no''' to temporarily block the pop-up kernel &gt; configuration interface</p>{| class="wikitable" style="width:800px;" |-| <p>test@test:~/orangepi-build$ '''sudo ./build.sh KERNEL_CONFIGURE=no'''</p>|}</li><li><p>You can also set '''KERNEL_CONFIGURE=no''' in the &gt; orangepi-build/userpatches/config-default.conf configuration file, &gt; which can permanently disable this function</p></li><li><p>If the following error is displayed when compiling the kernel, it is &gt; because the terminal interface of the Ubuntu PC is too small to &gt; display the make menuconfig interface. Please maximize the &gt; terminal of the Ubuntu PC and run the build.sh script again</p><p>[[File:media/image305zero3-img305.png|574x234px]]</p></li></ol></li></ol>
<!-- -->
<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 follows:follows:</p>
<ol style="list-style-type: lower-alpha;">
<li><p>The version of the linux kernel source code</p>
{| 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>
{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] Compiler version [ '''aarch64-linux-gnu-gcc 11''' ]</p>|}</li><li><p>The configuration file used by the kernel by default and the &gt; 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><p>The path of the deb package related to the kernel generated by &gt; compiling</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 &gt; kernel selected last time will be displayed. Use the following &gt; command to start compiling the kernel source code directly &gt; 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 &gt; used by the kernel</p></li><li><p>'''linux-headers-next-sun50iw9_x.x.x_arm64.deb''' Include kernel &gt; headers</p></li><li><p>'''linux-image-next-sun50iw9_x.x.x_arm64.deb''' Contains kernel &gt; 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:follows:</p>
<p>Set the IGNORE_UPDATES variable in '''userpatches/config-default.conf''' to &quot;yes&quot;</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~/orangepi-build$ '''vim userpatches/config-default.conf'''</p>
<p>IGNORE_UPDATES=&quot;'''<span style="color:#FF0000">yes</span>'''&quot;</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>
<ol style="list-style-type: lower-alpha;">
<li><p>Upload the deb package of the compiled linux kernel to the linux &gt; 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/output/debs$ '''scp \'''</p>
<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>
{| class="wikitable" style="width:800px;" |-| <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 &gt; 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>
 
== Compile rootfs ==
<ol style="list-style-type: decimal;">
<li><p>Run the build.sh script, remember to add sudo permission</p>
{| class="wikitable" style="width:800px;" |-| <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p>|}</li><li><p>Select '''Rootfs and all deb packages''', then press Enter</p></li></ol>
<div class="figure">
[[File:media/image306zero3-img306.png|576x119px|选区_241]]
</div></li></ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>Then select the model of the development board</p>
<p>[[File:media/image297zero3-img297.png|576x123px]]</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>
<ol style="list-style-type: lower-alpha;">
<li><p>The current branch can see debian11, ubuntu20.04, ubuntu22.04 &gt; three options</p></li><li><p>The next branch can see debian11, debian12, ubuntu22.04 three &gt; options</p><p>[[File:media/image298zero3-img298.png|576x77px]]</p></li></ol>
</li>
<li><p>Then select the type of rootfs</p>
<p>[[File:media/image307zero3-img307.png|576x79px]]</p></li>
<li><p>Then select the type of image</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''Image with console interface (server)''' Indicates the image of &gt; the server version, which is relatively small</p></li><li><p>'''Image with desktop environment''' Indicates a mirror image with &gt; a desktop, which is relatively large</p>
<div class="figure">
[[File:media/image308zero3-img308.png|576x75px|选区_245]]
</div></li></ol>
<div class="figure">
[[File:media/image309zero3-img309.png|576x78px|选区_397]]
</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>
<p>[[File:media/image310zero3-img310.png|576x76px]]</p><p>[[File:media/image311zero3-img311.png|576x74px]]</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:media/image312zero3-img312.png|575x264px]]</p></li>
<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;">
<li><p>The type of rootfs</p>
{| 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>
{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] Target directory [ '''orangepi-build/external/cache/rootfs''' ]</p>|}</li><li><p>The name of the rootfs compressed package generated by &gt; compilation</p>{| class="wikitable" style="width:800px;" |-| <p>[ o.k. ] File name [ '''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' ]</p>|}</li></ol>
</li>
<li><p>View the rootfs compressed package generated by compilation</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4''' &gt; is the rootfs compressed package, the meaning of each field of &gt; the name is</p><ol style="list-style-type: lower-alphanone;"><li><p>a) '''bullseye''' indicates the type of linux distribution of &gt; rootfs</p></li><li><p>b) '''xfce''' means rootfs is the type of desktop version, if it &gt; is '''cli''', it means the type of server version</p></li><li><p>c) '''arm64''' represents the architecture type of rootfs</p></li><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><p>'''bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list''' &gt; 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>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4</p>
<p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.current</p>
<p>bullseye-xfce-arm64.5250ec7002de9e81a41de169f1f89721.tar.lz4.list</p>|}</li></ol>
</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>
<span id="compile-linux-image"></span>
 
== Compile linux image ==
<ol style="list-style-type: decimal;">
<li><p>Run the '''build.sh''' script, remember to add sudo permission</p>
{| class="wikitable" style="width:800px;" |-| <p>test@test:~/orangepi-build$ '''sudo ./build.sh'''</p>|}</li><li><p>Select '''Full OS image for flashing''', then press Enter</p></li></ol>
<div class="figure">
[[File:media/image313zero3-img313.png|576x128px|选区_242]]
</div></li></ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>Then select the model of the development board</p>
<p>[[File:media/image297zero3-img297.png|576x123px]]</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>
<ol style="list-style-type: lower-alpha;">
<li><p>The current branch can see debian11, ubuntu20.04, ubuntu22.04 &gt; three options</p></li><li><p>The next branch can see debian11, debian12, ubuntu22.04 three &gt; options</p><p>[[File:media/image298zero3-img298.png|576x77px]]</p></li></ol>
</li>
<li><p>Then select the type of rootfs</p>
<p>[[File:media/image307zero3-img307.png|576x79px]]</p></li>
<li><p>Then select the type of image</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''Image with console interface (server)''' Indicates the image of &gt; the server version, which is relatively small</p></li><li><p>'''Image with desktop environment''' Indicates a mirror image with &gt; a desktop, which is relatively large</p>
<div class="figure">
[[File:media/image308zero3-img308.png|576x75px|选区_245]]
</div></li></ol>
<div class="figure">
[[File:media/image309zero3-img309.png|576x78px|选区_397]]
</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>
<p>[[File:media/image310zero3-img310.png|576x76px]]</p><p>[[File:media/image311zero3-img311.png|576x74px]]</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:media/image312zero3-img312.png|575x264px]]</p></li>
<li><p>Then it will start to compile the linux image. The general process of compilation is as follows</p>
<ol style="list-style-type: lower-alpha;"><li><p>a. Initialize the compilation environment of Ubuntu PC and install the software packages required for the compilation process</p></li><li><p>b. Download the source code of u-boot and linux kernel (if cached, only update the code)</p></li><li><p>c. Compile u-boot source code and generate u-boot deb package</p></li><li><p>d. Compile the linux source code and generate linux-related deb packages</p></li><li><p>e. Make the deb package of linux firmware</p></li><li><p>f. Make the deb package of the orangepi-config tool</p></li><li><p>g. Create a deb package supported by the board</p></li><li><p>h. If you are compiling the desktop image, you will also create desktop-related deb packages</p></li><li><p>i. Check whether the rootfs has been cached, if not, recreate the rootfs, if it has been cached, directly decompress and use</p></li><li><p>j. Install the previously generated deb package into rootfs</p></li><li><p>k. 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><li><p>l. Then make an image file and format the partition, the default type is ext4</p></li><li><p>m. Then copy the configured rootfs to the mirrored partition</p></li><li><p>n. Then update initramfs</p></li><li><p>o. 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>
<ol style="list-style-type: lower-alpha;">
<li><p>The storage path of the compiled image</p>
{| class="wikitable" style="width:800px;" |-| <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></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
'''[ o.k. ] Runtime [ 19 min ]'''
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li><p>Repeat the command to compile the image, and use the following &gt; command to start compiling the image directly without selecting &gt; 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=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>= '''Android 12 TV system instructions ''' =
<span id="supported-android-versions"></span>
== Supported Android versions ==
{| class="wikitable" style="width:800px;"
|-
| style="text-align: leftcenter;"| Android version| style="text-align: leftcenter;"| kernel version
|-
| style="text-align: leftcenter;"| '''Android 12 TV version'''| style="text-align: leftcenter;"| '''linux5.4'''
|}
<span id="android-12-tv-function-adaptation"></span>
 
== Android 12 TV function adaptation ==
{| class="wikitable" style="width:800px;"
|-
| style="text-align: leftcenter;"| Function| style="text-align: leftcenter;"| Android12
|-
| style="text-align: leftcenter;"| HDMI Video| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| HDMI Audio| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| USB2.0 x 3| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| TFcard boot| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| network card| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| infrared| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| WIFI| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| WIFI hotsport| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| Bluetooth| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| BLE Bluetooth| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| headphone audio| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| TV-OUT| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| USB camera| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| LED light| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| Temperature Sensor| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| Mali GPU| style="text-align: leftcenter;"| OK
|-
| style="text-align: leftcenter;"| video codec| style="text-align: leftcenter;"| OK
|}
<span id="onboard-led-light-display-instructions"></span>
 
== Onboard LED light display instructions ==
{| class="wikitable" style="width:800px;"
|-
|
| style="text-align: leftcenter;"| '''Green Light'''| style="text-align: leftcenter;"| '''Red Light'''
|-
| '''u-boot startup phase'''
| style="text-align: leftcenter;"| '''Off'''| style="text-align: leftcenter;"| '''Bright'''
|-
| '''The kernel boots into the system'''
| style="text-align: leftcenter;"| '''Bright'''| style="text-align: leftcenter;"| '''Off'''
|}
<span id="android-method-to-return-to-the-previous-interface"></span>
 
== Android method to return to the previous interface ==
<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 '''<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>
<p>[[File:media/image314zero3-img314.png|231x199px]]</p></li></ol>
<span id="how-to-use-adb"></span>
 
== How to use ADB ==
=== Use network connection adb debugging ===
{| 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;">
<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 &quot;adb.tcp&quot;'''</p>
<p>[service.adb.tcp.port]: [5555]</p>|}</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:/ol># '''setprop service.adb.tcp.port 5555'''
apollo-p2:/ # '''setprop service.adb.tcp.port 5555'''<br />
apollo-p2:/ # '''stop adbd'''
apollo-p2:/ # '''start adbd'''
|}</ol>
<ol start="3" style="list-style-type: decimal;">
<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 install -y adb'''</p>|}</li>
<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>* daemon not running; starting now at tcp:5037</p>
<p>* daemon started successfully</p>
<p>connected to 192.168.1.xxx:5555</p>
 
 
<p>test@test:~$ '''adb devices'''</p>
<p>List of devices attached</p>
<p>192.168.1.xxx:5555 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device</p>|}</li><li><p>Then you can log in to the android system through the adb shell on the Ubuntu PC</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
test@test:~$ '''adb shell'''
apollo-p2:/ #
|}
</li></ol>
<span id="use-the-data-cable-to-connect-to-adb-debugging"></span>
<span id="use-the-data-cable-to-connect-to-adb-debugging"></span>
=== Use the data cable to connect to adb debugging ===
<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>
<p>[[File:media/image315zero3-img315.png|178x178px]]</p></li>
<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 install -y adb'''</p>|}</li>
<li><p>View the identified ADB device</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>test@test:~$ '''adb devices'''</p>
<p>List of devices attached</p>
<p>4c00146473c28651dd0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device</p>|}</li><li><p>Then you can log in to the android system through the adb shell on the Ubuntu PC</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
test@test:~$ '''adb shell'''
apollo-p2:/ $
|}
</li></ol>
<span id="view-the-method-of-setting-hdmi-display-resolution"></span>
<span id="view-the-method-of-setting-hdmi-display-resolution"></span>
== View the method of setting HDMI display resolution ==
<ol style="list-style-type: decimal;">
<li><p>First enter '''Settings'''</p>
<p>[[File:media/image316zero3-img316.png|234x83px]]</p></li>
<li><p>Then select '''Device Preferences'''</p>
<p>[[File:media/image317zero3-img317.png|415x170px]]</p></li>
<li><p>Then select '''Display &amp; Sound'''</p>
<p>[[File:media/image318zero3-img318.png|420x133px]]</p></li>
<li><p>Then select '''Advanced display settings'''</p>
<p>[[File:media/image319zero3-img319.png|423x96px]]</p></li>
<li><p>Then select '''HDMI outpu mode'''</p>
<p>[[File:media/image320zero3-img320.png|423x101px]]</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>
<p>[[File:media/image321zero3-img321.png|429x136px]]</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>
<p>[[File:media/image322zero3-img322.png|429x242px]]</p></li></ol>
<span id="hdmi-to-vga-display-test-1"></span>
<ol style="list-style-type: lower-alpha;">
<li><p>HDMI to VGA Converter</p>
<p>[[File:media/image145zero3-img145.png|155x104px]]</p></li><li><p>A VGA cable and a Micro HDMI male to HDMI female conversion &gt; cable</p><p>[[File:media/image146zero3-img146-1.png|148x133px300px]] [[File:media/image147zero3-img147.jpegpng|157x139px|IMG_6140(20220104-134930)300px]]</p></li>
<li><p>A monitor or TV that supports VGA interface</p></li></ol>
</li>
<li><p>HDMI to VGA display test as shown below</p>
<p>[[File:media/image323zero3-img323.png|576x330px]]</p>{| 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>
 
== WI-FI connection method ==
<ol style="list-style-type: decimal;">
<li><p>First select '''Settings'''</p>
<p>[[File:media/image316zero3-img316.png|234x83px]]</p></li>
<li><p>Then select '''Network &amp; Internet'''</p>
<p>[[File:media/image324zero3-img324.png|373x103px]]</p></li>
<li><p>Then open WI-FI</p>
<p>[[File:media/image325zero3-img325.png|381x50px]]</p></li>
<li><p>After turning on WI-FI, you can see the searched signal under '''Available networks'''</p>
<p>[[File:media/image326zero3-img326.png|381x187px]]</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>
<div class="figure">
[[File:media/image327zero3-img327.png|386x180px|Screenshot_20220104-164114]]
</div></li>
<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">
[[File:media/image328zero3-img328.png|401x165px|图片1]]
</div></li>
<li><p>After the WI-FI connection is successful, the display is as shown in the figure below</p>
<p>[[File:media/image329zero3-img329.png|402x141px]]</p></li></ol>
<span id="how-to-use-wi-fi-hotspot"></span>
 
== How to use WI-FI hotspot ==
<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>
<p>[[File:media/image316zero3-img316.png|234x83px]]</p></li>
<li><p>Then select '''Network &amp; Internet'''</p>
<p>[[File:media/image324zero3-img324.png|373x103px]]</p></li>
<li><p>Then select '''WIFI hotspot'''</p>
<p>[[File:media/image330zero3-img330.png|378x104px]]</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>
<p>[[File:media/image331zero3-img331.png|402x174px]]</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>
<p>[[File:media/image332zero3-img332.png|269x191px]]</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>
<p>[[File:media/image333zero3-img333.png|269x125px]]</p></li></ol>
<span id="how-to-check-the-ip-address-of-the-ethernet-port"></span>
<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>
<p>[[File:media/image334zero3-img334.png|431x161px]]</p></li>
<li><p>Then select '''Network &amp; Internet'''</p>
<p>[[File:media/image335zero3-img335.png|576x186px]]</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>
<p>[[File:media/image336zero3-img336.png|576x200px]]</p></li></ol>
<span id="bluetooth-connection-method"></span>
<ol style="list-style-type: decimal;">
<li><p>First select '''Settings'''</p>
<p>[[File:media/image316zero3-img316.png|234x83px]]</p></li>
<li><p>Then select '''Bluetooth'''</p>
<p>[[File:media/image337zero3-img337.png|377x111px]]</p></li>
<li><p>Then open '''Bluetooth Enable'''</p>
<p>[[File:media/image338zero3-img338.png|384x180px]]</p></li>
<li><p>Then click '''Pair new device''' to start scanning the surrounding Bluetooth devices</p>
<p>[[File:media/image339zero3-img339.png|389x129px]]</p></li>
<li><p>The searched Bluetooth devices will be displayed under '''Available devices'''</p>
<p>[[File:media/image340zero3-img340.png|407x181px]]</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>
<p>[[File:media/image341zero3-img341.png|420x115px]]</p></li><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:media/image342zero3-img342.png|178x200px]]</p></li>
<li><p>After the pairing is complete, open '''Paired devices''' and you can see the paired Bluetooth devices</p>
<p>[[File:media/image343zero3-img343.png|430x136px]]</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>
<p>[[File:media/image344zero3-img344.png|433x113px]]</p></li>
<li><p>The pictures received by the Android system Bluetooth of the development board can be viewed in '''Received files'''</p>
<p>[[File:media/image345zero3-img345.png|432x209px]]</p></li></ol>
<span id="how-to-use-the-usb-camera"></span>
 
== How to use the USB camera ==
<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>
{| class="wikitable" style="width:800px;"
|-
|
<p>console:/ # '''ls /dev/video0'''</p>
<p>/dev/video0</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>Download the USB camera test APP in the <span class="mark">official tool</span> on the development board data download page</p>
<p>[[File:media/image346zero3-img346.png|344x183px]]</p><p>[[File:media/image347zero3-img347.png|575x145px]]</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>
{| class="wikitable" style="width:800px;" |-| <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:media/image348zero3-img348.png|576x132px]]</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>
<span id="android-system-root-instructions"></span>
 
== Android system ROOT instructions ==
'''<span {| class="markwikitable"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.'''</spanbig>'''|}
<ol style="list-style-type: decimal;">
<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:media/image349zero3-img349.png|576x172px1200px]]</p><p>[[File:media/image350zero3-img350.png|575x124px1200px]]</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>
{| 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>
<p>[[File:media/image351zero3-img351.png|575x119px]]</p></li>
<li><p>The display interface after opening the '''ROOT test tool''' for the first time is shown in the figure below</p>
<p>[[File:media/image352zero3-img352.png|575x162px]]</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>
<p>[[File:media/image353zero3-img353.png|575x161px]]</p></li></ol>
<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 ==
<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 [[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>
<p>[[File:media/image354zero3-img354.png|576x124px]]</p></li>
<li><p>The interface after '''MiracastReceiver''' is opened is as follows</p>
<div class="figure">
[[File:media/image355zero3-img355.png|420x236px|Screenshot_20230625-193535]]
</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>
<p>[[File:media/image356zero3-img356-1.png|167x266px]]</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>
<p>[[File:media/image357zero3-img357-1.png|146x308px]]</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>
<p>[[File:media/image358zero3-img358.png|468x265px]]</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>
<p>[[File:media/image359zero3-img359-1.png|576x352px]]</p></li></ol>
<span id="pin-interface-gpio-uart-spi-test"></span>
 
== 26pin interface GPIO, UART, SPI test ==
<ol style="list-style-type: decimal;">
<li><p>First open the wiringOP APP on the desktop</p>
<p>[[File:media/image360zero3-img360.png|576x133px]]</p></li>
<li><p>Then click the '''GPIO_TEST''' button to open the GPIO test interface</p>
<p>[[File:media/image361zero3-img361.png|413x77px]]</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>
<p>[[File:media/image362zero3-img362.png|425x236px]]</p></li><li><p>Then click the '''GPIO READALL''' button, the output information is as shown in the figure below:below:</p>
<div class="figure">
[[File:media/image363zero3-img363.png|444x249px|Screenshot_20230609-155643]]
</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>
<p>[[File:media/image364zero3-img364.png|432x210px]]</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>
<p>[[File:media/image365zero3-img365.png|430x207px]]</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>
<p>[[File:media/image366zero3-img366.png|434x212px]]</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>
<p>[[File:media/image367zero3-img367.png|438x217px]]</p></li></ol>
<span id="pin-uart-test-method"></span>
<ol style="list-style-type: decimal;">
<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>/dev/ttyAS5</p>|}</li>
<li><p>First open the wiringOP APP on the desktop</p>
<p>[[File:media/image360zero3-img360.png|576x133px]]</p></li>
<li><p>Then click the '''UART_TEST''' button to open the UART test interface</p>
<p>[[File:media/image368zero3-img368.png|505x94px]]</p></li><li><p>The serial port test interface of wiringOP is shown in the figure below</p></li></ol> [[File:media/image369.png|511x133px]]
[[File:zero3-img369.png]]
</ol>
<ol start="5" style="list-style-type: decimal;">
<li><p>Then select the '''/dev/ttyAS5''' node in the selection box</p>
<p>[[File:media/image370zero3-img370.png|499x269px]]</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></ol> [[File:media/image371.png|334x107px]]
[[File:zero3-img371.png]]
</ol>
<ol start="7" style="list-style-type: decimal;">
<li>Then use Dupont wire to short the rx and tx pins of uart5</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
| style="text-align: leftcenter;"| uart5
|-
| Tx pin
| style="text-align: leftcenter;"| Corresponding to pin 8 of 26pin
|-
| Rx pin
| style="text-align: leftcenter;"| Corresponding to pin 10 of 26pin
|}
</li></ol>
<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></ol> [[File:media/image372.png|376x189px]]
[[File:zero3-img372.png]]
</ol>
<ol start="9" style="list-style-type: decimal;">
<li>If everything is normal, the received string will be displayed in the receiving box</li></ol>
[[File:media/image373zero3-img373.png|382x196px]]</ol><span id="pin-spi-test-method"></span>
<span id="pin-spi-test-method"></span>
=== 26pin SPI test method ===
<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>
<p>[[File:media/image360zero3-img360.png|576x133px]]</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></ol> '''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.'''
{| 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;">
<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>
<p>[[File:media/image374zero3-img374.png|518x96px]]</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>
<div class="figure">
[[File:media/image375.jpeg|296x135px|C:\Users\orangepi\Desktop\用户手册插图\Zero3\未标题zero3-7img375.jpg未标题-7png]]
</div></li>
<li><p>Then click the '''OPEN''' button to initialize the SPI</p></li></ol> [[File:media/image376.png|295x168px]]
[[File:zero3-img376.png]]
</ol>
<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>
<p>[[File:media/image377zero3-img377.png|294x169px]]</p></li><li><p>Finally, the APP will display the read ID information of the onboard SPI Flash</p></li></ol> [[File:media/image378.png|299x217px]]
[[File:zero3-img378.png]]
</ol>
<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>
<p>[[File:media/image379zero3-img379.png|302x201px]]</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>
<p>[[File:media/image380zero3-img380.png|336x113px]]</p></li></ol>
<span id="pin-i2c-test-method"></span>
 
=== 26pin I2C test method ===
<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>
{| class="wikitable" style="width:800px;"
|-
|
<p>apollo-p2:/ # '''ls /dev/i2c-3'''</p>
<p>/dev/i2c-3</p>|}</li>
<li><p>First open the wiringOP APP on the desktop</p>
<p>[[File:media/image360zero3-img360.png|576x133px]]</p></li>
<li><p>Then click the '''I2C_TEST''' button to open the i2c test interface</p>
<p>[[File:media/image381zero3-img381.png|506x110px]]</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 don’t don't need to re-select</p></li></ol> [[File:media/image382.png|353x159px]]
[[File:zero3-img382.png]]
</ol>
<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>
<p>[[File:media/image186zero3-img186.png|121x103px]]</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
| style="text-align: leftcenter;"| '''Pins of the RTC module'''| style="text-align: leftcenter;"| '''The pin corresponding to the 26pin of the development board'''
|-
| style="text-align: leftcenter;"| '''5V'''| style="text-align: leftcenter;"| '''pin 2'''
|-
| style="text-align: leftcenter;"| '''GND'''| style="text-align: leftcenter;"| '''pin 6'''
|-
| style="text-align: leftcenter;"| '''SDA'''| style="text-align: leftcenter;"| '''pin 3'''|-| style="text-align: leftcenter;"| '''SCL'''| style="text-align: leftcenter;"| '''pin 5'''|}</ol><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>{| class="wikitable" style="width:800px;" |-| <p>apollo-p2:/ # '''i2cdetect -y 3'''</p>|}<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><p>[[File:zero3-img384.png]]</p></li><li><p>The display after clicking the '''OPEN''' button to open i2c3 is as follows:</p><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><ol style="list-style-type: lower-alpha;"><li><p>We first set the address of the register to be written to 0x1c</p><p>[[File:zero3-img386.png]]</p></li><li><p>Then set the value to be written to 0x55</p><p>[[File:zero3-img387.png]]</p></li><li><p>Then click the '''WRITE BYTE''' button to execute the write action</p><p>[[File:zero3-img388.png]]</p></li></ol></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><p>[[File:zero3-img389.png]]</p></li></ol> <span id="appendix"></span> = '''Appendix''' = <span id="user-manual-update-history"></span>== User Manual Update History == {| class="wikitable" style="width:800px;" |-| style="text-align: center;"| '''Version'''| style="text-align: center;"| '''Date'''| style="text-align: center;"| '''Update Notes'''|-| style="text-align: center;"| v1.0| style="text-align: center;"| 2023-07-05| 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> == Image update history == {| class="wikitable" style="width:800px;text-align: center;" |-| '''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_ubuntu_jammy_server_linux6.1.31.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  OrangePi_Zero3_Android12_v1.0.tar.gz
<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>
<p>apollo-p2:/ # '''i2cdetect -y 3'''</p>
<p>[[File:media/image383.png|424x186px]]</p></li>
<li><p>Then set the address of i2c to 0x68 in wiringOP, and then click the '''OPEN''' button to open i2c3</p>
<p>[[File:media/image384.png|354x177px]]</p></li>
<li><p>The display after clicking the '''OPEN''' button to open i2c3 is as follows:</p>
<p>[[File:media/image385.png|355x171px]]</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>
<ol style="list-style-type: lower-alpha;">
<li><p>We first set the address of the register to be written to 0x1c</p>
<p>[[File:media/image386.png|322x152px]]</p></li>
<li><p>Then set the value to be written to 0x55</p>
<p>[[File:media/image387.png|315x177px]]</p></li>
<li><p>Then click the '''WRITE BYTE''' button to execute the write action</p>
<p>[[File:media/image388.png|314x173px]]</p></li></ol>
</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>
<p>[[File:media/image389.png|316x170px]]</p></li></ol>
 
<span id="appendix"></span>
= Appendix =
<span id="user-manual-update-history"></span>== User Manual Update History == {| class="wikitable": *initial version
|-
| style="text-align: left;"| '''Version'''| style="text-align: left;"| '''Date'''| style="text-align: left;"| '''Update Notes'''|-| style="text-align: left;"| v1.0| style="text-align: left;"| 2023-07-05| style="text-align: left;"| initial version13|} <span id="imageOpios-updatearch-history"></span>== Image update history == {| class="wikitable"|aarch64-| * *Date** | '''Update Notes'''|xfce-| 202 3opizero3-23.07-05| Orangepizero3_1.0.0_ubuntu_jammy_server_linux5.4.125.7z Orangepizero3_1.0.0_debian_bullseye_server_linux5.4.125.7z Ora ngepizero3_1.0.0_ubuntu_focal_desktop_xfce_linux5.4.125.7z Ora ngepizero3_1.0.0_ubuntu_jammy_desktop_xfce_linux5.4.125.7z Orange pizero3_1.0.0_debian_bullseye_desktop_xfce_linux5.4.125.7z Orangepizero3_1.0.0_ubuntu_jammy_server_linux6linux6.1.31.7z Orangepizero3_1.0.0_debian_bookworm_server_linux6.1.31.7z Orangepizero3_1.0.0_debian_bullseye_server_linux6.1.31.7z Or angepizero3_1.0.0_ubuntu_jammy_desktop_xfce_linux6.1.31.7z Orang epizero3_1.0.0_debian_bookworm_desktop_xfce_linux6.1.31.7z Orang epizero3_1.0.0_debian_bullseye_desktop_xfce_linux6.1.31.7z OrangePi_Zero3_Android12_v1.0.tarimg.gzxz
*initial version
: *initial version
|}