LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-03-2008, 11:13 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
udev: symlink for my meizu m6


I want to create a symlink to my meizu m6.... say something like /dev/meizu
How do I specify a rule for udev to do it?

Here's the info for the device:
Code:
$ udevinfo --query=all --name=sdb
P: /block/sdb
N: sdb
S: disk/by-id/usb-Meizu_MiniPlayer_000000E5E5000-0:0
S: disk/by-path/pci-0000:00:1d.7-usb-0:7:1.0-scsi-0:0:0:0
S: disk/by-uuid/68DE-5DE7
E: DEVTYPE=disk
E: ID_VENDOR=Meizu
E: ID_MODEL=MiniPlayer
E: ID_REVISION=1.00
E: ID_SERIAL=Meizu_MiniPlayer_000000E5E5000-0:0
E: ID_SERIAL_SHORT=000000E5E5000
E: ID_TYPE=disk
E: ID_INSTANCE=0:0
E: ID_BUS=usb
E: ID_PATH=pci-0000:00:1d.7-usb-0:7:1.0-scsi-0:0:0:0
E: ID_FS_USAGE=filesystem
E: ID_FS_TYPE=vfat
E: ID_FS_VERSION=FAT32
E: ID_FS_UUID=68DE-5DE7
E: ID_FS_UUID_ENC=68DE-5DE7
E: ID_FS_LABEL=
E: ID_FS_LABEL_ENC=
E: ID_FS_LABEL_SAFE=
 
Old 01-03-2008, 11:31 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
There may already be a file in /etc/udev/rules.d that contains a rule for your device and if so, you can edit it to suit your needs. Let's assume there isn't such a file. You can make a rule like this:

ENV{ID_VENDOR}=="Meizu", ENV{ID_MODEL}=="MiniPlayer", ENV{ID_SERIAL_SHORT}=="000000E5E5000", SYMLINK+="meizu"

Add this as a single line to a new file in /etc/udev/rules.d, which you can call something like 10-local.rules. I've deliberately chosen properties that are meaningful (model, manufacturer, serial number) because it makes more sense to identify a device by those things rather than, say, file system type.
 
Old 01-03-2008, 11:36 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Ok... let my try that. I wonder if it's possible to use ID_FS_UUID to identify it.

Code:
ENV{ID_FS_UUID}=="68DE-5DE7",SYMLINK+="meizu"
 
Old 01-03-2008, 11:51 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Of course you're free to add that property to the rule!
 
Old 01-03-2008, 11:55 AM   #5
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Good to know, however, it didn't work your way... nor mine. :-)

I don't have to restart udev (/etc/init.d/udev restart) after adding/editing the file, right? Cause I just read that files are read by udev when events are performed by the kernel.

Here's the file as I created it:
Code:
$ cat 62-meizu.rules
# Reglas para el meizu m6
#ENV{ID_VENDOR}=="Meizu", ENV{ID_MODEL}=="MiniPlayer", ENV{ID_SERIAL_SHORT}=="000000E5E5000", SYMLINK+="meizu"
ENV{ID_FS_UUID}=="68DE-5DE7", SYMLINK+="meizu"
I tried with the first line first. It failed, so I commented it and tried with the second (mine). Didn't work either.

By the way, I'm on kubuntu gutsy.
 
Old 01-03-2008, 11:59 AM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Yeah, you shouldn't need to restart udev but it wouldn't hurt to do so. Just to check: are there any other files in /etc/udev/rules.d?
 
Old 01-03-2008, 12:05 PM   #7
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Yes, there are a number of files.

Code:
$ ls -l
total 260
-rw-r--r-- 1 root root   132 2007-04-10 09:03 00-init.rules
lrwxrwxrwx 1 root root    23 2007-08-06 19:40 025_libsane-extras.rules -> ../libsane-extras.rules
lrwxrwxrwx 1 root root    22 2007-04-09 20:06 025_logitechmouse.rules -> ../logitechmouse.rules
-rw-r--r-- 1 root root   272 2007-04-10 09:03 05-options.rules
-rw-r--r-- 1 root root  3076 2007-09-24 10:29 20-names.rules
-rw-r--r-- 1 root root   119 2007-04-10 09:03 30-cdrom_id.rules
-rw-r--r-- 1 root root  3258 2007-07-10 12:52 40-permissions.rules
-rw-r--r-- 1 root root    30 2007-03-12 17:34 45-fuse.rules
-rw-r--r-- 1 root root 60410 2007-10-03 18:25 45-libgphoto2.rules
-rw-r--r-- 1 root root  1749 2006-08-22 21:38 45-libnjb.rules
-rw-r--r-- 1 root root 50851 2007-10-05 10:26 45-libsane.rules
-rw-r--r-- 1 root root  5716 2007-04-02 10:45 50-xserver-xorg-input-wacom.rules
-rw-r--r-- 1 root root    55 2007-05-23 17:02 60-kqemu.rules
-rw-r--r-- 1 root root   649 2007-07-10 12:52 60-symlinks.rules
-rw-r--r-- 1 root root   184 2008-01-03 12:50 62-meizu.rules
-rw-r--r-- 1 root root  1185 2007-09-24 10:29 65-dmsetup.rules
-rw-r--r-- 1 root root  4641 2007-03-08 13:58 65-libmtp.rules
-rw-r--r-- 1 root root  1365 2007-07-10 12:52 65-persistent-input.rules
-rw-r--r-- 1 root root  4261 2007-07-10 12:52 65-persistent-storage.rules
-rw-r--r-- 1 root root  1038 2007-09-30 09:22 70-persistent-cd.rules
-rw-r--r-- 1 root root   345 2007-06-28 20:47 70-persistent-net.rules
-rw-r--r-- 1 root root   186 2007-06-17 06:41 75-cd-aliases-generator.rules
-rw-r--r-- 1 root root   869 2007-06-17 06:41 75-persistent-net-generator.rules
-rw-r--r-- 1 root root   564 2007-09-24 10:29 80-programs.rules
-rw-r--r-- 1 root root   171 2006-07-30 20:51 85-alsa.rules
-rw-r--r-- 1 root root  1443 2007-03-27 07:39 85-brltty.rules
-rw-r--r-- 1 root root    81 2006-07-20 19:03 85-hdparm.rules
-rw-r--r-- 1 root root   723 2007-06-25 18:55 85-hplj10xx.rules
-rw-r--r-- 1 root root   126 2007-09-06 16:19 85-hwclock.rules
-rw-r--r-- 1 root root   708 2007-04-10 09:02 85-ifupdown.rules
-rw-r--r-- 1 root root   950 2006-07-20 20:02 85-pcmcia.rules
-rw-r--r-- 1 root root  3040 2007-08-31 17:45 90-modprobe.rules
-rw-r--r-- 1 root root    90 2007-07-03 04:53 95-hal.rules
-rw-r--r-- 1 root root    77 2007-04-10 09:03 99-udevmonitor.rules
-rw-r--r-- 1 root root   297 2007-08-07 08:07 kino.rules
lrwxrwxrwx 1 root root    15 2007-08-18 10:21 libmtp.rules -> ../libmtp.rules
-rw-r--r-- 1 root root  1224 2006-10-16 07:39 README
lrwxrwxrwx 1 root root    16 2007-04-19 15:31 z60_eciadsl.rules -> ../eciadsl.rules
And README says:
Code:
$ cat README
The files in this directory are read by udev(7) and used when events
are performed by the kernel.  The udev daemon watches this directory
with inotify so that changes to these files are automatically picked
up, for this reason they must be files and not symlinks to another
location as in the case in Debian.

Files should be named xx-descriptive-name.rules, the xx should be
chosen first according to the following sequence points:

  00   rules that it is critical to be run first, usually
       only WAIT_FOR_SYSFS

  20   rules that change the name from the device from the default
       (cannot be overriden)

  40   rules that set the permissions of device nodes
       (can be overriden by later rules)

  60   rules that add symlinks to device nodes
       (adds to those set in earlier rules)

  80   rules that run programs (but do not load modules)

  90   rules that load modules

  99   rules that it is critical to be run last


This scheme has been chosen so that user-supplied rules are normally
named 50-*.rules for the right thing to happen.

Packages should chose the approriate sequence point and add 5 to it
(e.g. 25-iftab.rules, 45-libsane.rules, etc.) unless there is a need
for a particular order.
That's why I numbered my file 62. I didn't change any other file.
 
Old 01-03-2008, 12:09 PM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Ok. In theory it should work then. First try restarting udev and see if you have a /dev/meizu. I've had strange problems with udev rules that seem to fix themselves after a restart of the udev daemon. Edit: also, let's see what's in your 60-symlinks.rules and 65-libmtp.rules files (I'm not sure if your device uses MTP or not).

Last edited by Nylex; 01-03-2008 at 12:11 PM.
 
Old 01-03-2008, 12:24 PM   #9
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Is it possible to see what rules are being applied on a device? Maybe with udevmonitor?
 
Old 01-03-2008, 12:29 PM   #10
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I've never actually used udevmonitor (apart from just now), but it's worth a try to see what's happening. Try running it with the --environment option and see what that gives you. For example, running it after turning my USB DVD-rewriter on gives me (amongst other things)

DEVLINKS=/dev/disk/by-id/usb-ATAPI_DVD_A_DH20A3P_0000000000121C73-0:0 /dev/disk/by-path/pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0 /dev/cdrom /dev/dvd /dev/dvdrw /dev/cdrw,

which shows the symlinks my udev rules have created.
 
Old 01-03-2008, 12:30 PM   #11
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
It can use MTP or MSC. Right now it's MSC.


Anyway, here are the files:

60-symlinks.rules
Code:
# This file establishes user-friendly symlinks to devices according to
# Ubuntu policy.  See udev(7) for syntax.
#
# The names of the actual devices themselves must not be set here, but
# in 20-names.rules; the permissions and ownership of those devices
# should be set in 40-permissions.rules.

# Compatibility symlinks for /dev/scd* devices
SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", SYMLINK+="%k"

# Compatibility symlinks for USB printers
SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*",  SYMLINK+="usb%k"

# Create /dev/pilot symlink for Palm Pilots
KERNEL=="ttyUSB*", ATTRS{product}=="Palm Handheld*|Handspring *|palmOne Handheld", \
                                        SYMLINK+="pilot"
65-libmtp.rules
Code:
# UDEV-style hotplug map for libmtp
# Put this file in /etc/udev/rules.d

SUBSYSTEM!="usb_device", ACTION!="add", GOTO="libmtp_rules_end"

# Creative Zen Vision
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="411f", SYMLINK+="libmtp-%k", MODE="666"
# Creative Portable Media Center
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="4123", SYMLINK+="libmtp-%k", MODE="666"
# Creative Zen Xtra (MTP mode)
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="4128", SYMLINK+="libmtp-%k", MODE="666"
# Second generation Dell DJ
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="412f", SYMLINK+="libmtp-%k", MODE="666"
# Creative Zen Micro (MTP mode)
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="4130", SYMLINK+="libmtp-%k", MODE="666"
# Creative Zen Touch (MTP mode)
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="4131", SYMLINK+="libmtp-%k", MODE="666"
# Dell Pocket DJ (MTP mode)
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="4132", SYMLINK+="libmtp-%k", MODE="666"
# Creative Zen Sleek (MTP mode)
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="4137", SYMLINK+="libmtp-%k", MODE="666"
# Creative Zen MicroPhoto
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="413c", SYMLINK+="libmtp-%k", MODE="666"
# Creative Zen Sleek Photo
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="413d", SYMLINK+="libmtp-%k", MODE="666"
# Creative Zen Vision:M
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="413e", SYMLINK+="libmtp-%k", MODE="666"
# Samsung YH-820
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="502e", SYMLINK+="libmtp-%k", MODE="666"
# Samsung YH-925
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="502f", SYMLINK+="libmtp-%k", MODE="666"
# Samsung YP-T7J
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="5047", SYMLINK+="libmtp-%k", MODE="666"
# Samsung YP-U2J (YP-U2JXB/XAA)
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="5054", SYMLINK+="libmtp-%k", MODE="666"
# Samsung YP-F2J
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="5057", SYMLINK+="libmtp-%k", MODE="666"
# Samsung YH-999 Portable Media Center
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="5a0f", SYMLINK+="libmtp-%k", MODE="666"
# Intel Bandon Portable Media Center
SYSFS{idVendor}=="045e", SYSFS{idProduct}=="00c9", SYMLINK+="libmtp-%k", MODE="666"
# JVC Alneo XA-HD500
SYSFS{idVendor}=="04f1", SYSFS{idProduct}=="6105", SYMLINK+="libmtp-%k", MODE="666"
# Philipps HDD6320
SYSFS{idVendor}=="0471", SYSFS{idProduct}=="01eb", SYMLINK+="libmtp-%k", MODE="666"
# Philipps HDD6320 2
SYSFS{idVendor}=="0471", SYSFS{idProduct}=="014b", SYMLINK+="libmtp-%k", MODE="666"
# Philipps HDD1630/17
SYSFS{idVendor}=="0471", SYSFS{idProduct}=="014c", SYMLINK+="libmtp-%k", MODE="666"
# SanDisk Sansa m240
SYSFS{idVendor}=="0781", SYSFS{idProduct}=="7400", SYMLINK+="libmtp-%k", MODE="666"
# SanDisk Sansa c150
SYSFS{idVendor}=="0781", SYSFS{idProduct}=="7410", SYMLINK+="libmtp-%k", MODE="666"
# SanDisk Sansa e200
SYSFS{idVendor}=="0781", SYSFS{idProduct}=="7420", SYMLINK+="libmtp-%k", MODE="666"
# SanDisk Sansa e260
SYSFS{idVendor}=="0781", SYSFS{idProduct}=="7420", SYMLINK+="libmtp-%k", MODE="666"
# iRiver Portable Media Center
SYSFS{idVendor}=="1006", SYSFS{idProduct}=="4002", SYMLINK+="libmtp-%k", MODE="666"
# iRiver Portable Media Center
SYSFS{idVendor}=="1006", SYSFS{idProduct}=="4003", SYMLINK+="libmtp-%k", MODE="666"
# iRiver T10
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1113", SYMLINK+="libmtp-%k", MODE="666"
# iRiver T20 FM
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1114", SYMLINK+="libmtp-%k", MODE="666"
# iRiver U10
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1116", SYMLINK+="libmtp-%k", MODE="666"
# iRiver T10
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1117", SYMLINK+="libmtp-%k", MODE="666"
# iRiver T20
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1118", SYMLINK+="libmtp-%k", MODE="666"
# iRiver T30
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1119", SYMLINK+="libmtp-%k", MODE="666"
# iRiver T10 2GB
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1120", SYMLINK+="libmtp-%k", MODE="666"
# iRiver Clix
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="112a", SYMLINK+="libmtp-%k", MODE="666"
# iRiver H10 20GB
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="2101", SYMLINK+="libmtp-%k", MODE="666"
# iRiver H10
SYSFS{idVendor}=="4102", SYSFS{idProduct}=="2102", SYMLINK+="libmtp-%k", MODE="666"
# Dell DJ Itty
SYSFS{idVendor}=="413c", SYSFS{idProduct}=="4500", SYMLINK+="libmtp-%k", MODE="666"
# Toshiba Gigabeat MEGF-40
SYSFS{idVendor}=="0930", SYSFS{idProduct}=="0009", SYMLINK+="libmtp-%k", MODE="666"
# Toshiba Gigabeat
SYSFS{idVendor}=="0930", SYSFS{idProduct}=="000c", SYMLINK+="libmtp-%k", MODE="666"
# Archos 104 (MTP mode)
SYSFS{idVendor}=="0e79", SYSFS{idProduct}=="120a", SYMLINK+="libmtp-%k", MODE="666"

LABEL="libmtp_rules_end"
There you go.
 
Old 01-03-2008, 12:33 PM   #12
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
The only thing I did was connect the Meizu. Here's the output:
Code:
$ sudo udevmonitor --environment
[sudo] password for antoranz:
udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent

UEVENT[1199385073.608197] add      /devices/pci0000:00/0000:00:1d.7/usb5/5-7 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7
SUBSYSTEM=usb
SEQNUM=3700
MAJOR=189
MINOR=521
DEVTYPE=usb_device
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/005/010
PRODUCT=492/140/100
TYPE=0/0/0
BUSNUM=005
DEVNUM=010

UEVENT[1199385073.608285] add      /class/usb_endpoint/usbdev5.10_ep00 (usb_endpoint)
ACTION=add
DEVPATH=/class/usb_endpoint/usbdev5.10_ep00
SUBSYSTEM=usb_endpoint
SEQNUM=3701
MAJOR=254
MINOR=10
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb

UEVENT[1199385073.608395] add      /devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0
SUBSYSTEM=usb
SEQNUM=3702
DEVTYPE=usb_interface
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/005/010
PRODUCT=492/140/100
TYPE=0/0/0
INTERFACE=8/6/80
MODALIAS=usb:v0492p0140d0100dc00dsc00dp00ic08isc06ip50

UDEV  [1199385073.617402] add      /devices/pci0000:00/0000:00:1d.7/usb5/5-7 (usb)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7
SUBSYSTEM=usb
SEQNUM=3700
MAJOR=189
MINOR=521
DEVTYPE=usb_device
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/005/010
PRODUCT=492/140/100
TYPE=0/0/0
BUSNUM=005
DEVNUM=010
UDEVD_EVENT=1
DEVNAME=/dev/5-7

UEVENT[1199385073.619419] add      /class/scsi_host/host11 (scsi_host)
ACTION=add
DEVPATH=/class/scsi_host/host11
SUBSYSTEM=scsi_host
SEQNUM=3703
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11

UEVENT[1199385073.620345] add      /class/usb_endpoint/usbdev5.10_ep81 (usb_endpoint)
ACTION=add
DEVPATH=/class/usb_endpoint/usbdev5.10_ep81
SUBSYSTEM=usb_endpoint
SEQNUM=3704
MAJOR=254
MINOR=11
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb-storage

UEVENT[1199385073.620395] add      /class/usb_endpoint/usbdev5.10_ep02 (usb_endpoint)
ACTION=add
DEVPATH=/class/usb_endpoint/usbdev5.10_ep02
SUBSYSTEM=usb_endpoint
SEQNUM=3705
MAJOR=254
MINOR=12
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb-storage

UEVENT[1199385073.620435] add      /class/usb_device/usbdev5.10 (usb_device)
ACTION=add
DEVPATH=/class/usb_device/usbdev5.10
SUBSYSTEM=usb_device
SEQNUM=3706
MAJOR=189
MINOR=521
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb

UDEV  [1199385073.624756] add      /class/usb_endpoint/usbdev5.10_ep00 (usb_endpoint)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/usb_endpoint/usbdev5.10_ep00
SUBSYSTEM=usb_endpoint
SEQNUM=3701
MAJOR=254
MINOR=10
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
UDEVD_EVENT=1
DEVNAME=/dev/usbdev5.10_ep00

UDEV  [1199385073.719122] add      /devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0 (usb)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0
SUBSYSTEM=usb
SEQNUM=3702
DEVTYPE=usb_interface
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/005/010
PRODUCT=492/140/100
TYPE=0/0/0
INTERFACE=8/6/80
MODALIAS=usb:v0492p0140d0100dc00dsc00dp00ic08isc06ip50
UDEVD_EVENT=1

UDEV  [1199385073.726532] add      /class/scsi_host/host11 (scsi_host)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/scsi_host/host11
SUBSYSTEM=scsi_host
SEQNUM=3703
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11
UDEVD_EVENT=1

UDEV  [1199385073.732872] add      /class/usb_endpoint/usbdev5.10_ep81 (usb_endpoint)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/usb_endpoint/usbdev5.10_ep81
SUBSYSTEM=usb_endpoint
SEQNUM=3704
MAJOR=254
MINOR=11
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb-storage
UDEVD_EVENT=1
DEVNAME=/dev/usbdev5.10_ep81

UDEV  [1199385073.738325] add      /class/usb_endpoint/usbdev5.10_ep02 (usb_endpoint)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/usb_endpoint/usbdev5.10_ep02
SUBSYSTEM=usb_endpoint
SEQNUM=3705
MAJOR=254
MINOR=12
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb-storage
UDEVD_EVENT=1
DEVNAME=/dev/usbdev5.10_ep02

UDEV  [1199385073.787108] add      /class/usb_device/usbdev5.10 (usb_device)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/usb_device/usbdev5.10
SUBSYSTEM=usb_device
SEQNUM=3706
MAJOR=189
MINOR=521
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
UDEVD_EVENT=1
USB_BUS=005
USB_DEV=010
DEVNAME=/dev/bus/usb/005/010

UEVENT[1199385079.665710] add      /devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0 (scsi)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
SUBSYSTEM=scsi
SEQNUM=3707
PHYSDEVBUS=scsi
MODALIAS=scsi:t-0x00

UEVENT[1199385079.665762] add      /class/scsi_disk/11:0:0:0 (scsi_disk)
ACTION=add
DEVPATH=/class/scsi_disk/11:0:0:0
SUBSYSTEM=scsi_disk
SEQNUM=3708
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd

UEVENT[1199385080.581870] add      /block/sdb (block)
ACTION=add
DEVPATH=/block/sdb
SUBSYSTEM=block
SEQNUM=3709
MINOR=16
MAJOR=8
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd

UEVENT[1199385080.581928] add      /class/scsi_device/11:0:0:0 (scsi_device)
ACTION=add
DEVPATH=/class/scsi_device/11:0:0:0
SUBSYSTEM=scsi_device
SEQNUM=3710
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd

UEVENT[1199385080.581964] add      /class/scsi_generic/sg2 (scsi_generic)
ACTION=add
DEVPATH=/class/scsi_generic/sg2
SUBSYSTEM=scsi_generic
SEQNUM=3711
MAJOR=21
MINOR=2
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd

UDEV  [1199385080.682978] add      /devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0 (scsi)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
SUBSYSTEM=scsi
SEQNUM=3707
PHYSDEVBUS=scsi
MODALIAS=scsi:t-0x00
UDEVD_EVENT=1

UDEV  [1199385080.729624] add      /class/scsi_disk/11:0:0:0 (scsi_disk)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/scsi_disk/11:0:0:0
SUBSYSTEM=scsi_disk
SEQNUM=3708
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd
UDEVD_EVENT=1

UDEV  [1199385080.787375] add      /class/scsi_device/11:0:0:0 (scsi_device)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/scsi_device/11:0:0:0
SUBSYSTEM=scsi_device
SEQNUM=3710
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd
UDEVD_EVENT=1

UDEV  [1199385080.820004] add      /class/scsi_generic/sg2 (scsi_generic)
UDEV_LOG=3
ACTION=add
DEVPATH=/class/scsi_generic/sg2
SUBSYSTEM=scsi_generic
SEQNUM=3711
MAJOR=21
MINOR=2
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd
UDEVD_EVENT=1
DEVNAME=/dev/sg2

UDEV  [1199385080.881958] add      /block/sdb (block)
UDEV_LOG=3
ACTION=add
DEVPATH=/block/sdb
SUBSYSTEM=block
SEQNUM=3709
MINOR=16
MAJOR=8
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.7/usb5/5-7/5-7:1.0/host11/target11:0:0/11:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd
UDEVD_EVENT=1
DEVTYPE=disk
ID_VENDOR=Meizu
ID_MODEL=MiniPlayer
ID_REVISION=1.00
ID_SERIAL=Meizu_MiniPlayer_000000E5E5000-0:0
ID_SERIAL_SHORT=000000E5E5000
ID_TYPE=disk
ID_INSTANCE=0:0
ID_BUS=usb
ID_PATH=pci-0000:00:1d.7-usb-0:7:1.0-scsi-0:0:0:0
ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT32
ID_FS_UUID=68DE-5DE7
ID_FS_UUID_ENC=68DE-5DE7
ID_FS_LABEL=
ID_FS_LABEL_ENC=
ID_FS_LABEL_SAFE=
DEVNAME=/dev/sdb
DEVLINKS=/dev/disk/by-id/usb-Meizu_MiniPlayer_000000E5E5000-0:0 /dev/disk/by-path/pci-0000:00:1d.7-usb-0:7:1.0-scsi-0:0:0:0 /dev/disk/by-uuid/68DE-5DE7
 
Old 01-03-2008, 12:35 PM   #13
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
There's nothing in those files specifically referring to your device. Another thing you could try is making your rule similar to the ones in those files (i.e. using ATTRS{*} and SYSFS{*} keys rather than ENV{*} ones). To see what's relevant, use "udevinfo -a -p /sys/block/sdb".
 
Old 01-03-2008, 01:15 PM   #14
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Now we're talking!

Let me see what I can do from that command output.
 
Old 01-03-2008, 01:20 PM   #15
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
It worked, man!

Code:
SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0492", ATTRS{idProduct}=="0140", ATTRS{serial}=="000000E5E5000", \
        SYMLINK+="meizu"
 
  


Reply

Tags
udev



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
Making udev create a /dev/floppy symlink Yalla-One Slackware 7 07-06-2007 08:37 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
udev trouble - can't auto-symlink Yalla-One Slackware 8 11-03-2005 06:04 AM
udev takes long time to create /dev/usbhd symlink Yalla-One Slackware 4 04-04-2005 03:27 AM
symlink mikedelo Linux - Software 2 03-28-2004 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:51 PM.

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