This USB lark
- One minute read - 162 wordsI suppose I’d always thought that USB might be a bit complicated. All you need to do is look at the huge variety of USB devices out there, and is before you read about the USB cart of death (and you thought Microsoft never tested anything).
It turns out that it isn’t a bit complicated. It’s really really bloody complicated.
Luckily, Python comes to my rescue once again. All I needed is Python (clearly) and a fantastic module called PyUSB. So, a little bit of Python, and I’m enumerating devices on my USB buses, like this:
Macintosh-2:mine mauvedeity$ ./usbenum2.py
Vendor: 05ac ProductID: 8005
Vendor: 05ac ProductID: 020fThere you are, the first few devices on my laptop. As far as I know, the first one is the Bluetooth adaptor and the second one is the keyboard and trackpad. Next, to figure out how to send data via USB to the device I want to talk to.