Enable RTL8192CU usb0 Wireless connection...

Hi, all:

I’ve been stuck at RTL8192CU wireless connection on my beaglebone. I tried the solution here http://gencarelle.com/blog/2013/07/19/problems-with-rtl8188cus/ . With the wired connection, the current situation on my beaglebone is like:

`
1)
ubuntu@arm:~$ lsusb
Bus 001 Device 002: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ubuntu@arm:~$ lsmod | grep 8192
8192cu 535620 0

ubuntu@arm:~$ cat /etc/network/interfaces

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

auto eth0
iface eth0 inet dhcp

Example to keep MAC address between reboots

#hwaddress ether DE:AD:BE:EF:CA:FE

WiFi Example

auto wlan0
iface wlan0 inet dhcp
wpa-ssid “MYSSID”
wpa-psk “PASSWORD”

Ethernet/RNDIS gadget (g_ether)

… or on host side, usbnet and random hwaddr

iface usb0 inet static

address 192.168.1.50

netmask 255.255.255.0

network 192.168.1.0

gateway 192.168.1.1

ubuntu@arm:~$ ifconfig
eth0 Link encap:Ethernet HWaddr d4:94:a1:8e:d6:eb
inet addr:192.168.1.41 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::d694:a1ff:fe8e:d6eb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:330 errors:0 dropped:0 overruns:0 frame:0
TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32330 (32.3 KB) TX bytes:31436 (31.4 KB)
Interrupt:56

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 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
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr 9a:e2:fb:a9:24:de
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
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)

wlan0 Link encap:Ethernet HWaddr 00:e0:4c:14:4b:30
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)

`

My questions are:

  1. What is usb0? Is it corresponding to the usb wireless adapter? But, I think the usb wireless adapter should be corresponding to wlan0 .
  2. My own intranet’s gateway is: 192.168.1.1 . I just want to realize wireless connection by using my RTK8192CU USB wireless adapter, instead of the Wired connection. How should I proceed?? The current phenomenon is: whenever I plugged out the Wired connection, my router seems to be unable to detect the wireless device on this beaglebone. However, if I plugged the wire into my beaglebone, I got the above quoted phenomenon, but still, no wireless connection.

Can anybody help please?

Best Regards
Pei

Hi Pei,

Responses inline -

My questions are:

  1. What is usb0? Is it corresponding to the usb wireless adapter? But, I think the usb wireless adapter should be corresponding to wlan0 .

usb0 is the mini usb port used when first setting up the BBB - i.e. your fall back, everything has gone wrong, usb connect directly to a PC adapator. This is what allows you to browse or ssh to 192.168.7.2 when you first turn on the BBB. It is not related to your wifi issue.

  1. My own intranet’s gateway is: 192.168.1.1 . I just want to realize wireless connection by using my RTK8192CU USB wireless adapter, instead of the Wired connection. How should I proceed?? The current phenomenon is: whenever I plugged out the Wired connection, my router seems to be unable to detect the wireless device on this beaglebone. However, if I plugged the wire into my beaglebone, I got the above quoted phenomenon, but still, no wireless connection.

So I spent a full week banging my head against a wall trying to get my RTL8188CUS working. In my case, having followed the same guide as you to get the latest and greatest drivers I ended up with a similar issue of a seemingly blank config for my wlan0 ifconfig results. This was particularly apparent if I plugged in via USB, opened up 2 ssh sessions via the 192.168.7.2 interface, then ran an “ifdown wlan0, ifup wlan0”. This would lead to endless DHCPDISCOVER requests being printed to the screen with no address being assigned. (The second ssh window is so that you can ifdown wlan0 to stop the DHCPDISCOVER requests.)

In my case, it was a simple power issue. I read in some forums that having the ethernet adaptor plugged in at the same time as wlan0 could also cause confusion. As such my working setup was to use the external powersupply AS WELL AS the usb being plugged into something at the same time with just the usb wifi dongle and nothing else attached. For example you could use an iphone charger to provide a little extra usb power in addition to the wall power supply, and worst case move the entire monstrosity very close to your WiFi router to give it the best possible signal.

The single power cord solution was to purchase a powered USB hub and that is now feeding power into my BB from one port, the main port of the usb hub is fed into the full usb port of the BBB, and the wifi adaptor is in another powered USB port. This all kind of sucks, but it fixed my problems with WiFi. However, even now, there are plenty of instances where i will lose pings for a while. SSH session disconnects etc. I also discovered that of my 2 wifi routers both running wpa2 security, one was far easier to connect to despite being further away.

Anyway, I have a working setup even if it is ugly to look at! I think I may try a different wifi adaptor to see if I can get it working with just the wall power supply and nothing else attached.

Hope this helps!

Hi, there seems to be some progress here.

I now can log onto BB with the USB wireless adapter with the Ethernet cable unplugged. The following info is after I log onto BB

`

ubuntu@arm:~$ ifconfig
eth0 Link encap:Ethernet HWaddr d4:94:a1:8e:d6:eb
inet addr:192.168.1.41 Bcast:192.168.1.255 Mask:255.255.255.0
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)
Interrupt:56

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 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
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr 16:e3:2a:38:85:72
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
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)

wlan0 Link encap:Ethernet HWaddr 00:e0:4c:14:4b:30
inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fe14:4b30/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:291 errors:0 dropped:304 overruns:0 frame:0
TX packets:257 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:43731 (43.7 KB) TX bytes:41502 (41.5 KB)

`

It’s weird that even if the Ethernet is unplugged, I’m still able to ping the Ethernet port, as well as the wireless USB adapter. How come I can ping the Ethernet without having it plugged?

Well, there are a lot of package loss though, both the wired and wireless connection.

`

…:~$ ping 192.168.1.41
PING 192.168.1.41 (192.168.1.41) 56(84) bytes of data.
64 bytes from 192.168.1.41: icmp_req=1 ttl=64 time=57.8 ms
64 bytes from 192.168.1.41: icmp_req=2 ttl=64 time=2.57 ms
64 bytes from 192.168.1.41: icmp_req=3 ttl=64 time=1.39 ms
64 bytes from 192.168.1.41: icmp_req=7 ttl=64 time=8.50 ms
64 bytes from 192.168.1.41: icmp_req=15 ttl=64 time=9.02 ms
64 bytes from 192.168.1.41: icmp_req=21 ttl=64 time=1.64 ms
64 bytes from 192.168.1.41: icmp_req=27 ttl=64 time=6.10 ms
^C
— 192.168.1.41 ping statistics —
27 packets transmitted, 7 received, 74% packet loss, time 26160ms
rtt min/avg/max/mdev = 1.394/12.438/57.812/18.752 ms
…:~$ ping 192.168.1.50
PING 192.168.1.50 (192.168.1.50) 56(84) bytes of data.
64 bytes from 192.168.1.50: icmp_req=5 ttl=64 time=8.51 ms
64 bytes from 192.168.1.50: icmp_req=10 ttl=64 time=1.53 ms
64 bytes from 192.168.1.50: icmp_req=11 ttl=64 time=1.49 ms
64 bytes from 192.168.1.50: icmp_req=12 ttl=64 time=4.15 ms
64 bytes from 192.168.1.50: icmp_req=15 ttl=64 time=1.50 ms
64 bytes from 192.168.1.50: icmp_req=21 ttl=64 time=7.97 ms
64 bytes from 192.168.1.50: icmp_req=27 ttl=64 time=4.84 ms
^C
— 192.168.1.50 ping statistics —
29 packets transmitted, 7 received, 75% packet loss, time 28165ms
rtt min/avg/max/mdev = 1.494/4.288/8.515/2.802 ms

`

Both the wired or wireless connections have about 75% packat loss. Why is it so?

Cheers
Pei