[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-hotplug
Subject:    Re: How to make a rule for a specific usb Interface
From:       Rui Santos <rsantos () grupopie ! com>
Date:       2007-10-24 17:23:03
Message-ID: 471F7F77.3040107 () grupopie ! com
[Download RAW message or body]

Hi Kay,

First of all, thank you for your reply,

Kay Sievers wrote:
> On 10/24/07, Rui Santos <rsantos@grupopie.com> wrote:
>   
>> Hi all,
>>
>> I hope this is the right place to ask this kind of question. If not
>> please redirect me to the right place.
>>
>> I own an interface, that has this output on lsusb -v
>>
>>
>> Bus 003 Device 021: ID 19d2:0001
>>     
>
> ...
>
>   
>> Finally, my problem:
>>
>> I try to create a special link for the device's first usbserial_generic
>> device, using the following rule:
>>
>> KERNEL=="ttyUSB*", SYSFS{idVendor}=="19d2", SYSFS{idProduct}=="0001",
>> SYSFS{bInterfaceNumber}=="0", SYMLINK+="tty3G"
>>
>> The "tty3G" link is not created. But, if I replace SYMLINK+="tty3G" with
>> RUN+="/test", the "/test" script is executed.
>>
>> Is there any reason why the link in not created with this rule? What is
>> wrong with this rule.
>>     
>
> idVendor, idProduct are at a different device than bInterfaceNumber.
> They are different parent devices for the tty device, so they will not
> match. If you remove the device-node match, the event for the
> interface itself, not the tty event will run your script.
>   
I was not aware of that needed device-node match. It help me in getting
on the right track.
> You can probably match on the "modalias" value instead, it contains
> the vendor/product/interface numbers in a single string.
>   
Unfortunately, "modalias" has no difference on all three devices... go
figure....

But I was able to circunvent it with the following rule ( just for the
archives ):

DRIVERS=="usbserial_generic", ATTRS{bNumEndpoints}=="03", ATTRS{bInterfaceNumber}=="00", SYMLINK+="zte"


> Kay
>   
Thanks for your help Kay

Rui

>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic