Switching the mode produces five SET_REPORT
requests; after testing, it seems only the first is needed. It might be interesting to dig deeper into Creative’s protocol in the future though.
What is the easiest way to deal with USB HID reports from user space under Linux? It turns out linux provides a special kind of block device at /dev/hidraw*
to easily interface with such things.
echo -n -e '\x02\x02' > /dev/hidraw0 # Sets port to microphone mode
echo -n -e '\x02\x00' > /dev/hidraw0 # Sets port back to extra headphone
The above commands require root, and hidraw0
should be replaced with the correct device on your system. But after testing this, it works!
Now perhaps I should see if this can be nicely integrated into the kernel driver…
Edit: Support is now in the mainline Linux kernel, in commit 388fdb8.
Discussion
r/ReverseEngineering