APC UPS - cannot find UPS device
I have installed apcupsd on my mdk10 system using rpms. It installs fine and starts fine using service apcupsd start. Unfortunately, after about 10 seconds, the following error pops up:
Code:
acupsd FATAL ERROR in linux-usb.c at line 751 Here's the relevant clip from linux-usb.c: Code:
if (!open_usb_device(ups)) { This is my simple config file (just the required basics): Code:
## apcupsd.conf v1.1 ## Here is some info about my device: cat /proc/bus/usb/devices Code:
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0 Code:
crw-r--r-- 1 root root 180, 96 Jul 24 21:48 /dev/usb/hiddev0 Code:
Bus 001 Device 002: ID 051d:0002 American Power Conversion Back-UPS Pro 500 |
I have the same problem with an APC Back-UPS Pro 500
Someone please help him :) |
Solved it on my box...
Ok, well I don't know if this is going to be helpful to anyone or not, but I figured out what was wrong on my box. I was running mandrake's "secure" 2.6.3 kernel and realized when I did a "zcat /proc/config.gz"|grep -i devfs that devfs wasn't enabled. Switching to their standard kernel fixed everything.
When you do that zcat (assuming your kernel has CONFIG_IKCONFIG=y and CONFIG_IKCONFIG_PROC=y), you should see: CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y Oh, also, I don't know a lot about dev nodes, major and minor numbers, and all that, but I did notice that on mine it reports "crw-r--r-- 1 root root 180, 0 Dec 31 1969 hiddev0" Your minor number for hiddev0 is much higher...if you want to take a shot in the dark, try pointing apcupds to look at the node that has the maj & min numbers 180 0 or if it doesn't exist maybe do a "mknod /dev/usb/MyUPS c 180 0" and point it to that..... don't blame me if this breaks something :) I've only been in the linux world for a few years and am still learning new things all the time. I'm sure making that node isn't the "Right Way" but it may be a clue for you to find your problem. Good luck --Jacob |
Re: Solved it on my box...
Quote:
Thanks a lot for your suggestions. If you have any more helpful tips, let us know. :) Edit: Seems to be working fine now! I haven't tested a full power failure, but service apcupsd status works and I've received events when I unplugged the ups from the line. All I did was change the kernel - didn't do anything with the minor numbers. Thanks a bunch! |
I'm having this same problem, with Mdk 10.1 that I finally got installed today (it's a long boring terrifying story).
Can one of you please tell me how to change to the "regular" kernel instead of the "secure" one so that I can get my apcupsd working and don't have to worry about bad shutdowns in case of power failure? I'd very much appreciate step-by-step instructions. I know how to install a new kernel, but I don't know where to find the one you're talking about or if it's just a question of installing it like a kernel upgrade. Thanks in advance! |
Quote:
Code:
urpmi kernel It will have to download and install, and then I think you'll need to edit /etc/lilo.conf. Check that file before and after to see if the urpmi installation makes and changes to it. If the install makes changes itself, run Code:
lilo If the changes aren't done automatically, you will have to do them yourself. In lilo.conf, duplicate the entry for the kernel you are using. Edit the label (that's the name that will show up in the bootloader screen). Next look in /boot/ to see what new files are there. It's the vmlinuz, System.map and initrd files that will be created for your new kernel (I'm going from memory here). So go back to /etc/lilo.conf and edit the corresponding entries under your new label. You'll likely just have to edit the filenames for those three files. If you want that kernel to load by default, go to the top of /etc/lilo.conf and changes the default entry to the label of your new kernel. Regardless of if you want the new kernel to be default or not, save the file and run Code:
lilo Reboot and you should be able to boot up with your new kernel. If you have any problems post again and I should be able to figure out what I missed. |
Just saw your reply on my way to bed--it turned out I was able to solve the apcupsd problem by changing one line in the apcupsd.conf file, to use what I guess is a new naming convention that resulted in a new path for finding the USB device. I got my clue from another thread in LQ.
Meanwhile I did install another kernel and then my mouse didn't work right. Luckily I knew from experience recently how to fix that (wrong type of mouse reported, and wrong button assignments). After reading your post, I tried "urpmi kernel" and got one of my few laughs of the day when after thinking it over for a while, urpmi reported back: Code:
Everything already installed |
[QUOTE]Originally posted by jonr
[B]Just saw your reply on my way to bed--it turned out I was able to solve the apcupsd problem by changing one line in the apcupsd.conf file, to use what I guess is a new naming convention that resulted in a new path for finding the USB device. I got my clue from another thread in LQ. <snipped> Hi jonr I have a similar problem with apcupsd and mdk 10.1 any chance you could post the line you changed or post the txt of your apcupsd.conf file rgds S.F |
[QUOTE]Originally posted by S.Fart
[B] Quote:
I think it used to be something like "DEVICE /dev/usb0" or similar. # Here a table of the possible devices related with the UPS drivers: # # Driver Device Description # dumb /dev/tty** Serial character device # apcsmart /dev/tty** Serial character device # net hostname:port Network link to a master apcupsd # through NIS # snmp hostname:port:vendor:community # SNMP Network link to an SNMP-enabled # UPS device. Vendor is the MIB used by # the UPS device: can be "APC" or "RFC" # where APC is the powernet MIB and RFC # is the IETF's rfc1628 UPS-MIB. # Port is usually 161. DEVICE /dev/hiddev0 (Note: the little happy faces are where the text says "colon p" as you might guess.) :p |
Thanks jonr
I will give that a try, I think its got me on the right track anyway. This 10.1 has been lously to install where as 10.0 was a sweet install. rgds S.F. |
Quote:
|
Hi Jon
No luck I an afraid I think it has something to do with the new usb udev. I and going to leave it for a day or two and read about udev and also try to get my scsi stuff working I think its a similar problem rgds S.F |
Quote:
Sorry it didn't work. It always seems like every "upgrade" takes five or six steps backwards. :( |
Ah I suppose its all part of the learning process, its just a bit frustrating at times.
I do like the new kde stuff, much more stable I haven't had kpilot or knotes crash yet. I am beginning to think my scsi prob might an install issue I remember seeing something about a perl error and something to do with scsi. Other than the scsi and ups probs its fine. Wasn't impressed with their unfinished incorporation of NUTS though. rgds S.F |
All times are GMT -5. The time now is 07:27 PM. |