# wpa_supplicant working but no net[SOLVED]

## Zagloj

I don't know how to explain my problem properly in the title, but it is so easy as all looks fine but I have no net (can't browse the web). I use wpa_supplicant and my device is a usb wireless adapter with the zd1211 driver, it works on windows xp and I only had to plug in into my usb port on gentoo and emerge the firmware, then all looked ok. The resolv.conf is:

```
# Generated by dhcpcd from wlan0

# /etc/resolv.conf.head can replace this line

nameserver 192.168.1.1

# /etc/resolv.conf.tail can replace this line
```

The resolv.conf is the same that the one in another machine running Arch linux and connected to the same AP. 

 My lsusb:

```
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 003: ID 0ace:1215 ZyDAS ZD1211B 802.11g

Bus 002 Device 002: ID 046d:c050 Logitech, Inc. RX 250 Optical Mouse
```

My ifconfig 

```
wlan1     Link encap:Ethernet  HWaddr 00:1d:1a:04:25:69  

          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::21d:1aff:fe04:2569/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:26 errors:0 dropped:0 overruns:0 frame:0

          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:4249 (4.1 KiB)  TX bytes:2871 (2.8 KiB)
```

About lsmod

```
zd1211rw               33240  0 

mac80211              112640  1 zd1211rw

cfg80211              109608  2 zd1211rw,mac80211

usbcore               105612  8 zd1211rw,sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd

firmware_class          4816  6 zd1211rw,tg3,qla2xxx,qla1280,advansys,pcmcia
```

The iwconfig

```
wlan1     IEEE 802.11bg  ESSID:"Orange-ca1f"  

          Mode:Managed  Frequency:2.462 GHz  Access Point: CC:96:A0:97:CA:1F   

          Bit Rate=1 Mb/s   Tx-Power=20 dBm   

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

          Encryption key:off

          Power Management:off

          Link Quality=45/100  Signal level=45/100  

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

And finally wpa_cli status:

```
Selected interface 'wlan1'

bssid=cc:96:a0:97:ca:1f

ssid=Orange-ca1f

id=0

mode=station

pairwise_cipher=TKIP

group_cipher=TKIP

key_mgmt=WPA-PSK

wpa_state=COMPLETED

ip_address=192.168.1.100

```

But I open Opera or another browser or I try to download something from portage or use the Irc and I can't connect to the net. Any help would  be much appreciated.

 Thanks in advance.

----------

## NeddySeagoon

Zagloj,

```
          Bit Rate=1 Mb/s   Tx-Power=20 dBm    

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

          Encryption key:off 

          Power Management:off 
```

all looks bad.  Bit rate =1Mb/s is as low as it can go and its what you get whwn its not working.

iwconfig says  Encryption key:off if thats true and its connected, your wireless is not encrypted. Your wpa_cli status suggets your link is supposed to be encrypted.

Look in dmesg, it may show whats actually happening.

----------

## massimo

What does route -n return?

----------

## Zagloj

 *NeddySeagoon wrote:*   

> Zagloj,
> 
> ```
>           Bit Rate=1 Mb/s   Tx-Power=20 dBm    
> 
> ...

 

Thanks, didn't know about the importance and levels of those values (what a shame I didn't look at encryption message), I am not very experienced in command level wireless configuration, indeed I tried first with Wicd, but the client said that an IP was obtained and all was fine, since I noticed that it was not true, I started with the manual configuration.

 I did dmesg | grep zd  (I though it was a nice idea, but I dont know exactly where to look) and dmesg | grep wlan, with these results:

```
zd1211rw 1-10:1.0: phy0

usbcore: registered new interface driver zd1211rw

zd1211rw 1-10:1.0: firmware version 4725

zd1211rw 1-10:1.0: zd1211b chip 0ace:1215 v4810 high 00-1d-1a MAXIM_NEW_RF pa0 -7---
```

```
<30>udevd[15581]: renamed network interface wlan0 to wlan1

ADDRCONF(NETDEV_UP): wlan1: link is not ready

wlan1: direct probe to cc:96:a0:97:ca:1f (try 1)

wlan1: direct probe responded

wlan1: authenticate with cc:96:a0:97:ca:1f (try 1)

wlan1: authenticated

wlan1: associate with cc:96:a0:97:ca:1f (try 1)

wlan1: RX AssocResp from cc:96:a0:97:ca:1f (capab=0x431 status=0 aid=1)

wlan1: associated

ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready

wlan1: no IPv6 routers present
```

 And my route -n as massimo requested:

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     0.0.0.0         255.255.255.0   U     2003   0        0 wlan1

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         192.168.1.1     0.0.0.0         UG    2003   0        0 wlan1
```

 Thanks again and sorry for not noticing some things, I started this morning with this and it's midnight here, a bit sleepy thought  :Embarassed: 

----------

## NeddySeagoon

Zagloj,

That all looks good.  Can you get that and the iwconfig you posted above at the same time ?

What do you have in /etc/resolv.conf?

dhcp should have given you a nameserver here.

```
nameserver 192.168.1.1

nameserver 4.2.2.1
```

wold be good to play with.  If you only have commented lines add in those two nameserver lines and tet again.

The first is your router, which will be fastest if it works, the other is a public nameserver.

This is just for testing, when your dhcp lease expires, this file will be reverted when your lease is updated.

----------

## Gusar

There's a thread at the Arch forums, similar issues with the same wireless chipset. So I don't think it's a configuration problem, but a regression in the driver. So installing an older kernel would be a thing to try.

----------

## Zagloj

Thanks for the answers, and yes, NeddySeagoon, I have all those values at the same time, but you pointed at Encyption:off and I think it maybe one thing derived from the problem.

 About my kernel, I cannot downgrade it, I use 2.35.x cause something didn't allow me to keep an older one, indeed, I think that it could be a problem about being too old kernel, can it be solved in a newer kernel? I say that because:

http://sourceforge.net/mailarchive/forum.php?forum_name=zd1211-devs&max_rows=25&style=nested&viewmonth=201111

 But I can understand that wrongly. By the way, I tried first to compile the driver included in the cdrom and it failed to compile saying that didn't found config.h file, but driver in kernel is ever better, I believe.

 Thanks and hope to have it solved soon  :Smile:  (About kernels I must wait anyways because huge merging at the moment, it's the third and final day I hope  :Laughing:  )

 Eddit Plus if it is of help my wpa settings and net ones:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_inerface_group=wheel 

network={

    ssid=”myessid”

  #  scan_ssid=1

    proto=WPA

    key_mgmt=WPA-PSK

    psk=thelongpassphrase

 }
```

```

modules=("wpa_supplicant")

wpa_supplicant_wlan1="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"

config_wlan1=("dhcp")

```

The psk was obtained with the wpa_passphrase command

----------

## massimo

I have a USB device using the same module (zen-sources-3.1 @ amd64) which works very well with WPA2 although it states Encryption=off.

----------

## Zagloj

 *massimo wrote:*   

> I have a USB device using the same module (zen-sources-3.1 @ amd64) which works very well with WPA2 although it states Encryption=off.

 

 Ok, I will give it a try with a newer kernel, in case there were driver problems with this kernel or something, by the way, did you follow this?

http://www.gentoo-wiki.info/Zydas_ZD1211

I only installed the firmware, it doesn't appear to need anything more.

----------

## Zagloj

Well, the problem keeps there. After upgrading to kernel 3.1.5, at leas has Bit Rate = 11Mb/s. I says connected, using wicd or using wpa_cli or wpa_gui. If it is something, in status of wpa_gui it says Completed (station).

 About scanning there is no problem, I can see my  neighborhood APs, the problem keeps in I can't  browse the web or do something internet related, so I think I am still really not connected 

 Any help would be much appreciated, it's getting me tired, not having any clue about the problem.

----------

## NeddySeagoon

Zagloj,

Time for a summary so we can see what you have and what you don't.

Boot normally and do anything you normally do to get your wireless started. Post the output of the following commands

```
ifconfig -a

iwconfig

route

rc-update -v show

cat /etc/resolv.conf

ls /etc/init.d/net.*

cat /etc/conf.d/net

cat /etc/wpa_supplicant/wpa_supplicant.conf

cat /etc/conf.d/wireless
```

your dmesg would be nice to have too - all of it

Some of those files may contain keys/passwords which you may not want to post. Feel free to sustitute a placeholder as long as you do not spoil the syntax.

You may not have all of those files either. e.g. /etc/conf.d/wireless has been depreciated for a long time. IF you don't have a file at all, say so.

----------

## Gusar

 *Zagloj wrote:*   

>  Any help would be much appreciated, it's getting me tired, not having any clue about the problem.

 

I gave you a clue. A regression in the driver. So try a older kernel. And by that I mean, idk, 2.6.38. Or even older, say the long-term-stable 2.6.32

Then, once you have a kernel that works, you could go bisecting, to figure out exactly when it broke. This is a long process, but it would help everyone with this wireless chipset.

----------

## Zagloj

Thanks, but the older I have in this machine is 2.6.35 and next is 3.0 at the moment, I have limited bandwich access at home, so I will try later in the week to download the sources for older kernel, I will check with 3.0 in case it works.

 Bye and hope to fix it  :Smile: 

By the way I remember something that made me upgrade to kernel 2.6.35 but I am not sure what it was.

----------

## Zagloj

Ok, now I figured out that the problem could be not the driver, I mean, my computer appears connected in the router... I dont know what this could mean  :Confused: 

----------

## massimo

 *Zagloj wrote:*   

> Ok, now I figured out that the problem could be not the driver, I mean, my computer appears connected in the router... I dont know what this could mean :?

 

Are you able to ping an IP address (8.8.8.8, Google's public DNS) or do a dig/nslookup on www.google.com?

----------

## Zagloj

 *massimo wrote:*   

>  *Zagloj wrote:*   Ok, now I figured out that the problem could be not the driver, I mean, my computer appears connected in the router... I dont know what this could mean  
> 
> Are you able to ping an IP address (8.8.8.8, Google's public DNS) or do a dig/nslookup on www.google.com?

 

 Nope, that gives me a message "Operation nor permitted" each time I try to ping, plus I can't open my router (192.168.1.1) from the browser, it's a bit weird since I see in the router that I am connected.

----------

## massimo

 *Zagloj wrote:*   

>  *massimo wrote:*    *Zagloj wrote:*   Ok, now I figured out that the problem could be not the driver, I mean, my computer appears connected in the router... I dont know what this could mean :? 
> 
> Are you able to ping an IP address (8.8.8.8, Google's public DNS) or do a dig/nslookup on www.google.com? 
> 
>  Nope, that gives me a message "Operation nor permitted" each time I try to ping, plus I can't open my router (192.168.1.1) from the browser, it's a bit weird since I see in the router that I am connected.

 

Any firewall on that system in place?

----------

## Zagloj

I use iptables on my gentoo install and the router has a firewall, but no luck turning it off, my iptables was generated by a automated web script, so it might work, I think.

EDIT: Solved!!!! It was my iptables, I had the eth0 interface, not the wlan1, because I ever used eth0  :Embarassed:  Btw THANKS ALL

----------

