Displaying 19 results from an estimated 19 matches for "usb_interrupt_read".
2009 Dec 29
1
SUN_LIBUSB
...oping
around I found this bit of code in libusb.c libusb_get_interrupt().
#ifdef SUN_LIBUSB
/*
usleep(timeout * 1000);
*/
return 0;
#else
/* FIXME: hardcoded interrupt EP => need to get EP descr
for IF descr */
ret = usb_interrupt_read(udev, 0x81, (char *)buf,
bufsize, timeout);
if (ret > 0) {
upsdebugx(6, " ok");
} else {
upsdebugx(6, " none (%i)", ret);
}
return ret;
#endi...
2006 Jul 06
1
tracing a problem with newhidups
...:
----------
upsdrv_updateinfo...
Waiting for notifications...
none (-22)
entering string_to_path()
parsing UPS
Looking up UPS
----------
The function calls in userspace are:
[newhidups.c] upsdrv_updateinfo()
[libhid.c] HIDGetEvents()
[libusb.c] libusb_get_interrupt()
[libusb] usb_interrupt_read()
[libusb] usb_urb_transfer()
In the usb_urb_transfer() function one can find that
----------
urb.number_of_packets = 0; /* don't do isochronous yet */
urb.usercontext = NULL;
ret = ioctl(dev->fd, IOCTL_USB_SUBMITURB, &urb);
----------
and in the kernel code...
2006 May 08
1
RE: Nut-upsuser Digest, Vol 11, Issue 3
...powered
ugen0 at uhub0 port 1
ugen0: MGE UPS SYSTEMS NOVA AVR, rev 1.10/0.01, addr 2
2).
Install libusb 0.1.12
0.1.11 includes a bug fix for *BSD to allow short reads. Without this
various status is not returned from UPS.
3). I found another problem with libusb on netBSD in that the
Function usb_interrupt_read() calls read() which blocks on read from usb
until buffer is full. In my case this was seemingly infinite. A timeout is
passed to the function but netBSD does not seem to respect this.
I have been meaning to lodge a bug-report but haven't as yet.
To fix (hack) I changed bsd.c in libusb as fol...
2009 Aug 02
2
Driver fix for Ippon BCP800 (06da/0003), blazer_usb.c
...)
@@ -94,6 +94,23 @@
}
+static int phoenix_flush_io()
+{
+ static
+ char buf[SMALLBUF+1];
+ int i, ret;
+ upsdebugx(3, "phoenix_flush_io");
+ for(i = 0; i < 10; i++) {
+ memset(buf, 0, sizeof(buf));
+ /* ret = usb->get_interrupt(udev, (unsigned char *)buf, 8, 1000); */
+ ret = usb_interrupt_read(udev, 0x81, buf, SMALLBUF, 1000);
+ upsdebugx(4, "flush(%d,%d) <- '%s'", ret, strlen(buf), buf);
+ if (ret < 1)
+ break;
+ }
+ return 0;
+}
+
static int phoenix_command(const char *cmd, char *buf, size_t buflen)
{
char tmp[SMALLBUF];
@@ -103,6 +120,7 @@
memset(tmp,...
blazer_usb: compatibility with Ippon BackPro UPSes (Phoenix Power Co., Ltd usb-to-serial controller)
2010 Jan 06
1
blazer_usb: compatibility with Ippon BackPro UPSes (Phoenix Power Co., Ltd usb-to-serial controller)
...nd);
int ret = usb_control_message(devfd, 0x21, 0x9, 0x2, 0, tmp, tosend, 1000);
if((ret <= 0) || (ret != tosend)) {
return_buf[0] = 0;
return -1;
}
index += tosend;
}
- ------------------- cut --------------------------------------
6. Read back return string from UPS in one chunk using usb_interrupt_read:
- ------------------- cut --------------------------------------
char tmp[256];
memset(tmp, 0, sizeof(tmp));
int ret = usb_interrupt_read(devfd, 0x81, tmp, max_return_size, timeout);
if(ret <= 0) {
return_buf[0] = 0;
return -1;
}
int max = (max_return_size > 256) ? 256 : max_return_size;...
2008 Nov 30
4
Sweex 1000VA UPS (Lakeview Research)
Hi all,
i've read a thread about this UPS from Peter van Valderen. He tried to
develop a
driver for this specific type of UPS. I've downloaded nut-2.2.2 and tried to
apply
the patches (lakeview.patch & lakeview.v2.patch) but both resulted in
rejected
chunks. I've tried to ./configure with type lakeview and then a make, but
the make
command fails.
Does anybody has any
2005 Nov 08
0
gcc4 noise
...ets in passing argument 3 of libusb_get_string differ in signedness
libhid.c:571: warning: pointer targets in return differ in signedness
gcc -I../include -O -Wall -Wsign-compare -c libusb.c
libusb.c: In function libusb_get_interrupt:
libusb.c:321: warning: pointer targets in passing argument 3 of usb_interrupt_read differ in signedness
gcc -I../include -O -Wall -Wsign-compare -c bcmxcp_usb.c
bcmxcp_usb.c: In function get_answer:
bcmxcp_usb.c:47: warning: pointer targets in passing argument 3 of usb_interrupt_read differ in signedness
gcc -I../include -O -Wall -Wsign-compare -c tripplite_usb.c
tripplite_usb....
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
2008 Dec 05
1
[nut-commits] svn commit r1596 - in trunk: drivers man tools
On Thu, Dec 4, 2008 at 4:51 PM, Arjen de Korte
<adkorte-guest at alioth.debian.org> wrote:
> Author: adkorte-guest
> Date: Thu Dec 4 21:51:28 2008
> New Revision: 1596
>
> Log:
> Added new richcomm_usb driver based on the lakeview_usb driver (using libusb).
Sorry if I wasn't clear - I was advocating *renaming* the lakeview_usb
driver to richcomm_usb.
Is there another
2010 Mar 25
1
new TSSHARA SOHO II ups
Hi all, My name is Sergio Penen and I'd like to contribute to the project by
developing a new driver for TS SHARA SOHO II usb ups.
I'm almost done decoding the protocol and already have some basic
functionality working with NUT. However I'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
2007 Nov 20
2
Mustek Powermust 600VA
Hi,
I'm having a hard time configuring a Mustek Powermust 600VA ups to
work via USB with nut. I read somewhere that nut works OK via the
rs232 cable, but unfortunately I don't have a COM port in my computer.
The kernel detects the ups as an Xbox pad :) and loads the xpad
module. I tried running /lib/nut/megatec with different /dev/ttySx but
it displays megatec protocol UPS was not
2013 Dec 21
0
Generic UPS driver
...output error
0.041723 hid_lookup_path: ffa00001 -> not found in lookup table
0.041741 hid_lookup_path: ffa00004 -> not found in lookup table
0.041747 Path: ffa00001.ffa00004, Type: Output, ReportID: 0x00, Offset: 0, Size: 8
In your upsmon log, these seem to be the usb_interrupt_read() request/response pairs:
ffff88010f25a600 1892124915 S Ii:4:004:1 -115:8 8 <
ffff88010f25a600 1893162682 C Ii:4:004:1 0:8 8 = 03000000 00000000
ffff880138503b40 1893182340 S Ii:4:004:1 -115:8 8 <
ffff880138503b40 1894210833 C Ii:4:004:1 0:8 8 = 03000000 00000000
ffff880138503b40 1894217214...
2007 May 13
0
No subject
...etrieve_query(unsigned char *query, unsigned char *reply) {
int ret;
ret = usb_control_msg(upsdev, STATUS_REQUESTTYPE, REQUEST_VALUE,
MESSAGE_VALUE, INDEX_VALUE, query, sizeof(query), 1000);
if (ret < 0) {
return ret;
}
ret = usb_interrupt_read(upsdev, REPLY_REQUESTTYPE, reply,
sizeof(REPLY_PACKETSIZE), 1000);
return ret;
}
void claim_device () {
int ret;
ret = usb_claim_interface(upsdev, 0);
if (ret < 0)
{
upslogx(LOG_ERR, "Can't claim USB interface");
}...
2007 May 13
0
No subject
...e_and_retrieve_query(unsigned char *query, unsigned char *reply) {
int ret;
ret = usb_control_msg(upsdev, STATUS_REQUESTTYPE, REQUEST_VALUE,
MESSAGE_VALUE, INDEX_VALUE, query, sizeof(query), 1000);
if (ret < 0) {
return ret;
}
ret = usb_interrupt_read(upsdev, REPLY_REQUESTTYPE, reply,
sizeof(REPLY_PACKETSIZE), 1000);
return ret;
}
void claim_device () {
int ret;
ret = usb_claim_interface(upsdev, 0);
if (ret < 0)
{
upslogx(LOG_ERR, "Can't claim USB interface");
}...
2007 May 13
0
No subject
...e_and_retrieve_query(unsigned char *query, unsigned char *reply) {
int ret;
ret = usb_control_msg(upsdev, STATUS_REQUESTTYPE, REQUEST_VALUE,
MESSAGE_VALUE, INDEX_VALUE, query, sizeof(query), 1000);
if (ret < 0) {
return ret;
}
ret = usb_interrupt_read(upsdev, REPLY_REQUESTTYPE, reply,
sizeof(REPLY_PACKETSIZE), 1000);
return ret;
}
void claim_device () {
int ret;
ret = usb_claim_interface(upsdev, 0);
if (ret < 0)
{
upslogx(LOG_ERR, "Can't claim USB interface");
}...
2013 Dec 20
2
Generic UPS driver
Hi, I just bought a cheap UPS and apparently I'm hitting the same issue
that's described here:
http://comments.gmane.org/gmane.comp.monitoring.nut.user/6146
Mine is a different brand: "Kanji" which appears to be the argentinian
dealler for some generic chinese manufacturer. My model is also 800VA
and identified in the same way, so maybe is the same UPS under a
different brand:
2007 Feb 16
5
MGE Nova AVR 600 USB on FreeBSD
Hi,
I've seen a few emails in the archives about problems polling MGE UPSs
via USB under FreeBSD, but unfortunately I didn't find a solution in
them that works for me.
A few details about my setup.. The UPS is a MGE Nova AVR 600 connected
via USB to a FreeBSD 6.2 box. I have tried both the nut port (2.0.5)
and the svn trunk but have had no success yet. I am running nut as
root to
2007 Feb 16
5
MGE Nova AVR 600 USB on FreeBSD
Hi,
I've seen a few emails in the archives about problems polling MGE UPSs
via USB under FreeBSD, but unfortunately I didn't find a solution in
them that works for me.
A few details about my setup.. The UPS is a MGE Nova AVR 600 connected
via USB to a FreeBSD 6.2 box. I have tried both the nut port (2.0.5)
and the svn trunk but have had no success yet. I am running nut as
root to