Re: [WebUSB - USB gadget] Prevent CDC-ACM from loading serial interface

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

 



Thank you Greg for your reply :) it's such an honor to speak with you :)

> You could, but then you would not be a cdc-acm device, right?

that would not be a problem. I just need to send and receive data
between my usb gadget and chrome.

>Why not just disconnect the driver from the device when you want to grab
> it instead?  You can do that in userspace just fine, and I think libusb
> even has a function for it.

That's what I did to test that everything was working on the device side.

I would prefer that the user wouldn't have to install/do anything to
make it work.

USB should be plug and play, WebUSB even more so.


> I thought that was what webusb did already, odd that it's not working
> for you.  Have you tried talking to the webusb developers for the
> browser you are using?

the motivation behind this is that WebUSB should help support new
devices, not devices already in use by the OS.

If I could trick the OS not to load the device, then WebUSB would work
without modifications.

On Tue, Feb 6, 2018 at 11:41 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Feb 06, 2018 at 11:31:40PM +0100, Alberto Esposito wrote:
>> Hello everybody!
>>
>> I'm trying to connect to a serial interface created with usb gadget
>> driver via WebUSB.
>>
>> I was successful in setting up the serial interface, but WebUSB
>> refuses to work because it can't claim the interface, since it's busy.
>>
>> The culprit is the cdc-acm driver, which correctly see the interface
>> and claims it first.
>>
>> How can I prevent the cdc-acm driver from claiming the interface,
>> without modifications to the client?
>
> Sorry, you can't.
>
>> Can I change the interface descriptors somehow, so that cdc-acm
>> doesn't recognize the device anymore?
>
> You could, but then you would not be a cdc-acm device, right?
>
>> Or maybe I have to create a new device type in the usb gadget driver,
>> to cover this specific case?
>
> Why not just disconnect the driver from the device when you want to grab
> it instead?  You can do that in userspace just fine, and I think libusb
> even has a function for it.
>
> I thought that was what webusb did already, odd that it's not working
> for you.  Have you tried talking to the webusb developers for the
> browser you are using?
>
> thanks,
>
> greg k-h
--
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