I have created an ap according to the article.
http://www.niwi.cz/clanky/it-poznamk...figuration-730
For my wireless net card.
iw list
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
* P2P-client
* P2P-GO
cat /etc/network/interfaces
auto dsl-provider
iface dsl-provider inet ppp
pre-up /bin/ip link set eth0 up
provider dsl-provider
auto eth0
iface eth0 inet static
address 192.168.22.1
netmask 255.255.255.0
dns-server 114.114.114.114
auto wlan0
iface wlan0 inet static
address 192.168.22.2
netmask 255.255.255.0
cat /etc/hostapd/hostapd.conf
hw_mode=g
channel=11
driver=nl80211
ssid=test
interface=wlan0
# encryption
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
ctrl_interface=/var/run/hostapd
# Only root can configure hostapd
ctrl_interface_group=0
cat /etc/dnsmasq.conf
interface=wlan0
listen-address=192.168.22.1
dhcp-range=192.168.22.2,192.168.22.150,12h
dhcp-option=3,192.168.22.1
dhcp-option=6,114.114.114.114
All the configuration files are listed here.
Now let's start ap.
nmcli radio wifi off
rfkill unblock wlan
ifconfig wlan0 192.168.22.2 up
service dnsmasq restart
service hostapd restart
hostapd /etc/hostapd/hostapd.conf
To connect the ap with my android phone with ssid `test` and password `password`.
The info displayed on pc's console:
hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlan0 with hwaddr 00:1a:8c:30:08:b1 and ssid "test"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: authenticated
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED f0:79:59:cb:d8:eb
wlan0: STA f0:79:59:cb:d8:eb RADIUS: starting accounting session 5789EE90-00000000
wlan0: STA f0:79:59:cb:d8:eb WPA: pairwise key handshake completed (RSN)
wlan0: AP-STA-DISCONNECTED f0:79:59:cb:d8:eb
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: authenticated
wlan0: STA f0:79:59:cb:d8:eb IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED f0:79:59:cb:d8:eb
wlan0: STA f0:79:59:cb:d8:eb RADIUS: starting accounting session 5789EE90-00000001
wlan0: STA f0:79:59:cb:d8:eb WPA: pairwise key handshake completed (RSN)
There is always in `authenticating` status in my android phone ,why can't connected?