From: Mike Jones on

Having fun here ATM trying to nail down a USB camera.

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

....and so I've ended up with this

# None of these work...
# SYSFS{serial}="01.00.00",NAME="s401"
# SYSFS{Product}="Samsung Digimax 401",NAME="s401"
# SYSFS{product}="Samsung Digimax 401",NAME="s401"
# SYSFS{iProduct}="Samsung Digimax 401",NAME="s401"

....in /etc/udev/rules.d/10-udev.rules

....while trying to get a non-moving target to appear in /dev when this
device is activated.

I'm now at the point where I'm wading around making more mess than is
productive, so if anybody has a few clues, tips, pointers..?

--
*=( http://www.thedailymash.co.uk/
*=( For all your UK news needs.
From: Tom Canich on
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.

Hope that helps,
Tom
From: Mike Jones on
Responding to Tom Canich:

> 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.
>
> Hope that helps,
> Tom


Yup! Thats seems to have done the trick! (Camera is a usbmsd)

I note that when I mount (as per new fstab entry) /mnt/401 it creates and
links the auto generated /dev/sd?? to /mnt/s401, and symlinks it to /dev/
s401. No problem if it works. :)

Just (accidentally) checked. 1st time around it got /dev/sdc1, 2nd time
it got /dev/sdd1, both times symlinked to /dev/s401. Neat!

When I've fscked my brain, I'll backtrack and try to figure out how this
(including syntax) works, and why I couldn't make this out of the info
I've been reading, like the classically clear explanationsin the man
pages for the stuff it turns out I didn't need to be looking at. (You
know the story, I'm sure!)

Anyhoo, thanks!

--
*=( http://www.thedailymash.co.uk/
*=( For all your UK news needs.
From: Grant on
On Sun, 18 Apr 2010 14:59:53 +0000 (UTC), Mike Jones <luck(a)dasteem.invalid> wrote:

>Responding to Tom Canich:
>
>> 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.
>>
>> Hope that helps,
>> Tom
>
>
>Yup! Thats seems to have done the trick! (Camera is a usbmsd)
>
>I note that when I mount (as per new fstab entry) /mnt/401 it creates and
>links the auto generated /dev/sd?? to /mnt/s401, and symlinks it to /dev/
>s401. No problem if it works. :)
>
>Just (accidentally) checked. 1st time around it got /dev/sdc1, 2nd time
>it got /dev/sdd1, both times symlinked to /dev/s401. Neat!
>
>When I've fscked my brain, I'll backtrack and try to figure out how this
>(including syntax) works, and why I couldn't make this out of the info
>I've been reading, like the classically clear explanationsin the man
>pages for the stuff it turns out I didn't need to be looking at. (You
>know the story, I'm sure!)
>
>Anyhoo, thanks!

Was thinking I'd do a before and after cam plugged 'tree /dev > dev-before',
'tree /dev > dev-after'; then 'diff -u dev-before dev-after' to see what udev
added to the device nodes.

Grant.
--
http://bugs.id.au/
From: Mike Jones on
Responding to ljb:

> luck(a)dasteem.invalid wrote:
>>...
>> When I've fscked my brain, I'll backtrack and try to figure out how
>> this (including syntax) works, and why I couldn't make this out of the
>> info I've been reading, like the classically clear explanationsin the
>> man pages for the stuff it turns out I didn't need to be looking at.
>> (You know the story, I'm sure!)
>
> If your first post was accurate, you were using a single = sign as in
> SYSFS{idProduct}="Value". That won't work. You need the double equals
> meaning testing the value, like SYSFS{idProduct}=="value".


D'oh! #1

There will inevitably be more before the idea sticks. ;)

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