# No suitable AP found? D-Link DWL-G630 Issue

## xheotris

I recently started converting my Inspiron 8200 notebook into a gentoo machine. It's been up and running and working great for me. I sat down today with the thought that I would try to get my wireless card to work on it, and... no go. It seems that I have a problem when scanning for an AP. Apparently there are none in the area according to my notebook, however my desktop (which is running windows) tells me that there are about 10 different access points near by, all encrypted. I really don't know what I'm doing with this, and what I have here is a basic understanding and information found from different sources thrown into a blender. I'm going to provide as much information below, and if more is needed please let me know. I would love to get this no AP issue solved.

The wireless card I am using is a D-Link AirPlusG (DWL-G630)

```
07:00.0 Ethernet controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)
```

I have installed madwifi-ng, wpa_supplicant, and wireless-tools and whatever was related to them. I also followed from the madwifi.org website their gentoo install instructions. This is the /etc/init.d/net.wifi0 file which autoloads whenever the card is inserted and unloaded when the card is removed

```
#!/sbin/runscript

depend() {

   need localmount

}

start () {

   ebegin "Configure madwifi-ng devices & loading necessary modules"

   modprobe wlan_tkip

   wlanconfig ath0 create wlandev wifi0 wlanmode sta

   wlanconfig wmon1 create wlandev wifi0 wlanmode monitor

   eend 0

}

stop () {

   ebegin "Removing modules to leave a clean slate :-)"

   rmmod wlan_tkip

   rmmod wlan_acl

   rmmod wlan_ccmp

   rmmod wlan_wep

   rmmod wlan_xauth

   rmmod ath_pci

   rmmod ath_rate_sample

   rmmod ath_rate_onoe

   rmmod ath_rate_amrr

   rmmod ath_hal

   rmmod wlan_scan_ap

   rmmod wlan

   eend 0

}
```

The following is what is inserted into my dmesg after the card is inserted

```
pccard: CardBus card inserted into slot 1

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

wlan: 0.8.4.2 (0.9.2.1)

ath_rate_sample: 1.2 (0.9.2.1)

ath_pci: 0.9.4.5 (0.9.2.1)

PCI: Enabling device 0000:07:00.0 (0000 -> 0002)

ACPI: PCI Interrupt 0000:07:00.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

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: H/W encryption support: WEP AES AES_CCM TKIP

wifi0: mac 7.8 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

wifi0: Atheros 5212: mem=0xf6000000, irq=11

unable to load wlan_scan_monitor
```

And here's my lsmod

```
wlan_tkip               9984  0 

wlan_scan_ap            3488  0 

ath_pci                65024  0 

ath_rate_sample         8640  1 ath_pci

wlan                  130748  5 wlan_tkip,wlan_scan_ap,ath_pci,ath_rate_sample

ath_hal               175600  3 ath_pci,ath_rate_sample
```

/etc/conf.d/net

```
modules=( "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

wpa_timeout_ath0=60

mode_ath0="managed"

config_ath0=( "dhcp" )

dhcpcd_ath0="-t 10"
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
network={

   key_mgmt=NONE

   priority=-9999999

}

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

   ssid="teh place?"

   key_mgmt=WPA-PSK

   proto=WPA

   pairwise=CCMP TKIP

   group=CCMP TKIP

   scan_ssid=0

   psk="this is where the pass phrase goes and I dont know what to do about spaces"

}
```

After all of that information is included and I plug in my card my iwconfig gives me an output of

```
ath0      IEEE 802.11b  ESSID:""  

          Mode:Master  Channel:0  Access Point: Not-Associated   

          Bit Rate:0 kb/s   Tx-Power:0 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:0  Rx invalid crypt:0  Rx invalid frag:0

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

wmon1     IEEE 802.11b  ESSID:""  

          Mode:Monitor  Channel:0  Access Point: Not-Associated   

          Bit Rate:0 kb/s   Tx-Power:0 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:0  Rx invalid crypt:0  Rx invalid frag:0

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

I run ifconfig ath0 up and I get

```
ath0      Link encap:Ethernet  HWaddr 00:13:46:13:4B:D6  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

wifi0     Link encap:UNSPEC  HWaddr 00-13-46-13-4B-D6-AC-45-00-00-00-00-00-00-00-00  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:148 errors:0 dropped:0 overruns:0 frame:1547

          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:199 

          RX bytes:14422 (14.0 Kb)  TX bytes:506 (506.0 b)

          Interrupt:11 Memory:e0d60000-e0d70000 
```

If I run an iwlist ath0 scan it gives me ath0       No scan results.

When I run the wpa_supplicant -dd -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf I recieve:

```
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'

Line: 3 - start of a new network block

key_mgmt: 0x4

priority=-9999999 (0xff676981)

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group='0' (DEPRECATED)

eapol_version=1

ap_scan=1

fast_reauth=1

Line: 13 - start of a new network block

ssid - hexdump_ascii(len=9):

     1a 2b 3c 4d 5e 6f 7a 8b 9c                        teh place?       

key_mgmt: 0x2

proto: 0x1

pairwise: 0x18

group: 0x18

scan_ssid=0 (0x0)

PSK (ASCII passphrase) - hexdump_ascii(len=28): [REMOVED]

PSK (from passphrase) - hexdump(len=32): [REMOVED]

Priority group 0

   id=1 ssid='teh place?'

Priority group -9999999

   id=0 ssid=''

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

Could not configure driver to use managed mode

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: 00:13:46:13:4b:d6

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=0

Added interface ath0

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 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

Selecting BSS from priority group -9999999

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

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

Wireless event: cmd=0x8b19 len=8

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

Selecting BSS from priority group -9999999

No suitable AP found.

Setting scan request: 5 sec 0 usec
```

I seem to get the last loop repeated where it says it's starting to scan, then it can't find anything, then it starts anew again. Any help is appreciated. Thanks!

----------

## rockdw

Assuming everything else is working, are any of the ap's you are trying to hit ssid broadcast disabled?  You may need to add something like this to your /etc/conf.d/net:

associate_order="forceany"

I just figured out that the setting I had was shooting myself in the foot.  My AP was broadcast disabled, and I was using "preferredonly", which works only with visible APs.  I changed to "forcepreferred" and life is good again.  :Smile: 

----------

## xheotris

The AP is not set to disable broadcasting, and I know there are many other AP's which should appear, but don't. I've kinda given up on getting this card to work (mostly since my boyfriend sold it). When I have suitable financial funds I will do research for a card that "works" and go with that.

----------

