# can't find USB ports -- maybe need udev configuration help

## zgentoo

I've been banging my head against this for two days. My system knows I have USB ports:

```

# lspci

0000:00:00.0 Host bridge: Intel Corp. 82875P Memory Controller Hub (rev 02)

0000:00:01.0 PCI bridge: Intel Corp. 82875P Processor to AGP Controller (rev 02)

0000:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1 (rev 02)

0000:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2 (rev 02)

0000:00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02)

0000:00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #4 (rev 02)

0000:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)

[...]

```

Nothing corresponding to them that I can see appears in /dev. 

I'm running udev, and not devfs (This is on a gentoo-dev-sources 2.6.8 kernel configured without devfs.)

Is the idea that I have to have a rule in advance in my udev.conf to identify a particular device and then a /dev file will be automagically created when I plug in a device it recognizes? How would I find where to create an entry for, say, a Palm m505?

thanks.

----------

## massimo

You might take a loot at these two pages:

http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html

http://www.reactivated.net/udevrules.php

----------

## oumpah-pah

I'm not sure I fully understand your problem. Are you saying that your USB ports do not appear in /dev, or that the devices connected to them do not appeat in /dev ?

----------

## zgentoo

I see neither any sign of the ports, nor of connected devices. Under udev, would one expect it to not create a device file for just the port without a device?

----------

## oumpah-pah

No, there shouldn't be devices just for the ports. It just when you said

 *zgentoo wrote:*   

> Nothing corresponding to them that I can see appears in /dev.

 

after listing the ports that confused me.

Now, what do you get in dmesg when you plug a device in? If you get nothing, it is not a udev configuration problem, but a kernel one. If you get something, just post it here.

By the way, the proper place for personal udev rules is in /etc/udev/rules.d/10-local.rules.

----------

## zgentoo

dmesg says a lot of stuff... here's the stuff to do with USB (and probably stuff that doesn't but I'm not sure about, so I included it.)

```

Linux Plug and Play Support v0.97 (c) Adam Belay

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

00:00:01[A] -> 2-16 -> IRQ 16 level low

00:00:01[B] -> 2-17 -> IRQ 17 level low

00:00:1f[A] -> 2-18 -> IRQ 18 level low

00:00:1e[D] -> 2-19 -> IRQ 19 level low

00:00:1d[D] -> 2-23 -> IRQ 23 level low

00:02:00[A] -> 2-21 -> IRQ 21 level low

00:02:00[B] -> 2-22 -> IRQ 22 level low

00:02:00[D] -> 2-20 -> IRQ 20 level low

number of MP IRQ sources: 15.

number of IO-APIC #2 registers: 24.

testing the IO APIC.......................

IO APIC #2......

.... register #00: 02000000

.......    : physical APIC id: 02

.......    : Delivery Type: 0

.......    : LTS          : 0

.... register #01: 00178020

.......     : max redirection entries: 0017

.......     : PRQ implemented: 1

.......     : IO APIC version: 0020

.... IRQ redirection table:

 NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:   

 00 000 00  1    0    0   0   0    0    0    00

 01 003 03  0    0    0   0   0    1    1    39

 02 003 03  0    0    0   0   0    1    1    31

 03 003 03  0    0    0   0   0    1    1    41

 04 003 03  0    0    0   0   0    1    1    49

 05 003 03  0    0    0   0   0    1    1    51

 06 003 03  0    0    0   0   0    1    1    59

 07 003 03  0    0    0   0   0    1    1    61

 08 003 03  0    0    0   0   0    1    1    69

 09 003 03  0    1    0   0   0    1    1    71

 0a 003 03  0    0    0   0   0    1    1    79

 0b 003 03  0    0    0   0   0    1    1    81

 0c 003 03  0    0    0   0   0    1    1    89

 0d 003 03  0    0    0   0   0    1    1    91

 0e 003 03  0    0    0   0   0    1    1    99

 0f 003 03  0    0    0   0   0    1    1    A1

 10 003 03  1    1    0   1   0    1    1    A9

 11 003 03  1    1    0   1   0    1    1    B1

 12 003 03  1    1    0   1   0    1    1    B9

 13 003 03  1    1    0   1   0    1    1    C1

 14 003 03  1    1    0   1   0    1    1    E1

 15 003 03  1    1    0   1   0    1    1    D1

 16 003 03  1    1    0   1   0    1    1    D9

 17 003 03  1    1    0   1   0    1    1    C9

IRQ to pin mappings:

IRQ0 -> 0:2

IRQ1 -> 0:1

IRQ3 -> 0:3

IRQ4 -> 0:4

IRQ5 -> 0:5

IRQ6 -> 0:6

IRQ7 -> 0:7

IRQ8 -> 0:8

IRQ9 -> 0:9

IRQ10 -> 0:10

IRQ11 -> 0:11

IRQ12 -> 0:12

IRQ13 -> 0:13

IRQ14 -> 0:14

IRQ15 -> 0:15

IRQ16 -> 0:16

IRQ17 -> 0:17

IRQ18 -> 0:18

IRQ19 -> 0:19

IRQ20 -> 0:20

IRQ21 -> 0:21

IRQ22 -> 0:22

IRQ23 -> 0:23

.................................... done.

PCI: Using ACPI for IRQ routing

Simple Boot Flag at 0x7a set to 0x80

Machine check exception polling timer started.

Starting balanced_irq

```

Visor/Palm support is configured as a kernel module:

```

CONFIG_USB_SERIAL_VISOR=m

```

but I don't see anything in /sys that would appear to correspond to it (but I don't know what its name would be.)

Perhaps what I need is a script for hotplug and I'll pursue that and finding the sys file and writing a udev rule next..

----------

## massimo

Is the module loaded (lsmod)?

What does dmesg say right after you connect your usb device (the last lines)?

----------

## zgentoo

no, lsmod reports it's not loaded. And dmesg's last lines say nothing about the module or the device. Thanks.

----------

## massimo

Well, then try loading the module and after that plug in the device and check dmesg.

----------

## zgentoo

Getting closer... with the module loaded, and the palm in its cradle attached to a USB port, dmesg reports:

```

usbcore: registered new driver usbserial

drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0

drivers/usb/serial/usb-serial.c: USB Serial support registered for Handspring Visor / Palm OS

drivers/usb/serial/usb-serial.c: USB Serial support registered for Sony Clie 3.5

drivers/usb/serial/usb-serial.c: USB Serial support registered for Sony Clie 5.0

usbcore: registered new driver visor

drivers/usb/serial/visor.c: USB HandSpring Visor / Palm OS driver v2.1

usb 2-1: new full speed USB device using address 2

visor 2-1:1.0: Handspring Visor / Palm OS converter detected

usb 2-1: Handspring Visor / Palm OS converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

usb 2-1: Handspring Visor / Palm OS converter now attached to ttyUSB1 (or usb/tts/1 for devfs)

usb 2-1: USB disconnect, address 2

visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0

visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1

visor 2-1:1.0: device disconnected

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

visor 2-1:1.0: Handspring Visor / Palm OS converter detected

usb 2-1: Handspring Visor / Palm OS converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

usb 2-1: Handspring Visor / Palm OS converter now attached to ttyUSB1 (or usb/tts/1 for devfs)

usb 2-1: USB disconnect, address 3

visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0

visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1

visor 2-1:1.0: device disconnected

usb 2-1: new full speed USB device using address 4

visor 2-1:1.0: Handspring Visor / Palm OS converter detected

usb 2-1: Handspring Visor / Palm OS converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

usb 2-1: Handspring Visor / Palm OS converter now attached to ttyUSB1 (or usb/tts/1 for devfs)

usb 2-1: USB disconnect, address 4

visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0

visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1

visor 2-1:1.0: device disconnected

```

Why it cycles through 4 addresses and ends up disconnected I don't know yet. There's no /dev/ttyUSB0 or /dev/ttyUSB1 when I ls /dev.

(Thanks to everyone for their help...)

----------

## massimo

After you load the module and connect the device, is there anything in /dev/usb/?

----------

## zgentoo

No, there's nothing even containing the string 'USB' (upper or lower case) anywhere under /dev.

Here's a clue I'm still missing: should I be running usbdevfs in addition to udev (yes, I know usbdevfs is different from devfs, which was made obsolete by udev) ?

----------

## massimo

Try loading the module with these parameters:

modprobe visor vendor=830 product=2

----------

## zgentoo

Before and after modprobing with those parameters, plugging in the Palm makes my system create a device at /dev/ptmx, but that does't work for communicating with the Palm.

----------

## massimo

Maybe manually creating the device nodes might help you accessing you Palm. Here is a Mini-Howto: http://www.vbijl.net/~ryan/visor/howto/

----------

## DeadMonkey

Forget Google.  I need to come here first from now on...

udev created the entries when I pressed the sync button on my Visor cradle called /dev/tts/USB0 and USB1 (and then immediately disappeared after the connection timed out).  But that guide showed to make the nodes for /dev/ttyUSB0 and USB1, and then link to /dev/pilot, /dev/palm.

With Jpilot, it worked like a charm!  Perhaps Jpilot only reads from /dev/pilot, as it says pilot-link does.

Anyway, massimo, thanks for the link!

----------

## phoolish

That's a temporary solution, exactly the same way you had to do it before.  Using udev means centralizing all the commands in one location (mainly /etc/udev/rules.d/ & /etc/udev/permissions.d/) or am I missing the point of using udev over devfs?  Still looking for solution to my handspring visor vs jpilot issue.

----------

## phoolish

I noticed that my visor was able to sync with jpilot when using the root account, but not to my normal user account.  Even though I had a permission.d/10-udev.permissions entry setup

```
pilot*:root:usb:0666
```

Here is my 10-udev.rules entry for my visor edge palm pilot which now syncs with jpilot completely, well, I have to press the hotsync button before I hit the sync button in jpilot, but other then it seems to work golden

```
BUS="usb", SYSFS{product}="Handspring Visor", NAME="%k", SYMLINK="pilot",GROUP="wheel"
```

I don't know whether including the GROUP call in rules is a security risk (someone with more knowledge of udeb please address this), but this is my solution for now. (commented out my 10-udev.permissions entry)  Just make sure a user who wants access to this account is also in the group wheel (already necessary for all kinds of fun in Gentoo)

----------

