LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-13-2006, 10:29 AM   #1
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
iPod udev rules for 2 different iPods


Why does udev recognition of my iPod break when I add the serial number to the udev rule?

My original /etc/udev/rules.d/10-local.rules works fine:
Code:
BUS="scsi", SYSFS{model}="iPod*", KERNEL="sd?2", NAME="%k", SYMLINK="ipodnano", MODE="0666"
However, when trying to add a custom rule to differentiante two iPods, nothing works:

Code:
BUS="scsi", SYSFS{model}="iPod*", SYSFS{serial}="000F2566129GA5E7", KERNEL="sd?2", NAME="%k", SYMLI
NK="ipodnano", MODE="0666"
The only thing I changed was to add the SYSFS{serial}="..." part, but for some reason, that breaks the entire recognition. I got the serial both from looking in lsusb -vv and in /sys/devices/.../usb/ directory.

Anyone? I'd really like to be able to have my ipod video as /dev/ipodvideo and the Nano as /dev/ipodnano

Any insight greatly appreciated.

-Y1
 
Old 05-13-2006, 11:51 AM   #2
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Just a shot in the dark, try getting rid of SYSFS{model}="iPod*". You won't need it anyway if the serial number works.

To make sure that makes sense, I am suggesting that you try:

Code:
BUS="scsi", SYSFS{serial}="000F2566129GA5E7", KERNEL="sd?2", NAME="%k", SYMLINK="ipodnano", MODE="0666"
 
Old 05-14-2006, 10:59 AM   #3
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 15
Posts: 546

Rep: Reputation: 43
Keys in udev rules must belong to the same "block".
For instance my usbdrive output looks like
looking at device '/devices/pci0000:00/0000:00:03.1/usb3/3-2/3-2:1.0/host0/target0:0:0/0:0:0:0':
ID=="0:0:0:0"
BUS=="scsi"
DRIVER=="sd"
SYSFS{ioerr_cnt}=="0x1"
SYSFS{iodone_cnt}=="0x15"
SYSFS{iorequest_cnt}=="0x15"
SYSFS{iocounterbits}=="32"
SYSFS{timeout}=="30"
SYSFS{state}=="running"
SYSFS{rev}=="1.01"
SYSFS{model}=="JUMPDRIVE "
SYSFS{vendor}=="LEXAR "
SYSFS{scsi_level}=="3"
SYSFS{type}=="0"
SYSFS{queue_type}=="none"
SYSFS{queue_depth}=="1"
SYSFS{device_blocked}=="0"
SYSFS{max_sectors}=="240"
and deeper
looking at device '/devices/pci0000:00/0000:00:03.1/usb3/3-2':
ID=="3-2"
BUS=="usb"
DRIVER=="usb"
SYSFS{configuration}==""
SYSFS{serial}=="000000105071405266050000000000000000000000000"
SYSFS{product}=="LEXR PLUG DRIVE"
SYSFS{manufacturer}=="LEXR PLUG DRIVE"
SYSFS{maxchild}=="0"
SYSFS{version}==" 1.10"
SYSFS{devnum}=="2"
SYSFS{speed}=="12"
SYSFS{bMaxPacketSize0}=="8"
SYSFS{bNumConfigurations}=="1"
SYSFS{bDeviceProtocol}=="00"
SYSFS{bDeviceSubClass}=="00"
SYSFS{bDeviceClass}=="00"
SYSFS{bcdDevice}=="0001"
SYSFS{idProduct}=="0080"
SYSFS{idVendor}=="05dc"
SYSFS{bMaxPower}==" 90mA"
SYSFS{bmAttributes}=="80"
SYSFS{bConfigurationValue}=="1"
SYSFS{bNumInterfaces}==" 1"
So if you want to set up a rule for your iPods differentiating them by serial number you must use keys in the same block ie
BUS=="usb", NAME="=sd[a-z][0-9]", KERNEL=="%k", SYSFS{product}=="LEXR PLUG DRIVE", SYSFS{serial}=="000000105071405266050000000000000000000000000", SYMLINK=="bla-bla"
Hope this helps
Ciao
 
Old 05-20-2006, 04:27 AM   #4
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Original Poster
Rep: Reputation: 36
Thanks much - that hit the spot!
I now changed all my rules to match usb rather than SCSI, and I even got my old CDROM / DVD aliases to work again

Much appreciated!

-Y1
 
  


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
Creating rules for udev wnaLinux Slackware 5 01-03-2008 09:21 AM
UDEV Rules Location Toods Slackware 1 04-28-2006 02:23 AM
Udev rules working but... cferron Linux - Hardware 5 03-24-2006 02:46 AM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 10:07 AM
Networking rules (udev) cassi0peias Linux - Networking 1 10-18-2005 10:13 AM

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

All times are GMT -5. The time now is 10:18 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