Re: selection of usb configuration on the fly on usb host

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

 



HI Alen ,

Thanx for the  reply . it will certainly help my cause .

But my problem is , before a userspace program send the command

echo N >/sys/bus/usb/devices/.../bConfigurationValue to the device ,

usb host will already  select default mass storage configuration on
device plugin

(device exposes default 1st configuration as mass storage  and we have
no control over device firmware ).

this is not desired . what i want is , usb host on detecting this
multi configuration device ,

instead of  selecting default configuration , invoke some userspace binary

where depending upon  "echo N
>/sys/bus/usb/devices/.../bConfigurationValue to the device "

desired configuration can be selected .

so how i can handle this signalling from usb host to userspace  .
thanx for reply once again


Regards

Amit Nagal







On Thu, Jun 10, 2010 at 8:11 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, 10 Jun 2010, Amit Nagal wrote:
>
>> Hi ,
>>
>>
>> i am working on linux usb host side  .
>>
>> the interfacing usb device supports 2 usb configurations .
>>
>> default is 1) mass storage .
>>
>> other is 2) vendor specific configuration .
>>
>> if we connect such device to usb host ,
>>
>> is it possible to have the following :
>>
>> 1)  usb core queries device for total no of configurations supported .
>>
>> and then instead of selecting the first default mass storage
>> configuration from  the device ,
>>
>> usb core  notifies  some user space program regarding usb
>> configurations  available
>>
>> and depending upon user input  to user space program ,
>>
>> mass storage configuration or the vendor specific configuration is
>> selected from user space .
>>
>> how we can select on the fly from user space program the desired usb
>> configuration from a multi
>>
>> configuration usb device . what user space interface we can use . and
>> what modifications
>>
>> need to be done in usb core .
>
> A program can select configuration N by writing to the appropriate file
> in sysfs.  For example:
>
>        echo N >/sys/bus/usb/devices/.../bConfigurationValue
>
> where "..." is the path for the device you want to set.  No
> modifications to usbcore are needed.
>
> Alan Stern
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux