HID Monitor Driver Advice
mark at bolhuis.dev
mark at bolhuis.dev
Thu Apr 15 11:35:45 EDT 2021
Hi all
My name is Mark and I'm currently writing a device driver for Eizo EV
FlexScan monitors, so that I can control them over usb. This driver is
built by reverse engineering the hid reports sent by the propriety and
windows only software.
It can be found here: https://github.com/markbolhuis/openeizo
I have some questions about this that hopefully somebody can answer.
1) What would be the recommended way to interface this with userspace?
My plan is to expose a device file for each unique setting that the
monitor has such as brightness control, input selection and so on...
However I'm not sure this is a suitable way of doing this since the
monitors have many options that are very similar. For example contiguous
numerical values only differ by their usage and value min and max,
meaning that if I have a file per setting there will be a lot of
repetition. There are already 40+ unique attributes/settings that may
need a file.
2) To properly initialize the driver I will have to fetch a second
report descriptor from the monitor. This isn't a standard hid report
descriptor. It seems that Eizo are simply using the format instead of
inventing their own. Is there a way for the hid subsystem to parse
arbitrary report descriptors and expose them as a structure for generic
use? I couldn't find much that would help with this. hid_parse_report @
inlcude/linux/hid.h:895 seems to be the closest to what I need but it's
tied to a device.
3) I contacted Eizo and politely asked if they could provide an hid
specification for the vendor defined usages however they weren't able to
help. This forced me to reverse engineer. Is there anything that I
should be aware of if I want to submit code that based on reverse
engineering? I didn't reverse engineer the windows driver itself, just
sniffed the packets with usbmon.
4) How would I find people who have compatible monitors to test it out
and/or help reverse engineer? I only have one monitor so I'm writing
against that, with no guarantee that it will work for others.
Thank you for reading
Mark Bolhuis
More information about the Kernelnewbies
mailing list