LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   APC UPS w/ USB signal cable - work in Linux? (https://www.linuxquestions.org/questions/linux-hardware-18/apc-ups-w-usb-signal-cable-work-in-linux-155547/)

sirpimpsalot 03-09-2004 03:48 PM

APC UPS w/ USB signal cable - work in Linux?
 
Our company just recieved (for free) several 350VA APC Back-UPS ES Series UPS devices that use a USB cable to attach to the server/system.

I would like to configure our linux server (SUSE 9.0) to automatically /cleanly shutdown during a power failure. Unfortunately I can't seem to find any information regarding the USB interface and Linux? Any chance I can get this running under linux? Or (alternatively) could I make my own serial cable that will run with known working linux packages?

I really wouldnt mind even getting some general information regarding UPS configuration under linux in general if anyone can help with that as well. What does everyone use? How difficult (generally speaking) is it to set up UPS support under linux? Surprisingly I cant find any modules or help document on my SUSE box, and my google searches have been fruitless as well.

Any help would be greatly appreciated!

jtshaw 03-09-2004 04:21 PM

There isn't just a good chance it'll work, there is a great chance:)

http://www.sibbald.com/apcupsd/

KEYofR 06-16-2004 09:45 PM

Quote:

Originally posted by jtshaw
There isn't just a good chance it'll work, there is a great chance:)

http://www.sibbald.com/apcupsd/

Well, I'd sure like to be let in on the secret handshake if it's supposed to be so easy.

I have suse 9.0 recently installed on a new box based on a asus p4bgv-mx motherboard and I installed apcupsd via yast2 and I have a backups-es 725 plugged in and it's the only usb device and it sure isn't working merely by following the surface directions.


linux:~ # apcupsd --version
apcupsd 3.10.6 (05 August 2003) suse

linux:~ # /etc/rc.d/apcupsd start
Starting apcupsd power managementapcupsd FATAL ERROR in dumbsetup.c at line 86
Cannot open UPS port /dev/usb/hiddev[0-15]: No such file or directory
failed


linux:~ # grep -v "^#" /etc/apcupsd/apcupsd.conf
UPSCABLE usb
UPSTYPE backups
DEVICE /dev/usb/hiddev[0-15]
...

linux:~ # cat /proc/usb/devices
...
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=051d ProdID=0002 Rev= 1.06
S: Manufacturer=APC
S: Product=Back-UPS ES 725 FW:802.n2.D USB FW:n2
S: SerialNumber=
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=hid
E: Ad=81(I) Atr=03(Int.) MxPS= 6 Ivl=10ms
...

linux:~ # ls -l /dev/usb/hid*
crw-rw---- 1 root root 180, 96 Oct 2 2003 /dev/usb/hiddev0
crw-rw---- 1 root root 180, 97 Oct 2 2003 /dev/usb/hiddev1
crw-rw---- 1 root root 180, 106 Oct 2 2003 /dev/usb/hiddev10
crw-rw---- 1 root root 180, 107 Oct 2 2003 /dev/usb/hiddev11
crw-rw---- 1 root root 180, 108 Oct 2 2003 /dev/usb/hiddev12
crw-rw---- 1 root root 180, 109 Oct 2 2003 /dev/usb/hiddev13
crw-rw---- 1 root root 180, 110 Oct 2 2003 /dev/usb/hiddev14
crw-rw---- 1 root root 180, 111 Oct 2 2003 /dev/usb/hiddev15
crw-rw---- 1 root root 180, 98 Oct 2 2003 /dev/usb/hiddev2
crw-rw---- 1 root root 180, 99 Oct 2 2003 /dev/usb/hiddev3
crw-rw---- 1 root root 180, 100 Oct 2 2003 /dev/usb/hiddev4
crw-rw---- 1 root root 180, 101 Oct 2 2003 /dev/usb/hiddev5
crw-rw---- 1 root root 180, 102 Oct 2 2003 /dev/usb/hiddev6
crw-rw---- 1 root root 180, 103 Oct 2 2003 /dev/usb/hiddev7
crw-rw---- 1 root root 180, 104 Oct 2 2003 /dev/usb/hiddev8
crw-rw---- 1 root root 180, 105 Oct 2 2003 /dev/usb/hiddev9


Perhaps it's a bad interaction with hotplug or usbd?

....

OK, i got it working. While I was assembling the details for this post I noticed in the config file comments about the old vs new values for device type.
I changed
UPSTYPE backups
to
UPSTYPE usb

and everything else above just the same and "etc/rc.d/apcupsd start"
worked immediately.

I decided to go ahead and post for the sake of the next guy who thinks it doesn't work right away. But I no longer have a question.

Thanks for the help! :)

mdmoery 11-22-2004 04:27 PM

Quote:

Originally posted by KEYofR
Well, I'd sure like to be let in on the secret handshake if it's supposed to be so easy.

OK, i got it working. While I was assembling the details for this post I noticed in the config file comments about the old vs new values for device type.
I changed
UPSTYPE backups
to
UPSTYPE usb

and everything else above just the same and "etc/rc.d/apcupsd start"
worked immediately.

I decided to go ahead and post for the sake of the next guy who thinks it doesn't work right away. But I no longer have a question.

Thanks for the help! :)

And since I am the next guy who did not think it worked right away, I thank you. :-)

Wed 06-21-2010 04:58 AM

I am a next guy who think it could very well work right away, but have no cable. The manual refers to DB9, but what I see is an RJ-45 with 9 leads.

How do I go about it to build a cable?

KEYofR 06-21-2010 08:24 AM

Different models of APC's come with different connectors. Some with rs232 via db9, some with usb via keyed 10-pin rj45.
You don't build the usb cable. Even though the proper cable will cost more than such a simple cable really should, Finding 10p10c/rj50 (like rj45 but with 10 pins instead of 8) plugs, and a 10-pin rj50 crimper tool and a sacrificial standard usb cable will cost even more than just getting the proper cable on-line.

You can't use ordinary rj45 plugs because, of course, both of the outer-most pins are used, which don't exist on rj45.

I won't post a link to an ebay or nextag listing since they'll just be dead later.
Just Google for AP9827 or 940-0127D to buy a cable.
Least I can find is $15 - $20 on ebay and a few other places.

And here is the pinout if you have access to 10p10c plugs and crimper.
http://pinouts.ru/DevicesCables/apc_...e_pinout.shtml


All times are GMT -5. The time now is 04:39 PM.