ELASTEL TECHNOLOGY CO., LTD.
7.1 STA Mode
1. Start up the wlan
sudo ifconfig wlan0 up
2. Scan the available WiFi Hotspot
sudo iw dev wlan0 scan |less
3. Create the password file and connecting
# Create the config file
sudo wpa_passphrase ESSID PWD > xxx.conf
# Use the config file to connect
sudo wpa_supplicant -B -iwlan0 -c ./xxx.conf
# Check the connection status
sudo iwconfig wlan0
7.2 AP Mode
Use the “creat_ap” tool to enable the WiFi hotspot.
1. Install the necessary dependency
sudo apt-get install hostapd dnsmasq iptables
2. Install create_ap tool from Github
git clone https://github.com/oblique/create_ap
cd create_ap
make install
3. Enable WIFI Hotspot
(1) Create WiFi hotspot without password.
create_ap wlan0 eth0 MyAccessPoint
(2) Create WiFi hotspot with WPA+WPA2 authentication.
create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
(3) Create WiFI Hotspot without internet sharing
create_ap -n wlan0 MyAccessPoint MyPassPhrase