-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Detect host OS based on USB fingerprint #18463
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few areas that this won't compile, and I've flagged those.
Should be noted that this is originally from keyboardio's arduino module: It's licensed under the MIT License and should probably retain that licensing. Also, should be noted that there hasn't been any changes to the code since Aug 2018. Also tagging @algernon. |
We haven't done much with the FingerprintUSBHost module in a looong time. As far as I remember, it was more of a proof of concept, rather than a fully fleshed out solution. It's mostly @obra's work, by the way. If there are any licensing questions, he's the right person to ask. I'm happy to chime in and answer what I can, but my memories of that module are kinda hazy by now. |
The short version is that it’s a really cool party trick, but very unreliable in the face of things like virtualization and OS revisions. After testing pretty extensively, I’d not want to use the technique as part of a shipping product. On Sep 24, 2022, at 3:16 PM, Gergely Nagy ***@***.***> wrote:
We haven't done much with the FingerprintUSBHost module in a looong time. As far as I remember, it was more of a proof of concept, rather than a fully fleshed out solution. It's mostly @obra's work, by the way. If there are any licensing questions, he's the right person to ask.
I'm happy to chime in and answer what I can, but my memories of that module are kinda hazy by now.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks for the feedback! And yeah, the detection is very ... fragile, at best. |
Please note that I have used none of the FingerprintUSBHost code. Only the general idea of using I believe it should be reliable enough to cover most real life cases. I have tried using KVM switch but haven't tried passing device to virtualized host. With more collected data it should be easy to support more less popular cases, I added debugging section specifically for this. |
Co-authored-by: Drashna Jaelre <drashna@live.com>
Btw this is mis-recognizing an M1 Max studio as an iOS device (only tested on Ventura). |
Thus the initial reluctance including it -- it's fragile. |
I guess it's impossible to distinguish ARM Macs from iOS/iPadOS devices as they use the same USB stack. So |
It could be OS version specific, too. |
I will check with my Ventura Intel MacBook. I might make a pr if I have time. |
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
This comment was marked as outdated.
This comment was marked as outdated.
It's already been merged. |
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
Description
Feature to detect host OS using
wLength
field fromgetDescriptor
USB packets.Context: https://www.reddit.com/r/olkb/comments/x1ezbg/way_to_detect_host_os_in_qmk/
I'd appreciate if someone can write better documentation, I added only some very basic description.
Types of Changes
Checklist