# [SOLVED]Unable to connect to wireless ap

## Moji

I've have free unencrypted wireless networks at school, but I've been unable to connect to them using my DWL-G650 wireless card. Using the same card I am able to connect other networks around town(encrypted and unencrypted). I've done searches here on the forums and tried several of the fixes but I still haven't been able fix it. 

I think either I've got something set incorrectly in my base wireless settings or I'm just a dork. 

Any help or suggestions would be greatly appreciated as I can't seem to figure this one out.

Driver

```

net-wireless/madwifi-ng-0.9.2.1
```

lspci

```

Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
```

iwlist scann

```

          Cell 01 - Address: 00:E0:63:81:CB:81

                    ESSID:"wireless"

                    Mode:Master

                    Frequency:2.412 GHz (Channel 1)

                    Quality=27/94  Signal level=-68 dBm  Noise level=-95 dBm

                    Encryption key:off

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

                    Extra:bcn_int=100

          Cell 02 - Address: 00:E0:63:81:D4:FF

                    ESSID:"wireless"

                    Mode:Master

                    Frequency:2.412 GHz (Channel 1)

                    Quality=22/94  Signal level=-73 dBm  Noise level=-95 dBm

                    Encryption key:off

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

                    Extra:bcn_int=100

          Cell 03 - Address: 00:E0:63:81:D4:EE

                    ESSID:"wireless"

                    Mode:Master

                    Frequency:2.462 GHz (Channel 11)

                    Quality=20/94  Signal level=-75 dBm  Noise level=-95 dBm

                    Encryption key:off

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

                    Extra:bcn_int=100

          Cell 04 - Address: 00:01:F4:ED:0E:41

                    ESSID:"wireless"

                    Mode:Master

                    Frequency:2.462 GHz (Channel 11)

                    Quality=5/94  Signal level=-90 dBm  Noise level=-95 dBmath0      IEEE 802.11g  ESSID:"truax wireless"  

                    Encryption key:off

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

                    Extra:bcn_int=100
```

iwconfig

```

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   

          Bit Rate:1 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=29/94  Signal level=-66 dBm  Noise level=-95 dBm

          Rx invalid nwid:17579  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

lsmod

```

Module                  Size  Used by

snd_seq                37776  0 

snd_seq_device          5772  1 snd_seq

snd_pcm_oss            29152  0 

snd_mixer_oss          13056  1 snd_pcm_oss

xt_state                1728  2 

ip_conntrack_ftp        5232  0 

ip_conntrack_irc        4848  0 

ipt_TOS                 1728  0 

ipt_MASQUERADE          2304  0 

ip_nat                 12076  1 ipt_MASQUERADE

ip_conntrack           34548  5 xt_state,ip_conntrack_ftp,ip_conntrack_irc,ipt_MASQUERADE,ip_nat

iptable_mangle          2048  0 

wlan_tkip              10240  0 

wlan_xauth              1344  0 

wlan_ccmp               6464  0 

wlan_scan_ap            4032  0 

parport_pc             19108  0 

parport                18048  1 parport_pc

snd_maestro3           18404  0 

snd_ac97_codec         78496  1 snd_maestro3

snd_ac97_bus            1792  1 snd_ac97_codec

snd_pcm                54664  3 snd_pcm_oss,snd_maestro3,snd_ac97_codec

snd_timer              15364  2 snd_seq,snd_pcm

snd_page_alloc          6792  1 snd_pcm

snd                    37156  8 snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_maestro3,snd_ac97_codec,snd_pcm,snd_timer

soundcore               6240  1 snd

nvidia               4541588  12 

wlan_scan_sta           9856  1 

ath_pci                71392  0 

ath_rate_sample        10880  1 ath_pci

wlan                  154140  8 wlan_tkip,wlan_xauth,wlan_ccmp,wlan_scan_ap,wlan_scan_sta,ath_pci,ath_rate_sample

ath_hal               189200  3 ath_pci,ath_rate_sample
```

wpa_supplicant

```

Initializing interface 'ath0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'madwifi' ctrl_interface 'N/A' bridge 'N/A'

Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group='10' (DEPRECATED)

update_config=1

Priority group 1

   id=0 ssid='cbcc'

Priority group 0

   id=6 ssid='wireless'

Initializing interface (2) 'ath0'

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

SIOCGIWRANGE: WE(compiled)=20 WE(source)=13 enc_capa=0xf

  capabilities: key_mgmt 0xf enc 0xf

WEXT: Operstate: linkmode=1, operstate=5

Own MAC address: XX:XX:XX:XX:XX:XX #my device mac address

wpa_driver_madwifi_del_key: keyidx=0

wpa_driver_madwifi_del_key: keyidx=1

wpa_driver_madwifi_del_key: keyidx=2

wpa_driver_madwifi_del_key: keyidx=3

wpa_driver_madwifi_set_countermeasures: enabled=0

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

Setting scan request: 0 sec 100000 usec

ctrl_interface_group=10

Added interface ath0

RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()

Wireless event: cmd=0x8b06 len=8

Ignore event for foreign ifindex 3

RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

State: DISCONNECTED -> SCANNING

Starting AP scan (broadcast SSID)

Trying to get current scan results first without requesting a new scan to speed up initial association

Received 399 bytes of scan results (3 BSSes)

Scan results: 3

Selecting BSS from priority group 1

0: 00:01:f4:ee:45:7e ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

1: 00:e0:63:81:d4:de ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

2: 00:01:f4:ec:fe:79 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

Selecting BSS from priority group 0

0: 00:01:f4:ee:45:7e ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

1: 00:e0:63:81:d4:de ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

2: 00:01:f4:ec:fe:79 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

No suitable AP found.

Setting scan request: 0 sec 0 usec

Starting AP scan (broadcast SSID)

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

Wireless event: cmd=0x8b1a len=8

CTRL_IFACE monitor attached - hexdump(len=24): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 31 30 39 30 35 2d 31 35 37 00

RX ctrl_iface - hexdump_ascii(len=10):

     49 4e 54 45 52 46 41 43 45 53                     INTERFACES      

RX ctrl_iface - hexdump_ascii(len=6):

     53 54 41 54 55 53                                 STATUS          

RX ctrl_iface - hexdump_ascii(len=13):

     4c 49 53 54 5f 4e 45 54 57 4f 52 4b 53            LIST_NETWORKS   

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

Wireless event: cmd=0x8b19 len=8

Received 1104 bytes of scan results (8 BSSes)

Scan results: 8

Selecting BSS from priority group 1

0: 00:0f:66:18:73:74 ssid='5457' wpa_ie_len=0 rsn_ie_len=0 caps=0x11

   skip - no WPA/RSN IE

1: 00:e0:63:81:d4:e5 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

2: 00:01:f4:ee:45:7e ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

3: 00:e0:63:81:d4:de ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

4: 02:02:2d:5b:f0:ae ssid='hpsetup' wpa_ie_len=0 rsn_ie_len=0 caps=0x2

   skip - no WPA/RSN IE

5: 02:02:2d:5b:f0:ae ssid='hpsetup' wpa_ie_len=0 rsn_ie_len=0 caps=0x2

   skip - no WPA/RSN IE

6: 00:01:f4:ed:12:56 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

7: 00:01:f4:ec:fe:79 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

Selecting BSS from priority group 0

0: 00:0f:66:18:73:74 ssid='5457' wpa_ie_len=0 rsn_ie_len=0 caps=0x11

   skip - no WPA/RSN IE

1: 00:e0:63:81:d4:e5 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

2: 00:01:f4:ee:45:7e ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

3: 00:e0:63:81:d4:de ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

4: 02:02:2d:5b:f0:ae ssid='hpsetup' wpa_ie_len=0 rsn_ie_len=0 caps=0x2

   skip - no WPA/RSN IE

5: 02:02:2d:5b:f0:ae ssid='hpsetup' wpa_ie_len=0 rsn_ie_len=0 caps=0x2

   skip - no WPA/RSN IE

6: 00:01:f4:ed:12:56 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

7: 00:01:f4:ec:fe:79 ssid='wireless' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

   skip - no WPA/RSN IE

No suitable AP found.
```

/etc/conf.d/wireless

```

associate_timeout_ath0="10"

sleep_scan_ath0="1"

essid_ath0="wireless"

associate_test_ath0="all"

iwconfig_ath0="ap off key off"
```

/etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=10

update_config=1

network={

        ssid="wireless"

        key_mgmt=NONE

}
```

/etc/conf.d/net

```

config_eth0=( "dhcp" )

dhcp_eth0="nontp nonis"

modules_ath0=( "!iwconfig" "wpa_supplicant" )

config_ath0=( "dhcp" )

wpa_supplicant_ath0="-D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf -wB"

wpa_timeout_ath0=60
```

-MJLast edited by Moji on Fri May 11, 2007 11:39 pm; edited 1 time in total

----------

## Kvetch

 *Moji wrote:*   

> 
> 
> modules_ath0=( "!iwconfig" "wpa_supplicant" )
> 
> config_ath0=( "dhcp" )
> ...

 

I don't have access to a machine with wireless right now but what's !iwconfig and the -wB at the end or the wpa_supplicant line?

----------

## Abraxas

If you are using madwifi-ng then try using -Dwext instead of -Dmadwifi

----------

## lonrot_m

question, why would you need wpa_supplicant if it's unencrypted wouldn't it be enough with iwconfig?

did you try (probably you did but anyways)

```
iwconfig ath0 essid "wireless"

dhcpcd -t 15 -d ath0
```

----------

## Abraxas

 *lonrot_m wrote:*   

> question, why would you need wpa_supplicant if it's unencrypted wouldn't it be enough with iwconfig?
> 
> did you try (probably you did but anyways)
> 
> ```
> ...

 

He is connecting to other networks including encrypted ones.  I have my atheros based card setup with wpa_supplicant and I don't have a problem connecting with unencrypted networks.

----------

## Moji

Back from a 14 hour school day where I got to try some of the suggestions.

Kvetch,

The -wB in /etc/conf.d/net is the command line option for wpa_supplicant to run in the background.

lonrot_m,

wpa_supplicant is what I had been using if only because I wasn't sure what else to use. I did try today to bring all the daemons down, and try to get iwconfig to do the connection for me, without wpa_supplicant/wext running in the background. When I did a:

```
iwconfig ath0 ap 00:01:F4:ED:0E:41
```

 it didn't want to register the Access Point. It would take the command and then do nothing. When I checked with iwconfig the ap was showing Access Point: Not-Associated.

Abraxas,

I tried using -D wext and I could see the card scaning away but it didn't connect to a network, i tried using iwconfig with it and I wasn't able to force it to pick up an access point. Is there a tool that you know of with wext that pumps out some debug?

I tried

```
iwconfig ath0 essid "wireless"
```

 and then checked the device with iwconfig, it listed the essid correctly but it still refused to list the mac address of the Access Point. 

Because this is decent sized wireless net they have about 3-6 Access Points in range with the same essid at any given time, is it getting confused with some many similar nets?

I did sit and watch iwconfig for about 30 minutes today, after trying several things unsuccessfully, and I noticed that the ESSID stayed at "wireless" mode,key and everything else stayed the same but the Frequency kept cycling around to the different freqs used by each of the ap's in the area.

Again the whole time the access point just refused to resolve to anything other than: Access Point: Not-Associated.

Abraxas,

Would you mind posting the output of:

```
for x in "/etc/conf.d/net" "/etc/conf.d/wireless" "/etc/wpa_supplicant/wpa_supplicant.conf" ;do echo -e "#${x}\n\n$(sed 's/#.*$//g;/network.*=.*{/,/}/{/.*/d};/^[ \t\v\f]*$/d;' "${x}")\n";done
```

I might just have something set screwy and since it seems to be set up correctly for you I might be able to steal some settings.

Thanks all for the help so far, hopefully its something simply that I'm just overlooking.

-MJ

----------

## madisonicus

For what it's worth, here's the data from my system.  even thought it's for a ipw3945 it might help:

```
#/etc/conf.d/net

modules=( "wpa_supplicant" )

dhcp_eth0=( "nontp nodns" )

dhcp_eth1=( "nontp nodns" )

config_eth0=( "dhcpcd" )

config_eth1=( "dhcpcd" )

dhcpcd_eth0="-t 5"

dhcpcd_eth1="-t 5"

wpa_supplicant_eth1=( "-i eth1 -D wext -Bw -c /etc/wpa_supplicant/wpa_supplicant               

.conf" )

RC_NEED=( "ipw3945d" )

#/etc/conf.d/wireless

#/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=10

update_config=1
```

eth1 is my wifi.

-m

----------

## Moji

Thanks, I'll have to wait until I get to the school house again to test it out.

-MJ

----------

## Jointy

hi,

has the AP a MAC filter running ???

have you ever tried to sniff traffic from other clients ???

Is that essid "wireless" a honey pot ap ???

hope it helps  :Wink: 

gl

j0inty

----------

## Moji

The new madwifi-ng-0.9.3-r3 package seems to have fixed this problem so changing the title to solved. 

Thanks to all those that posted suggestions, even if I wasn't able to pin down the problem.

-MJ

----------

