# ath0 can't see anything, can't connect

## ExecutorElassus

so, i followed the gentoo guide for setting up my netgear wg311t (with atheros chipset). i'm running wpa_supplicant, and nothing seems able to connect to the access point (a netgear wireless router, wgt624) that's sitting on the desk right next to it. all kernel options are correctly enabled, and wpa_supplicant is running with the following command, initiated from /etc/init.d/net.ath0:

```
wpa_supplicant -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf -B
```

iwconfig shows this:

```
  # iwconfig               

eth0      no wireless extensions.

lo        no wireless extensions.

wifi0     no wireless extensions.

ath0      IEEE 802.11b  ESSID:""  

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

          Bit Rate:0 kb/s   Tx-Power:18 dBm   Sensitivity=0/3  

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm

          Rx invalid nwid:5973  Rx invalid crypt:0  Rx invalid frag:0

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

the "Rx invalid nwid" number keeps going up. the card isn't connecting to any access point, and its status light just keeps blinking. here are the following commands i've tried, and their result:

```

ukiyo elassus # iwconfig ath0 key s:<my human-readable key>  

Error for wireless request "Set Encode" (8B2A) :

    SET failed on device ath0 ; Invalid argument.

ukiyo elassus # iwconfig ath0 nwid any    

Error for wireless request "Set NWID" (8B02) :

    SET failed on device ath0 ; Operation not supported.

ukiyo elassus # iwconfig ath0 mode auto

Error for wireless request "Set Mode" (8B06) :

    SET failed on device ath0 ; Invalid argument.
```

here's /etc/conf.d/net.ath0:

```
# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

network={

        essid="TOADHALL"

        ssid="TOADHALL"

        priority=0

        key_mgmt=NONE

        wep_key0="my wep key, same as above"}

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

config_ath0=(192.168.0.7 broadcast 192.168.2.255 netmask 255.255.255.0)

gateway=ath0/192.168.0.1
```

so that's all i have. dmesg shows this:

```
ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

wlan: 0.8.4.2 (0.9.2)

ath_rate_sample: 1.2 (0.9.2)

ath_pci: 0.9.4.5 (0.9.2)

ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 19 (level, low) -> IRQ 21

wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

wifi0: H/W encryption support: WEP AES AES_CCM TKIP

wifi0: mac 7.9 phy 4.5 radio 5.6

wifi0: Use hw queue 1 for WME_AC_BE traffic

wifi0: Use hw queue 0 for WME_AC_BK traffic

wifi0: Use hw queue 2 for WME_AC_VI traffic

wifi0: Use hw queue 3 for WME_AC_VO traffic

wifi0: Use hw queue 8 for CAB traffic

wifi0: Use hw queue 9 for beacons

couldn't load module 'wlan_scan_sta' (-38)

unable to load wlan_scan_sta

wifi0: Atheros 5212: mem=0xe6020000, irq=21

couldn't load module 'wlan_wep' (-38)

couldn't load module 'wlan_wep' (-38)

couldn't load module 'wlan_wep' (-38)
```

the router doesn't show the card as an attached device, and the card doesn't see the router (or doesn't show it). i've double-checked all the setup steps, and i've followed them all. so, can somebody help me figure out what i'm doing wrong? i've tried setting my ssid to the ssid of the network, or to "any." i've tried setting my wep key to the human-readable one, or to the 10-digit hex number that the router generates. 

previously, i was using an SMC card, that managed to see the router, and connect, but which i couldn't use as a network interface (that is, unplugging eth0 resulted in no throughput). 

any help would be much appreciated.

thanks,

EE

----------

## smlgbl

Do you actually have the wlan_scan_sta module and the other one it isn't able to find? Maybe you have to recompile the madwifi-ng packages. Maybe also reemerge the baselayout, as there might have been a change in the initscripts. But beware of updating baselayout, meaning be sure to do an "etc-update" afterwards.

----------

## ExecutorElassus

hmm... so, i re-emerged madwifi-ng, after re-emrging baselayout. modprobed wlan_scan_sta, and wlan_wep. now, it shows that it sees the access point, and i get these:

```
Trying to associate with <MAC address, correct ssid>

Association request to the driver failed

Authentication with <MAC address> timed out
```

over and over in wpa_gui's log files.

so, thanks for helping me fix the modules. now what's wrong? did i not compile a driver option?  

thanks for the help; at least i'm making progress.

EE

----------

## smlgbl

Usually I have to modprobe only ath_pci, that pulls all the other necessary modules in as well.

----------

## ExecutorElassus

for me, it doesn't: i have to modprobe wlan_wep and wlan_scan_sta manually.

that still doesn't get to why the driver doesn't seem able to associate with an access point. i can't seem to connect, and the router still doesn't see the card.

EE

----------

## ExecutorElassus

anybody have any other suggestions? my wifi is still unable to associate with the router. here's what i get now:

```
Trying to associate with <MAC address, correct ssid>

Association request to the driver failed

Authentication with 00:00:00:00:00:00 timed out
```

over and over. what am i doing wrong here?

thanks,

EE

----------

## fernercc

Im using an Orinoco 8470-wd with madwifi-ng drivers. 

However, for some reason i cant get wpa_supplicant to work

i get this:

ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument

Association request to the driver failed

Any suggestion? How did you guys get yours working?

----------

