Realtek 8185: can't connect to AP

Hi!

This is my first post to this forum. Somehow the captcha didn’t work with my browser, so I couldn’t search this forum for my problem, so please excuse if this is a double-post. Anyway, I did search the web; I found a lot, but nothing useful.

I’ve just bought a Digitus DN-7006GT PCI WLAN card with a Realtek 8185 chipset on it. According to the packing it supports WPA and WPA2.

Linux likes the card after the module “rtl8180” is loaded. It’s shown by ifconfig and I can see all the surrounding networks with a “iwlist wlan0 scan”. But I can’t connect to my access point, which uses WPA encryption (I can’t switch it to WEP right now). I’ve tried the traditional method and networkmanager, and both get a timeout while connecting. hwinfo says wpa should be supported (output below).

I’ve also tried ndiswrapper but I got a kernel panic after that.

I’d be happy about any answers (:

kevin

This is the output of networkmanager in dmesg when I try to connect to the AP:

wlan0: authenticate with AP 00:18:9b:70:ef:8e
wlan0: authenticate with AP 00:18:9b:70:ef:8e
wlan0: authenticate with AP 00:18:9b:70:ef:8e
wlan0: authentication with AP 00:18:9b:70:ef:8e timed out
wlan0: authenticate with AP 00:18:9b:70:ef:8e
wlan0: authenticated
wlan0: associate with AP 00:18:9b:70:ef:8e
wlan0: associate with AP 00:18:9b:70:ef:8e
wlan0: associate with AP 00:18:9b:70:ef:8e
wlan0: association with AP 00:18:9b:70:ef:8e timed out
wlan0: authenticate with AP 00:18:9b:70:ef:8e
wlan0: authenticate with AP 00:18:9b:70:ef:8e
wlan0: authenticate with AP 00:18:9b:70:ef:8e
wlan0: authentication with AP 00:18:9b:70:ef:8e timed out
wlan0: deauthenticated
$ uname -rvm
2.6.27.7-9-default #1 SMP 2008-12-04 18:10:04 +0100 x86_64
# hwinfo --wlan
23: PCI 508.0: 0282 WLAN controller
  [Created at pci.318]
  UDI: /org/freedesktop/Hal/devices/pci_10ec_8185
  Unique ID: y9sn.yPceUqvgmU6
  Parent ID: WL76.vuIf6LvchL4
  SysFS ID: /devices/pci0000:00/0000:00:09.0/0000:05:08.0
  SysFS BusID: 0000:05:08.0
  Hardware Class: network
  Model: "Realtek RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller"
  Vendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
  Device: pci 0x8185 "RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller"
  SubVendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
  SubDevice: pci 0x8185
  Revision: 0x20
  Driver: "rtl8180"
  Driver Modules: "rtl8180"
  Device File: wlan0
  Features: WLAN
  I/O Ports: 0xac00-0xacff (rw)
  Memory Range: 0xd9006000-0xd90063ff (rw,non-prefetchable)
  IRQ: 18 (no events)
  HW Address: 00:18:e7:4b:55:04
  Link detected: yes
  WLAN channels: 1 2 3 4 5 6 7 8 9 10 11
  WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462
  WLAN encryption modes: WEP40 WEP104 TKIP CCMP
  WLAN authentication modes: open sharedkey wpa-psk wpa-eap
  Module Alias: "pci:v000010ECd00008185sv000010ECsd00008185bc02sc00i00"
  Driver Info #0:
    Driver Status: rtl8180 is active
    Driver Activation Cmd: "modprobe rtl8180"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #9 (PCI bridge)

AFAIK, the 8185 should work with WPA. Check the contents of
/var/log/NetworkManager for clues to what happened.

I took a look at /var/log/NetworkMananger. Seems like everything works right, besides this:

Feb  1 17:28:45 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  inactive -> scanning
Feb  1 17:28:46 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  scanning -> associating
Feb  1 17:28:56 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  associating -> disconnected
Feb  1 17:28:56 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  disconnected -> scanning
Feb  1 17:28:57 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  scanning -> associating
Feb  1 17:29:07 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  associating -> disconnected
Feb  1 17:29:07 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  disconnected -> scanning
Feb  1 17:29:08 chuck NetworkManager: <info>  (wlan0): supplicant connection state:  scanning -> associating
Feb  1 17:29:09 chuck NetworkManager: <info>  Activation (wlan0/wireless): association took too long.

I tripple checked the password, so I why it’s not connecting?

OK, NM is communicating with wpa_supplicant. I should have mentioned
this before, but you should look at /var/log/wpa_supplicant.log.
Depending on what you see there, we may have to increase the debug
level of the supplicant.

Larry

Sorry, but I don’t know where to increase the debugging level of wpa_supplicant. Where is the configfile to set the parameters of wpa_supplicant? Please be patient with me (:

The current /var/log/wpa_supplicant.log just tells me it’s got a timeout while authenticating.

like-asdf wrote:
> Sorry, but I don’t know where to increase the debugging level of
> wpa_supplicant. Where is the configfile to set the parameters of
> wpa_supplicant? Please be patient with me (:
>
> The current /var/log/wpa_supplicant.log just tells me it’s got a
> timeout while authenticating.

I deliberately didn’t give you the command to increase the
wpa_supplicant debugging level until I was sure we needed it.

The first thing you will need to do is find and kill the running copy
of the supplicant. To do this, issue the command

pa ax | grep supplicant

You will see a line like

3528 ? S 0:02 /usr/sbin/wpa_supplicant -c
/etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log

To kill yours, look at the process ID (the 3528 in my case) and issue
the command

sudo kill -9 XXXX

where XXXX is replaced by that process ID. Next restart the supplicant
with the command

sudo /usr/sbin/wpa_supplicant -c
/etc/wpa_supplicant/wpa_supplicant.conf -i wlan0 -D wext -ddd

The above command should all be on one line - my mailer has probably
wrapped it. This command will run the supplicant in the foreground
with the maximum of debugging output to the terminal. You should be
able to copy and paste some of the output to the forum. Of particular
interest will be the 4-step handshaking process.

Larry

Thanks for your detailed instructions, Larry. I did what you told me, but honestly I don’t have a clue what it is trying to tell me, it just says “no suitable AP found” all the time… O_o

Hopefully you know what this means:

# kill -9 4797; /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0 -D wext -ddd                                                                                                      
Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' 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='wheel' (DEPRECATED)                                                                                                                                                                      
Initializing interface (2) 'wlan0'                                                                                                                                                                             
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf                                                                                                                                                       
  capabilities: key_mgmt 0xf enc 0xf flags 0x0                                                                                                                                                                 
WEXT: Operstate: linkmode=1, operstate=5                                                                                                                                                                       
Own MAC address: 00:18:e7:4b:55:04                                                                                                                                                                             
wpa_driver_wext_set_wpa                                                                                                                                                                                        
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0                                                                                                                                          
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0                                                                                                                                          
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0                                                                                                                                          
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0                                                                                                                                          
wpa_driver_wext_set_countermeasures                                                                                                                                                                            
wpa_driver_wext_set_drop_unencrypted                                                                                                                                                                           
RSN: flushing PMKID list in the driver                                                                                                                                                                         
Setting scan request: 0 sec 100000 usec                                                                                                                                                                        
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                                                                                                                                                                               
Using existing control interface directory.                                                                                                                                                                    
ctrl_interface_group=10 (from group name 'wheel')                                                                                                                                                              
Added interface wlan0                                                                                                                                                                                          
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                                                                                               
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                                                                                              
Wireless event: cmd=0x8b06 len=12                                                                                                                                                                              
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                                                                                               
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                                                                                              
Wireless event: cmd=0x8b06 len=12                                                                                                                                                                              
                                                                                                                                                                                                               
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                                                                                                         
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable                                                                                                                                                           
Failed to get scan results                                                                                                                                                                                     
Failed to get scan results - try scanning again                                                                                                                                                                
Setting scan request: 0 sec 0 usec                                                                                                                                                                             
Starting AP scan (broadcast SSID)                                                                                                                                                                              
Scan requested (ret=0) - scan timeout 5 seconds                                                                                                                                                                
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                                                                                               
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                                                                                              
Wireless event: cmd=0x8b19 len=16                                                                                                                                                                              
Received 2426 bytes of scan results (7 BSSes)                                                                                                                                                                  
CTRL-EVENT-SCAN-RESULTS                                                                                                                                                                                        
No suitable AP found.                                                                                                                                                                                          
Setting scan request: 5 sec 0 usec                                                                                                                                                                             
EAPOL: disable timer tick                                                                                                                                                                                      
No enabled networks - do not scan                                                                                                                                                                              
State: SCANNING -> INACTIVE                                                                                                                                                                                    
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                                                                                               
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                                                                                              
Wireless event: cmd=0x8b19 len=16                                                                                                                                                                              
Received 1848 bytes of scan results (5 BSSes)                                                                                                                                                                  
CTRL-EVENT-SCAN-RESULTS                                                                                                                                                                                        
No suitable AP found.                                                                                                                                                                                          
Setting scan request: 5 sec 0 usec                                                                                                                                                                             
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                                                                                               
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                                                                                              
Wireless event: cmd=0x8b06 len=12                                                                                                                                                                              
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                                                                                               
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                                                                                              
Wireless event: cmd=0x8b04 len=16                                                                                                                                                                              
No enabled networks - do not scan                                                                                                                                                                              
State: INACTIVE -> INACTIVE

Do I have to configure my network manually in wpa_supplicant.conf or is Networkmanager’s configuration sufficient? Thanks again!

kevin

like-asdf wrote:
> Thanks for your detailed instructions, Larry. I did what you told me,
> but honestly I don’t have a clue what it is trying to tell me, it just
> says “no suitable AP found” all the time… O_o

In the scan data, it did not dind an AP with the ESSID you specified.
>
> Do I have to configure my network manually in wpa_supplicant.conf or is
> Networkmanager’s configuration sufficient? Thanks again!

You will need to put your ESSID and WPA secret in wpa_supplicant.conf.

Larry

Okay, I’ve put essid, key_mgmt and key in wpa_supplicant.conf. Now the output is much better, it scans networks and finds my configured one. But this one line is making me sad:

Authentication with 00:ab:cd:ef:ab:cd timed out.

Just to make sure I reconfigured my access point with a new password, but it didn’t help…

Which part of the authentication is failing?

When you enter the bare command ‘/usr/sbin/wpa_supplicant’, which
version does it report?

Larry

Strange thing happened: I just retried connecting to find out, what authentication is failing, and it has connected! But only for a short period: wpa_supplicant connects successfully, then tells me that “Signal quality [is] low”, then the connection fails; it then tries to reconnect and this goes on and on. My access point runs at 100% transmission power, and I have no problem connecting with my laptop where my desktop computer is.

Is there a way to deal with this? Or does it simply just don’t work?

btw: How can I set a module to be loaded at startup? Yast doesn’t recognize my card anymore (after I deleted the card accidentally), and I have to issue “modprobe rtl8180” after every reboot…

Again, thanks for your help!
kevin

EDIT: I just noticed something: Some other networks in my area have about 55% signal strength, but my access point’s signal is only 15%… Maybe this access point is just crap…

like-asdf wrote:
> Strange thing happened: I just retried connecting to find out, what
> authentication is failing, and it has connected! But only for a short
> period: wpa_supplicant connects successfully, then tells me that “Signal
> quality [is] low”, then the connection fails; it then tries to reconnect
> and this goes on and on. My access point runs at 100% transmission
> power, and I have no problem connecting with my laptop where my desktop
> computer is.
>
> Is there a way to deal with this? Or does it simply just don’t work?

I have no experience with the RTL8185, or any other PCI device from
Realtek; however, I have found the Realtek-provided drivers for the
USB devices to be of low quality. They have been translated into
something that is acceptible for in-kernel usage by Linux, but they
still need a lot of TLC.

> btw: How can I set a module to be loaded at startup? Yast doesn’t
> recognize my card anymore (after I deleted the card accidentally), and I
> have to issue “modprobe rtl8180” after every reboot…

YaST => System => /etc/sysconfig Editor => System => Kernel =>
MODULES_LOADED_ON_BOOT

Larry

Thank you very much, Larry, I really appreciate your help!

regards, kevin