Open main menu

Wiki-Orange Pi β

Changes

WIFI connection test

8,227 bytes added, 15:48, 24 April 2023
Created page with "{| class="wikitable" style="width:800px;background-color:#ffffdc;" |- |'''Please do not connect to WIFI by modifying the /etc/network/interfaces configuration file. There will..."
{| class="wikitable" style="width:800px;background-color:#ffffdc;"
|-
|'''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.'''
|}
'''1. The server image connects to WIFI through commands'''
{| class="wikitable" style="width:800px;background-color:#ffffdc;"
|-
|'''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.'''
|}
1) First log in to the linux system, there are the following three ways<br>
a. If the development board is connected with a network cable, you can remotely log in to the Linux system through ssh<br>
b. 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<br>
c. 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<br><br>
2) First use the '''nmcli dev wifi''' command to scan the surrounding WIFI hotspots<br>
{| class="wikitable" style="width:800px;"
|-
|orangepi@orangepi:~$ '''nmcli dev wifi'''
|}
[[Image:Pi-5-details-pic60.png]]<br><br>
3) Then use the nmcli command to connect to the scanned WIFI hotspot, where:<br>
a. '''wifi_name''' needs to be replaced with the name of the WIFI hotspot you want to connect to<br>
b. '''wifi_passwd''' needs to be replaced with the password of the WIFI hotspot you want to connect to<br>
{| 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'.
|}

4) You can view the IP address of wifi through the '''ip addr show wlan0''' command<br>
{| class="wikitable" style="width:800px;"
|-
|orangepi@orangepi:~$ '''ip addr show wlan0'''<br>
11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000<br>
link/ether 23:8c:d6:ae:76:bb brd ff:ff:ff:ff:ff:ff<br>
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<br>
inet6 240e:3b7:3240:c3a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute<br>
valid_lft 259192sec preferred_lft 172792sec<br>
inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute valid_lft forever preferred_lft forever
|}
5) 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'''<br>
{| class="wikitable" style="width:800px;"
|-
|orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''<br>
PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms<br>
^C<br>
--- www.orangepi.org ping statistics ---<br>
5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms
|}

'''2. The server image connects to WIFI in a graphical way'''<br><br>
1) First log in to the linux system, there are the following three ways<br>
a. If the development board is connected with a network cable, you can remotely log in to the Linux system through ssh<br>
b. 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 minicom cannot display the graphical interface)<br>
c. 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<br><br>
2) Then enter the nmtui command in the command line to open the wifi connection interface<br>
{| class="wikitable" style="width:800px;"
|-
|orangepi@orangepi:~$ '''nmtui'''
|}
3) Enter the nmtui command to open the interface as shown below<br><br>
[[Image:Pi-5-details-pic61.png]]<br><br>
4) Select '''Activate a connect''' and press Enter<br><br>
[[Image:Pi-5-details-pic62.png]]<br><br>
5) Then you can see all the searched WIFI hotspots<br><br>
[[Image:Pi-5-details-pic63.png]]<br><br>
6) Select the WIFI hotspot you want to connect to, then use the Tab key to position the cursor on '''Activate''' and press Enter<br><br>
[[Image:Pi-5-details-pic64.png]]<br><br>
7) 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<br><br>
[[Image:Pi-5-details-pic65.png]]<br><br>
8) After the WIFI connection is successful, a "*" will be displayed in front of the connected WIFI name<br><br>
[[Image:Pi-5-details-pic66.png]]<br><br>
9) You can view the IP address of wifi through the '''ip addr show wlan0''' command<br>
{| class="wikitable" style="width:800px;"
|-
|orangepi@orangepi:~$ '''ip addr show wlan0'''<br>
11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000<br>
link/ether 24:8c:d3:aa:76:bb brd ff:ff:ff:ff:ff:ff<br>
inet '''<span style="color:#FF0000">192.168.1.11</span>'''/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0 valid_lft 259069sec preferred_lft 259069sec<br>
inet6 240e:3b7:3240:c4a0:c401:a445:5002:ccdd/64 scope global dynamic noprefixroute<br>
valid_lft 259071sec preferred_lft 172671sec<br>
inet6 fe80::42f1:6019:a80e:4c31/64 scope link noprefixroute valid_lft forever preferred_lft forever
|}
10) 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'''<br>
{| class="wikitable" style="width:800px;"
|-
|orangepi@orangepi:~$ '''ping www.orangepi.org -I wlan0'''<br>
PING www.orangepi.org (182.92.236.130) from 192.168.1.49 wlan0: 56(84) bytes of data.<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=1 ttl=52 time=43.5 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=2 ttl=52 time=41.3 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=3 ttl=52 time=44.9 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=4 ttl=52 time=45.6 ms<br>
64 bytes from 182.92.236.130 (182.92.236.130): icmp_seq=5 ttl=52 time=48.8 ms<br>
^C<br>
--- www.orangepi.org ping statistics ---<br>
5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 41.321/44.864/48.834/2.484 ms
|}

'''3. Test method of desktop image'''<br><br>
1) Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI)<br><br>
[[Image:Pi-5-details-pic67.png]]<br><br>
2) Click '''More networks''' in the pop-up drop-down box to see all scanned WIFI hotspots, and then select the WIFI hotspot you want to connect to<br><br>
[[Image:Pi-5-details-pic68.png]]<br><br>
3) Then enter the password of the WIFI hotspot, and then click Connect to start connecting to WIFI<br><br>
[[Image:Pi-5-details-pic69.png]]<br><br>
4) After connecting to WIFI, you can open the browser to check whether you can access the Internet. The entrance of the browser is shown in the figure below<br><br>
[[Image:Pi-5-details-pic70.png]]<br><br>
5) If you can open other web pages after opening the browser, it means that the WIFI connection is normal<br><br>
[[Image:Pi-5-details-pic71.png]]<br><br>