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

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

 



On Wed, Feb 07, 2018 at 12:05:04AM +0100, Alberto Esposito wrote:
> 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.

Then don't lie to the operating system and say you are a cdc-acm device,
and all will be fine.

> >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.

Surely webusb has an interface to disconnect the OS driver from the
requested device?  If not, then it needs to add that, for the obvious
reasons you are having.

> > 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.

Then don't create a new device that the OS will always grab, because it
is advertising itself as a device the OS knows about :)

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

No "trick" needed, either have webusb disconnect the driver from the
device, or change your device to not have the OS bind a driver to it.

good luck!

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