[systemd-devel] WebUSB

Lars Knudsen larsgk at gmail.com
Mon Jan 9 20:03:01 UTC 2017


On Mon, Jan 9, 2017 at 7:43 PM, Bjørn Mork <bjorn at mork.no> wrote:

> Lars Knudsen <larsgk at gmail.com> writes:
>
> > configured with [0]CDC INT, [1]CDC BULK and [2]WebUSB CDC/BULK) would:
> >
> > 1) not be considered a modem (it would not make sense to do a modem
> > including webusb headers - in the same device mode at least)
> > 2) provide standard /dev/ttyUSBx serial functionality on the standard CDC
> > endpoints (e.g. interface 1 above)
> > 3) provide full user access to the WebUSB CDC/BULK interface (2 above)
> >
> > What I was asking before is for an example header/configuration
> descriptors
> > where MM would *not* pick up the CDC interface but the system still
> > creating a /dev/ttyUSBx device (or ttyACMx - which it's called when MM is
> > installed) - without creating blacklisting rules specifically for e.g.
> > *that* VID/PID combo.
> > When I was experimenting the last few days - this did not seem
> possible.  I
> > had to completely wipe any indication of this device being CDC before MM
> > stopped claiming it.  Surely, MM should not pick it up if the device
> > indicates it doesn't have call functionality?
>
> This is hard to decipher.
>
> I tend to interprete "a CDC interface" as a "Communications Class
> Interface" as defined by "Universal Serial Bus Class Definitions for
> Communications Devices".  But this makes no sense in the context you are
> using it, so I guess I am misunderstanding?
>
> I don't think any current kernel driver will create /dev/ttyUSBx devices
> for any type of CDC function, so that makes no sense either.
>
> /dev/ttyACMx devices are created by the CDC ACM driver, and has nothing
> to do with MM being installed or not.
>
Thanks for clearing that upi - I was wondering why on some devices we have
without MM, the USB serial devices are called /dev/ttyUSBx until MM is
installed (but maybe it pulls cdc_acm?)

>
> In short: I don't understand anything of the above. I believe the
> requested descriptor samples would clear up some of this.  As would some
> references to the CDC spec if you are going to continue using parts of
> if to describe the device.
>

Ok - one example would be taking e.g. the USBCDC descriptors from mbed:

https://developer.mbed.org/users/mbed_official/code/USBDevice/file/4f589e246b9e/USBSerial/USBCDC.cpp

and adding a bulk WebUSB interface or the ones from Zephyr/Intel:

https://github.com/nagineni/zephyr-webusb/blob/master/samples/usb/webusb/src/webusb_serial.c

(where the webusb interface is added)

I'd like if we by default:

1. assume it's not a modem (I still can't think of any practical examples
where WebUSB descriptors [that requires online] would be added in a modem
[to get online?]) - this would be
2. could have user space access to the endpoints (at least the WebUSB
endpoints - the desired behavior could probably be to have the system
create a serial device on the CDC port andlet the firmware tie the two up
functionality wise, Reilly?) - this is probably udev/systemd

does this make more sense?

br
Lars


>
> Bjørn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170109/06934090/attachment.html>


More information about the systemd-devel mailing list