RTL8188SU USB Wifi Success

After giving up on my Realtek RTL8192 based adapter, I went to the
store and bought four different USB wifi adapters. Luckily I got the
first and cheapest one going.

It has an RTL8188SU chip inside. For some reason it seems to use the
r8712u driver kernel module. I copied the firmware blobs over from my
ubuntu box. Connmand complains that it's an unsupported driver. I
disabled connmand and edited the wpa supplicant config file and let
wpa supplicant bring it up with WPA PSK encryption. For whatever
reason dhcp didn't want to talk to wlan0 so I configured it by hand. I
haven't done any heavy lifting but I can at least ssh into it.

This adapter goes by the name of "Belkin N150", purchased at Walmart.

I have been unsuccessfully trying to get an ASUS USB-N10 to work and
it has the same chip. I was able to get it to talk to the access
point using WPA PSK, but it wouldn't get an IP address. After that, I
couldn't get it to load the firmware again. Which firmware did you
copy? Was there more than one file?

I just scp'ed it over from my laptop which is running whatever the
newest ubuntu is. Presumably rtl8712u.bin is the important one. It
won't load the firmware until I run wpa_supplicant, I have no idea why
not.

root@beaglebone:/lib/firmware/rtlwifi# md5sum *
748944fbffd3b08b5b1929bb6c7fc537 rtl8192cfw.bin
943e9b714a926e630b8152d7aad91d2e rtl8192cufw.bin
7a3b61dbd72e0efb22f892ece8020994 rtl8192defw.bin
bccf9bf2276621770f101a60736b4004 rtl8192sefw.bin
8e6396b5844a3e279ae8679555dec3f0 rtl8712u.bin

Here's the script I cobbled up to bring it up

root@beaglebone:~# cat wlan0-up.sh
ifdown wlan0
killall wpa_supplicant
nohup wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf &
ifconfig wlan0 192.168.0.11
route add default gw 192.168.0.1
echo nameserver 8.8.8.8 > /etc/resolv.conf

here's the relevant bit of my wpa_supplicant.conf

# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid
ciphers
network={
  ssid="n1ywb"
  psk="mypassword"
  priority=5
}

# Same as previous, but request SSID-specific scanning (for APs that
reject
# broadcast SSID)
network={
  ssid="n1ywb"
  scan_ssid=1
  psk="mypassword"
  priority=2
}

Here's the log

2011-12-11T16:20:04+00:00 beaglebone connmand[104]: wlan0 {add}
address 192.168.0.11/24 label wlan0 family 2
2011-12-11T16:20:04+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {add} address 192.168.0.11/24 label wlan0 family 2
2011-12-11T16:20:04+00:00 beaglebone wpa_supplicant: Libgcrypt
warning: missing initialization - please fix the application
2011-12-11T16:20:04.587891+00:00 beaglebone kernel: [ 70.038135]
r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
2011-12-11T16:20:05.327829+00:00 beaglebone kernel: [ 70.770787]
r8712u: 1 RCR=0x153f00e
2011-12-11T16:20:05.327944+00:00 beaglebone kernel: [ 70.771360]
r8712u: 2 RCR=0x553f00e
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: wlan0 {update}
flags 4163 <UP,RUNNING>
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 operstate 0 <UNKNOWN>
2011-12-11T16:20:05+00:00 beaglebone avahi-daemon[103]: Joining mDNS
multicast group on interface wlan0.IPv4 with address 192.168.0.11.
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {update} flags 4163 <UP,RUNNING>
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 operstate 0 <UNKNOWN>
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: wlan0 {add} route
192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {add} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
2011-12-11T16:20:05+00:00 beaglebone avahi-daemon[103]: New relevant
interface wlan0.IPv4 for mDNS.
2011-12-11T16:20:05+00:00 beaglebone avahi-daemon[103]: Registering
new address record for 192.168.0.11 on wlan0.IPv4.
2011-12-11T16:20:05.447926+00:00 beaglebone kernel: [ 70.893368]
ADDRCONF(NETDEV_UP): wlan0: link is not ready
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: wlan0 {add} route
0.0.0.0 gw 192.168.0.1 scope 0 <UNIVERSE>
2011-12-11T16:20:05+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {add} route 0.0.0.0 gw 192.168.0.1 scope 0 <UNIVERSE>
2011-12-11T16:20:06+00:00 beaglebone connmand[104]: wlan0 {update}
flags 4099 <UP>
2011-12-11T16:20:06+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:06+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 operstate 5 <DORMANT>
2011-12-11T16:20:06+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {update} flags 4099 <UP>
2011-12-11T16:20:06+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:06+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 operstate 5 <DORMANT>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {add} route
fe80:: gw :: scope 0 <UNIVERSE>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {update}
flags 69635 <UP,LOWER_UP>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 operstate 5 <DORMANT>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {update} flags 69635 <UP,LOWER_UP>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 operstate 5 <DORMANT>
2011-12-11T16:20:11.477929+00:00 beaglebone kernel: [ 76.921493]
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {RX} 2
packets 304 bytes
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {TX} 3
packets 400 bytes
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {update}
flags 69699 <UP,RUNNING,LOWER_UP>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: wlan0 {newlink}
index 3 operstate 6 <UP>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {RX} 2 packets 304 bytes
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {TX} 3 packets 400 bytes
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {update} flags 69699 <UP,RUNNING,LOWER_UP>
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 address 08:86:3B:43:3F:D1 mtu 1500
2011-12-11T16:20:11+00:00 beaglebone connmand[104]: connmand[104]:
wlan0 {newlink} index 3 operstate 6 <UP>
2011-12-11T16:20:13+00:00 beaglebone avahi-daemon[103]: Registering
new address record for fe80::a86:3bff:fe43:3fd1 on wlan0.*.

rtl8712u.bin is identical to the one I have. As I said in my other
post, sometimes the firmware loads and sometimes it gets an error.
With intermittent results like that I would suspect a hardware
problem, but the adapter works perfectly under Fedora. When it does
come up, I am doing almost exactly what you are doing bringing up
wpa_supplicant and setting a static IP, but I can't ping the gateway.

Well, it turns out there was indeed a hardware problem. Not with the
wireless adapter, but with the Beaglebone. It was occasionally
hanging and sometimes would have difficulty booting. It finally
reached the point where it would not boot at all. Hopefully when it
comes back from the Beagle Hospital the wireless adapter will work
without further screwing around.

We shall see. No HW issue has been confirmed until we look at it.

Gerald

Thank you!

I got it to work on my ASUS USB-N10 using your instructions.

I must run wpa_supplicant manually to make it work, also it doesn’t pick up an IP address from the router’s dhcp server.

Any idea how to provide the config file to the wpa_supplicant instance that is already setup to run at boot ?

Can wpa_supplicant take care of DHCP as well?

A.

I made some progress that I’d like to share here:

I changed /etc/network/interfaces to:

`

The loopback interface

auto lo
iface lo inet loopback

Wireless interfaces

auto wlan0
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant_MY_NETWORK.conf
`

wpa_supplicant_MY_NETWORK.conf is configured with my router’s SSID,…

It works if I run after boot
/etc/init.d/networking restart

It picks up an IP and works fine. But I want this to happen automatically during the startup. I tried using the above command as a service using systemctl,… but I think it should be simpler than that.

Any idea?
thx

Hi,

you are, probably using connman, as it is standard in recent angstrom
distribution.
It has completely new configuration.

You don't need to specify anything in the /etc/network/interfaces and
in the wpa_supplicant.

So, here is your bonus guide for connman (I'm typing this by memory,
there are could be some errors)

0. Restart you beagle.

1. Enable Wi-Fi in connman by editing /var/lib/connman/setting
look for section

[WiFi]
Enable=true

2. Restart connman
   systclt restart connman.service

3. install package connman-tools and connman-test. Maybe it will
require additionally python-gobject.
4. Go to /usr/lib/connman/test
5. Execute ./get-services

Examine output of the scanning. This should include your network. You
could identify it with "Name" parameter.

copy somewhere the whole section for the network.

Create new file, with extention .config, for example default.config
and put following content:

[global]
Name = Default
Description = Default network

[service_default]
Type=wifi
SSID=00000000000000
AutoConnect=true
Favorite=true
Passphrase=0000000000000000000000000000000000000000000000000000000000000000

The name of the section should be section_$youfilename_without_config$
SSID you will get from the scanning. The section for your network will
have name with following pattern:

[something/...something_000000000_11111111_something ]
where 0000000 is the Mac address of your WiFi adapter and 11111111 is
SSID of your network.

In the Passphrase you could put unencrypted passphrase, or get it in
the number format with
wpa_pasprase utility.

6. restart connman
   systemctl restart connman.service

After that, you should be connected to your network and it should work
after restart as well.

Hope this helps,
Maksym.

Thx for the reply,

I have uninstalled connman as I have found it hectic to configure.

I am hoping to get this down by simple linux tools.

  1. install package connman-tools and connman-test. Maybe it will require additionally python-gobject.

I was able to install these packages with the following:

$ opkg install connman-tools connman-tests

Note that connman-tests is plural.