LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-07-2005, 04:18 PM   #1
can3p
LQ Newbie
 
Registered: May 2005
Posts: 12

Rep: Reputation: 0
problems with udev


Kernel:2.6.11.11

I have a problem with connecting my Palm. When I run hotplug, I can see information about device in sysfs:
Code:
udevinfo -a -p /sys/bus/usb/devices/usb1/1-2 

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

  looking at class device '/sys/bus/usb/devices/usb1/1-2':
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="00"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="  2mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0100"
    SYSFS{bmAttributes}="c0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="3"
    SYSFS{idProduct}="0169"
    SYSFS{idVendor}="054c"
    SYSFS{manufacturer}="Palm, Inc."
    SYSFS{maxchild}="0"
    SYSFS{product}="Palm Handheld"
    SYSFS{speed}="12"
    SYSFS{version}=" 1.00"
But the proper device file in /dev does not appear.
I read the docs, and wrote the rule:
BUS="usb", SYSFS{product}="Palm Handheld", KERNEL="pilot", NAME="%k", SYMLINK="usb1"

But there is no /dev/pilot when I run hotplug
What did I do wrong?
 
Old 06-07-2005, 04:33 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Weird, there's already a rule in /etc/udev/rules.d/udev.rules
This is the line it contains:
# pilot/palm devices
KERNEL="pilot", NAME="%k", GROUP="uucp"

Maybe you could try to comment this one.
 
Old 06-08-2005, 02:11 PM   #3
can3p
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
No, I haven't got such rule in my /etc/udev/rules.d/udev.rules.
Since I went to 2.6 from 2.4 kernel, there is no file with the name, containing *usb*. And I don't know, what to do.
Here is everething, that connected with usb devices in /etc/udev/rules.d/udev.rules:
Code:
# USB devices
KERNEL="hiddev*",   NAME="usb/%k"
KERNEL="auer*",     NAME="usb/%k"
KERNEL="legousbtower*", NAME="usb/%k"
KERNEL="dabusb*",   NAME="usb/%k"
BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k"

BUS="usb", SYSFS{product}="Palm Handheld", KERNEL="pilot", NAME="pilot", SYMLINK="usb1"
I don't know, what I need to add in this file to make this working. Or the problem is somewhere else.
 
Old 06-08-2005, 05:11 PM   #4
Croaker
Member
 
Registered: Sep 2004
Location: Oklahoma City, OK
Distribution: Slackware 12.1
Posts: 41

Rep: Reputation: 15
They problem may not be with udev. It may show up as a sda* device, not as usb. Usb devices show up as scsi under linux. I know my usb flashdrive appears as /dev/sda1.
Plug in your palmpilot, then take a look at /var/log/messages to find out exactly what it shows up as. Here's mine after plugging in my usb drive.

Code:
kernel: usb 1-5: new high speed USB device using ehci_hcd and address 2
kernel: Initializing USB Mass Storage driver...
kernel: scsi0 : SCSI emulation for USB Mass Storage devices
kernel: usbcore: registered new driver usb-storage
kernel: USB Mass Storage support registered.
kernel:   Vendor:           Model: Memorex TD 2B     Rev: PMAP
kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00
kernel: SCSI device sda: 1015808 512-byte hdwr sectors (520 MB)
kernel: sda: assuming Write Enabled
kernel: SCSI device sda: 1015808 512-byte hdwr sectors (520 MB)
kernel: sda: assuming Write Enabled
kernel:  sda: sda1
kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Since it shows up as sda: sda1, I just added this line to /etc/fstab:

Code:
/dev/sda1      /mnt/usb       vfat         noauto,users,rw  0 0
Then ran 'mkdir /mnt/usb' to create the mount point. If you don't have a mount point, then you are not going to be able to access it. That's why you need to add the line in /etc/fstab.
 
Old 06-08-2005, 05:45 PM   #5
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
Forgive me if I am wrong but I think udev and hotplug will work just fine if you have all your kernel modules installed. Have you got

CONFIG_USB=y
CONFIG_USB_DEBUG=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_UHCI=m
CONFIG_USB_UHCI_ALT=m
CONFIG_USB_OHCI=m

CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_VISOR=m


(its called visor for historical reasons apparently) read here:

http://pilot-link.org/README.usb

I had similar problems with my ipaq until I got the kernel modules built in.

Similar to what keefaz says, I find it useful to run dmesg in a separate console after attaching a device, the last entry will tell you if it got recognised ok

tobyl
 
Old 06-09-2005, 02:43 PM   #6
can3p
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Big thanks to tobyl!
Everything started to work, when I compiled visor module
After compiling kernel with visor module, and then I saw a message in dmesg:
Code:
visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0
visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1
But there was no ttyUSB* in /dev.
Then a read http://pilot-link.org/README.usb and found these magic lines:
Code:
# /bin/mknod /dev/ttyUSB0 c 188 0
# /bin/mknod /dev/ttyUSB1 c 188 1
# /bin/chmod 0666 /dev/ttyUSB?
After them everything started to work fine.
The problem is fixed, but i think, that these device files must be created by udev, because it's udev , and I don't understand, why it doesn't work properly.

P.S. Where did they get the number 188? Where can I find it myself in system?

Last edited by can3p; 06-09-2005 at 02:45 PM.
 
Old 06-09-2005, 02:53 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Look in your kernel source directory at :
Documentation/devices.txt
 
Old 06-09-2005, 06:33 PM   #8
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
glad to help

to expand on keefaz's last post a bit,

/usr/src/linux-2.6.11.7/Documentation/usb/usb-serial.txt

you have a later kernel than mine, so the file may be in a different place, but devices (assuming non-use of devfs which is the case in slackware) can be described by major and minor numbers. Devices handled by the usb-serial driver's major number is 188.

I'm not sure why the udev entry is not being created (if this is the case) but bear in mind that they will not be there until after hotplug has seen the device.

there is more at http://www.reactivated.net/writing_udev_rules.html

but it is quite involved so put your thinking hat on!

tobyl
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help! problems after updating udev for a 2.6.14 kernel! darksmiley Linux - General 5 12-02-2005 03:14 AM
Udev LinxNew Mandriva 1 05-01-2005 02:47 PM
problems with udev - 2.6.10 kernel akshunj Slackware 8 01-21-2005 10:45 AM
Udev anyone? yanik Debian 5 01-05-2005 09:02 AM
udev/hal, problems... TazG Linux - Hardware 0 09-28-2004 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration