<div dir="ltr">I have som more input - but really need Reilly's comments on this:<div><br></div><div>As hardware manufacturers most often want to make it possible for users to use their hardware in a WebUSB setting as well as in a "normal" app mode, we will most likely see composite devices that could have the following interfaces defined:</div><div><br></div><div>1. INT IF (for std CDC)</div><div>2. BULK CDC (non-webusb - e.g. for normal serial port bindings)</div><div>3. WebUSB CDC/bulk</div><div><br></div><div>In this case - ideally - the system should be allowed to grab 1 and 2 (but most probably not modemmanager - as it's very unlikely that a modem will be a webusb device.. as webusb devices assume internet) but leave 3 untouched (unclaimed) for WebUSB bulk communication.  This means that the udev rules need to be made on an interface level and not "blanket cover" the whole device.</div><div><br></div><div>Beware that I might not be 100% correct on these assumptions and really need some input on the intentions from Reilly or others with more knowledge in the area (let's give California time to wake up :))</div><div><br></div><div>br</div><div>Lars</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 9, 2017 at 11:29 AM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jan 9, 2017 at 11:07 AM, Greg KH <<a href="mailto:greg@kroah.com">greg@kroah.com</a>> wrote:<br>
> On Mon, Jan 09, 2017 at 09:40:59AM +0000, Kenneth Rohde Christiansen wrote:<br>
>> Web USB can only grab devices which has special Web USB headers. It can not<br>
>> grab any USB device.<br>
>><br>
>> <a href="https://wicg.github.io/webusb/#webusb-descriptors" rel="noreferrer" target="_blank">https://wicg.github.io/webusb/<wbr>#webusb-descriptors</a><br>
><br>
> Ah, fun :(<br>
><br>
> So, we can add a quirk into the kernel cdc-acm driver to never bind to a<br>
> device that has the wusb platform capability descriptor, which will<br>
> prevent you from having to disconnect the driver from the device (and<br>
> the permissions issues involved in that.)<br>
><br>
> Would that help out?<br>
><br>
> And just do the same thing in modem manager, never grab a device with<br>
> this descriptor, and let the browser/webusb handle the control of the<br>
> device if it so desires.<br>
<br>
</span>Not sure anything would be required in ModemManager if the kernel<br>
already skips the binding to cdc-acm; i.e. ModemManager won't do<br>
anything unless the TTY is exposed.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div>