# wireless connection not working

## PatomaS

Hi people

I'm trying to set the wireless connection in a laptop, but so far it seems that i'm doing something wrong, i hope somebody here can help me find what i'm missing.

Since that computer has no network connection, i'll try to write here all the information.

Platform:

amd64

Kernel:

2.6.32-r7

Network card:

Realtek RTL8187SE

Driver:

8187SE from the staging drivers section in kernel.

dmesg:

No errors reported

/etc/conf.d/net

```
config_wlan0=( "192.168.0.145 broadcast 192.168.0.255 netmask 255.255.255.0" )

routes_wlan0=( "default via 192.168.0.1" )

modules_wlan0=( "!iwconfig wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0=30

essid_wlan0="patito"

mode_wlan0="auto"

channel_wlan0="7"
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

ap_scan=1

network={

   ssid="patito"

   scan_ssid=1

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP TKIP

   psk="the_right_password"

   priority=5

}
```

resolv.conf

nameserver 192.168.0.1

I have tried many variations and combinations, but none seem to work, some of the last things i have tried are:

- modules_wlan0=( "!iwconfig wpa_supplicant" ) without !iwconfig. Then no ip was assigned to the wlan, even using dhcpcd.

- Using dhcp in /etc/conf.d/net

- changing proto=RSN to WPA to use version 1 of the protocol

- setting auth_alg to OPEN and to SHARED in wpa_supplicant.conf

- using wpa_supplicant -c /etc/... -Dwext -iwlan0. The only message was that the interface was connected to the mac address of the router.

With all the tests i have done, I can see in the router that something is trying to connect, but the ipaddress is always 0.0.0.0.

----------

## d2_racing

Hi, can you post this :

```

# lsmod

# ifconfig -a

# iwconfig

# iwlist scan

# dmesg | tail

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

# dmesg | tail

# wpa_cli status

```

----------

## PatomaS

Hi

Well, it's going to be hard to paste that because that computer has no internet nor network access and I don't have a usb key with me to paste text files with the information requested, so i will try to answer the information related.

lsmod:

is empty since I have everything in the kenel itself.

ifconfig -a

eth0

Now innactive, not started, not in rc levels and blocked in /etc/conf.d/rc

lo

Usual configuration with 127.0.0.1

wlan0

```

link encap: ethernet hwaddr 00:35:d3:95:c1:46

inet addr:192.168.0.145 bcast:192.168.0.255 mask:255.255.255.0

up broadcast running multicast mtu:1500 metric:1

rx packets:0 errors:0 dropped:336 overruns:0 frame:0

tx packets:364 errors:0 dropped:336 overruns:0 frame:0

```

iwconfig

```

lo and eth0 no wireless extensions

wlan0   802.11b/g   link essid:"patito"

   mode:managed   frequency=2.442 ghz   access point: 00:1c:f0:67:70:0a

   bit rate=54 mb/s

   retry:on   rts thr:off   fragment thr:off

   encryption key:off

   power management:off

   link quality=90/100   signal level=-46 dbm   noise level=-99 dbm

   rx invalid nwid:0   rx invalid crypt:0   rx invalid frag:0

   tx excessive retries:0   invalid misc:0   missed beacon:0

```

iwlist scan

```

   cell 01 - address 00:1c:f0:67:70:0a

   essid:"patito"

   protocol:ieee 802.11bg

   mode:master

   channel:7

   encryption key:on

   bit rates: 54 mb/s

   extra rates (mb/s) 1 2 5.5 6 9 11 12 18 24 36 48 54

   quality= 93/100   signal level=-44 dbm   noise level=-103 dbm

   ie:   wpa version 1

      group cipher : tkip

      pairwise ciphers (2) : tkip ccmp

      authentication suites (1) : psk

   ie:   ieee 802.11i/wpa2 version 1

      group cipher : tkip

      pairwise cipher (2) : tkip ccmp

      authentication suites (1) : psk

   extra: last beacon: 42ms ago

there are more connection points or cells around my building

```

dmesg | tail

```

[ 2071.712541 ]   associated successfully

[ 2071.712545 ]   using g rates

...

5 more times

```

/etc/init.d/net.wlan0 start 

```
* warning: net.wlan0 has already been started.
```

dmesg | tail

```

[ 2183.658471 ]   associated successfully

[ 2183.658475 ]   using g rates

...

5 more times

```

wpa_cli status

```
failed to connect to wpa_supplicant - wpa_ctrl_open: nosuch file or directory
```

anything else, please let me know.

Bye

----------

## PatomaS

Hi people

Still trying but nothing good so far.

Bye

----------

## d2_racing

Can you try this little one :

```

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=0 

update_config=1 

network={ 

   ssid="patito" 

   psk="the_right_password" 

   priority=5 

}

```

----------

## PatomaS

Hi

Well i just tried that and still the same results.

Also, just in case, i tried the same commands I was asked before and there where no changes, all of them reported the same.

But thanks so far.

 :Smile: 

Bye

----------

## d2_racing

Hi, can you post this :

```

# /etc/init.d/net.wlan0 restart

# iwconfig

# ifconfig -a

# cat /etc/resolv.conf

# ping www.google.com

```

----------

## PatomaS

Hi

This is the outcome of the requested comands:

/etc/init.d/net.wlan0 restart

```

* stopping wlan0

*   bringing down wlan0

*      shutting down wlan0 ...                        [ok]

*   configuring wireless network for wlan0

*      wlan0 connected to essid "patito" at 00:1c:f0:67:70:0a

*      in managed mode on channel 7 (wep disabled)

*   bringing up wlan0

*      192.169.0.145                              [ok]

*   adding routes

*      default via 192.168.0.1 ...                     [ok]

```

iwconfig

lo and eth0

no wireless extensions

```

wlan0   802.11b/g   link essid:"patito"

      mode:managed   frequency=2.442 ghz   access point: 00:1c:f0:67:70:0a

      bit rate=54 mb/s

      retry:on   rts thr:off   fragment thr: off

      encryption key: off

      power management:off

      link quality=86/100   signal level=-35 dbm   noise=-111 dbm

      rx invalid nwid:0   rx invalid crypt:0   rx invalid frag:0

      tx excessive retries:0   invalid misc:0   missed beacon:0
```

ifconfig -a

```
eth0      link encap: ethernet hwaddr 00:90:f5:98:e7:32

      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)

lo      link encap: local loopback

      inet addr:127.0.0.1      mask:255.0.0.0

      up loopback running      mtu:16436   metric:1

      rx packets:9   errors:0   dropped:0   overruns:0   frame:0

      tx packets:9   errors:0   dropped:0   overruns:0   carrier:0

      collisions:0   txqueuelen:0

      rx bytes=840   (840.0.b)   tx bytes=840   (840.0.b)

wlan0   link encap: ethernet      hwaddr 00:35:d3:95:c1:46

      inet addr:192.168.0.145      bcast:192.168.0.255      mask:255.255.255.0

      up broadcast running multicast   mtu:1500      metric:1

      rx packets:0   errors:0   dropped:644   overruns:0   frame:0

      tx packets:660   errors:0   dropped:0      overruns:0   carrier:0

      collisions:0   txqueuelen:1000

      rx bytes=0   (0.0.b)   tx bytes=30177   (29.4.kib)

      interrupt:18   memory:ffffc90000670000-ffffc90000670100

```

resolv.conf

```
nameserver 192.168.0.1
```

ping www.google.com

```
ping: unknown host www.google.com
```

ping 192.168.0.1

```

ping 192.168.0.1 (192.168.0.1) 56(84) bytes of data

from 192.168.0.145 icmp_seq=2 destination host unreachable

from 192.168.0.145 icmp_seq=2 destination host unreachable

from 192.168.0.145 icmp_seq=2 destination host unreachable

```

Sorry for any typo i may have.

anything else, just let me know.

Bye

----------

## PatomaS

Hi people

Still trying but nothing good so far.

Bye

----------

## PatomaS

Hi

Well i managed to connect a wire to that computer for a while and uploaded some logs which you cand find in the following links:

lspci

lspci -knn

ifconfig

ifconfig -a

iwconfig

lsusb

uname -a

iwlist wlan0 scan

/etc/wpa_supplicant/wpa_supplicant.conf

/etc/conf.d/net

dmesg extracts

I hope this is enough, but ig you need anything else, please let me know.

Bye

----------

## Telemin

Hi PatomaS, looking at your network config files you seem to have some things in there which are either superfluous or bad practice.  My I suggest you try these as alternatives:

/etc/conf.d/net

```

modules=("wpa_supplicant")

# Ethernet config

#config_eth0="192.168.0.130 brd 192.168.0.255"

#routes_eth0=( "default via 192.168.0.1" )

# Wireless config

associate_timeout_wlan0="20"

wpa_supplicant_wlan0="-Dwext"

# Per essid configs

config_Patitio=("dhcp")

```

wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

network={

   ssid="patito"

   psk="My_password_in_ascii"

   priority=5

}

```

Usually wpa_supplicant is either intelligent enough to choose the correct options from context or the defaults are the most commonly used values.

Either way minimalist configs usually seem to work better than ones which specify a value for every possible variable.

-Freestyling-

----------

## PatomaS

Hi

I tried the configuration freestyling suggested, but to no avail.

But, after that, i've been doing some more tests, or may be the same of two day ago, who know at this point, well, the thing is, if I stop net.wlan0 and anfter tha I run wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf, the ouput is as follows:

```

CTRL-EVENT-SCAN-RESULTS

Trying to associate with 00:1c:f0:67:70:0a (SSID='patito' freq=2442 MHz)

ioctl[SIOCSIWFREQ]: Operation not supported

Association request to the driver failed

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Associated with 00:1c:f0:67:70:0a

Associated with 00:1c:f0:67:70:0a

Associated with 00:1c:f0:67:70:0a

Associated with 00:1c:f0:67:70:0a

...

```

I'm not sure what that message means, and before showing my enormous ignorance, I'm trying to find out what it is. Any ideas?

Bye

----------

## rafaeleru

You solved your problem?

I think i have the same problem. Somebody can help me?

----------

