search for: raw_buf

Displaying 5 results from an estimated 5 matches for "raw_buf".

Did you mean: raw_box
2007 Jan 31
3
Re: [Nut-upsuser] Ablerex 625L USB version
Peter, I have been doing some more testing and I find that if I modify the libusb.c file to set a report size in libusb_get_report to 16 the error messages go away. This is the code as it currently stands: static int libusb_get_report(usb_dev_handle *udev, int ReportId, unsigned char *raw_buf, int ReportSize ) { int ReportSize_test = 16; unsigned char raw_buf_test[ReportSize_test + 1]; int rc; unsigned char *p_raw_buf_test; upsdebugx(4, "Entering libusb_get_report, ReportSize: %i, ReportSize_test: %i",ReportSize, ReportSize_test); if (udev != NUL...
2010 Mar 25
1
new TSSHARA SOHO II ups
...ng USBDeviceMatcher_t */ USBDeviceMatcher_t *matcher, int (*callback)(usb_dev_handle *udev, USBDevice_t *hd, unsigned char *rdbuf, int rdlen)); void (*close)(usb_dev_handle *sdev); int (*get_report)(usb_dev_handle *sdev, int ReportId, unsigned char *raw_buf, int ReportSize ); int (*set_report)(usb_dev_handle *sdev, int ReportId, unsigned char *raw_buf, int ReportSize ); int (*get_string)(usb_dev_handle *sdev, int StringIdx, char *buf, size_t buflen); int (*get_interrupt)(usb_dev_handle *sdev, unsigned char *buf, int bufsize, in...
2018 Feb 16
0
[PATCH 1/3] Skip non-feature HID reports
...s it is for powercom devices). libusb_get_report() has: ret = usb_control_msg(udev, USB_ENDPOINT_IN + USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x01, /* HID_REPORT_GET */ ReportId+(0x03<<8), /* HID_REPORT_TYPE_FEATURE */ 0, raw_buf, ReportSize, USB_TIMEOUT); Hence, libusb_get_report() always requests the report ID as a feature report, and never uses the report type that was stored. This means that when HIDDumpTree() iterates over all reports that were gathered from in the USB report descriptor, it tries to obtain their valu...
2018 Feb 15
2
[PATCH 1/3] Skip non-feature HID reports
On Feb 3, 2018, at 7:19 PM, Russell King wrote: > > Input and Output reports are used for interrupt endpoints rather than > control endpoints. HIDGetItemData() only ever requests feature > report IDs, and requesting non-feature report IDs as feature IDs may > lead to undesirable results and errors. This one made me scratch my head a bit. I don't think it's unreasonable
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...e_t *curDevice, /* device matching HIDDeviceMatcher_t */ > HIDDeviceMatcher_t *matcher, > unsigned char *ReportDesc, > - int mode); > + int *mode); > void (*close)(hid_dev_handle_t *sdev); > int (*get_report)(hid_dev_handle_t *sdev, int ReportId, > unsigned char *raw_buf, int ReportSize ); > @@ -188,7 +188,7 @@ > /* > * HIDOpenDevice > * -------------------------------------------------------------------------- */ > -HIDDevice_t *HIDOpenDevice(hid_dev_handle_t **udevp, HIDDevice_t *hd, HIDDeviceMatcher_t *matcher, int mode); > +HIDDevice_t *H...