# p5k-e wifi with rtl8187 - Unable to connect

## Rhiakath

Hi there.

Once again, wireless problems.

I've compiled mac80211 inside the kernel, and as module. rtl8187 has just the option to compile as module.

i can scan, and my wireless network appears. But when i try to start it, it just doesn't connect. I've tried disabling encryption, to no luck. Here's some info.

```

mephisto rhiakath # lsmod

Module                  Size  Used by

rtl8187                33792  0

mac80211              101324  1 rtl8187

eeprom_93cx6            3712  1 rtl8187

coretemp                7040  0

w83627ehf              18948  0

hwmon_vid               4224  1 w83627ehf

snd_hda_intel         263256  0

snd_pcm                49412  1 snd_hda_intel

snd_timer              15620  1 snd_pcm

snd_page_alloc          7688  2 snd_hda_intel,snd_pcm

snd_hwdep               7172  1 snd_hda_intel

nvidia               7810080  24

snd                    33444  4 snd_hda_intel,snd_pcm,snd_timer,snd_hwdep

```

```
mephisto rhiakath # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:""

          Mode:Managed  Channel:0  Access Point: Not-Associated

          Tx-Power=0 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B

          Encryption key: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

```

```

mephisto rhiakath # iwconfig wlan0 essid Arcadia mode managed key open xxxxxxxxxxxxxxxxxxxxxxxxxx

mephisto rhiakath # ifconfig wlan0 192.168.2.103

mephisto rhiakath # iwconfig wlan0 ap 00:1C:DF:3F:BF:A7

mephisto rhiakath # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:"Arcadia"

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1C:DF:3F:BF:A7

          Tx-Power=27 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B

          Encryption key:1150-0921-2036-6531-7251-1197-90

          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

```

All seems right, so far...

The problem is now. I can't ping even the router. Nothing. zilch.

If i try using an init script, this is what happens.

```
mephisto rhiakath # /etc/init.d/net.wlan0 restart

 * Service net.wlan0 starting

 Failed to configure wireless for wlan0                                                                                                                                     [ !! ]

 * ERROR:  net.wlan0 failed to start
```

This is my net configuration

```

mephisto rhiakath # cat /etc/conf.d/net

config_eth0=("192.168.2.101 netmask 255.255.255.0 broadcast 192.168.2.255")

routes_eth0=("default via 192.168.2.1")

dns_servers_eth0=("192.168.2.1")

essid_wlan0=("Arcadia")

config_Arcadia=("192.168.2.103 netmask 255.255.255.0 broadcast 192.168.2.255")

routes_Arcadia=("default via 192.168.2.1")

dns_servers_Arcadia=("192.168.2.1")

key_Arcadia=("xxxxxxxxxxxxxxxxxxxxxxxxxx enc open")

```

What could be the problem here?

----------

## IvanMajhen

```
wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:"Arcadia"

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1C:DF:3F:BF:A7

          Tx-Power=27 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B

          Encryption key:1150-0921-2036-6531-7251-1197-90

          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
```

You are associated to WAP. 

You need to setup ip, netmask, route, dns...

Manually:

```
iwconfig wlan0 essid Arcadia key 11500921203665317251119790

ifconfig wlan0 192.168.2.103 netmask 255.255.255.0 broadcast 192.168.2.255

route add default gw 192.168.2.1

echo nameserver  192.168.2.1 > /etc/resolv.conf
```

Gentoo: /etc/conf.d/net

```
modules=( "wpa_supplicant"  )

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0=5

config_Arcadia=( "192.168.2.103/24 brd 192.168.2.255" )

routes_Arcadia=( "default gw 192.168.2.1" )

dns_servers_Arcadia=( "192.168.2.1" )
```

/etc/wpa_supplicant/wpa_supplicant.conf should look like this:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

update_config=1

network={

        ssid="Arcadia"

        key_mgmt=NONE

        wep_key0=11500921203665317251119790

}
```

You need wpa_supplicant for this.

Another way to setup wireless is with wireless tools. Don't know exact syntax becuse i don't use it.

----------

## PaulBredbury

I've got a P5K Premium motherboard. Its wireless sucks, so I added a more powerful TP-Link WN650G.

Wireless can be really temperamental if there's a couple of walls in the way of its signal  :Sad: 

The TP-Link is better than the motherboard's wireless, but still not perfect.

I'd recommend setting up wireless when your motherboard is very close to the router, so at least you can be assured that the signal strength is high.

----------

## Rhiakath

I'm not using wpa. I'm using wep. Is wpa_supplicant needed?

Besides, if you look closely, i did all that. I set the dns, gateway and ip address. it just fails. never tells me why.

----------

## d2_racing

In fact, Wpa_supplicant is compatible with a wep key also.

----------

## d2_racing

```

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=wheel 

ap_scan=0 

#update_config=1 

###### Configuration for WPA2 with encryption AES(CCMP) ###### 

#network={ 

#        ssid="YOURSSID" 

#        psk="YOURPassPhrase" 

#        proto=WPA2 

#        key_mgmt=WPA-PSK 

#        pairwise=CCMP 

#        group=CCMP 

#        priority=5 

#} 

#### OR 

###### Configuration for WEP ###### 

network={ 

        ssid="YOURSSID" 

        scan_ssid=1 

        priority=5 

        key_mgmt=NONE 

        wep_key0=0123456789 

        wep_tx_keyidx=0 

} 

```

----------

## Rhiakath

Ok, but what good would that do?

Like, the problem should not be with the configuration. With my laptop, i use the exact same config file, just change the ip address, and it works. Why should i have to use wpa_supplicant to connect with the desktop?

----------

## larand54

Did you manage to get it work?

I have the same problem. I running dual boot and in Windows it works ok but not here (same machine, same place but Gentoo instead of windows). It does not found any network so it doesn't matter how you set up configuration files.

I tried the KWIFI-manager but it does not find any network but it reacts if I unloads rtl8187.

----------

## Rhiakath

Yeap. connected it with a cable. Any other way, never got it to work.

----------

## larand54

 *Rhiakath wrote:*   

> Yeap. connected it with a cable. Any other way, never got it to work.

 

You mean you skipped wireless?

----------

## Rhiakath

yeap

----------

## Rhiakath

ok, but i REALLY WANT wireless access on this! So, i'm not giving up. Gonna try the wpa today, when i get home from work.. (8 more hours to go... sigh...)

----------

## Rhiakath

Ok, gave it another go. this is my current config.

linux kernel 2.6.27-r7, wpa_supplicant_0.6.4.

I can connect to the router, now configured with wpa2.

the configuration is correct, because it's the same on my laptop.

it is able to connect, and able to ping about 10 times. then, no more communication whatsoever with the router.

if i reload the rtl8187 driver, i get another 10 pings at the router. unfortunately, this is not enough for me even to open the router page.

So, what's wrong with this?

----------

## Rhiakath

Ok, i tried compiling the drivers inside the kernel, and it works a bit better. I can now browse (somewhat). It is incredibly slow, and sometimes, doesn't transfer any data at all. Sometimes restarting net.wlan0 kinda works.

any ideia?

----------

