Check that the NIC is compatible
The code is as follows |
Copy Code |
Ifconfig wlan0 Create Wlandev Ath0 # take Ath0 as an example Ifconfig Wlan0 List Caps Drivercaps=6f85ed01<sta,ibss,hostap,ahdemo,txpmgt,shslot,shpreamble,monitor,mbss,wpa1,wpa2,burst,wme,wds, Bgscan,txfrag> Cryptocaps=1f<wep,tkip,aes,aes_ccm,tkipmic> |
Contains hostap to represent compatibility
Create a wireless network interface
The code is as follows |
Copy Code |
Ifconfig Wlan0 Destroy Ifconfig wlan0 Create Wlandev ath0 wlanmode Hostap |
Write person HOSTAPD configuration file
/etc/hostapd.conf
The code is as follows |
Copy Code |
Interface=wlan0 Debug=1 Ctrl_interface=/var/run/hostapd Ctrl_interface_group=wheel Ssid=heiher.info # Take Heiher.info as an example Wpa=1 WPA_PASSPHRASE=PASSWD # Fill in the password here Wpa_key_mgmt=wpa-psk WPA_PAIRWISE=CCMP TKIP |
Start wireless AP
code is as follows |
copy code |
/etc/rc.d/ HOSTAPD forcestart |