I have been working on getting hosapd work for some time.
The guides I have followed will be attached on the bottom.
So first things first.
As far as I can tell, my network card does support AP mode. Please correct me if it doesnt.
joubin@ubuntu:~$ iw list
Wiphy phy0
Band 1:
Capabilities: 0x1862
HT20/HT40
Static SM Power Save
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 16 usec (0x07)
HT TX/RX MCS rate indexes supported: 0-7, 32
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps
* 5.5 Mbps
* 11.0 Mbps
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
RTS threshold: 2347
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
software interface modes (can always be added):
* AP/VLAN
* monitor
interface combinations are not supported
Supported commands:
* new_interface
* set_interface
* new_key
* new_beacon
* new_station
* new_mpath
* set_mesh_params
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* remain_on_channel
* set_tx_bitrate_mask
* action
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* connect
* disconnect
Supported TX frame types:
* IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
Supported RX frame types:
* IBSS: 0x00d0
* managed: 0x0040 0x00d0
* AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
* AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
* mesh point: 0x00b0 0x00c0 0x00d0
* P2P-client: 0x0040 0x00d0
* P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
Also,
joubin@ubuntu:~$ iwconfig
lo no wireless extensions.
br0 no wireless extensions.
wlan1 IEEE 802.11bgn ESSID:"pivotpoint"
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr=2347 B Fragment thr:off
Power Management:off
eth0 no wireless extensions.
So, I followed this guide and the following happens.
The network is created and can be seen from multiple machines: Windows, Mac, and linux -- as well as some phones that I have.
However, and this is the problem, none of of the machines will connect to it.
Both my mac and windows 7 machine sit there for about 10 seconds and then they time out.
My iphone trys to join but never establishes a connection..
Clearification. Usually, even if a hotspot has network issues, my machines are able to join and then they assign themselves an ip. The 169.x.x.x
However, they dont do that either.
Could this be driver issues?
root@ubuntu:~/Desktop/hostap/hostapd# uname -a
Linux ubuntu 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux
lshw retuned:
*-network
description: Wireless interface
physical id: 2
bus info: usb@1:1
logical name: wlan1
serial: 00:21:2f:3b:23:e3
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8192cu driverversion=3.2.0-29-generic-pae firmware=N/A ip=10.10.0.1 link=no multicast=yes wireless=IEEE 802.11bgn
when I run it with the dd command I get the following errors.
not that im running hostapd from a directory. It is a recent build from their git
root@ubuntu:~/Desktop/hostap/hostapd# ./hostapd -v
hostapd v2.0-devel
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi> and contributors
root@ubuntu:~/Desktop/hostap/hostapd# dhclient wlan1 & ./hostapd -dd /etc/hostapd/hostapd.conf
[9] 14315
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
nl80211: interface wlan1 in phy phy1
rfkill: initial event: idx=2 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=3 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Add own interface ifindex 6
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=0 use_monitor=1
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan1 created: ifindex=15
nl80211: Add own interface ifindex 15
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=US
nl80211: 2402-2472 @ 40 MHz
nl80211: 5170-5250 @ 40 MHz
nl80211: 5250-5330 @ 40 MHz
nl80211: 5490-5600 @ 40 MHz
nl80211: 5650-5710 @ 40 MHz
nl80211: 5735-5835 @ 40 MHz
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g Channel: 1 Frequency: 2412 MHz
nl80211: Set freq 2412 (ht_enabled=0 sec_channel_offset=0)
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
wlan1: Flushing old station entries
wlan1: Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan1 with hwaddr 00:21:2f:3b:23:e3 and ssid "my_hotspot"
nl80211: Set beacon (beacon_set=0)
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
wlan1: Setup of interface done.
random: Got 17/20 bytes from /dev/random
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface mon.wlan1 is up
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan1' added
wlan1: Event INTERFACE_STATUS (5) received
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
nl80211: if_removed already cleared - ignore event
wlan1: Event TX_STATUS (18) received
mgmt::deauth cb
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
mgmt::auth
authentication: STA=f0:dc:e2:d0:34:1b auth_alg=0 auth_transaction=1 status_code=0 wep=0
New STA
ap_sta_add: register ap_handle_timer timeout for f0:dc:e2:d0:34:1b (300 seconds - ap_max_inactivity)
wlan1: STA f0:dc:e2:d0:34:1b IEEE 802.11: authentication OK (open system)
wlan1: STA f0:dc:e2:d0:34:1b MLME: MLME-AUTHENTICATE.indication(f0:dc:e2:d0:34:1b, OPEN_SYSTEM)
wlan1: STA f0:dc:e2:d0:34:1b MLME: MLME-DELETEKEYS.request(f0:dc:e2:d0:34:1b)
authentication reply: STA=f0:dc:e2:d0:34:1b auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
wlan1: Event TX_STATUS (18) received
mgmt::auth cb
wlan1: STA f0:dc:e2:d0:34:1b IEEE 802.11: authenticated
wlan1: Event RX_MGMT (20) received
mgmt::assoc_req
association request: STA=f0:dc:e2:d0:34:1b capab_info=0x421 listen_interval=10
new AID 1
wlan1: STA f0:dc:e2:d0:34:1b IEEE 802.11: association OK (aid 1)
wlan1: Event TX_STATUS (18) received
mgmt::assoc_resp cb
wlan1: STA f0:dc:e2:d0:34:1b IEEE 802.11: associated (aid 1)
wlan1: AP-STA-CONNECTED f0:dc:e2:d0:34:1b
wlan1: STA f0:dc:e2:d0:34:1b MLME: MLME-ASSOCIATE.indication(f0:dc:e2:d0:34:1b)
wlan1: STA f0:dc:e2:d0:34:1b MLME: MLME-DELETEKEYS.request(f0:dc:e2:d0:34:1b)
wlan1: STA f0:dc:e2:d0:34:1b RADIUS: starting accounting session 5031A12A-00000000
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
hostapd_new_assoc_sta: reschedule ap_handle_timer timeout for f0:dc:e2:d0:34:1b (300 seconds - ap_max_inactivity)
nl80211: Event message available
nl80211: New station f0:dc:e2:d0:34:1b
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
wlan1: Event RX_MGMT (20) received
wlan1: Event TX_STATUS (18) received
^CSignal 2 received - terminating
wlan1: STA f0:dc:e2:d0:34:1b MLME: MLME-DEAUTHENTICATE.indication(f0:dc:e2:d0:34:1b, 1)
wlan1: STA f0:dc:e2:d0:34:1b MLME: MLME-DELETEKEYS.request(f0:dc:e2:d0:34:1b)
Removing station f0:dc:e2:d0:34:1b
wlan1: AP-STA-DISCONNECTED f0:dc:e2:d0:34:1b
ap_free_sta: cancel ap_handle_timer for f0:dc:e2:d0:34:1b
wlan1: Flushing old station entries
wlan1: Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
nl80211: Remove interface ifindex=15
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 6 iftype 2 (STATION)