# [SOLVED] /dev/usb missing

## SAngeli

Hi,

I know that there has been several threads about this, but they did not help me.

I have Gentoo 64bit 2005.0 installed. I have the following error at boot:

```
 * Coldplugging usb devices ...

expr: non-numeric argument

/etc/hotplug/usb/libusbscanner: line 21: printf: /devices/pci0000:00/0000:00:02.1/usb1/1-0:1.0: invalid number

chown: cannot access `/proc/bus/usb/000/000': No such file or directory

chmod: cannot access `/proc/bus/usb/000/000': No such file or directory

expr: non-numeric argument

/etc/hotplug/usb/libusbscanner: line 21: printf: /devices/pci0000:00/0000:00:02.1/usb1/1-1: invalid number

chown: cannot access `/proc/bus/usb/000/000': No such file or directory

chmod: cannot access `/proc/bus/usb/000/000': No such file or directory

expr: non-numeric argument

/etc/hotplug/usb/libusbscanner: line 21: printf: /devices/pci0000:00/0000:00:02.1/usb1/1-9: invalid number

chown: cannot access `/proc/bus/usb/000/000': No such file or directory

chmod: cannot access `/proc/bus/usb/000/000': No such file or directory

expr: non-numeric argument

/etc/hotplug/usb/libusbscanner: line 21: printf: /devices/pci0000:00/0000:00:02.0/usb2/2-0:1.0: invalid number

chown: cannot access `/proc/bus/usb/000/000': No such file or directory

chmod: cannot access `/proc/bus/usb/000/000': No such file or directory

expr: non-numeric argument

/etc/hotplug/usb/libusbscanner: line 21: printf: /devices/pci0000:00/0000:00:02.0/usb2/2-4: invalid number

chown: cannot access `/proc/bus/usb/000/000': No such file or directory

chmod: cannot access `/proc/bus/usb/000/000': No such file or directory

expr: non-numeric argument

/etc/hotplug/usb/libusbscanner: line 21: printf: /devices/pci0000:00/0000:00:02.0/usb2/2-5: invalid number

chown: cannot access `/proc/bus/usb/000/000': No such file or directory

chmod: cannot access `/proc/bus/usb/000/000': No such file or directory

chown: cannot access `/proc/bus/usb/001/003': No such file or directory

chmod: cannot access `/proc/bus/usb/001/003': No such file or directory
```

1) I do not know how to solve it.

2) I am unable to make my HP LaserJet 1320 printer print, I believe because /dev/usb/lp0 is missing.

I have the following compiled into the kernel:

Support for Host-side USB

USB device filesystem

OHCI HCD support

USB Printer support

Here are some info, if it can help:

lspci

0000:00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)

0000:00:01.0 ISA bridge: nVidia Corporation: Unknown device 0050 (rev a3)

0000:00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)

0000:00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)

0000:00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)

0000:00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)

0000:00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev a2)

0000:00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a3)

0000:00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a3)

0000:00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)

0000:00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

0000:00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

0000:00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

0000:00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

0000:01:00.0 VGA compatible controller: nVidia Corporation NV43 [GeForce 6600 GT] (rev a2)

0000:05:0b.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

0000:05:0c.0 Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (rev 13)[/code]

dmesg | grep ohci

[code]ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ohci_hcd 0000:00:02.0: PCI device 10de:005a (nVidia Corporation)

ohci_hcd 0000:00:02.0: irq 20, pci mem 0xd2003000

ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 2

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

usb 2-4: new low speed USB device using ohci_hcd and address 3

usb 2-5: new low speed USB device using ohci_hcd and address 4

dmesg | grep ehci

[code]ehci_hcd 0000:00:02.1: PCI device 10de:005b (nVidia Corporation)

ehci_hcd 0000:00:02.1: irq 21, pci mem 0xd2004000

ehci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:02.1: park 0

ehci_hcd 0000:00:02.1: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

usb 1-1: new high speed USB device using ehci_hcd and address 2

usb 1-9: new high speed USB device using ehci_hcd and address 6[/code]

grep EHCI /usr/src/linux/.config

[code]CONFIG_USB_EHCI_HCD=y

# CONFIG_USB_EHCI_SPLIT_ISO is not set

# CONFIG_USB_EHCI_ROOT_HUB_TT is not set[/code]

grep OHCI /usr/src/linux/.config

[code]# CONFIG_IEEE1394_OHCI1394 is not set

CONFIG_USB_ARCH_HAS_OHCI=y

CONFIG_USB_OHCI_HCD=y[/code]

ls /dev/u*

[code]/dev/urandom[/code]

lsusb

[code]Bus 002 Device 004: ID 046d:c01b Logitech, Inc. MX310 Optical Mouse

Bus 002 Device 003: ID 046a:0023 Cherry GmbH

Bus 002 Device 002: ID 03f0:1d17 Hewlett-Packard

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 006: ID 05e3:0710 Genesys Logic, Inc.

Bus 001 Device 002: ID 04b8:011b Seiko Epson Corp. Perfection 2400 Photo

Bus 001 Device 001: ID 0000:0000[/code]

lsmod

[code]Module                  Size  Used by

it87                   25884  0

i2c_sensor              3200  1 it87

i2c_isa                 2432  0

i2c_core               20504  3 it87,i2c_sensor,i2c_isa

snd_seq_midi            7488  0

snd_pcm_oss            52128  0

snd_mixer_oss          17152  1 snd_pcm_oss

snd_seq_dummy           3332  0

snd_seq_oss            34880  0

snd_seq_midi_event      7232  2 snd_seq_midi,snd_seq_oss

snd_seq                54912  6 snd_seq_midi,snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_mpu401              6856  1

snd_mpu401_uart         7040  1 snd_mpu401

snd_rawmidi            24288  2 snd_seq_midi,snd_mpu401_uart

snd_seq_device          7952  5 snd_seq_midi,snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi

skge                   34768  0

snd_intel8x0           31936  1

snd_ac97_codec         87640  1 snd_intel8x0

snd_pcm                91148  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              22664  2 snd_seq,snd_pcm

snd                    53960  17 snd_pcm_oss,snd_mixer_oss,snd_seq_dummy,snd_seq_oss,snd_seq,snd_mpu401,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

soundcore               8672  1 snd

snd_page_alloc          8584  2 snd_intel8x0,snd_pcm

evdev                   8640  0

capability              4232  0

commoncap               6208  1 capability

nvidia               4049148  12[/code]

uname -a

[code]Linux mir 2.6.11-gentoo-r11 #3 Sat Jul 2 20:16:17 CEST 2005 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linu[/code]x

I appreciate any help. I am lost and need assistance, please.

SpiroLast edited by SAngeli on Mon Aug 15, 2005 6:22 pm; edited 1 time in total

----------

## NeddySeagoon

SAngeli,

I will be interested to hear why you chose that printer. Meanwhile, lets get it to work.

Emerge usbview and see if the USB subsystem can see the printer when you plug it in.

You can look in /proc/bus/usb/devices yourself but its not a pretty sight.

Do you have any other USB things working ?

----------

## SAngeli

Good morning NeddySeagoon,

I am glad you picked my case and assist me. Thank you.

I will tell you shortly the main reasons of my choice.

As for now here are the info:

Info obtained through KInfoCenter

PCI device 10de:005a (nVidia Corporation) (2)

```
PCI device 10de:005a (nVidia Corporation) (2)

Manufacturer: Linux 2.6.11-gentoo-r11 ohci_hcd

Serial #: 0000:00:02.0

Class:  9  (Hub)

Subclass:  0  (Unused)

Protocol:  0

USB Version:  1.10

Vendor ID:  0x0

Product ID:  0x0

Revision:  2.06

Speed:  12 Mbit/s

Channels:  10

Max. Packet Size:  0

Bandwidth:  36 of 900 (4%)

Intr. requests: 3

Isochr. requests:  0 
```

hp LaserJet 1320 series

```
Manufacturer: Hewlett-Packard

Serial #: 00CNGW54WG6L

Class:  0  ((Defined at Interface level))

Subclas:  0

Protocol:  0

USB Version:  1.10

Vendor ID:  0x3f0  (Hewlett-Packard)

Product ID:  0x1d17

Revision:  1.00

Speed:  12 Mbit/s

Channels:  0

Max. Packet Size:  0
```

Info obtained through usbview

hp LaserJet 1320 series

```

hp LaserJet 1320 series

Manufacturer: Hewlett-Packard

Serial Number: 00CNGW54WG6L

Speed: 12Mb/s (full)

USB Version:  1.10

Device Class: 00(>ifc )

Device Subclass: 00

Device Protocol: 00

Maximum Default Endpoint Size: 8

Number of Configurations: 1

Vendor Id: 03f0

Product Id: 1d17

Revision Number:  1.00

Config Number: 1

   Number of Interfaces: 1

   Attributes: c0

   MaxPower Needed:   2mA

   Interface Number: 0

      Name: usblp

      Alternate Number: 0

      Class: 07(print) 

      Sub Class: 1

      Protocol: 3

      Number of Endpoints: 3

         Endpoint Address: 01

         Direction: out

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms

         Endpoint Address: 81

         Direction: in

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms

         Endpoint Address: 82

         Direction: in

         Attribute: 3

         Type: Int.

         Max Packet Size: 8

         Interval: 255ms

   Interface Number: 0

      Name: usblp

      Alternate Number: 1

      Class: 07(print) 

      Sub Class: 1

      Protocol: 2

      Number of Endpoints: 2

         Endpoint Address: 01

         Direction: out

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms

         Endpoint Address: 81

         Direction: in

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms

   Interface Number: 0

      Name: usblp

      Alternate Number: 2

      Class: 07(print) 

      Sub Class: 1

      Protocol: 1

      Number of Endpoints: 1

         Endpoint Address: 01

         Direction: out

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms
```

cat /proc/bus/usb/devices

```
T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=03f0 ProdID=1d17 Rev= 1.00

S:  Manufacturer=Hewlett-Packard

S:  Product=hp LaserJet 1320 series

S:  SerialNumber=00CNGW54WG6L

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:  If#= 0 Alt= 0 #EPs= 3 Cls=07(print) Sub=01 Prot=03 Driver=usblp

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=255ms

I:  If#= 0 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

I:  If#= 0 Alt= 2 #EPs= 1 Cls=07(print) Sub=01 Prot=01 Driver=usblp

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
```

I read somewhere that this could be caused by udev. Here is my current udev version: sys-fs/udev-045

Hope all this is sufficient info. 

Now, as for the reason of my printer choice, I will post it in my other thread so that it stays with that case.

I will be waiting for your advices. I count on your help and thank you respectively.

Sincerely,

SpiroLast edited by SAngeli on Tue Jul 05, 2005 3:44 pm; edited 3 times in total

----------

## Maedhros

Moved from Desktop Environments to Kernel & Hardware.

----------

## NeddySeagoon

SAngeli,

udev-45 is very old. I have udev-56 and I believe udev-59 is out. If you think its a udev issue, look in your udev rules folder  

```
/etc/udev/rules.d
```

and examine all the files in reverse numerical order. You may only have the file 

```
50-udev.rules

```

You should have an entry 

```
BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k", GROUP="lp"
```

that makes your /dev/usb/lpX entries.

Your printer may be /dev/usblp, not /dev/usb/lp0.

It may be worth trying an update to udev before you do much more.

----------

## SAngeli

Hi everybody,

 :Very Happy:  I SOLVED THIS PRINTING ISSUE  :Very Happy: 

I can only say one thing: Either you know UDEV or you are out of the picture

Here is exactely how I did fix this issue: Follow step by step this URL link: http://homepage.mac.com/felipe_alfaro/iblog/B1004527421/C406641880/E817624163/index.html

In summary do as follows:

1. cat /proc/bus/usb/devices

2. Position yourself at the printer section (obviously, if you do not find it. it only means your PC did not detect it)

Here is my example:

```
T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=03f0 ProdID=1d17 Rev= 1.00

S:  Manufacturer=Hewlett-Packard

S:  Product=hp LaserJet 1320 series

S:  SerialNumber=00CTGY63WI6L

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:  If#= 0 Alt= 0 #EPs= 3 Cls=07(print) Sub=01 Prot=03 Driver=usblp

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=255ms

I:  If#= 0 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

I:  If#= 0 Alt= 2 #EPs= 1 Cls=07(print) Sub=01 Prot=01 Driver=usblp

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
```

This is what is needed to you:

- S:  SerialNumber=00CTGY63WI6L

3. create, if it does not already exist this file: /etc/udev/rules.d/10-local.rules and add this line:

BUS="usb", SYSFS{serial}="00CTGY63WI6L", NAME="lp0", SYMLINK="printers/hp1320"

In your case you will need to adapt what is colored. Also note that printers is a name chosen. It can also be changed to what you prefer to.

4. modify in /etc/cups/printers.conf this line:

- DeviceURI usb:/dev/printers/hp1320

5. from konsole run udevstart

6. verify that the new node exists. Run ls -l /dev/printers/hp1320 It should return this:

lrwxrwxrwx  1 root root 6 Jul  5 19:33 /dev/printers/hp1320 -> ../lp0

You are done!

I hope this can help a lot of those, like me, who had this issue.

FIY: For UDEV to learn here is a good link: http://www.reactivated.net/writing_udev_rules.html

If anybody finds anything that should be corrected, please post here.

Sincerely,

Spiro

----------

## SAngeli

Hi NeddySeagoon,

the only thing I do not like about this forum is that while I might be typing, someone else could be replying to my questions prior to my posts. This is what happened. Your reply was posted at Tue Jul 05, 2005 6:37 pm just while I was composing my reply at Tue Jul 05, 2005 6:57 pm *** Obviously I am joking. I love this forum. I hope it is always blessed! ***

Thank you NeddySeagoon for your kind reply. I appreciate your assistance. I will tomorrow post at the other thread my reasons for the printer choice.

One question if possible: what is the difference between 10-local.rules  10-udev.rules?

My print rule did not work on 10-udev.rules. I had to create 10-local.rules and than it did work.

Could you please explain the entire /etc/udev/rules.d/ concept, if possible.

Thank you,

Spiro

----------

## HomerSimpson

Thanks. I can print again!

Why isn't /dev/usb/lp0 being created?

I was running udev 49 upgrade to 60 to get this to work. I had the same problem with both.

Unfortunately I don't have access to my UPS either now. I will try something similar to what you posted to see if that gets it going.

Thanks

----------

## NeddySeagoon

SAngeli,

I don't fully understand udev but it is well documented, so I will only point you to google.

The rules files all begin with a number and are scanned in reverse numerical order when a device is detected.

You should not edit the 50- ...  file, that is the defualt set of rules supplied with udev.

You should add your own file with a lower number (I didn't think the names were important). That way, any rules in lower number files will over ride

rules in higer number files, and you won't lose your custom rules when udev is updated.

----------

## SAngeli

Hi NeddySeagoon,

Thanks for your reply. Only to ask if you are aware of:

which one to use: 10-local.rules or 10-udev.rules? 

It should be (a number lower than 50) 10-udev.rules. If so, then how come I had to create 10-local.rules to make my printer node be created? This is what I do not understant.

But, as soon as I can, I will study properly this udev beast so that I can properly set it up.

For now, thank you so much for all your help.

Time to go to bed, zzzzzzz

Talk to you tomorrow,

Spiro

----------

## NeddySeagoon

SAngeli,

As I said, I didn't think the file names (beyond the leading number) were important, so I don't know.

----------

## SAngeli

Hi NeddySeagoon,

ok. I see.

Thank you very much,

Spiro

----------

## SAngeli

Hi,

I solved my issue. I replaced my HP USB printer with a NIC one.

Now, finally I do not have to rely on USB.

thank you for all your help.

Spiro

----------

## rzaleski81

I jumped on the writing udev rules and the only thing I would add is changing NAME="%k" in the rules will correctly find the device matching the printers serial and symlink it instead of requiring the device to be lp0.  It didn't work immediately for me bause of that.  Thanks for the info pointing in the right direction though.  I guess learning udev is something I'll have to continually do, but I think I can just learn to write udev ruls now  :Wink: .

----------

## SAngeli

Hi rzaleski81,

I like your Icon.

Yes, I agree with you. It is better to let kernel assign the proper name  NAME="%k"  and then with smylink adapting it as you wish. As a matter of fact I have been doing so since I learned this benefit too.

I am glad this thread assisted you and make sure: keep up with udev as it is indeed difficult to understand it at first. But, once you got it, it's a pleasure writing rules.   :Wink: 

Take good care,

Spiro

----------

