In case you missed my previous posts I’m trying to reverse engineer how the Apple USB display service utility sends configuration commands to Apple Studio Display CRT monitors over USB.
I haven’t managed to run the original Apple software on QEMU successfully, but in the meantime I though I could use libusb to get a bit more information about the Apple Studio Display.
libusb is a C library and I’d rather not have to write C code. Luckily for me there is a rust wrapper for libusb called rusb.
Did I mention I’m hopping I’ll be able to use libusb and rust to create an open source command line tool that can change service settings on the Apple Studio Display?
Rust’s documentation is outstanding: I took me less time than I anticipated to go through enough chapters to feel confident to run one of rusb’s list device example and understand what was going on (disclaimer: I’m fluent in C#).
Below is the relevant output of the list device example I got while my computer was connected to the Apple Studio Display via USB.
Last login: Mon Mar 16 15:56:51 on ttys000 ~ ▶ cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.04s Running `target/debug/open-usb-dsu` Bus 020 Device 002 ID 05ac:9210 12 Mbps Device Descriptor: bcdUSB 1.00 bDeviceClass 0x00 bDeviceSubClass 0x00 bDeviceProtocol 0x00 bMaxPacketSize0 8 idVendor 0x05ac idProduct 0x9210 bcdDevice 18.156 iManufacturer 0 iProduct 1 iSerialNumber 0 bNumConfigurations 1 Config Descriptor: bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes: Self Powered true Remote Wakeup false bMaxPower 0mW no extra data Interface Descriptor: bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 0x03 bInterfaceSubClass 0x00 bInterfaceProtocol 0x00 iInterface 0 [9, 33, 0, 1, 0, 1, 34, 1, 1] Endpoint Descriptor: bEndpointAddress 0x81 EP 1 In bmAttributes: Transfer Type Interrupt Synch Type NoSync Usage Type Data wMaxPacketSize 0x0008 bInterval 255 Bus 020 Device 001 ID 05ac:9110 12 Mbps Device Descriptor: bcdUSB 1.00 bDeviceClass 0x09 bDeviceSubClass 0x00 bDeviceProtocol 0x00 bMaxPacketSize0 8 idVendor 0x05ac idProduct 0x9110 bcdDevice 0.01 iManufacturer 0 iProduct 0 iSerialNumber 0 bNumConfigurations 1 Config Descriptor: bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes: Self Powered true Remote Wakeup false bMaxPower 2mW no extra data Interface Descriptor: bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 0x09 bInterfaceSubClass 0x01 bInterfaceProtocol 0x00 iInterface 0 no extra data Endpoint Descriptor: bEndpointAddress 0x81 EP 1 In bmAttributes: Transfer Type Interrupt Synch Type NoSync Usage Type Data wMaxPacketSize 0x0001 bInterval 255 ▶
The second device listed has a class of 0x09 which means it is the USB hub built in the display…
The first device however has a device class of 0x00 and interface class of 0x03. This seem to indicate it is a HID device (i.e. it’s telling its host “I’m a keyboard”).
Could it be that the color sync button on the display, acts as a keyboard and sends a special key combination that, when running mac os 9 launches the color sync software?
I’ll update this post with my findings soon.
You must be logged in to post a comment.