search for: get_report

Displaying 12 results from an estimated 12 matches for "get_report".

2011 Feb 10
1
Bug/Patch for NUT 2.6.0 ; usbhid-ups (libhid.c)
...he driver starts up OK, and upsc client gives me values for 39 variables/parameters. In NUT 2.4.3 and 2.6.0, level 1 debug from the driver shows lots of errors and upsc client gives me only 22 variables/parameters. I narrowed the problem down to one function call in libhid.c: r = comm_driver->get_report(udev, id, buf, sizeof(buf)); Below is the patch that fixes the problem. With this change, I get no errors in the level 1 driver debug output, and upsd and all the clients seem to work properly. Once I found that this fixed my problems, I didn't look into it further. But I expect that whoev...
2011 Feb 10
1
Bug/Patch for NUT 2.6.0 ; usbhid-ups (libhid.c)
...he driver starts up OK, and upsc client gives me values for 39 variables/parameters. In NUT 2.4.3 and 2.6.0, level 1 debug from the driver shows lots of errors and upsc client gives me only 22 variables/parameters. I narrowed the problem down to one function call in libhid.c: r = comm_driver->get_report(udev, id, buf, sizeof(buf)); Below is the patch that fixes the problem. With this change, I get no errors in the level 1 driver debug output, and upsd and all the clients seem to work properly. Once I found that this fixed my problems, I didn't look into it further. But I expect that whoev...
2010 Mar 19
1
usbhid-ups fails with Belkin F6C120-UNV in nut-2.4.3
...8, Value: 100.000000 ... With 2.4.3: # /sbin/usbhid-ups -D -a auto Network UPS Tools - Generic HID driver 0.34 (2.4.3) USB communication driver 0.31 0.000000 debug level is '1' 0.001172 upsdrv_initups... 0.279899 Using subdriver: Belkin HID 0.12 0.284577 libusb_get_report: No error 0.284609 Can't retrieve Report 01: Operation not permitted 0.284628 Path: UPS.BELKINConfig.BELKINConfigVoltage, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8 0.289575 libusb_get_report: No error 0.289590 Can't retrieve Report 02: Operation not permi...
2018 Feb 16
0
[PATCH 1/3] Skip non-feature HID reports
...so, HIDGetItemData() searches the parsed descriptor to match the type > as well as the Usage path, so I'm not sure if I can figure out a way > that it would get an Input report ID confused with a Feature report ID > (unless interrupt_only is set, as 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...
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
2010 Mar 25
1
new TSSHARA SOHO II ups
...ve some doubts on how to integrate this driver with NUT and I wonder if you could give me some guidance in that sense. To be more specific: In order to communicate with this UPS both input and output have to be performed as USB interrupts I/O as this UPS doesn't recognizes Control IO, so libusb_get_report() and libusb_set_report() will not work. Looking at libusb.c I realized there's a libusb_get_interrupt() which can be used to read from the endpoint, however there's no counterpart libusb_set_interrupt() API and usb_communication_subdriver_t structure doesn't contain a *set_interrupt el...
2007 Jan 26
4
Ablerex 625L USB version
Hi, Is there any further information on this UPS interface? I have an Upsonic UPS that is reporting the same interface, but I cannot make it work or get any sensible information from it. Thanks Jon --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 000706-2, 25/01/2007 Tested on: 26/01/2007 11:00:14 AM avast! is copyright (c) 2000-2007 ALWIL Software.
2007 Jan 26
4
Ablerex 625L USB version
Hi, Is there any further information on this UPS interface? I have an Upsonic UPS that is reporting the same interface, but I cannot make it work or get any sensible information from it. Thanks Jon --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 000706-2, 25/01/2007 Tested on: 26/01/2007 11:00:14 AM avast! is copyright (c) 2000-2007 ALWIL Software.
2007 Jan 28
0
Fwd: Re: [Nut-upsuser] Ablerex 625L USB version
...e Belkin UPS that I own seems to have a dual bug: if you give a buffer that is too large, then it will attempt to write random contents from the firmware memory into the buffer, often crashing the device). Alternatively, what would happen if you just ignored the error in libhid.c after the call to get_report? Perhaps the buffer has been filled with partial data in spite of the error message? Just some thoughts. -- Peter Jon Gough wrote: > > Peter, > I have been trying with no luck to get the drivers working. I > have done a "lsusb -v -d ffff:" to get the info from the USB &...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...d) regular expressions. If any > @@ -169,7 +169,7 @@ > HIDDevice_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, HIDDevic...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 1125f4715830..5204769834d1 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -509,27 +509,23 @@ static int hidg_setup(struct usb_function *f, VDBG(cdev, "get_report\n"); /* send an empty report */ length = min_t(unsigned, length, hidg->report_length); memset(req->buf, 0x0, length); - goto respond; - break; case ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8 | HID_REQ_GET_PROTOCOL): VDBG(cdev, "get_pro...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 1125f4715830..5204769834d1 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -509,27 +509,23 @@ static int hidg_setup(struct usb_function *f, VDBG(cdev, "get_report\n"); /* send an empty report */ length = min_t(unsigned, length, hidg->report_length); memset(req->buf, 0x0, length); - goto respond; - break; case ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8 | HID_REQ_GET_PROTOCOL): VDBG(cdev, "get_pro...