Hello! I'm trying to use nut with a Ippon Smart Winner 3000 UPS (shop.key.ru/photo/items/45535.jpg) which looks like a custom-labeled OEM model of the megatec branch. I tried both the megatec_usb and the blazer_usb drivers for it, with a obvious config section: [ippon] driver = blazer_usb port = auto vendorid = 06da productid = 0003 desc = "Ippon Smart Winner 3000" If I run blazer_usb -a ippon -DDDDD I get the following: debug level is '5' Checking device (06DA/0003) (002/011) - VendorID: 06da - ProductID: 0003 - Manufacturer: unknown - Product: USB UPS - Serial Number: unknown - Bus: 002 Trying to match device Device matches failed to claim USB device: could not claim interface 0: Device or resource busy detached kernel driver from USB device... Trying megatec protocol... send: Q1 read: (218.7 218.7 218.7 020 50.0 0110 54.8 00001000 send_to_all: SETINFO input.voltage "218.7" send_to_all: SETINFO input.voltage.fault "218.7" send_to_all: SETINFO output.voltage "218.7" send_to_all: SETINFO ups.load "20" send_to_all: SETINFO input.frequency "50.0" send_to_all: SETINFO battery.voltage "110.00" send_to_all: SETINFO ups.temperature "54.8" send_to_all: SETINFO beeper.status "disabled" send_to_all: SETINFO ups.type "offline / line interactive" send_to_all: SETINFO ups.status "OL" Status read in 1 tries Supported UPS detected with megatec protocol send: error sending control message: Connection timed out blazer_rating: short reply Rating read 1 failed Checking device (06DA/0003) (002/011) - VendorID: 06da - ProductID: 0003 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 002 Trying to match device Device does not match - skipping Checking device (0000/0000) (002/001) ... here it goes over all USB devices, despite the fact that I have pointed the vendor/product ids in the config ... Checking device (0000/0000) (001/001) - VendorID: 0000 - ProductID: 0000 - Manufacturer: Linux 2.6.18-92.1.22.el5.centos.plus ehci_hcd - Product: EHCI Host Controller - Serial Number: 0000:00:03.2 - Bus: 001 Trying to match device Device does not match - skipping No appropriate HID device found blazer_vendor: short reply Vendor information read 3 failed Vendor information unavailable Battery runtime will not be calculated (runtimecal not set) send_to_all: SETINFO ups.delay.start "180" send_to_all: SETINFO ups.delay.shutdown "30" send_to_all: ADDCMD beeper.toggle send_to_all: ADDCMD load.off send_to_all: ADDCMD load.on send_to_all: ADDCMD shutdown.return send_to_all: ADDCMD shutdown.stayoff send_to_all: ADDCMD shutdown.stop send_to_all: ADDCMD test.battery.start send_to_all: ADDCMD test.battery.start.deep send_to_all: ADDCMD test.battery.start.quick send_to_all: ADDCMD test.battery.stop send_to_all: SETINFO ups.vendorid "0000" send_to_all: SETINFO ups.productid "0000" blazer_status: short reply Communications with UPS lost: status read failed! dstate_init: sock /var/run/nut/blazer_usb-ippon open on fd 5 ...and over and over again... So it looks like the driver talks properly with the UPS (and reads the voltage, temperature etc properly), but at some point the interaction is being suddenly interrupted (blazer_rating: short reply), then it reconnects again and so on in a endless loop. What I can do to locate and fix the problem? -- Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available Url : lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20090318/4f150077/attachment.pgp
Citeren Andrew Zabolotny <zap op homelink.ru>:> [ippon] > driver = blazer_usb > port = auto > vendorid = 06da > productid = 0003 > desc = "Ippon Smart Winner 3000"This vendorid and productid are already supported out-of-the box. Specifying them in the configuration should only be done for devices that are not (yet) supported.> If I run blazer_usb -a ippon -DDDDD I get the following: > > debug level is '5' > Checking device (06DA/0003) (002/011) > - VendorID: 06da > - ProductID: 0003 > - Manufacturer: unknown > - Product: USB UPS > - Serial Number: unknown > - Bus: 002 > Trying to match device > Device matches > failed to claim USB device: could not claim interface 0: Device or > resource busy detached kernel driver from USB device...The above is normal. Apparently the kernel already configured a driver for this device and we need to detach that driver before we can use the device.> Trying megatec protocol... > send: Q1 > read: (218.7 218.7 218.7 020 50.0 0110 54.8 00001000 > send_to_all: SETINFO input.voltage "218.7" > send_to_all: SETINFO input.voltage.fault "218.7" > send_to_all: SETINFO output.voltage "218.7" > send_to_all: SETINFO ups.load "20" > send_to_all: SETINFO input.frequency "50.0" > send_to_all: SETINFO battery.voltage "110.00" > send_to_all: SETINFO ups.temperature "54.8" > send_to_all: SETINFO beeper.status "disabled" > send_to_all: SETINFO ups.type "offline / line interactive" > send_to_all: SETINFO ups.status "OL" > Status read in 1 triesLooks good.> Supported UPS detected with megatec protocol > send: error sending control message: Connection timed out > blazer_rating: short reply > Rating read 1 failedThis doesn't look good. Apparently, your UPS doesn't understand the command to read the ratings from it. Some devices are brain dead and will not answer anything after that, so you should configure the driver to skip the detection of the ratings (see 'man 8 blazer' on how to do that). You may want to skip reading the vendor information as well, since that most likely will result in the same mess.> Checking device (06DA/0003) (002/011) > - VendorID: 06da > - ProductID: 0003 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 002 > Trying to match device > Device does not match - skipping > Checking device (0000/0000) (002/001) > ... here it goes over all USB devices, despite the fact that I have > pointed the vendor/product ids in the config ...This is not how the detection mechanism works. It will walk trough all USB devices until one matches. But apparently, your UPS doesn't listen to us anymore. [...]> send_to_all: SETINFO ups.vendorid "0000" > send_to_all: SETINFO ups.productid "0000"This is a bug that has been fixed in the SVN trunk already. Best regards, Arjen -- Please keep list traffic on the list
On Wednesday 18 March 2009 00:58:31 Andrew Zabolotny wrote:> Hello! > > I'm trying to use nut with a Ippon Smart Winner 3000 UPS > (shop.key.ru/photo/items/45535.jpg) which looks like a > custom-labeled OEM model of the megatec branch. > > I tried both the megatec_usb and the blazer_usb drivers for it, with a > obvious config section:[snip]> > ...and over and over again... > > So it looks like the driver talks properly with the UPS (and reads the > voltage, temperature etc properly), but at some point the interaction is > being suddenly interrupted (blazer_rating: short reply), then it > reconnects again and so on in a endless loop. > > What I can do to locate and fix the problem?I've just commited a fix for the blazer_usb driver. I'm still trying to fix megatec_usb also. There is a very odd and interesting problem which I want to resolve. The device actually hangs if not read until timeout. BTW the same logic is in megatec_usb's phoenix subdriver. -- Alexander