RTL8187 based WLAN-USB not working on Angstrom

Hi all,
maybe someone already has a solution.

I habe a RTL8187 based 802.11 USB stick on an external powered hub and
it is recognized by the Angstrom kernel:

[ 4264.530792] usb 1-2.4.3: new high speed USB device using ehci-omap
and address 10
[ 4264.664337] usb 1-2.4.3: configuration #1 chosen from 1 choice
[ 4265.003509] rtl8187: 8187B chip detected.
[ 4265.013885] wmaster0 (rtl8187): not using net_device_ops yet
[ 4265.020721] wlan0 (rtl8187): not using net_device_ops yet
[ 4265.026855] phy2: hwaddr 00:02:72:7d:7f:db, RTL8187BvE V0 +
rtl8225z2

Then, I can do an iwlist wlan0 scan to see all access points:

wlan0 Scan completed :
          Cell 01 - Address: 00:13:49:E3:9C:DD
                    ESSID:"DSLWLANModem200"
                    Mode:Master
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=30/100 Signal level:-56 dBm
                    Encryption key:on
                    IE: Unknown: 000F44534C574C414E4D6F64656D323030
                    IE: Unknown: 010482848B96
                    IE: Unknown: 030106
                    IE: Unknown: 32080C1218243048606C
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/
s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/
s
                              48 Mb/s; 54 Mb/s
                    Extra:tsf=00000597297741c8
                    Extra: Last beacon: 703ms ago
          Cell 02 - Address: 00:12:BF:7D:CE:E6
                    ESSID:"WLAN-3"
                    Mode:Master
                    Channel:4
                    Frequency:2.427 GHz (Channel 4)
                    Quality=72/100 Signal level:-35 dBm
                    Encryption key:off
                    IE: Unknown: 00084453495452492D33
                    IE: Unknown: 010882848B0C12961824
                    IE: Unknown: 030104
                    IE: Unknown: 2A0100
                    IE: Unknown: 32043048606C
                    IE: Unknown:
DD180050F2020101030003A4000027A4000042435E0062322F00
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36
Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:tsf=0000000152ff5244
                    Extra: Last beacon: 1007ms ago
          Cell 03 - Address: 00:1D:7E:B5:1F:83
                    ESSID:"HomeWIFI"
                    Mode:Master
                    Channel:11
                    Frequency:2.462 GHz (Channel 11)
                    Quality=18/100 Signal level:-62 dBm
                    Encryption key:on
                    IE: Unknown: 0008486F6D6557494649
                    IE: Unknown: 010882848B960C121824
                    IE: Unknown: 03010B
                    IE: Unknown: 050400010000
                    IE: Unknown: 2A0100
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 32043048606C
                    IE: Unknown:
DD180050F2020101020003A4000027A4000042435E0062322F00
                    IE: Unknown:
DD1E00904C334E1003FFFF000000000000000000000000000000000000000000
                    IE: Unknown:
2D1A4E1003FFFF000000000000000000000000000000000000000000
                    IE: Unknown:
DD1A00904C340B0F0800000000000000000000000000000000000000
                    IE: Unknown:
3D160B0F0800000000000000000000000000000000000000
                    IE: Unknown: DD0900037F01010000FF7F
                    IE: Unknown: DD0A00037F04010001000000
                    IE: Unknown: DD0E0050F204104A0001101044000102
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/
s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/
s
                              48 Mb/s; 54 Mb/s
                    Extra:tsf=00000021fcbb8180
                    Extra: Last beacon: 85ms ago

Now I try

iwconfig wlan0 essid "WLAN-3" to associate but I get

iwconfig
lo no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11bg ESSID:"WLAN-3"
          Mode:Managed Frequency:2.427 GHz Access Point: Not-
Associated
          Tx-Power=27 dBm
          Retry min limit:7 RTS thr:off Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0

root@beagleboard:~#

So it simply does not associate although encryption is off.

Any ideas or secrets commands I am missing?

tnx,
Nikolaus

I went through this about 2 weeks ago and for me, it was the “connmand” daemon.

The clue was to look at /var/log/messages and see that the interface associated and then de-associated on the very next line.

Changing the name in /etc/init.d/rc5 (I believe) for the startup link from S22Connmand to XXS22Connmand made the interface work by basically disabling ConnectionManager from battling with NetworkManager.

Charles

Hm. On om Angstrom system there is no /var/log/messages file :frowning:

And neither daemon is running.

The system I use is

Linux beagleboard 2.6.29-omap1 #1 Sat Jun 20 15:29:31 CEST 2009 armv7l
GNU/Linux

But the reason must be similar to what you describe since dmesg says:

[ 376.120300] wlan0: direct probe to AP 00:12:bf:7d:ce:e6 try 1
[ 376.123107] wlan0 direct probe responded
[ 376.123138] wlan0: authenticate with AP 00:12:bf:7d:ce:e6
[ 376.128601] wlan0: authenticated
[ 376.128601] wlan0: associate with AP 00:12:bf:7d:ce:e6
[ 376.184082] wlan0: RX AssocResp from 00:12:bf:7d:ce:e6 (capab=0x421
status=0 aid=2)
[ 376.184112] wlan0: associated
[ 376.190093] wlan0: disassociating by local choice (reason=3)

When I google for that message, there are many reports for different
Linux distributions and different chipsets... Some reports say just
"upgrading did help". But what could help on Angstrom/BeagleBoard?

Does anyone have an explanation which process/driver/module is
generating the "wlan0: disassociating by local choice (reason=3)" on
dmesg?

Tnx,
Nikolaus

Hi Nikolaus,

This might do it for you..
taken from Koen's post, this forum...

"In the connman case you
should do one of the following:

* use update-rc.d to disable the startup scripts
* edit /var/lib/connman/defaults.conf and add something like
[Configuration]
Policy=manual
Priority=200
* edit /var/lib/connman/dev_<your mac addres>.conf and change Policy
to manual
* use the connman gui to have connman ignore the interface

regards,

Koen "

see the Koen Kooi post Aug 9, 12:30pm
http://groups.google.com/group/beagleboard/browse_thread/thread/4b7bbe62e3bbf1a5/2dd50e1881886f71?lnk=raot

http://technostuff.blogspot.com/2009/06/trendnet-wifi-on-beagleboard-running.html

I hope this helps.
Don Lewis

Thanks,
that thread did help!

I have not yet tried Koen's proposal (because I have no GUI to operate
connman), but the (not recommended) hack

chmod -x /etc/init.d/connman

plus a reboot did work and now I have association with the AP.

Nikolaus

Cool, I'm glad you are up and running again. I got my 'hack' info from
other Beagleboard
users and it works for me. I do get chastised sometimes for it :wink:

Don Lewis

I have tried Koen's first suggestion 'update-rc.d' and it works too.

Nothing coaxes my rt2500usb dongle to work. I've tried update-rc.d
remove and all others. Three other boxes associated.
root@beagleboard:~# ifup wlan0
[ 1586.931457] ADDRCONF(NETDEV_UP): wlan0: link is not ready
udhcpc (v1.13.2) started
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1
Sending discover...
Sending discover...
Sending discover...

No lease, failing
root@beagleboard:~#
root@beagleboard:~# ps fax|grep dhc
2695 ttyS2 S+ 0:00 \_ grep dhc
root@beagleboard:~#
From dmesg

RTL8187 problem solved! Thanks for everyone's postings.

# runlevel
N 5
# mv /etc/rc5.d/S22connman /etc/rc5.d/XXS22connman
# reboot

# ifconfig wlan0 down
# iwconfig wlan0 essid "<your essid>"
# ifconfig up
# udhcpc -n -i wlan0