On Tuesday 11 December 2001 08:33, Brad Hards wrote:
> Flavio Stanchina wrote:
> > The hid driver will recognize the monitor but I couldn't find any
> > useful tool for Linux. Pointers, anyone? Willing to write something
> > myself if specs are available.
>
> The specs are freely available:
> http://www.usb.org/developers/data/devclass/usbmon10.pdf

Thanks, that was it.

> (Minor changes to) the hiddev driver would probably allow you to do the
> tool in userspace.

I've managed to retrieve all the information from the monitor, but 
apparently I can't set new values: HIDIOCSUSAGE followed by HIDIOCSREPORT 
succeeds, but nothing changes on the display, and at the next run the 
monitor reports the old values unless I comment out HIDIOCINITREPORT.
I was tinkering with brightness and contrast to start with, so I should 
really immediately *see* when the stuff is working as expected.

Note that HIDIOCSREPORT reports success even if I open the device node 
with O_RDONLY as a normal user. Is this the intended behaviour? Maybe it 
doesn't *really* try to write to the device?

The code is available here:
http://spazioweb.inwind.it/fstanchina/linux/hacks/testhiddev.c
Disclaimer: it is ugly, incomplete and probably broken in countless ways 
as it is my first attempt at this kind of hacking. Use at your own risk.

BTW, the example code in linux/hiddev.h is broken:
--- hiddev.h.orig       Sun Dec 16 23:46:19 2001
+++ hiddev.h    Sun Dec 16 23:47:45 2001
@@ -164,8 +164,8 @@
  *             ioctl(fd, HIDIOCGUSAGE, &uref);
  *          }
  *     }
- *     uref.report_id |= HID_REPORT_ID_NEXT;
- *     ret = ioctl(fd, HIDIOCGREPORTINFO, &uref);
+ *     rinfo.report_id |= HID_REPORT_ID_NEXT;
+ *     ret = ioctl(fd, HIDIOCGREPORTINFO, &rinfo);
  *  }
  */
  

-- 
Ciao,
    Flavio Stanchina
    Trento - Italy

"The best defense against logic is ignorance."
http://spazioweb.inwind.it/fstanchina/

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to