[Nut-upsuser] APC 1500 USB problem

Czuczy Gergely czuczy at publishing.hu
Fri Apr 13 06:07:44 UTC 2007


On Thu, 12 Apr 2007 18:31:10 -0300 (ADT)
selinger at mathstat.dal.ca (Peter Selinger) wrote:

> A couple of suggestions.
> 
> First, please read the man page of newhidups, particularly the section
> on how to configure multiple USB ups's. ("IMPLEMENTATION"). Newhidups
> does not use /dev/usb/hiddev*, and the "port" values you have given
> will be ignored in any case.
Yes, I've already read that. When i was trying to make it work in the
suggested way, then it absolutely failed to work. After that failure
when I specified the device it started to work. Moreover, it was not
told there, to how to acquire the proper values for the settings.

> Second, please follow the instructions in the file INSTALL that comes
> with NUT. In other words, use upsd, upsmon, upsdrvctl, and don't use
> your distribution's /usr/local/etc/rc.d/nut, at least until you have
> found out what the problem is. The problem might be with that script,
> which is not part of NUT (and therefore we don't know what it does and
> cannot support it here).
I've tried to start it directly with upsd, and also i've tried to start
the driver(newhidups) up directly, according to its help output, but
either ways failed.

> Third, the information you gave is insufficient to determine what the
> problem is. There are several reasons the newhidups driver might not
> be able to connect to your UPS, e.g. (a) another instance of newhidups
> is already attached to the UPS, (b) a permissions problem, (c)
> other ??? So you should check that newhidups is not already running.
> You should also check that the device really exists (lsusb or usbview
> or similar). You should also check that the permissions on the file
> /proc/bus/usb/XXX/YYY are set correctly. See the file INSTALL, and
> also http://www.mathstat.dal.ca/~selinger/ups/backups.html, for
> step-by-step instructions. 
Another instances were not running, I've always made that sure.
Permissions were set up correctly, I've also made this sure.


usb device listing:

# usbdevs
addr 1: UHCI root hub, Intel
 addr 2: Back-UPS RS 1500 FW:8.g8 .I USB FW:g8, American Power
Conversion addr 3: Back-UPS RS 1500 FW:8.g8 .I USB FW:g8, American
Power Conversion
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
Intel(0x0000), rev 1.00 port 1 addr 2: low speed, power 24 mA, config
1, Back-UPS RS 1500 FW:8.g8 .I USB FW:g8(0x0002), American Power
Conversion(0x051d), rev 1.06 port 2 addr 3: low speed, power 24 mA,
config 1, Back-UPS RS 1500 FW:8.g8 .I USB FW:g8(0x0002), American Power
Conversion(0x051d), rev 1.06

USB device listing:
# ls -lh /dev/ugen*
crw-rw-rw-  1 root  operator    0,  58 Apr 12 16:11 /dev/ugen0
crw-rw-rw-  1 root  operator    0,  59 Apr 12 16:11 /dev/ugen0.1
crw-rw-rw-  1 root  operator    0,  60 Apr 12 16:11 /dev/ugen1
crw-rw-rw-  1 root  operator    0,  61 Apr 12 16:11 /dev/ugen1.1

The rc script:
http://pastebin.ca/437762
It's a bit logical. Runs the $command, yet without arguments. The
pre- and post- commands are also taken into account.

After reading your link, i've figured this out:

our UPS1:
Checking device (051D/0002) (/dev/usb0//dev/ugen0)
- VendorID: 051d
- ProductID: 0002
- Manufacturer: American Power Conversion
- Product: Back-UPS RS 1500 FW:8.g8 .I USB FW:g8
- Serial Number: JB0436038663
- Bus: /dev/usb0

UPS2:
Checking device (051D/0002) (/dev/usb0//dev/ugen0)
- VendorID: 051d
- ProductID: 0002
- Manufacturer: American Power Conversion
- Product: Back-UPS RS 1500 FW:8.g8 .I USB FW:g8
- Serial Number: JB0436038664
- Bus: /dev/usb0

(please note that at this time only the ups in question
was plugged in at all)

After this the ups.conf:
[ups1]
        driver = newhidups
        port = auto
        desc = "APC Back-UPS RS 1500"
        vendorid = 051d
        productid = 0002
        serial = JB0436038663

[ups2]
        driver = newhidups
        port = auto
        desc = "APC Back-UPS RS 1500"
        vendorid = 051d
        productid = 0002
        serial = JB0436038664

(it would be nice, if a "#1"/"#2" could be added to
the description, but that's a syntax error atm)

Hmm, now it worked. strange :)
Before i started to collect these data newhidups
was not able to read one of the UPS's serial, it just
said "Unknown" for that field in the debug output. I can't
reproduce that :(

Anyways, for now it seems that it's going to work. Thank for your
reply. Most sooner this configuration can be tested at monday, so
if I will find any troubles, I will tell you that :)
We've got total of 3 UPSes in this office, and on UPS1, there are
~7 servers, even windows boxes. So, it's I think it will be a good
testing area for NUT :)

Again, thank you very much for your reply.

-- 
Your sincerely,

Gergely Czuczy
Publishing Factory Ltd
http://www.publishing.hu/



More information about the Nut-upsuser mailing list