Archive for the ‘Uncategorized’ Category

APC SmartUPS recognition problems (”device not accepting address X, error -110″ or “device descriptor read/64, error -110″)

Thursday, February 8th, 2007

After the power scare in December, I decided to run apcupsd to perform an orderly shutdown of Asterisk when the power failed.

I discovered something interesting about my APC UPS, though. If the UPS is connected to the computer when it first boots, the computer will be unable to recognize it. If they are not connected when the computer boots, everything will be fine.

I first noticed the problem when bringing my network rack back up from a forced power fail situation. Rather than recognizing the UPS, I received the following messages from the kernel:

usb 1-1: new low speed USB device using ohci_hcd and address 7
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: new low speed USB device using ohci_hcd and address 8
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: new low speed USB device using ohci_hcd and address 9
usb 1-1: device not accepting address 9, error -110

I was able to diagnose the problem by using a separate computer connected to the serial port on the UPS. With a helpful guide to the APC “smart” serial protocol (it’s really pretty brain-dead), I could interact with the UPS via serial from a laptop running on battery power. When the UPS was running normally, I could type commands to the serial port, like this:

YSM
NA
Smart-UPS 750 XL
B27.67
F60.00
XCOK
022.0
C022.0
f100.0
j0086:
k0
m08/31/02
nAS0235331770(
o120
y(C) APCC
p090

However, I noticed that when I was interacting with the UPS on serial and the Asterisk box came up when connected via USB, the serial port would freeze up. If I disconnect the Linux system from the UPS and plug it in after the system boots, then everything is OK. I am running the USB code as a module. Maybe it would be different compiled into the kernel.

The Power Company (PG&E, in this case) cares about your alarm clock?

Wednesday, December 27th, 2006

I started off my day at home today, but there was a big windstorm that knocked out power for 50,000 customers this morning. When I called PG&E to report it, they offered to let me set up a wake-up call using an automated system. I must admit that it was quite a surprise to hear about that extra level of service. Generally, I do not expect utilities to provide for needs above and beyond the basic service that they provide.

(The conspiratorial part of me wonders why the power company has rolled out this service. Did they get sued by some employer who claimed that no wake-up alarms made a large number of their employees late and therefore, the suit sought to recover loss due to late employees?)

My UPS worked fine, though I don’t have enough run time to do much except go to my rack and power everything down. I should figure out how to get it to trigger a network shutdown so that everything doesn’t go down hard in case I’m not at home.