-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Update from USB 2.0 to USB 2.1 #4627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
But where is the BOS coded in the usb core? As far as I understood 2.1 supports this BOS thing and enables micro$$$$ to read the BOS. But what if its not there? Is it? Never heard of that. Why would you need it? So changing just the number here doesnt solve the problem I think. |
This patch doesn't add any code to the USB core to respond to a BOS request but leaves it up to libraries using PluggableUSB to provide it. Without the version change the host OS will not request the BOS descriptor. I don't believe it will be an issue for devices to advertise this version and still return nothing in response to a GET_DESCRIPTOR(BOS) request. |
That makes sense now. Do you have a working usecase of a pluggable usb module? |
We do: the WebUSB Arduino library part of the WebUSB API |
(gentle ping) |
Yeah! |
@reillyeon have a look at #4793 |
Hi! anything I can do here to help move this along? Thanks a million, very excited to no longer have to manually patch this in to utilize webusb. |
Hi everyone,
and
In this way you could add a bunch of variant boards which should be exactly the same as Micro/Leonardo but defining I'm preparing a PR right now, I'll ask @reillyeon to test it and eventually update the WubUSB arduino integration howto. |
@facchinm (and probably even more @beaufortfrancois), are there any downsides to just setting the USB version to 2.1? Are there additional things we need to support or do? |
@matthijskooijman , |
We could make the whole usb core pluggable/optional. This way you could also make the Leonardo sketched without usb smaller and faster. I've opened a PR about this some time ago. The people who need USB 2.1 could fork the usb core and reimplement the stuff they need. But they could still use the rest of the core. If you ask me I'd make the whole core more like a set of libraries. For USB, Seriel, Millis, Interrupts etc. Then you have less code and more flexible in overwriting those. |
Alternatively, perhaps the USB version could be determined at runtime? Either by some code (the same code that adds the BOS descriptor) setting it to 2.1, or perhaps by somehow detecting that a BOS descriptor was plugged in and doing it automatically (not sure if that is feasible, though). |
Superseded by #5128, now the board which needs to advertise as USB 2.1 can do it with a simple extra boards.txt (see webusb/arduino#16) |
Thanks everyone for the discussion and contribution ! |
Let's update USB Version from 2.0 to 2.1 so that the host could tell if the USB device exposes a Binary Object Store descriptor or not.
For info, this is where the WebUSB descriptor (and Microsoft OS Descriptor 2.0) reading sequence starts.