Unable to connect to Internet - "link is not ready"

Bug #63664 reported by Andy Balaam
12
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
linux-source-2.6.17 (Ubuntu)
Invalid
Low
Unassigned
wireless-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I am running Edgy, and I downloaded updates on 2006-10-01.

I have a 3com OfficeConnect USB wireless dongle which I am using to connect to my 3com OfficeConnect router.

I have the zd1211 firmware files inside this directory:

/lib/firmware/2.6.17-10-generic/zd1211/

(and they are also all inside the parent, /lib/firmware/2.6.17-10-generic/, which is where I found them originally.)

When I start the machine, dmesg says:

zd1211rw 1-1:1.0: firmware version 4605
zd1211rw 1-1:1.0: zd1211 chip 6891:a727 v4330 full 00-12-a9 RF2959_RF pa0 g--
zd1211rw 1-1:1.0: eth1
usbcore: registered new driver zd1211rw

and then later:

ADDRCONF(NETDEV_UP): eth1: link is not ready

I am unable to ping the router or any outside sites.

The strange thing is that I was able (after much fiddling) to get this working yesterday, but when I booted today it wasn't working!

/etc/network/interfaces looks like this:

iface eth1 inet static
        wireless-essid AJB
        wireless-key XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX
        address 10.0.1.7
        netmask 255.255.255.0
        gateway 10.0.1.1

(wireless key replaced with Xs)

This is exactly the same as when it was working yesterday.

using ifdown eth1 and then ifup eth1 doesn't help, and neither does unplugging and reinserting the USB dongle.

Please do ask if you need more info. Apologies if I'm doing something stupid.

Thanks, Andy

Revision history for this message
Caroline Ford (secretlondon) wrote :

Confirming - this is the second part of the zd1211rw problem.

Changed in zd1211:
status: Unconfirmed → Confirmed
Revision history for this message
Caroline Ford (secretlondon) wrote :

Changing to linux source as the new driver is in the kernel - zd1211 is the old driver which shipped with dapper

Revision history for this message
Caroline Ford (secretlondon) wrote :

This is the not-working-with-symlinks-in-place bug which is referred to in bug #60222.

With my zd1211 hardware I get it to associate if (and only if) I run sudo iwlist eth1 scan. I don't get any throughput and pinging the router gets multiple duplicate responses. The dongle works fine on the same computer running dapper.

Out of the box the device comes up as disabled. Adding it to /network/interfaces fixed that for me.

Revision history for this message
Matthew Garrett (mjg59) wrote :

I can't reproduce the failure on my zd1211 - with the latest kernel it comes up and associates fine without requiring an iwlist scan. Can you provide dmesg output when it's failing? There ought to be a decent amount of softmac failure output.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Oh, I see. Explicitly setting the essid in /etc/network/interfaces doesn't actually seem to work when the device is hotplugged. Scott, how can I get a debug trace of what commands are executed when I hotplug a USB wireless device?

Revision history for this message
peter76 (pf-moll) wrote :

Same problem here; have my /etc/network/interfaces setup properly, but... Link not ready. If I do iwlist scan; it doesn't support scanning. When I do: iwconfig eth1 essid myessid, it becomes ready, and was able to connect, but at the moment, dhclient times out.
When I do: sudo iwconfig eth1 channel 11, it gives me:
Error for wireless request "Set Frequency" (8B04) :
    SET failed on device eth1 ; Operation not permitted.
Hope this helps; if I can do more debugging ( read: spell out what you want me to do:-) please say so.

peter

Revision history for this message
peter76 (pf-moll) wrote :

Edit to my above post:

The dhclient timing out had something to do with my router not releasing an ip-address.... So it works again, but the rest stated is still true. Sorry for the inconvenience

Peter

Revision history for this message
Andy Balaam (mail-artificialworlds) wrote :

I can confirm that typing:

sudo iwconfig eth1 essid MY_ESS_ID

Does allow me to connect to the Internet.

DHCP does not appear to be working, so I have had to use static IP configuration in /etc/network/interfaces

Revision history for this message
Caroline Ford (secretlondon) wrote :

Tried with a clean install of Kubuntu 6.10 rc. No joy.

It won't let me sudo iwlist eth1 scan as it complains that the device doesn't support scanning.

I can't get dhcp or static IP working, but I haven't tried Andy's suggestion above.

I'll try and find some suitable dmesg output. The rw driver is nowhere near as spammy as the old one in dapper.

Revision history for this message
Caroline Ford (secretlondon) wrote :

Only things I can find are:

Oct 24 18:56:15 eser kernel: [17181220.516000] zd1211rw 3-5:1.0: error ioread32(CR_REG1): -11

Oct 24 18:31:59 eser kernel: [17179764.188000] SoftMAC: Authentication timed out with 00:18:4d:03:f9:c2
Oct 24 18:34:18 eser ntpdate[5062]: can't find host ntp.ubuntu.com
Oct 24 18:34:18 eser ntpdate[5062]: no servers can be used, exiting
Oct 24 18:34:38 eser kernel: [17179922.848000] SoftMAC: Authentication timed out with 00:18:4d:03:f9:c2
Oct 24 18:35:01 eser kernel: [17179945.948000] zd1211rw 3-5:1.0: error ioread32(CR_REG1): -11
Oct 24 18:35:41 eser ntpdate[5222]: can't find host ntp.ubuntu.com
Oct 24 18:35:41 eser ntpdate[5222]: no servers can be used, exiting

Revision history for this message
Caroline Ford (secretlondon) wrote :
Revision history for this message
Caroline Ford (secretlondon) wrote :
Revision history for this message
Caroline Ford (secretlondon) wrote :

I have more errors now. I can get connection but network monitor and ifconfig don't seem to know about it.

Oct 29 00:38:29 eser kernel: [17180132.148000] SoftMAC: Open Authentication completed with 00:18:4d:x:x:x
Oct 29 00:38:29 eser kernel: [17180132.148000] SoftMAC: Authentication response received from 00:18:4d:x:x:x but no queue item exists.

Oct 28 07:34:54 eser kernel: [17210851.148000] SoftMAC: Received deauthentication packet from 00:18:4d:x:x:x, but that network is unknown.

It's erratic and nowhere near as good as it was with dapper.

Revision history for this message
Jon Smirl (jonsmirl) wrote :

I went through this with the main zd1211rw developer on the zd1211 mailing list. The problem is that the link is not brought up before ifup tries to use it.

This will work and DHCP will get an address
ifconfig eth1 up
ifup eth1

This does not work, it is also what happens when you hotplug
ifup eth1

This is a red herring, it brings the link up as a side effect.
iwconfig eth1 essid MY_ESS_ID
If you ask for a dchp address manually after this the net will work

I believe the right question is, how do I get "ifconfig eth1 up" executed before the rest of "ifup eth1". A related question, why doesn't this bother other wireless adapters? Who is responsible for doing "ifconfig eth1 up"?

I downloaded the source for ifupdown and can barely make sense of it. It does not appear that the scripts do "ifconfig eth1 up" for anything but the loopback device.

His position is that Ubuntu is broken for not issuing the "ifconfig eth1 up" and that the driver is working fine.

Revision history for this message
Matthew Garrett (mjg59) wrote :

ifup will only call ifconfig if the interface is statically configured - see line 3924 of ifupdown.nw. If it's using dhcp, then dhclient will do that. There's never been any requirement for an interface to be up before dhclient is run on it.

Revision history for this message
Jon Smirl (jonsmirl) wrote :

Trace from zd1211rw debug that failed.

The network scripts tried to Associate the device to an access point before the device had "ifconfig eth1 up" issued.

If failed way before we get to DHCP

# ifup eth1
[ 3487.283681] ieee80211_crypt: registered algorithm 'WEP'
[ 3487.326061] zd1211rw 5-3.6:1.0: set_security()
[ 3487.326069] zd1211rw 5-3.6:1.0: set_security() .active_key = 0
[ 3487.326074] zd1211rw 5-3.6:1.0: set_security() .level = 1
[ 3487.326078] zd1211rw 5-3.6:1.0: set_security() .enabled = 1
[ 3487.326082] zd1211rw 5-3.6:1.0: set_security() .encrypt = 1
[ 3487.330038] SoftMAC: Associate: Scanning for networks first.
[ 3487.330047] SoftMAC: Associate: failed to initiate scan. Is device up?
[ 3487.386892] zd1211rw 5-3.6:1.0: zd_usb_enable_int()
[ 3487.386902] zd1211rw 5-3.6:1.0: zd_usb_enable_int() submit urb cf5696c0
[ 3487.386971] zd1211rw 5-3.6:1.0: zd_chip_set_basic_rates_locked() ff0f
[ 3487.388904] zd1211rw 5-3.6:1.0: zd_chip_lock_phy_regs() CR_REG1: 0xa0 -> 0x20
[ 3487.390900] zd1211rw 5-3.6:1.0: zd_chip_unlock_phy_regs() CR_REG1:

Revision history for this message
Jon Smirl (jonsmirl) wrote :

Could this be an explanation of where the disconnect is? If you set essid or key in other wireless drivers while they are down, they remember this fact and then process these when the link comes up. zd1211rw is trying to execute the essid/key set immediately and returning an error that the link is down.

Revision history for this message
Matthew Garrett (mjg59) wrote :

I haven't been able to find any documentation that suggests it's required for userspace to bring the interface up before attempting to set the essid. If it's specced anywhere, we can change ifupdown - if not, it sounds like a zd1211rw (or possibly softmac) bug.

Revision history for this message
Jon Smirl (jonsmirl) wrote :

I'll bet there isn't any documentation that says the wireless driver has to allow essid/key to be set before the link is up either. So you are both right. Where does something like this get decided?

Revision history for this message
Matthew Garrett (mjg59) wrote :

If the "correct" mechanism isn't documented, then established practise should be followed. In this case, it's to allow the essid to be set before the interface is brought up. An analogy might be drawn with ifconfig settings - userspace can set the IP address and netmask without bringing the interface up.

Revision history for this message
Jon Smirl (jonsmirl) wrote :

zd1211rw developer has informed me that softmac can't set the essid/key without the link being up. All of the other distributions (except Debian) have been modified to bring the link up first.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Have you got a link to a discussion of this?

Revision history for this message
Jon Smirl (jonsmirl) wrote :
Revision history for this message
Matthew Garrett (mjg59) wrote :

Can you try editing /etc/network/if-pre-up.d/wireless tools and adding

/sbin/ifconfig "$IFACE" up

just above the

 if [ -n "$IF_WIRELESS_SENS" ]; then

line and see if that helps things?

Revision history for this message
Jon Smirl (jonsmirl) wrote :

I have already done that, everything works fine with "/sbin/ifconfig "$IFACE" up" added. Maybe a little inefficient since it will be done once for every wireless parameter.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Though this is strictly a bug in softmac, it seems unlikely that it'll be fixed there. With luck dscape will prove to be a better bet, but for now I've worked around this in wireless-tools.

Changed in wireless-tools:
status: Unconfirmed → Fix Released
Changed in linux-source-2.6.17:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Low
Revision history for this message
aguy (astyguy-deactivatedaccount) wrote :

Same error with belkin wireless g usb device

[ 160.584707] usb 3-2: USB disconnect, address 2
[ 208.033987] usb 3-5: USB disconnect, address 4
[ 208.057265] zd1211rw 3-5:1.0: error ioread32(CR_REG1): -22
[ 233.608831] usb 3-5: new high speed USB device using ehci_hcd and address 5
[ 233.741981] usb 3-5: configuration #1 chosen from 1 choice
[ 233.856771] usb 3-5: reset high speed USB device using ehci_hcd and address 5
[ 235.331469] zd1211rw 3-5:1.0: firmware version 4725
[ 235.373458] zd1211rw 3-5:1.0: zd1211b chip 050d:705c v4810 high 00-17-3f AL2230_RF pa0 g--NS
[ 235.376045] zd1211rw 3-5:1.0: eth1
[ 237.589520] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 374.072084] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 476.203216] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 539.403235] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 539.485918] ADDRCONF(NETDEV_UP): eth1: link is not ready

Revision history for this message
aguy (astyguy-deactivatedaccount) wrote :

sorry, last error was with ubuntu hardy heron

[ 160.584707] usb 3-2: USB disconnect, address 2
[ 208.033987] usb 3-5: USB disconnect, address 4
[ 208.057265] zd1211rw 3-5:1.0: error ioread32(CR_REG1): -22
[ 233.608831] usb 3-5: new high speed USB device using ehci_hcd and address 5
[ 233.741981] usb 3-5: configuration #1 chosen from 1 choice
[ 233.856771] usb 3-5: reset high speed USB device using ehci_hcd and address 5
[ 235.331469] zd1211rw 3-5:1.0: firmware version 4725
[ 235.373458] zd1211rw 3-5:1.0: zd1211b chip 050d:705c v4810 high 00-17-3f AL2230_RF pa0 g--NS
[ 235.376045] zd1211rw 3-5:1.0: eth1
[ 237.589520] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 374.072084] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 476.203216] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 539.403235] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 539.485918] ADDRCONF(NETDEV_UP): eth1: link is not ready

Revision history for this message
aguy (astyguy-deactivatedaccount) wrote :

My main problem here is that the "Network Settings" application will only allow WEP and not WPA or WPA2 encription

Revision history for this message
aguy (astyguy-deactivatedaccount) wrote :

This now works for me using Ubuntu 8.04

Revision history for this message
f3a97 (f3a97) wrote :

Hi,
     I have the same problem. In particular, this is what I've seen.

If I turn on my wireless router and then boot my PC, all is fine: my wireless card (USB ACER with zd1211 chipset) get the signal, the NM applet shows a nice green bar and I can surf the Internet.

The problem occurs if, for example, I take out the USB wireless card and then I plug it in again. In this case, the wireless network doesn't get configured correctly.

The interesting thing is that the fix to the problem is really easy! I have to do a simple:

$ sudo ifdown eth1
$ sudo ifup eth1

and the net is back again. I'm using Hardy with latest updates, but I have had the same problem with Gutsy.

It is a quite annoying bug. If I can help to diagnose the problem and make Ubuntu better, I'm willing to help! Let me know if you have any idea.

Revision history for this message
f3a97 (f3a97) wrote :

Hi,
      I have to add that the same problem exists with my laptop, that I use with another USB wireless card (3Com) which has the same chipset.

Revision history for this message
f3a97 (f3a97) wrote :

Hi, is there any activity regarding this bug?

BTW, with the latest hardy updates I have to launch the ifdown & ifup manually every time!

I repeat that I'm willing to help, if you have any idea!!!

Thanks

Revision history for this message
f3a97 (f3a97) wrote :

Update:

With the latest Hardy updates (just finished now to install them), the problem is partially solved - i.e. I'm in the same situation as Gutsy.

I mean that now I can access the Net.

The problem still remains if I unplug the USB dongle and then plug it in again: in this case, I get the 'link not ready message'.

Revision history for this message
f3a97 (f3a97) wrote :

An update guys.

I recently upgraded my father notebook to Hardy. Both me and him connect through USB wireless dongles which have zd1211 chipset.

I can say that his computer is ok: there aren't any "link is not ready" issues.

In my case, I've found that my USB dongles sometimes goes offline, perhaps is a cabling issue.

So for what I can say this bug can be closed.

Thanks

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

The 18 month support period for Edgy Eft 6.10 has reached it's end of life. As a result, we are closing the linux-source-2.6.17 Edgy Eft kernel task.

Hardy Heron 8.04 was recently released. It would be helpful if you could test the new release and verify if this is still an issue - http://www.ubuntu.com/getubuntu/download . You should be able to test your bug using the LiveCD. Please let us know your results. Thanks.

Changed in linux-source-2.6.17:
status: Confirmed → Invalid
Changed in linux:
status: New → Incomplete
Revision history for this message
Andy Balaam (mail-artificialworlds) wrote :

Marking as invalid - I am unable to re-test this myself but stek79's report suggest that this issue is solved.

Changed in linux:
status: Incomplete → Invalid
Changed in linux:
status: Invalid → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.