Displaying 11 results from an estimated 11 matches for "usb_strerror".
Did you mean:
db_strerror
2009 Jul 10
1
PowerWare USB debug messages
Earlier this year, I added a patch to my local NUT tree to
additionally print the value of usb_strerror() if usb_clear_halt()
failed.
(Ignore the commented-out goto.)
Since these messages are at the LOG_ERR level, should we add
usb_strerror() to all of the calls in nut_usb.c?
diff --git a/drivers/nut_usb.c b/drivers/nut_usb.c
index 494a1fa..4ca2691 100644
--- a/drivers/nut_usb.c
+++ b/drivers/nut_...
2010 May 11
1
possible code change to drivers/libusb.c
...ess we
claimed the device.
$ diff -uw libusb.c.bak libusb.c.new
--- libusb.c.bak 2010-05-11 09:35:39.000000000 -0400
+++ libusb.c.new 2010-05-11 09:32:44.000000000 -0400
@@ -206,18 +206,21 @@
upsdebugx(2, "failed to claim USB
device: %s", usb_strerror());
+ if (retries-- > 1) {
+ continue;
+ }
+
+ fatalx(EXIT_FAILURE, "Can't claim USB
device [%04x:%04x]: %s", curDevice->VendorID, curDevice->Prod...
2005 Nov 08
1
TrippLite OMNI1000LCD hiddev
Joel Peshkin wrote:
>
> I hacked in the following additonal changes...
>
> Index: newhidups.c
> ===================================================================
> RCS file: /cvsroot/nut/nut/drivers/newhidups.c,v
> retrieving revision 1.1.1.1.8.6.2.21
> diff -u -r1.1.1.1.8.6.2.21 newhidups.c
> --- newhidups.c 7 Nov 2005 22:14:20 -0000 1.1.1.1.8.6.2.21
> +++
2010 Apr 08
2
HP R1500 G2
...close(): hdl=0x0
usb_error(): error=22
usb_devices list:
0: 3f0.1fe0/0
0.017204 Checking device (0000/0000) (/dev/usb/3f0.1fe0/0)
usb_open: device ptr is 0x4bea8
usb_open: pindex = 0
usb_open():
usb_open_ep0():
opening /dev/usb/3f0.1fe0/0/cntrl0
opening ep0 failed, -1
usb_open_ep0 failed: 16
usb_strerror(): usb_error_type=2, errno=22
0.018193 Failed to open device, skipping. (Invalid argument)
0.018350 No appropriate HID device found
0.018511 No matching HID UPS found
.....
And running it under truus I see thih line
838: open("/dev/usb/3f0.1fe0/0/cntrl0", O_RDWR)...
2005 Aug 25
3
Tr : NUT patches
Hi Peter,
I've forwarded your mail to upsdev as it will be of interest for several
people that are working on it. As I'm also on vacation (again) for a
week and 1/2 as of this evening, I don't think I'll have the time for it
before I get back....
I've not yet audited the patches, but these are queued on the
Alioth tracker:
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...en);
- } else {
- ret = usb_get_string_simple(udev, command[i].index,
buf, buflen);
- }
+ ret = nut_usb_get_string(udev, command[i].index, buf, buflen);
if (ret <= 0) {
upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() :
"timeout", ret);
@@ -733,34 +726,6 @@ static int krauler_command(const char *cmd, char
*buf, size_t buflen)
/* This may serve in the future */
upsdebugx(1, "received %d (%d)", ret, buf[0]);
- if (langid_fix != -1) {
- ...
2010 Apr 19
2
Too much logging from libusb.c (patch supplied)
...where this is happening and did the following patch:
diff --git a/drivers/libusb.c b/drivers/libusb.c
index 50bfc7f..3eae478 100644
--- a/drivers/libusb.c
+++ b/drivers/libusb.c
@@ -353,7 +353,7 @@ static int libusb_open(usb_dev_handle **udevp, USBDevice_t *curDevice, USBDevice
*/
static int libusb_strerror(const int ret, const char *desc)
{
- if (ret > 0) {
+ if (ret >= 0) {
return ret;
}
I've been running that patched version since April 16th, monitoring two
UPSes (APC Back UPS XS 1000 and Cyber Power 1000AVRLCD) with no issues.
-spc
2005 Jun 23
1
USB UPS Question...
...nterface'
libusb.o(.text+0x15a): In function `libusb_open':
: undefined reference to `usb_claim_interface'
libusb.o(.text+0x17e): In function `libusb_open':
: undefined reference to `usb_control_msg'
libusb.o(.text+0x192): In function `libusb_open':
: undefined reference to `usb_strerror'
libusb.o(.text+0x203): In function `libusb_open':
: undefined reference to `usb_get_string_simple'
libusb.o(.text+0x2a5): In function `libusb_open':
: undefined reference to `usb_get_string_simple'
libusb.o(.text+0x341): In function `libusb_open':
: undefined reference to `...
2005 Sep 21
0
Compre facil seu imóvel consorcio (11) 2121-4103
...:222: `request` undeclared (first use in this function)
amload.c:222: `value` undeclared (first use in this function)
amload.c:222: `buf` undeclared (first use in this function)
amload.c:222: `size` undeclared (first use in this function)
amload.c:232: warning: implicit declaration of function `usb_strerror`
amload.c:232: warning: format argument is not a pointer (arg 2)
amload.c:234: warning: implicit declaration of function `usb_clear_halt`
amload.c: At top level:
amload.c:250: parse error before `*` token
amload.c:251: warning: function declaration isn`t a prototype
amload.c: In function `rea...
2010 Mar 05
5
Getting 'Data stale' error with bcmxcp_usb for a PowerWare 5115 on OSX
Good evening,
I tried getting this to work a couple years back but didn't have
enough time to do all the debugging that was needed (apologies
to the devs who tried to help at that time). It's working much
better now, but I'm still not able to get an answer from upsc.
Can anyone help me work out why I'm getting the error when
querying with upsc:
Error: Data stale
My
2010 Mar 05
5
Getting 'Data stale' error with bcmxcp_usb for a PowerWare 5115 on OSX
Good evening,
I tried getting this to work a couple years back but didn't have
enough time to do all the debugging that was needed (apologies
to the devs who tried to help at that time). It's working much
better now, but I'm still not able to get an answer from upsc.
Can anyone help me work out why I'm getting the error when
querying with upsc:
Error: Data stale
My