-
Notifications
You must be signed in to change notification settings - Fork 15
/
README
43 lines (31 loc) · 1.02 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
This is a trivial proof of concept Arduino library that uses 1.6.7's
new PluggableUSB system to inspect USB Descriptors and guess the
host operating system based on markers it sees. The first version
of this library uses markers in GET_DESCRIPTOR requests for String
Descriptors. There's more that can be done.
#include "FingerprintUSBHost.h"
void setup() {
Serial.begin(9600);
String os;
delay(15000); // Take a moment to let things settle
FingerprintUSBHost.guessHostOS(os);
Serial.print("I think the Host OS is ");
Serial.print(os);
Serial.println();
}
void loop() {
// put your main code here, to run repeatedly:
}
So far, it's only been tested on:
Mac OS X 10.10.5
Mac OS X 10.11
Windows 10
ChromeOS
Android
iOS 9.1
As of now, it still identifies iOS as OS X. (OSX 10.11 uses iOS's USB Stack)
ChromeOS and Android are both identified as Linux (since they're both using the Linux USB stack.)
Pull requests to improve the detection logic are very welcome.
Jesse Vincent
2016.01.03