Jeffrey B. Green
2007-Oct-18 15:49 UTC
[Nut-upsuser] Belkin w/ Cypress Semi. interface probs
Hi, I've recently acquired a couple of Belkin F6H375-USB UPS units that use the Cypress Semiconductor interface (0665:5161), and they are not working with my etch servers. The usbhid driver sees them and takes possession but the nut software does not see anything. After exploration of the driver, running: % /lib/nut/usbhid-ups -DDDDDD -a belkin -x vendor=".*" -x product=".*" -u root -x explore I get (snipped to the tail): entering identify_ups(0x0665, 0x5161) upsdrv_updateinfo... dstate_init: sock /var/run/nut/usbhid-ups-belkin open on fd 5 upsdrv_updateinfo... Waiting for notifications... none (-110) upsdrv_updateinfo... Waiting for notifications... none (-110) upsdrv_updateinfo... (and so on and on) Checking out the code (2.2.0) I notice that the interrupt read function that is called just prior to the "none" message is basically just a stub, i.e. int shut_interrupt_read(shut_dev_handle_t *dev, int ep, unsigned char *bytes, int size, int timeout) { /* sleep during timeout to slow down a bit... */ sleep(timeout / 1000); /* FIXME: to be written */ return 0; } However, it automatically returns a zero, i.e. success. But the msg "none" says otherwise, e.g. -110. The usb version doesn't even seem to have an interrupt_read. But that version is definitely not invoked since the SHUT_MODE compile time variable is set. So I'm curious as to what is happening. I'm also still digging, i.e. following the upsdrv_updateinfo bit. Please feel free to reroute this msg to the developer list if it is deemed more appropriate there. thanks, -jeff
Alexander I. Gordeev
2007-Oct-18 15:53 UTC
[Nut-upsuser] Belkin w/ Cypress Semi. interface probs
On Thu, 18 Oct 2007 19:49:27 +0400, Jeffrey B. Green <jeff at kikisoso.org> wrote:> Hi, > > I've recently acquired a couple of Belkin F6H375-USB UPS units that use > the Cypress Semiconductor interface (0665:5161), and they are not > working with my etch servers. The usbhid driver sees them and takes > possession but the nut software does not see anything. > > After exploration of the driver, running: >[snip] Please, try megatec_usb driver, it should work out of the box. -- Alexander