# Custom access point trouble: a.p. seen but not reachable

## NP_complete

My wireless card is DLink DWA-552 Xtreme N Desktop Adapter.  It shows up as

00:08.0 Network controller: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01)

and is supported by the ath9k driver.  I would like to use this as an access point as per

http://en.gentoo-wiki.com/wiki/Wireless/Access_point

The trouble is: when I execute `hostapd -dd /etc/hostapd/hostapd.conf`, the resulting network can be

seen but not conected to.  (I tried to connect from both GNU/Linux & W).  Someone please

help.

My hostapd.conf file is:

interface=wlan0

bridge=br0

driver=nl80211

logger_syslog=-1

logger_syslog_level=2

logger_stdout=-1

logger_stdout_level=2

dump_file=/tmp/hostapd.dump

ctrl_interface=/var/run/hostapd

#ctrl_interface_group=wheel                                                                                                                                  

ctrl_interface_group=0

ssid=cosmo2010

#country_code=US                                                                                                                                             

#ieee80211d=1                                                                                                                                                

hw_mode=g

channel=6

beacon_int=100

dtim_period=2

max_num_sta=255

rts_threshold=2347

fragm_threshold=2346

#supported_rates=10 20 55 110 60 90 120 180 240 360 480

540                                                                                                  

#basic_rates=10 20                                                                                                                                           

#basic_rates=10 20 55 110                                                                                                                                    

#basic_rates=60 120 240                                                                                                                                      

#preamble=1                                                                                                                                                  

macaddr_acl=0

#accept_mac_file=/etc/hostapd/hostapd.accept                                                                                                                 

#deny_mac_file=/etc/hostapd/hostapd.deny                                                                                                                     

auth_algs=1

ignore_broadcast_ssid=0

wme_enabled=1

wme_ac_bk_cwmin=4

wme_ac_bk_cwmax=10

wme_ac_bk_aifs=7

wme_ac_bk_txop_limit=0

wme_ac_bk_acm=0

wme_ac_be_aifs=3

wme_ac_be_cwmin=4

wme_ac_be_cwmax=10

wme_ac_be_txop_limit=0

wme_ac_be_acm=0

wme_ac_vi_aifs=2

wme_ac_vi_cwmin=3

wme_ac_vi_cwmax=4

wme_ac_vi_txop_limit=94

wme_ac_vi_acm=0

wme_ac_vo_aifs=2

wme_ac_vo_cwmin=2

wme_ac_vo_cwmax=3

wme_ac_vo_txop_limit=47

wme_ac_vo_acm=0

#wep_default_key=0                                                                                                                                           

#wep_key0=123456789a                                                                                                                                         

#wep_key1="vwxyz"                                                                                                                                            

#wep_key2=0102030405060708090a0b0c0d 

ieee80211n=1

#ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]                                                                                                                  

#ieee8021x=1                                                                                                                                                 

#eapol_version=2                                                                                                                                             

#wep_key_len_broadcast=5                                                                                                                                     

#wep_key_len_unicast=5                                                                                                                                       

#wep_rekey_period=300                                                                                                                                        

eapol_key_index_workaround=0

#eap_reauth_period=3600                                                                                                                                      

#use_pae_group_addr=1                                                                                                                                        

eap_server=0

own_ip_addr=127.0.0.1

wpa=2

#wpa_psk (dot11RSNAConfigPSKValue)

#wpa_passphrase(dot11RSNAConfigPSKPassPhrase)                                                                                       #wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

wpa_passphrase=secret_passphrase

wpa_key_mgmt=WPA-PSK

wpa_pairwise=CCMP

and the log messages are:

Configuration file: /etc/hostapd/hostapd.conf

ctrl_interface_group=0

Opening raw packet socket for ifindex 1633878026

BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)

SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf

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

RATE[0] rate=10 flags=0x2

RATE[1] rate=20 flags=0x6

RATE[2] rate=55 flags=0x6

RATE[3] rate=110 flags=0x6

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

Passive scanning not supported

Flushing old station entries

Deauthenticate all stations

Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz

cUsing interface wlan0 with hwaddr 00:21:91:fb:8f:44 and ssid 'cosmo2010'

SSID - hexdump_ascii(len=9):

     63 6f 73 6d 6f 32 30 31 30                        cosmo2010

PSK (ASCII passphrase) - hexdump_ascii(len=17):

     73 65 63 72 65 74 5f 70 61 73 73 70 68 72 61 73   secret_passphras

     65                                                e               

PSK (from passphrase) - hexdump(len=32): af 30 f0 14 99 bb 2a 17 2e 4d b9 3c 0a ba f1 72 35 60 0a 22 c2 8a c1 43 58 ab b5 d8 47 2f 48 eb

WPA: group state machine entering state GTK_INIT (VLAN-ID 0)

GMK - hexdump(len=32): [REMOVED]

GTK - hexdump(len=16): [REMOVED]

WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)

wlan0: Setup of interface done.

MGMT (TX callback) ACK

STA 00:1b:77:7d:55:c8 sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

STA 00:1b:77:7d:55:c8 sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

MGMT

mgmt::deauth

deauthentication: STA=00:1b:77:7d:55:c8 reason_code=3

Station 00:1b:77:7d:55:c8 trying to deauthenticate, but it is not authenticated.

STA 00:1b:77:7d:55:c8 sent probe request for our SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

MGMT

mgmt::auth

authentication: STA=00:1b:77:7d:55:c8 auth_alg=0 auth_transaction=1 status_code=0 wep=0

  New STA

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.11: authentication OK (open system)

wlan0: STA 00:1b:77:7d:55:c8 MLME: MLME-AUTHENTICATE.indication(00:1b:77:7d:55:c8, OPEN_SYSTEM)

wlan0: STA 00:1b:77:7d:55:c8 MLME: MLME-DELETEKEYS.request(00:1b:77:7d:55:c :Cool: 

authentication reply: STA=00:1b:77:7d:55:c8 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)

MGMT (TX callback) ACK

mgmt::auth cb

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.11: authenticated

MGMT

mgmt::assoc_req

association request: STA=00:1b:77:7d:55:c8 capab_info=0x431 listen_interval=1

WME IE - hexdump(len=7): 00 50 f2 02 00 01 00

Validating WME IE: OUI 00:50:f2  OUI type 2  OUI sub-type 0  version 1

handle_assoc STA 00:1b:77:7d:55:c8 - no HT, num of non-HT stations 1

hostapd_ht_operation_update current operation mode=0x0

hostapd_ht_operation_update new operation mode=0x13 changes=2

  new AID 1

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.11: association OK (aid 1)

MGMT (TX callback) ACK

mgmt::assoc_resp cb

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.11: associated (aid 1)

wlan0: STA 00:1b:77:7d:55:c8 MLME: MLME-ASSOCIATE.indication(00:1b:77:7d:55:c :Cool: 

wlan0: STA 00:1b:77:7d:55:c8 MLME: MLME-DELETEKEYS.request(00:1b:77:7d:55:c :Cool: 

wlan0: STA 00:1b:77:7d:55:c8 WPA: event 1 notification

wlan0: STA 00:1b:77:7d:55:c8 WPA: start authentication

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state INITIALIZE

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.1X: unauthorizing port

WPA: 00:1b:77:7d:55:c8 WPA_PTK_GROUP entering state IDLE

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state AUTHENTICATION

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state AUTHENTICATION2

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state INITPSK

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state PTKSTART

wlan0: STA 00:1b:77:7d:55:c8 WPA: sending 1/4 msg of 4-Way Handshake

WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)

IEEE 802.1X: 00:1b:77:7d:55:c8 TX status - version=2 type=3 length=95 - ack=1

IEEE 802.1X: 121 bytes from 00:1b:77:7d:55:c8

   IEEE 802.1X: version=1 type=3 length=117

wlan0: STA 00:1b:77:7d:55:c8 WPA: received EAPOL-Key frame (2/4 Pairwise)

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state PTKCALCNEGOTIATING

WPA: PTK derivation - A1=00:21:91:fb:8f:44 A2=00:1b:77:7d:55:c8

WPA: PMK - hexdump(len=32): [REMOVED]

WPA: PTK - hexdump(len=64): [REMOVED]

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state PTKCALCNEGOTIATING2

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state PTKINITNEGOTIATING

wlan0: STA 00:1b:77:7d:55:c8 WPA: sending 3/4 msg of 4-Way Handshake

WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8 kde_len=46 keyidx=1 encr=1)

Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]

IEEE 802.1X: 00:1b:77:7d:55:c8 TX status - version=2 type=3 length=151 - ack=1

IEEE 802.1X: 99 bytes from 00:1b:77:7d:55:c8

   IEEE 802.1X: version=1 type=3 length=95

wlan0: STA 00:1b:77:7d:55:c8 WPA: received EAPOL-Key frame (4/4 Pairwise)

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state PTKINITDONE

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.1X: authorizing port

wlan0: STA 00:1b:77:7d:55:c8 RADIUS: starting accounting session 4BC11600-00000000

wlan0: STA 00:1b:77:7d:55:c8 WPA: pairwise key handshake completed (RSN)

STA 00:13:46:14:0b:d2 sent probe request for broadcast SSID

MGMT (TX callback) fail

mgmt::proberesp cb

unknown vendor specific information element ignored (vendor OUI 00:03:47 len=7)

unknown vendor specific information element ignored (vendor OUI 00:03:47 len=7)

STA 00:13:02:ba:7e:00 sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

unknown vendor specific information element ignored (vendor OUI 00:03:47 len=7)

STA 00:13:02:ba:7e:00 sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

STA 00:14:a5:5b:41:96 sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

STA 00:22:fa:32:40:94 sent probe request for broadcast SSID

MGMT (TX callback) fail

mgmt::proberesp cb

STA 00:21:5d:e6:7a:ea sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

STA 00:21:5d:e6:7a:ea sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

STA 00:21:5d:e6:7a:ea sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

STA 00:14:85:1b:ae:b9 sent probe request for broadcast SSID

MGMT (TX callback) fail

mgmt::proberesp cb

STA 00:1b:77:7d:55:c8 sent probe request for our SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

STA 00:1f:3b:50:0e:19 sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

STA 00:17:c4:2c:2e:d1 sent probe request for broadcast SSID

MGMT (TX callback) fail

mgmt::proberesp cb

MGMT

mgmt::deauth

deauthentication: STA=00:1b:77:7d:55:c8 reason_code=3

wlan0: STA 00:1b:77:7d:55:c8 WPA: event 3 notification

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state DISCONNECTED

WPA: 00:1b:77:7d:55:c8 WPA_PTK entering state INITIALIZE

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.1X: unauthorizing port

wlan0: STA 00:1b:77:7d:55:c8 IEEE 802.11: deauthenticated

wlan0: STA 00:1b:77:7d:55:c8 MLME: MLME-DEAUTHENTICATE.indication(00:1b:77:7d:55:c8, 3)

wlan0: STA 00:1b:77:7d:55:c8 MLME: MLME-DELETEKEYS.request(00:1b:77:7d:55:c :Cool: 

hostapd_ht_operation_update current operation mode=0x13

hostapd_ht_operation_update new operation mode=0x0 changes=2

STA 00:1b:77:7d:55:c8 sent probe request for broadcast SSID

MGMT (TX callback) ACK

mgmt::proberesp cb

Signal 2 received - terminating

Flushing old station entries

Deauthenticate all stationsLast edited by NP_complete on Sun Apr 18, 2010 3:17 am; edited 1 time in total

----------

## DONAHUE

Have you looked at this guide ?

it uses a lot shorter hostapd.conf and no own_ip_addr=127.0.0.1 at all.

BTW i would try this as an unprotected access point first then wep then wpa in an effort to reduce the number of potential problems at the start.

does iwlist scan from another computer see this ap??

----------

## NP_complete

Donahue,

Thanks for answering.  Ever since I saw your response, I've been trying

to make use of the guide you linked to but found it difficult.  I am using

dnsmasq and dhcpcd since I followed

www.gentoo.org/doc/en/home-router-howto.xml to build my home router.

If someone could augment this last manual to include the wireless,

that would be perfect.

I do see the app from other machines. iwlist scan says:

wlan0     Scan completed :

          Cell 01 - Address: 00:21:91:FB:8F:44

                    Channel:1

                    Frequency:2.412 GHz (Channel 1)

                    Quality=65/70  Signal level=-45 dBm  

                    Encryption key:on

                    ESSID:"cosmo2010"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s

                    Mode:Master

                    Extra:tsf=00000000015955c3

                    Extra: Last beacon: 26378ms ago

                    IE: Unknown: 0009636F736D6F32303130

                    IE: Unknown: 010482840B16

                    IE: Unknown: 030101

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

I've seen people complain about ath9k.  I wonder if I should update

the kernel to a newer version.  2.6.31-gentoo-r6 is the one I am

currently using.  Unless someone suggests something brilliant,

I think I am out of luck.

----------

## Paczesiowa

try disabling wme_enabled, I had the same problem (but only on windows clients) with it enabled.

----------

## cwr

I use Ath9k (on an AR5008) and hostapd, and it works ok.  However, I haven't

tried WPA, just WEP, since that's all the wireless client can handle.  I'd drop

all encryption from hostapd if I were you, and then look at the result (from

another machine) with Kismet.  Once Kismet's happy, it's a question of sorting

out first DHCP, and then the routing.

Will

----------

