LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-10-2007, 01:22 AM   #1
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Rep: Reputation: 30
Udev rules not holding for device


I have udev running with the 2.6.16.9 kernel on Slackware 11.0. I have a scsi camera device that takes discs from a camera and reads them. The serial for the device is "0000186202," and appears in /dev as sda and sda1. I want to rename these to camera and camera1. The rule I have written looks like this
Code:
 BUS="usb", SYSFS{serial}="0000186202", NAME="camera/%n"
This was placed in a file a created called 10-local.rules in /etc/udev/rules.d/. Can you tell me why my camera isn't being named camera or camera1 yet? Thanks.
 
Old 04-10-2007, 02:41 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
The answer probably requires information from your hardware. What output do you get when you run 'udevinfo -a -p /sys/block/sda' (without quotes).

The problem may lie with mixing lines from the BUS="scsi" and BUSS="usb" blocks of output in your local rule.
 
Old 04-10-2007, 03:38 AM   #3
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
Multi-Card Reader is the device I'm configuring.

bobby@Joes:~$ udevinfo -a -p /sys/block/sda

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/block/sda':
KERNEL=="sda"
SUBSYSTEM=="block"
DRIVER==""
SYSFS{stat}==" 10 11 168 128 0 0 0 0 0 128 128"
SYSFS{size}=="501760"
SYSFS{removable}=="1"
SYSFS{range}=="16"
SYSFS{dev}=="8:0"

looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0/host0/target0:0:0/0:0:0:0':
ID=="0:0:0:0"
BUS=="scsi"
DRIVER=="sd"
SYSFS{ioerr_cnt}=="0x0"
SYSFS{iodone_cnt}=="0x17"
SYSFS{iorequest_cnt}=="0x17"
SYSFS{iocounterbits}=="32"
SYSFS{timeout}=="30"
SYSFS{state}=="running"
SYSFS{rev}=="0128"
SYSFS{model}=="STORAGE DEVICE "
SYSFS{vendor}=="Generic "
SYSFS{scsi_level}=="3"
SYSFS{type}=="0"
SYSFS{queue_type}=="none"
SYSFS{queue_depth}=="1"
SYSFS{device_blocked}=="0"
SYSFS{max_sectors}=="240"

looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0/host0/target0:0:0':
ID=="target0:0:0"
BUS==""
DRIVER==""

looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0/host0':
ID=="host0"
BUS==""
DRIVER==""

looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1/4-1:1.0':
ID=="4-1:1.0"
BUS=="usb"
DRIVER=="usb-storage"
SYSFS{modalias}=="usb:v05DCpB018d0128dc00dsc00dp00ic08isc06ip50"
SYSFS{bInterfaceProtocol}=="50"
SYSFS{bInterfaceSubClass}=="06"
SYSFS{bInterfaceClass}=="08"
SYSFS{bNumEndpoints}=="02"
SYSFS{bAlternateSetting}==" 0"
SYSFS{bInterfaceNumber}=="00"

looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4/4-1':
ID=="4-1"
BUS=="usb"
DRIVER=="usb"
SYSFS{configuration}==""
SYSFS{serial}=="0000186202"
SYSFS{product}=="Multi-Card Reader"
SYSFS{manufacturer}=="Lexar Media "
SYSFS{maxchild}=="0"
SYSFS{version}==" 2.00"
SYSFS{devnum}=="2"
SYSFS{speed}=="12"
SYSFS{bMaxPacketSize0}=="64"
SYSFS{bNumConfigurations}=="1"
SYSFS{bDeviceProtocol}=="00"
SYSFS{bDeviceSubClass}=="00"
SYSFS{bDeviceClass}=="00"
SYSFS{bcdDevice}=="0128"
SYSFS{idProduct}=="b018"
SYSFS{idVendor}=="05dc"
SYSFS{bMaxPower}=="500mA"
SYSFS{bmAttributes}=="80"
SYSFS{bConfigurationValue}=="1"
SYSFS{bNumInterfaces}==" 1"

looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb4':
ID=="usb4"
BUS=="usb"
DRIVER=="usb"
SYSFS{configuration}==""
SYSFS{serial}=="0000:00:1f.2"
SYSFS{product}=="UHCI Host Controller"
SYSFS{manufacturer}=="Linux 2.6.16.9 uhci_hcd"
SYSFS{maxchild}=="2"
SYSFS{version}==" 1.10"
SYSFS{devnum}=="1"
SYSFS{speed}=="12"
SYSFS{bMaxPacketSize0}=="64"
SYSFS{bNumConfigurations}=="1"
SYSFS{bDeviceProtocol}=="00"
SYSFS{bDeviceSubClass}=="00"
SYSFS{bDeviceClass}=="09"
SYSFS{bcdDevice}=="0206"
SYSFS{idProduct}=="0000"
SYSFS{idVendor}=="0000"
SYSFS{bMaxPower}==" 0mA"
SYSFS{bmAttributes}=="c0"
SYSFS{bConfigurationValue}=="1"
SYSFS{bNumInterfaces}==" 1"

looking at parent device '/devices/pci0000:00/0000:00:1f.2':
ID=="0000:00:1f.2"
BUS=="pci"
DRIVER=="uhci_hcd"
SYSFS{modalias}=="pci:v00008086d00002442sv00000E11sd00000083bc0Csc03i00"
SYSFS{local_cpus}=="1"
SYSFS{irq}=="11"
SYSFS{class}=="0x0c0300"
SYSFS{subsystem_device}=="0x0083"
SYSFS{subsystem_vendor}=="0x0e11"
SYSFS{device}=="0x2442"
SYSFS{vendor}=="0x8086"

looking at parent device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""

bobby@Joes:~$

Last edited by binarybob0001; 04-10-2007 at 03:43 AM.
 
Old 04-10-2007, 03:45 AM   #4
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
Lexar Media Multi Card Reader is the device I'm setting up.
 
Old 04-13-2007, 12:51 AM   #5
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
Can anyone give me more help?
 
Old 04-14-2007, 04:08 PM   #6
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
I still can't figure out these rules. Please help.
 
Old 04-14-2007, 05:04 PM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Do you even need to configure udev rules for the card-reader? Why won't the regular usb storage device rules work ?
Try running udevmonitor before plugging in the device. Do you have the "halmount" program? If so, and a device node is created, try "halmount /dev/<node>".

You lost me transitioning from a usb camera to a storage device.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Udev rules and Palm greatgoogamooga Linux - Software 6 11-29-2006 05:21 PM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 04:43 AM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 11:07 AM
udev rules, finding the kernel name of a device? rignes Linux - Software 2 11-07-2005 12:42 AM
Networking rules (udev) cassi0peias Linux - Networking 1 10-18-2005 11:13 AM


All times are GMT -5. The time now is 06:14 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration