# Wireless not working (RTL 8187B adapter)

## drogin

I have a wirleless RTL 8187B USB adapter.

I have compiled my kernel with the driver built-in(not as a module).

I'm trying to connect to an SSID with WPA, so I read wpa_supplicant was the way to go.

relevant info from lsusb gives:

```

Bus 001 Device 002: ID 0bda:8197 Realtek Semiconductor Corp. RTL8187B Wireless Adapter

```

During startup, it says:

 *Quote:*   

> 
> 
> Starting wlan0
> 
> Loading networking modules for wlan0
> ...

 

To check that the driver was present, 

this is the output from dmesg | grep 8187

```

[2.330368] usbcore: registered new interface driver rtl8187

[2.789838] rtl8187: 1-2:1.0: usb_probe_interface

[2.789841] rtl8187: 1-2:1.0: usb_probe_interface - got id

[3.073074] phy0: hwaddr 00:16:44:7b:6c:2e, RTL8187BvE V0 + rtl8225z2, rfkill mask2

[3.094773] rtl8187: Customer ID is 0x04

[3.095015] Registered led device rtl8187-phy0::radio

[3.095114] Registered led device rtl8187-phy0::tx

[3.095886] rtl8187: wireless switch is on

```

iwconfig gives:

```

wlan0      IEEE 802.11bg ESSID:"my SSID"

Mode:Managed  Frequency:2.457 Ghz    Access Point: Not-Associated

Tx-Power=20 dBm

Retry long limit: 7   RTS thr:off    Fragment thr:off

Encryption key:off

Power Management:off

```

iwlist scan lists all the nearby wirless networks correctly.

dmesg | grep wlan0 | less gives:

```

[19.612628] wlan0: link is not ready

[22.276423] wlan0: direct probe to XX:XX:XX:XX:XX:XX (try1)

... and A LOT OF THOSE, all to the same address (Is this address what you call mac address?),

going to try2, try3, timed out.

```

So it seems like something is working, but then not quite.

It seems it is able(after a lot of tries) to probe, authenticate, but always times out when associating.

In general there's a whole lot of timeouts..but I dunno..maybe thats normal.

Anyone know what the problem could be?Last edited by drogin on Tue Dec 21, 2010 4:02 pm; edited 1 time in total

----------

## DONAHUE

assuming dhcp is desired:

what result does 

```
dhcpcd wlan0
```

produce?

if that appears to run correctly,what does

```
iwconfig
```

produce?

baselayout1 or baselayout2 and openrc?

wicd?

networkmanager?

wpa_gui?

plain old gentoo networking?

```
cat /etc/conf.d/net
```

 produces?

```
cat /etc/wpa_supplicant/wpa_supplicant.conf
```

 produces?

----------

## drogin

 *Quote:*   

> what result does dhcpcd wlan0 produce? 

 

It produces this:

```

dhcpcd[3994]: version 5.2.8 starting

dhcpcd[3994]: wlan0: waiting for carrier

dhcpcd[3994]: timed out

dhcpcd[3994]: allowing 8 seconds for IPv4LL timeout

dhcpcd[3994]: timed out

```

 *Quote:*   

> 
> 
> if that appears to run correctly,what does iwconfig produce? 
> 
> 

 

This was included in my original post  :Smile: 

 *Quote:*   

> 
> 
> baselayout1 or baselayout2 and openrc?
> 
> wicd?
> ...

 

I'm new to Gentoo(just went from Ubuntu to Gentoo).

I have only installed x86_64  with stage 3 tarball.

No GUI/X/Network manager etc yet.

As for baselayout 1 / baselayout 2, I've never understood what that actually is, how to get it, or if I already got one of them.

So I guess it's "plain old gentoo networking"

my /etc/conf.d/net looks like this:

```

config_eth0=( "dhcp" )

config_wlan0=( "dhcp" )

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

essid_wlan0="my SSID"

```

/etc/wpa_supplicant/wpa_supplicant.conf looks like this:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

fast_reauth=1

network={

 ssid="my SSID"

 psk="the password"

 priority=5

}

```

----------

## DONAHUE

need content from

```
iwlist scan
```

feel free to hide/fake/delete mac address

```
wpa_gui
```

produces?

are you intending to use wep or wpa or wpa2

----------

## drogin

content from iwlist scan:

```

wlan0 Scan completed :

Cell 01 - Address: XX:XX:XX:XX:XX:XX

 Channel:10

 Frequency:2.457 GHz(Channel 10)

 Quality=64/70  Signal level=-46 dBm

 Encryption key:on

 ESSID:"my SSID"

 Bit Rates:1 Mb/s; 2 Mb/s; 5.5Mb/s; 11 Mb/s; 6 Mb/s

               9 Mb/s; 12 Mb/s; 18 Mb/s

 Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s

 Mode: Master

 Extra:tsf=00000154eee819b

 Extra: Last beacon: 441ms ago

 IE: Unknown: 0007536F6F6E20414C

 IE: Unknown 010882848b960C121824

 IE: Unknown: 03010A

 IE: Unknown: 2A0100

 IE: Unknown: 32943048606C

 IE: WPA Version 1

      Group cipher : TKIP

      Pairwise Ciphers (2) : TKIP CCMP

      Authentication Suites (1) : PSK

```

wpa_gui is not installed.

(Im guessing from it's name that it require X or something...I havent installed any graphical stuff yet).

For now, I only want to do WPA, which is what our wireless router is using, I belive.

----------

## DONAHUE

try a wpa_supplicant.conf of

 *Quote:*   

> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
> 
> update_config=1
> 
> network={
> ...

 

```
/etc/init.d/net.wlan0 start
```

----------

## drogin

Still same problem.

dhcpcd wlan0 times out waiting for carrier.

dmesg | grep wlan0 gives that it manage to authenticate, but it times out on association.

It also gives this:

```

[    18.462554] ADDRCONF(NETDEV_UP): wlan0: link is not ready

```

----------

## DONAHUE

```
iwconfig wlan0 mode managed
```

produces? If no output

```
/etc/init.d/net.wlan0 start
```

----------

## drogin

iwconfig wlan0 mode managed produces no output.

/etc/init.d/net.wlan0 start produces:

Warning: net.wlan0 has already been started

/etc/init.d/net.wlan0 restart produces:

```

Stopping wlan0

Loading networking modules for wlan0

modules: apipa arping ccwgroup macchanger macnet rename ifplugd wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4

ifplugd provides plug

wpa_supplicant provides wireless

ifconfig provides interface

dhcpcd provides dhcp

SIOCSIFFLAGS: Uknown error 132

SIOCSIFFLAGS: Uknown error 132

Configuring wlan0 for MAC address xx:xx:xx:xx:xx:xx

ifplugd does not work on wireless interfaces

starting wpa_supplicant on wlan0

starting wpa_cli on wlan0

waiting for association

backgrounding...

```

iwconfig wlan0 mode managed still produces no output.

EDIT: Got rid of the Uknown error 132's, by recompiling kernel without RFKILL switch support.

However, I still have the same problems as before.

----------

## DONAHUE

add  *Quote:*   

> iwconfig_wlan0="mode managed"

 to /etc/conf.d/net

```
/etc/init.d/net.wlan0 start
```

produces ?

```
iwlist scan
```

says what about mode?

----------

## drogin

/etc/init.d/net.wlan0 start

produces

```

warning: net.wlan0 has already been started.

```

/etc/init.d/net.wlan0 restart

produces

```

starting wlan0

Loading networking modules for wlan0

modules: apipa arping ccwgroup macchanger macnet rename ifplugd wpa_supplicant essidnet iptunnel ifconfig system dhcpcd ip6to4

ifplugd provides plug

wpa_supplicant provides wireless

ifconfig provides interface

dhcpcd provides dhcp 

Configuring wlan0 for MAC address xx:xx:xx:xx:xx:xx

ifplugd does not work on wireless interfaces

starting wpa_supplicant on wlan0

starting wpa_cli on wlan0

waiting for association

backgrounding... 

```

iwlist scan says about mode:

Cell 01 - (The one I want to connect to).

Mode: Master

----------

## drogin

I emerged gnome, and from gnome it works perfectly.

I guess gnome must've had some network package dependencies or something.

Not sure why it didnt work on "old plain gentoo" though.

----------

## DONAHUE

Good for you.

An interesting gnome side effect.

If you have(had) USE="qt4" when you emerge(d) wpa_supplicant you have wpa_gui available as a terminal command and at Applications-->Internet-->WPA Supplicant Administration GUI. A decent graphic network manager that works with plain old gentoo networking.

----------

