Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:configurations:wifi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
products:sbc:common:configurations:wifi [2022/07/06 00:00]
nick created
products:sbc:common:configurations:wifi [2022/07/08 05:10] (current)
frank
Line 1: Line 1:
 ====== Wi-Fi ====== ====== Wi-Fi ======
 +
 +===== Introduction =====
 +
 +This document is mainly about Wi-Fi. The first part of the document covers how to use Wi-Fi under Ubuntu, and the second part of the document covers how to use Wi-Fi under Android.
 +
 +===== Ubuntu =====
 +
 +<tabbox Desktop OS> 
 +
 +Wi-Fi settings are in the upper-right corner, click on the lower triangle to see the Wi-Fi settings options.
 +
 +{{/products/sbc/common/configurations/wifi-select.png?500|wifi-select}}
 +
 +Choose a Wi-Fi network that you want to connect to.
 +
 +{{/products/sbc/common/configurations/wifi-setting.png?500|wifi-setting}}
 +
 +After entering the password, you can use Wi-Fi normally.
 +
 +{{/products/sbc/common/configurations/wifi-password.png?500|wifi-password}}
 +
 +<tabbox Server OS> 
 +
 +<WRAP info >
 +Ubuntu/Debian servers can use NetworkManager to setup Wi-Fi via command line.
 +</WRAP>
 +
 +1. Scan for Wi-Fi Networks:
 +
 +```shell
 +$ nmcli d wifi list
 +IN-USE  SSID                          MODE   CHAN  RATE        SIGNAL  BARS  SEC
 +        VIM                           Infra  2     195 Mbit/ 92      ▂▄▆█  WPA
 +        Wesion                        Infra  7     260 Mbit/ 84      ▂▄▆█  WPA
 +        VIM_5G                        Infra  161   405 Mbit/ 84      ▂▄▆█  WPA
 +        HP-HOTSPOT-48-LaserJet M1218  Infra  7     54 Mbit/  69      ▂▄▆_  WPA
 +        ChinaNet-xjCH                 Infra  13    270 Mbit/ 67      ▂▄▆_  WPA
 +        BRGCN_GUEST                   Infra  1     405 Mbit/ 64      ▂▄▆_  WPA
 +        BRGCN                         Infra  1     405 Mbit/ 62      ▂▄▆_  WPA
 +```
 +
 +2. Create a hashed pre-computed PSK-key with wpa_passphrase:
 +  * To avoid storing plain-text passwords, there is an handy tool called ''wpa_passphrase'' that comes with ''wpa_supplicant''.
 +  * Input the command ''wpa_passphrase your_ssid your_password'' to create a 256-bit PSK passphrase from your_ssid and your_password.
 +```shell
 +khadas@Khadas:~$ wpa_passphrase your_ssid your_password
 +network={
 +  ssid="your_ssid"
 +  #psk="your_password"
 +  psk=6d5324610d3627ab4f97b80cf22b742996d82c022b283a874e88d083a299734c
 +}
 +```
 +The new password is now a hashed passphrase: ''6d5324610d3627ab4f97b80cf22b742996d82c022b283a874e88d083a299734c''.
 +
 +<WRAP info >
 +Replace the your_ssid & your_password with your SSID and password.
 +</WRAP>
 +
 +3. Connect to a Wi-Fi Network:
 +```shell
 +$ sudo nmcli d wifi connect your_ssid password 6d5324610d3627ab4f97b80cf22b742996d82c022b283a874e88d083a299734c wep-key-type key
 +Device 'wlan0' successfully activated with '206ab399-3822-4652-ba4c-64847af0bce9'.
 +```
 +<WRAP info >
 +Replace ''your_ssid'' and ''6d5324610d3627ab4f97b80cf22b742996d82c022b283a874e88d083a299734c'' with your SSID and passphrase.
 +</WRAP>
 +
 +4. Disconnect from a Wi-Fi Network:
 +
 +```shell
 +$ sudo nmcli d disconnect wlan0
 +Device 'wlan0' successfully disconnected.
 +```
 +</tabbox>
 +
  
Last modified: 2022/07/06 00:00 by nick