YEAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
after patching micropython’s usb library to respond to HID feature reports, Davinci resolve now recognizes the emulated device and starts talking! Too bad all the hid reports are vendor defined and I can’t really guess what they mean :(
micropython’s usb library doesn’t support get_report commands, so I patched in get_report support for report type 0x03 (feature reports) in micropython/lib/usb/device/hid.py’s on_interface_control_xfer. Now the pico can capture and respond to get feature reports from davinci resolve.
Based on poking technology’s video I managed to get the appropriate responses for davinci’s requests.
First davinci sends A1 01 01 03 02 00 08 00, get feature report id 1. I guess it’s some sort of initialization? Pico responds 01 4D 02 25 7B 01 05 02. Since the report descriptor is all vendor defined (0xFF07), I have no idea what this does.
Then davinci repeatedly sends A1 01 08 03 02 00 21 00, get feature report id 8. I haven’t implemented responding to this yet, but it seems like davinci will time out after a while and skip to the next step, which is the feature report 6 06 00 00 00 00 00 00 start of auth sequence to reset the handshake state machine!
I can’t find any info on what feature report id 8 is, and the descriptor is all vendor defined :<
But at least it works! I just need to implement the handshake state machine and then the keyboard can communicate with davinci :)
here’s the feature 8 report descriptor btw
b'\x09' b'\x08' # Usage (b'\x08)
b'\xA1' b'\x01' # Collection (Application)
b'\x85' b'\x08' # Report ID (8)
b'\x06' b'\x07' b'\xFF' # Usage Page (Vendor Defined b'\xFF07)
b'\x15' b'\x00' # Logical Minimum (0)
b'\x26' b'\xFF' b'\x00' # Logical Maximum (255)
b'\x09' b'\x00' # Usage (b'\x00)
b'\x75' b'\x08' # Report Size (8)
b'\x95' b'\x20' # Report Count (32)
b'\xB1' b'\x81' # Feature (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Volatile)
b'\xC0' # End Collection