[WIFI] Realtek RTL8192CU "fakes" connection

Hello all,

I’ve bought a Realtek RTL8192CU USB Wifi antenna which on Windows 7 is working like a charm.

On Suse (latest stable, kernel 3.7.10-1.16-desktop) it just misbehaves…

Here’s all the settings I’ve tried on NetworkManager, after selecting my WPA-2 protected wifi network:

|**IP
|
**|**SUBNET MASK
**|**GATEWAY
**|**DNS
**|**RESULT
**|
|Auto||||Can’t Connect|
|192.168.1.102|(Automatically 2555.2555.255.0)|||“Connected”
(Doesn’t even ping Google or router)|
|(as above)
|(as above)
|192.168.1.1
(router)
||(as above)
|
|(as above)
|(as above)
||8.8.8.8
8.8.4.4|(as above)|
|(as above)|(as above)|192.168.1.1
(router)|(as above)|(as above)|

As you can see, whatever I do I end up without internet, most of the time after having been given false hopes by the stupid applet

Any suggestion will be very welcome.

Please always state which version of openSUSE you use (no, not the “latest” because opinions may differ and when people visit this thread in two years because the find it with Google or likewise, they have to do a lot of guessing).
When you realy do not know, then please the output of

cat /etc/SuSE-release

Then on network connection problems. The general way of working is:

a) is the NIC up and does it have an IP address?

/sbin/ifconfig -a

b) when the above seems to be OK, you must be able to ping the router:

ping -c1 192.168.1.1

c) when that is OK, check if the router is in the route table for the default route:

/sbin/route -n

d) when that is OK, check if you can go to the internet with:

ping -c1 130.57.66.6

e) when that is OK, you can go to the internet, only thing to check now is if you can resolve host/domain names:

host forums.opensuse.org

Walk this path until you get stuck and report back
(Please use CODE tags around the prompt/command/output/next prompt sections you copy/paste from the terminal. You get the CODE tags by clicking on the # button in the tool bar of the post editor).

I apologise, I thought kernel version would suffice.

**Do you need NetworkManager/KDE version as well?

**

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 14:DA:E9:CC:1E:E8  
          UP BROADCAST 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:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:28 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1400 (1.3 Kb)  TX bytes:1400 (1.3 Kb)

wlan0     Link encap:Ethernet  HWaddr 00:E0:4C:12:E4:40  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1296 (1.2 Kb)  TX bytes:3110 (3.0 Kb)

Of course the one I’m having trouble with is wlan0


# ping -c1 192.168.1.1
connect: Network is unreachable


# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

Now what?

Already in the first step you can see that wlan0 is not up and has no IP address. So we should concentrate on getting the NIC up and running in the first place. All other things like routes and DNS comes later.

Now you seem to us NetworkManager with which I am not afluent. Thus either we can wait for somebody that knows more about NM and your WiFI card to tune in, or we can try to configure it using YaST with ifup. Just o see if we can get it functioning and then trying to switch to NM later.

YaST > Netwotk Devices > Network Settings. In the tab Global options choose for Traditional method with ifup. Then back to the tab with the list of devices, Choose your wlan0 device and cllick Edit belw. Then go through the movements there and see if you can get it runing. I guess you want to use DHCP.

Before I read the last answer I had rebooted and tried that on my openSuse 12.3…

I did all the steps through YAST and then rebooted (just to be sure).
NetworkMonitor showd some spikes in up/down data (never more than some kb) every few seconds, as if it was sending something. But it would not connect.

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 14:DA:E9:CC:1E:E8  
          BROADCAST 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:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:28 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1400 (1.3 Kb)  TX bytes:1400 (1.3 Kb)

wlan0     Link encap:Ethernet  HWaddr 00:E0:4C:12:E4:40  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:306 (306.0 b)  TX bytes:13320 (13.0 Kb)
          

So I tried following a guide that was inside the USB-WiFi optic disc…
I deleted all Yast configuration for the WiFi, rebooted and:

(The wpa.conf in my home was the one provided on the disc, Retino i)


# wpa_supplicant -Dwext -iwlan0 -c/home/simone/wpa.conf -B
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

# wpa_cli -p/var/run/wpa_supplicant scan
Selected interface 'wlan0'
OK

# wpa_cli -p/var/run/wpa_supplicant scan_results
Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
00:1d:8b:52:12:38       2412    -44     [WPA-PSK-TKIP][ESS]     FASTWEB-1-001D8B521238
a0:f3:c1:45:cb:96       2412    -44     [WPA2-PSK-TKIP+CCMP][ESS]       Retino
00:24:89:82:06:16       2462    -44     [WPA2-PSK-CCMP][ESS]    Vodafone-23328426


# wpa_cli -p/var/run/wpa_supplicant ap_scan 1
Selected interface 'wlan0'
OK

# wpa_cli -p/var/run/wpa_supplicant add_network
Selected interface 'wlan0'
0

# wpa_cli -p/var/run/wpa_supplicant set_network 0 ssid '"Retino"'
Selected interface 'wlan0'
OK

# wpa_cli -p/var/run/wpa_supplicant set_network 0 psk '"********"'
Selected interface 'wlan0'
OK

# wpa_cli -p/var/run/wpa_supplicant select_network 0
Selected interface 'wlan0'
OK

# wpa_cli -p/var/run/wpa_supplicant save_config
Selected interface 'wlan0'
OK

# wpa_cli -p/var/run/wpa_supplicant status
Selected interface 'wlan0'
bssid=a0:f3:c1:45:cb:96
ssid=Retino
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
address=00:e0:4c:12:e4:40

But still nothing, no connection, no pinging, and the same route -n as before, using ifup…

Just a little couriosity of mine: is wlan0 supposed to have link encap as “Ethernet”?

Also, since it is a USB wifi, do you need lsusb or something like that? Or a modprobe something since the driver is included in the kernel?

To begin with, I am not a WiFi expert (and btw why didn’t you postthis in the Wireless sub-forum where the wireless gurus are?). But IMHO when the device wlan0 is there, this means that the device is recocnised (and you can indeed see with lsusb if it is there and what sort of device it is) and also that the firmware is loaded (if thatis needed with this device, I do not know). You can see if there has been some firmware loading by looking with dmesg.

BTW when you configure using “traditional with ifup” in YaST, NM will not show any decent information imho. Thus after configuring with YaST, check what the result is with:

/sbin/ifconfig wlan0

(different from tthe earlier -a we used, because we know now that wlan0 is available).

Also, to see what YaST made out of your configuratiopnn efforts, you can see the rsults of them:

su -c 'cat /etc/sysconfig/network/ifcfg-wlan0'

When you want to post that here, take care to make your passphrases unreadable.

Oh dear, I was sure this was the wifi subforum! Hope some mod can move the thread…

Here’s the stuff:


# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:E0:4C:12:E4:40  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:306 (306.0 b)  TX bytes:6442 (6.2 Kb)


# cat /etc/sysconfig/network/ifcfg-wlan0
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME='802.11n WLAN Adapter'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='hotplug'
USERCONTROL='no'
WIRELESS_AP=''
WIRELESS_AP_SCANMODE='1'
WIRELESS_AUTH_MODE='psk'
WIRELESS_BITRATE='auto'
WIRELESS_CA_CERT=''
WIRELESS_CHANNEL=''
WIRELESS_CLIENT_CERT=''
WIRELESS_CLIENT_KEY=''
WIRELESS_CLIENT_KEY_PASSWORD=''
WIRELESS_DEFAULT_KEY='0'
WIRELESS_EAP_AUTH=''
WIRELESS_EAP_MODE=''
WIRELESS_ESSID='Retino'
WIRELESS_FREQUENCY=''
WIRELESS_KEY=''
WIRELESS_KEY_0=''
WIRELESS_KEY_1=''
WIRELESS_KEY_2=''
WIRELESS_KEY_3=''
WIRELESS_KEY_LENGTH='128'
WIRELESS_MODE='Managed'
WIRELESS_NICK=''
WIRELESS_NWID=''
WIRELESS_PEAP_VERSION=''
WIRELESS_POWER='no'
WIRELESS_WPA_ANONID=''
WIRELESS_WPA_IDENTITY=''
WIRELESS_WPA_PASSWORD=''
WIRELESS_WPA_PSK='********'
PREFIXLEN='24'

This thread is CLOSED for the moment and will be moved to Wireless.

Moved from Network/Internet and open again.

Your config looks OK to me (but, as said, I am no real WiFi guru).

And the ifconfig says it is up. but no IP address.

Is there anything in

dmesg

E.g. the config says it must be started on hotplug. You good remove and reconnect the device and then look at the end of dmesg.

Thanks.

#dmesg 
  155.780997] usb 1-5: new high-speed USB device number 4 using ehci_hcd
  155.896830] usb 1-5: New USB device found, idVendor=0bda, idProduct=8178
  155.896833] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
  155.896836] usb 1-5: Product: 802.11n WLAN Adapter
  155.896838] usb 1-5: Manufacturer: Realtek
  155.896840] usb 1-5: SerialNumber: 00e04c000001
  155.897493] rtl8192cu: Chip version 0x11
  155.975752] rtl8192cu: MAC address: 00:e0:4c:12:e4:40
  155.975757] rtl8192cu: Board Type 0
  155.975998] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
  155.976029] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin
  155.976204] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
  155.977366] rtlwifi: wireless switch is on
  156.141230] rtl8192cu: MAC auto ON okay!
  156.174258] rtl8192cu: Tx queue select: 0x05
  156.549498] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

On 07/27/2013 01:56 PM, simosito wrote:
>
> Thanks.
>
>
> Code:
> --------------------
> #dmesg
> 155.780997] usb 1-5: new high-speed USB device number 4 using ehci_hcd
> 155.896830] usb 1-5: New USB device found, idVendor=0bda, idProduct=8178
> 155.896833] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> 155.896836] usb 1-5: Product: 802.11n WLAN Adapter
> 155.896838] usb 1-5: Manufacturer: Realtek
> 155.896840] usb 1-5: SerialNumber: 00e04c000001
> 155.897493] rtl8192cu: Chip version 0x11
> 155.975752] rtl8192cu: MAC address: 00:e0:4c:12:e4:40
> 155.975757] rtl8192cu: Board Type 0
> 155.975998] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
> 155.976029] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin
> 155.976204] ieee80211 phy1: Selected rate control algorithm ‘rtl_rc’
> 155.977366] rtlwifi: wireless switch is on
> 156.141230] rtl8192cu: MAC auto ON okay!
> 156.174258] rtl8192cu: Tx queue select: 0x05
> 156.549498] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Why is the link not ready? Now that this thread is in the wireless for
um, you need to read the stickies. There is a lot of good info there.

I read the sticky, as suggested. As far as I can tell I have done all the tests that are written there…

I’m sorry to be such a pain in the alpaca, but I have zero experience with WiFi and 0.1 with internet-related linux stuff. Always used ethernet without having to configure anything, I’m spoiled that way :wink:

On 07/28/2013 09:36 AM, simosito wrote:
>
> I read the sticky, as suggested. As far as I can tell I have done all
> the tests that are written there…
>
> I’m sorry to be such a pain in the alpaca, but I have zero experience
> with WiFi and 0.1 with internet-related linux stuff. Always used
> ethernet without having to configure anything, I’m spoiled that way :wink:

I have not seen the output of ‘iwconfig’. It tells a lot more than ifconfig for
wireless.

There has been a lot of work on the rtl8192cu driver that does not appear until
kernel 3.10. I’m not sure if that has appeared in compet-wireless yet. That
would be a good place to start. If that does not help, then follow the
instructions at http://en.opensuse.org/openSUSE:Kernel_of_the_day to implement a
3.10 or 3.11 kernel.

Thank you. I shall move my PC near a working ethernet cable and try with a more recent kernel.
As soon as I’ve moved the PC I’ll post you the iwconfig.

**SOLVED
**

Apparently compet-wireless had changed name to compat-drivers and then simply backport.

What I did to get my wifi to work:

-Download and decompress backports-3.10-2

zypper in ncurses-devel

(error using make, couldn’t find ncurses.h)

make defconfig-wifi

(make menuconfig returned a symbol error)

make -j4
su

(make install must be done as root)

make install
  • Reboot.

And now my wifi is working.
(Should be working from my room as well, so we can mark the topic as solved if you don’t hear me complaining in the next 10-30 minutes)

Thank you for your help.

One question, though, next time I zypper up my kernel (I’m guessing we’re going to get 3.8 or 3.9 before we get 3.10-2) do I have to reinstall the backport modules?

**NOT SOLVED

**Just after hitting reply the connection died

 # iwconfig 
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off

If I run iwconfig whilst Yast is updating its configuration after scanning for networks:

# iwconfig 
wlan0     IEEE 802.11bgn  ESSID:"Retino"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: A0:F3:C1:45:CB:96   
          Bit Rate=150 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-39 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Then as soon as Yast is done, no wifi.

On 07/28/2013 01:36 PM, simosito wrote:
>
> *NOT SOLVED
>
> *Just after hitting reply the connection died
> Code:
> --------------------
> # iwconfig
> wlan0 IEEE 802.11bgn ESSID:off/any
> Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
> Retry long limit:7 RTS thr=2347 B Fragment thr:off
> Encryption key:off
> Power Management:off
> --------------------
>
>
> If I run iwconfig whilst Yast is updating its configuration after
> scanning for networks:
>
> Code:
> --------------------
> # iwconfig
> wlan0 IEEE 802.11bgn ESSID:“Retino”
> Mode:Managed Frequency:2.412 GHz Access Point: A0:F3:C1:45:CB:96
> Bit Rate=150 Mb/s Tx-Power=20 dBm
> Retry long limit:7 RTS thr=2347 B Fragment thr:off
> Encryption key:off
> Power Management:off
> Link Quality=70/70 Signal level=-39 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>
> --------------------
>
>
> Then as soon as Yast is done, no wifi.

Once the connection is made, the disconnect info will be in the output of the
dmesg command.

Yes, you will need to upgrade the compat-wireless package for every kernel
change, just as you need to do for any out-of-kernel driver.

So… After posting the last message I rebooted, opened a console, told my PC to ping the router, turned the screen off and watch TV for more than a hour. When I went back, it was still connected.

I moved the PC back to my room, and went to sleep. This morning I turned it on again.

This is after booting, no internet

#ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.104 icmp_seq=1 Destination Host Unreachable
#dmesg
  313.974478] wlan0: authenticate with a0:f3:c1:45:cb:96
  313.999329] wlan0: send auth to a0:f3:c1:45:cb:96 (try 1/3)
  314.099405] wlan0: send auth to a0:f3:c1:45:cb:96 (try 2/3)
  314.200172] wlan0: send auth to a0:f3:c1:45:cb:96 (try 3/3)
  314.300871] wlan0: authentication with a0:f3:c1:45:cb:96 timed out
  320.965569] wlan0: authenticate with a0:f3:c1:45:cb:96
  320.990650] wlan0: send auth to a0:f3:c1:45:cb:96 (try 1/3)
  321.000921] wlan0: authenticated
  321.002004] wlan0: associate with a0:f3:c1:45:cb:96 (try 1/3)
  321.009024] wlan0: RX AssocResp from a0:f3:c1:45:cb:96 (capab=0x411 status=0 aid=1)
  321.009092] wlan0: associated
# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"Retino"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: A0:F3:C1:45:CB:96   
          Bit Rate=1 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=67/70  Signal level=-43 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Then after 5 minutes (still no internet, of course)

# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off
#dmesg
  411.870368] wlan0: authenticate with a0:f3:c1:45:cb:96
  411.894929] wlan0: send auth to a0:f3:c1:45:cb:96 (try 1/3)
  411.995775] wlan0: send auth to a0:f3:c1:45:cb:96 (try 2/3)
  412.096541] wlan0: send auth to a0:f3:c1:45:cb:96 (try 3/3)
  412.197165] wlan0: authentication with a0:f3:c1:45:cb:96 timed out