Difference between revisions of "Template:Linux-WiFi"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
 
(updated by API)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
无论是SD WiFi还是USB WiFi, 它们的连接方式都是一样的。正基科技的APXX系列芯片属于SD WiFi,另外系统默认也已经支持市面上众多常见的USB WiFi,已测试过的USB WiFi型号如下:
+
For either an SD WiFi or a USB WiFi you can connect it to your board in the same way. The APXX series WiFi chips are SD WiFi chips. By default FriendlyElec's system supports most popular USB WiFi modules. Here is a list of the USB WiFi modules we tested:
 
::{| class="wikitable"
 
::{| class="wikitable"
 
|-
 
|-
|序号||型号        
+
|Index||Model        
 
|-
 
|-
 
|1  ||  RTL8188CUS/8188EU 802.11n WLAN Adapter     
 
|1  ||  RTL8188CUS/8188EU 802.11n WLAN Adapter     
Line 13: Line 13:
 
|-
 
|-
 
|5  ||  mi WiFi mt7601
 
|5  ||  mi WiFi mt7601
 +
|-
 +
|6  ||  5G USB WiFi RTL8821CU
 +
|-
 +
|7  ||  5G USB WiFi RTL8812AU
 
|}
 
|}
  
You can use the NetworkManager utility in FriendlyCore to manage its network. You can run "nmcli" in the commandline utility to start it. Here are the commands to start a WiFi connection:
+
You can use the NetworkManager utility to manage network. You can run "nmcli" in the commandline utility to start it. Here are the commands to start a WiFi connection:
 +
* Change to root
 +
<syntaxhighlight lang="bash">
 +
$ su root
 +
</syntaxhighlight>
 +
 
 
* Check device list
 
* Check device list
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo nmcli dev
+
$ nmcli dev
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Note: if the status of a device is "unmanaged" it means that device cannot be accessed by NetworkManager. To make it accessed you need to clear the settings under "/etc/network/interfaces" and reboot your system.
 
Note: if the status of a device is "unmanaged" it means that device cannot be accessed by NetworkManager. To make it accessed you need to clear the settings under "/etc/network/interfaces" and reboot your system.
Line 24: Line 33:
 
* Start WiFi
 
* Start WiFi
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo nmcli r wifi on
+
$ nmcli r wifi on
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
* Scan Surrounding WiFi Sources
 
* Scan Surrounding WiFi Sources
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo nmcli dev wifi
+
$ nmcli dev wifi
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
* Connect to a WiFi Source
 
* Connect to a WiFi Source
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo nmcli dev wifi connect "SSID" password "PASSWORD"
+
$ nmcli dev wifi connect "SSID" password "PASSWORD" ifname wlan0
 
</syntaxhighlight>
 
</syntaxhighlight>
 
The "SSID" and "PASSWORD" need to be replaced with your actual SSID and password.If you have multiple WiFi devices you need to specify the one you want to connect to a WiFi source with iface<br />
 
The "SSID" and "PASSWORD" need to be replaced with your actual SSID and password.If you have multiple WiFi devices you need to specify the one you want to connect to a WiFi source with iface<br />
Line 41: Line 50:
 
For more details about NetworkManager refer to this link: [[Use NetworkManager to configure network settings]]<br />
 
For more details about NetworkManager refer to this link: [[Use NetworkManager to configure network settings]]<br />
  
* 如果你的USB WiFi无法正常工作, 大概率是因为文件系统里缺少了对应的USB WiFi固件。对于Debian系统, 可以在[https://wiki.debian.org/WiFi|Debian-WiFi]里找到并安装USB WiFi芯片的固件。而对于Ubuntu系统, 则可以通过下列命令安装所有的USB WiFi固件:  
+
If your USB WiFi module doesn't work most likely your system doesn't have its driver. For a Debian system you can get a driver from [https://wiki.debian.org/WiFi Debian-WiFi] and install it on your system. For a Ubuntu system you can install a driver by running the following commands:  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
$ sudo apt-get install linux-firmware
+
$ apt-get install linux-firmware
 
</syntaxhighlight>
 
</syntaxhighlight>
一般情况下, WiFi的固件都存放在/lib/firmware目录下。
+
In general all WiFi drivers are located at the "/lib/firmware" directory.

Latest revision as of 07:49, 21 October 2019

For either an SD WiFi or a USB WiFi you can connect it to your board in the same way. The APXX series WiFi chips are SD WiFi chips. By default FriendlyElec's system supports most popular USB WiFi modules. Here is a list of the USB WiFi modules we tested:

Index Model
1 RTL8188CUS/8188EU 802.11n WLAN Adapter
2 RT2070 Wireless Adapter
3 RT2870/RT3070 Wireless Adapter
4 RTL8192CU Wireless Adapter
5 mi WiFi mt7601
6 5G USB WiFi RTL8821CU
7 5G USB WiFi RTL8812AU

You can use the NetworkManager utility to manage network. You can run "nmcli" in the commandline utility to start it. Here are the commands to start a WiFi connection:

  • Change to root
$ su root
  • Check device list
$ nmcli dev

Note: if the status of a device is "unmanaged" it means that device cannot be accessed by NetworkManager. To make it accessed you need to clear the settings under "/etc/network/interfaces" and reboot your system.

  • Start WiFi
$ nmcli r wifi on
  • Scan Surrounding WiFi Sources
$ nmcli dev wifi
  • Connect to a WiFi Source
$ nmcli dev wifi connect "SSID" password "PASSWORD" ifname wlan0

The "SSID" and "PASSWORD" need to be replaced with your actual SSID and password.If you have multiple WiFi devices you need to specify the one you want to connect to a WiFi source with iface
If a connection succeeds it will be automatically setup on next system reboot.

For more details about NetworkManager refer to this link: Use NetworkManager to configure network settings

If your USB WiFi module doesn't work most likely your system doesn't have its driver. For a Debian system you can get a driver from Debian-WiFi and install it on your system. For a Ubuntu system you can install a driver by running the following commands:

$ apt-get install linux-firmware

In general all WiFi drivers are located at the "/lib/firmware" directory.