From: Robby Workman on
On 2010-04-18, Tom Canich <tjc181(a)psu.edu> wrote:
> On 2010-04-18, Mike Jones <luck(a)dasteem.invalid> wrote:
>> This is about all the useful info (there's more,but its all stuff I can't
>> use) I get with "lsusb -v -d"
>>
>> idVendor 0x0839 Samsung Techwin Co., Ltd
>> idProduct 0x0016
>> bcdDevice 1.00
>> iManufacturer 1 Samsung Co Ltd
>> iProduct 2 Samsung Digimax 401
>> iSerial 3 01.00.00
>> bNumConfigurations 1
>
> Hi Mike,
>
> I only have experience with USB mass storage devices, but you might try:
>
> BUS=="usb", SYSFS{manufacturer}=="Samsung Co Ltd", \
> SYSFS{product}=="Samsung Digimax 401", \
> SYSFS{serial}=="01.00.00", KERNEL=="sd*", \
> NAME="%k", SYMLINK+="s401"
>
> You may need to adjust the value for KERNEL. You might also be able to
> omit the KERNEL setting entirely.
>
> Then, run '/sbin/udevadm control --reload-rules' (or restart rc.udevd).
>
> /dev/s401 should be created when you connect the camera.


As expected, very good, Tom :-)

Assuming recent udev (13.0 and onward), that SYSFS should be either
ATTR or ATTRS, depending on whether all of the attribute tests are
at the same level in the sysfs tree (if so, use ATTR), or if you need
to check the parents as well (use ATTRS).

In udev-151 and later, NAME should almost never be needed, as the
kernel version is expected to be at lesat 2.6.32, which sets almost
all of the device names correctly.

Regardless of all that, you should *never* change the actual name
of a device node using NAME="whatever" (okay, there's a couple of
exceptions, but they'll go away sooner or later too) -- instead,
you create symlinks (named however you want) pointing to the real
name of the node. This is what Tom did in his example, but just
in case it wasn't clear why, I thought I'd elaborate :-)

-RW
From: Mike Jones on
Responding to Robby Workman:

> On 2010-04-18, Tom Canich <tjc181(a)psu.edu> wrote:
>> On 2010-04-18, Mike Jones <luck(a)dasteem.invalid> wrote:
>>> This is about all the useful info (there's more,but its all stuff I
>>> can't use) I get with "lsusb -v -d"
>>>
>>> idVendor 0x0839 Samsung Techwin Co., Ltd idProduct
>>> 0x0016
>>> bcdDevice 1.00
>>> iManufacturer 1 Samsung Co Ltd iProduct 2
>>> Samsung Digimax 401 iSerial 3 01.00.00
>>> bNumConfigurations 1
>>
>> Hi Mike,
>>
>> I only have experience with USB mass storage devices, but you might
>> try:
>>
>> BUS=="usb", SYSFS{manufacturer}=="Samsung Co Ltd", \
>> SYSFS{product}=="Samsung Digimax 401", \ SYSFS{serial}
=="01.00.00",
>> KERNEL=="sd*", \ NAME="%k", SYMLINK+="s401"
>>
>> You may need to adjust the value for KERNEL. You might also be able to
>> omit the KERNEL setting entirely.
>>
>> Then, run '/sbin/udevadm control --reload-rules' (or restart rc.udevd).
>>
>> /dev/s401 should be created when you connect the camera.
>
>
> As expected, very good, Tom :-)
>
> Assuming recent udev (13.0 and onward), that SYSFS should be either ATTR
> or ATTRS, depending on whether all of the attribute tests are at the
> same level in the sysfs tree (if so, use ATTR), or if you need to check
> the parents as well (use ATTRS).
>
> In udev-151 and later, NAME should almost never be needed, as the kernel
> version is expected to be at lesat 2.6.32, which sets almost all of the
> device names correctly.
>
> Regardless of all that, you should *never* change the actual name of a
> device node using NAME="whatever" (okay, there's a couple of exceptions,
> but they'll go away sooner or later too) -- instead, you create symlinks
> (named however you want) pointing to the real name of the node. This is
> what Tom did in his example, but just in case it wasn't clear why, I
> thought I'd elaborate :-)
>
> -RW


All good info. Cheers!


--
*=( http://www.thedailymash.co.uk/
*=( For all your UK news needs.