8,367
edits
Changes
→The server image connects to WIFI through commands
==== The server image connects to WIFI through commands ====
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''When the development board is not connected to Ethernet, not connected to HDMI display, but only connected to the serial port, it is recommended to use the commands demonstrated in this section to connect to the WIFI network. Because nmtui can only display characters in some serial port software (such as minicom), and cannot display the graphical interface normally. Of course, if the development board is connected to an Ethernet or HDMI display, you can also use the commands demonstrated in this section to connect to the WIFI network.'''</big>|}
<ol style="list-style-type: decimal;">
<li><p>First log in to the linux system, there are the following three ways</p>
<ol style="list-style-type: lower-alpha;">
<li>If the development board is connected with a network cable, [[Orange Pi Zero 3#SSH remote login development board under Ubuntu|'''you can remotely log in to the Linux system through ssh''']]</li></ol>
<!-- -->
<ol start="2" style="list-style-type: lower-alpha;">
<li><p>If the development board is connected to the debugging serial port, you can use the serial port terminal to log in to the Linux system</p></li>
<li><p>If the development board is connected to the HDMI display, you can log in to the linux system through the terminal displayed on the HDMI</p></li></ol>
# First use the '''nmcli dev wifi'''command to scan the surrounding WIFI hotspots
::{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''nmcli dev wifi'''
|}
<div class="figure">
::[[File:media/image107.png|575x250px|选区_011]]
</div>
<ol style="list-style-type: lower-alpha;">
<li><p>'''wifi_name''' Need to replace it with the name of the WIFI hotspot you want to connect to</p></li>
<li><p>'''wifi_passwd'''Need to change to the password of the WIFI hotspot you want to connect to</p></li></ol></li></ol>
{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''sudo nmcli dev wifi connect <span style="color:#FF0000">wifi_name </span> password <span style="color:#FF0000">wifi_passwd</span>'''
Device 'wlan0' successfully activated with 'cf937f88-ca1e-4411-bb50-61f402eef293'.
|}</ol></li></ol>
<ol start="3" style="list-style-type: decimal;">
<li>You can view the IP address of wifi through the '''ip addr show wlan0''' command</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''ip a s wlan0'''
11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
:link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff
:inet '''<span style="color:#FF0000">192.168.1.11</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
::valid_lft 259192sec preferred_lft 259192sec
:inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute
::valid_lft 259192sec preferred_lft 172792sec
:inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute valid_lft forever preferred_lft forever
::valid_lft forever preferred_lft forever
|}
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+'''</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''
rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms
|}
</ol>
<span id="the-server-image-connects-to-wifi-in-a-graphical-way"></span>
==== The server image connects to WIFI in a graphical way ====