8,367
edits
Changes
→WIFI The server image connects to WIFI through commands
==== WIFI 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>If the development board is connected to the HDMI display, you can log in to the Linux system through the terminal displayed on the HDMI</p></li></ol>
</li>
<li><p>First use the nmcli dev wifi command to scan the surrounding WIFI hotspots</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''nmcli dev wifi'''
|}
<div class="figure">
[[File:pi3b-img176.png]]
</div></ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then use the nmcli command to connect to the scanned WIFI hotspot, where:</li></ol>
:a. '''wifi_name''' needs to be replaced with the name of the WIFI hotspot you want to connect to
:b. '''wifi_passwd''' needs to be replaced with the password of the WIFI hotspot you want to connect to
:{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''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>
<ol start="4" 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 addr show 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 '''192.168.1.11'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
::valid_lft forever preferred_lft forever|}</ol><ol start="5) " style="list-style-type: decimal;"><li>Use the '''ping''' command to test the connectivity of the wifi network, and the '''ping''' command can be interrupted through the shortcut key '''Ctrl+C'''</li>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''ping www.orangepi.online -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 ====