[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

making a dev with udev; was Re: ownership of /dev/raw1394



*	Date: Mon, 26 Jan 2009 10:49:44 -1000
*	From: Joel Roth <joelz@pobox.co.>
> 1) write your own udev rule

Plug in the Unibrain Fire-i camera, S/N:0040053291.
Converted to hexadecimal the serial number is 02632A2B.

peter@joule:~$ grep 0263 /var/log/syslog
Aug  2 09:46:38 joule kernel: [    8.815859] ieee1394: Node added: ID:BUS[0-00:1
023]  GUID[0814436102632a2b]

So we know the camera has GUID 0x0814436102632a2b.

Let's see where it is recorded in sysfs.
peter@joule:~$ find /sys -type f -exec grep "2632" {} \; -print
0x0814436102632a2b
/sys/devices/pci0000:00/0000:00:1e.0/0000:02:09.0/fw-host0/0814436102632a2b/guid
PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:02:09.0/fw-host0/0814436102632a2b
/sys/class/ieee1394_node/0814436102632a2b/uevent
PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:02:09.0/fw-host0/0814436102632a2b/0814436102632a2b-0
GUID=0814436102632a2b
/sys/class/ieee1394/0814436102632a2b-0/uevent
PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:02:09.0/fw-host0/0814436102632a2b/0814436102632a2b-0/0814436102632a2b-1
GUID=0814436102632a2b
/sys/class/ieee1394/0814436102632a2b-1/uevent

Try an obvious rule to make a device node for the camera.
With this line in /etc/udev/rules.d/z21_persistent-local.rules, restart udev.

ATTR{/sys/devices/pci0000:00/0000:00:1e.0/0000:02:09.0/fw-host0/0814436102632a2b/guid}="0x0814436102632a2b",NAME="Fire-i"

Then.
peter@joule:~$ ls /dev/F*
ls: cannot access /dev/F*: No such file or directory

The Fire-i device wasn't created.  How can an attribute 
suitable to hang a node upon be identified?  Any ideas 
to make this work?

Thanks,           ... Peter E.

-- 
Carnot netboots *.SUN4C; installation of NetBSD 5 pending.
Personal site works;  http://members.shaw.ca/peasthope/ .


Reply to: