# usb wifi fails to work on boot

## Gentree

Hi,

since updating some packages (including udev) a few weeks back, the usb wifi dongle fails to get recognised at boot time. I have to replug the device to get it to work. This is becoming a PITA.

from /var/log/messages:

```
Jan 19 08:50:19 localhost kernel: usb 1-2.1: device descriptor read/64, error -110

Jan 19 08:50:19 localhost kernel: usb 1-2.1: new high speed USB device using ehci_hcd and address 6

```

...

```
Jan 19 08:50:19 localhost smartd[4257]: Monitoring 2 ATA and 0 SCSI devices

Jan 19 08:50:20 localhost smartd[4259]: smartd has fork()ed into background mode. New PID=4259.

Jan 19 08:50:20 localhost smartd[4259]: file /var/run/smartd.pid written containing PID 4259

Jan 19 08:50:34 localhost kernel: usb 1-2.1: device descriptor read/64, error -110

Jan 19 08:50:49 localhost kernel: usb 1-2.1: device descriptor read/64, error -110

Jan 19 08:50:49 localhost kernel: usb 1-2.1: new high speed USB device using ehci_hcd and address 7

Jan 19 08:50:54 localhost kernel: usb 1-2.1: device descriptor read/8, error -110

Jan 19 08:50:59 localhost kernel: usb 1-2.1: device descriptor read/8, error -110

Jan 19 08:51:00 localhost kernel: usb 1-2.1: new high speed USB device using ehci_hcd and address 8

Jan 19 08:51:05 localhost kernel: usb 1-2.1: device descriptor read/8, error -110

Jan 19 08:51:07 localhost login[4391]: pam_unix(login:session): session opened for user prof by LOGIN(uid=0)

Jan 19 08:51:08 localhost polkitd[4465]: started daemon version 0.99 using authority implementation `local' version `0.99'

Jan 19 08:51:10 localhost kernel: usb 1-2.1: device descriptor read/8, error -110

Jan 19 08:51:10 localhost kernel: hub 1-2:1.0: unable to enumerate USB device on port 1

```

here's the replug:

```
Jan 19 08:55:18 localhost kernel: usb 1-2: USB disconnect, address 3

Jan 19 08:55:19 localhost ddclient[4195]: WARNING:  cannot connect to checkip.dyndns.org:80 socket: IO::Socket::INET: Bad hostname 'checkip.dyndns.org'

Jan 19 08:55:19 localhost ddclient[4195]: WARNING:  cannot connect to checkip.dyndns.org:80 socket: IO::Socket::INET: Bad hostname 'checkip.dyndns.org'

Jan 19 08:55:20 localhost kernel: usb 1-2: new high speed USB device using ehci_hcd and address 9

Jan 19 08:55:20 localhost kernel: usb 1-2: configuration #1 chosen from 1 choice

Jan 19 08:55:20 localhost kernel: hub 1-2:1.0: USB hub found

Jan 19 08:55:20 localhost kernel: hub 1-2:1.0: 4 ports detected

Jan 19 08:55:20 localhost kernel: usb 1-2.1: new high speed USB device using ehci_hcd and address 10

Jan 19 08:55:21 localhost kernel: usb 1-2.1: configuration #1 chosen from 1 choice

Jan 19 08:55:21 localhost kernel: cfg80211: Calling CRDA to update world regulatory domain

Jan 19 08:55:21 localhost kernel: phy0 -> rt73usb_validate_eeprom: EEPROM recovery - NIC: 0xffef

Jan 19 08:55:21 localhost kernel: phy0 -> rt73usb_validate_eeprom: EEPROM recovery - Led: 0xe000

Jan 19 08:55:21 localhost kernel: phy0 -> rt73usb_validate_eeprom: EEPROM recovery - RSSI OFFSET A: 0x0000

```

from that point it works as before and the network connects. 

What can be causing  error -110 at startup that goes away on replug?

TIA, Gentree.   :Cool: 

----------

## NeddySeagoon

Gentree,

Build the rt73 kernel stuff as modules, or add the firmware to the kernel.

The rt73 as modules works here.  I think the issue with built in is that the built in driver tries to read /lib/firmware before root is mounted.

I have not tried everything build in.

Incidentlly, timestamped kernel messages are useful for debugging things like this, such as you get from dmesg with the timestamping option on in the kernel.

----------

## Gentree

thanks Neddy,

I will try turning on the timestamp option. 

As for built-in etc., I have been using this rt73 dongle for nearly a year without this issue. I'm trying to trace what recent change has caused it to start failing. 

thx

----------

## Gentree

BTW the rt73 stuff already is built as modules:

```
$ lsmod|grep rt

rt73usb                20844  0 

rt2x00usb               6615  1 rt73usb

rt2x00lib              29636  2 rt73usb,rt2x00usb

mac80211              149153  2 rt2x00usb,rt2x00lib

cfg80211              103666  2 rt2x00lib,mac80211

```

 :Cool: 

thx

[EDIT]

I just did a make clean and rebuilt the kernel and its seems to be fixed.

 :Confused: 

Thanks.

----------

## Gentree

My joy was a bit too hasty. This is still unreliable. 

```

[    8.047560] usb 2-1: configuration #1 chosen from 1 choice

[    8.102415] usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04A9 pid 0x1088

[    8.102432] usbcore: registered new interface driver usblp

[    8.154036] usb 2-2: new high speed USB device using ehci_hcd and address 3

[    8.269448] usb 2-2: configuration #1 chosen from 1 choice

[    8.270281] hub 2-2:1.0: USB hub found

[    8.270610] hub 2-2:1.0: 4 ports detected

[    8.590965] usb 3-3: new full speed USB device using ohci_hcd and address 2

[    8.735235] usb 3-3: configuration #1 chosen from 1 choice

[    8.801150] usb 2-2.1: new full speed USB device using ehci_hcd and address 5

[    8.876151] usb 2-2.1: device descriptor read/64, error -71

[    9.052156] usb 2-2.1: device descriptor read/64, error -71

[    9.215169] usb 2-2.1: new high speed USB device using ehci_hcd and address 6

[    9.308172] usb 2-2.1: device descriptor read/64, error -71

[    9.492056] usb 2-2.1: device descriptor read/64, error -71

[    9.655067] usb 2-2.1: new high speed USB device using ehci_hcd and address 7

[   10.063707] usb 2-2.1: device not accepting address 7, error -71

[   10.125962] usb 2-2.1: new high speed USB device using ehci_hcd and address 8

[   10.535626] usb 2-2.1: device not accepting address 8, error -71

[   10.535847] hub 2-2:1.0: unable to enumerate USB device on port 1

```

later replug:

```
[  160.998201] usb 2-2: USB disconnect, address 3

[  162.982794] usb 2-2: new high speed USB device using ehci_hcd and address 9

[  163.098963] usb 2-2: configuration #1 chosen from 1 choice

[  163.099278] hub 2-2:1.0: USB hub found

[  163.099614] hub 2-2:1.0: 4 ports detected

[  163.375011] usb 2-2.1: new high speed USB device using ehci_hcd and address 10

[  163.591230] usb 2-2.1: configuration #1 chosen from 1 choice

[  163.640468] cfg80211: Calling CRDA to update world regulatory domain

[  163.947402] phy0 -> rt73usb_validate_eeprom: EEPROM recovery - NIC: 0xffef

[  163.947406] phy0 -> rt73usb_validate_eeprom: EEPROM recovery - Led: 0xe000

[  163.947409] phy0 -> rt73usb_validate_eeprom: EEPROM recovery - RSSI OFFSET A: 0x0000

[  163.947842] phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.

[  163.961841] phy0: Selected rate control algorithm 'minstrel'

[  163.962022] usbcore: registered new interface driver rt73usb

[  164.135903] udev: renamed network interface wlan0 to wlan1

[  164.815044] phy0 -> rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'.

[  164.815049] rt73usb 2-2.1:1.0: firmware: requesting rt73.bin

[  164.852975] phy0 -> rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7.

[  164.922446] phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 3, CWmax: 4, Aifs: 2, TXop: 102.

[  164.924443] phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 4, CWmax: 5, Aifs: 2, TXop: 188.

[  164.926442] phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 3, TXop: 0.

[  164.928441] phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 5, CWmax: 10, Aifs: 7, TXop: 0.

[  172.861553] wlan1: direct probe to AP 00:25:15:5e:b5:90 (try 1)

[  173.061084] wlan1: direct probe to AP 00:25:15:5e:b5:90 (try 2)

[  173.261047] wlan1: direct probe to AP 00:25:15:5e:b5:90 (try 3)

[  173.461020] wlan1: direct probe to AP 00:25:15:5e:b5:90 timed out

[  184.174692] wlan1: direct probe to AP 00:25:15:5e:b5:90 (try 1)

[  184.374165] wlan1: direct probe to AP 00:25:15:5e:b5:90 (try 2)

[  184.574125] wlan1: direct probe to AP 00:25:15:5e:b5:90 (try 3)

[  184.576469] wlan1: direct probe responded

[  184.576473] wlan1: authenticate with AP 00:25:15:5e:b5:90 (try 1)

[  184.578214] wlan1: authenticated

[  184.578231] wlan1: associate with AP 00:25:15:5e:b5:90 (try 1)

[  184.580838] wlan1: RX AssocResp from 00:25:15:5e:b5:90 (capab=0x411 status=0 aid=1)

[  184.580841] wlan1: associated

```

I have not been able to pin down why it sometimes comes up and sometimes fails. Since the rebuild I note the error when it occurs is  error -71 which is different.

Still flakey.

 :Sad: 

----------

## NeddySeagoon

Gentree,

```
[    8.590965] usb 3-3: new full speed USB device using ohci_hcd and address 2

[    8.735235] usb 3-3: configuration #1 chosen from 1 choice

[    8.801150] usb 2-2.1: new full speed USB device using ehci_hcd and address 5 
```

Thats odd.  Sometimes your 12Mbit/sec devices use the ohci driver and sometimes the ehci_hcd driver.

This must mean that you have USB2 hardware with transaction translation and that transaction translation is enabled in your kernel.

If thats true, please turn off kernel support for ohci_hcd and let the ehci_hcd driver, with  transaction translation, do everything.

```
[  163.099278] hub 2-2:1.0: USB hub found

[  163.099614] hub 2-2:1.0: 4 ports detected 
```

 shows that your replug is the entire USB hub and everything connected to it, not the rt73 device itself.

Can you test the rt73 device without using the 4 port hub?

We only care that the kernel modules and firmware load reliably for this testing, if the USB dongle is behind a steel case and cannot connect to the network, it doesn't matter.

----------

## Gentree

thanks Neddy,

```

[    8.590965] usb 3-3: new full speed USB device using ohci_hcd and address 2

[    8.735235] usb 3-3: configuration #1 chosen from 1 choice

[    8.801150] usb 2-2.1: new full speed USB device using ehci_hcd and address 5

 
```

usb 3 is a different physical connector next to usb 2. It is connected to an older slow scanner running usb1.1

There is another usb socket on the front that is normally unused except for usb keys. Connections at the back are left in place except for the obligatory replug in question here. 

```

#lsusb

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

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

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

Bus 002 Device 002: ID 04a9:1088 Canon, Inc. i965

Bus 003 Device 002: ID 04a9:2204 Canon, Inc. CanoScan FB630U

Bus 002 Device 011: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB

Bus 002 Device 012: ID 07d1:3c03 D-Link System AirPlus G DWL-G122 Wireless Adapter(rev.C1) [Ralink RT73]

```

If I replug the i965 I just see once device removed and added. The printer has an onboard usb hub , I thought that was the other hub showing here.

What I had not realised until you raised the point was that the 5m usb extention I have running to the wifi dongle apparently has a "4 port" hub in it, despite only having one physical socket. Hence what you note about the hub appearing when I replug the rt73. In fact I was unplugging the hub I did not realise was in the cable.

I need that extension to get within radio range of the wireless router. 

I suppose there could be some link between the problem and the presence of this extra hub but again the problem is new and the hardware was not an issue before. So I still suspect some software change to be the root of the new problems at boot time.

Thanks for picking up some detail I was missing. 

 :Cool: 

----------

## NeddySeagoon

Gentree,

Plug it all in ang get the USB wireless working, then post your /proc/bus/usb/devices file please.

I want to look at your USB tree layout and power requirements.

I'm still interested to know if it works without the 5m USB extension cable.

----------

