UPS support possible?

PokAlice
Posts: 14
Joined: Tue Mar 15, 2011 11:43 am

UPS support possible?

Post by PokAlice » Thu Mar 17, 2011 11:52 am

Hi,

I have an APC Backup UPS and have been trying to get apcupsd working (I enabled telnet access via the updated firmware available on this site). I managed to get apcupsd installed ok, but apctest fails. Looking at this I think it's because I don't see HID or HIDDEV usb drivers (and reading posts elsewhere and the instructions on the apcupsd site it seems this is necessary). Does anyone know if it's possible to get this working on this device? Would it need a custom kernel?

Also wanted to say thanks for the instructions on this site that helped me recover the drive when I bricked it the other day. Would be lost without it (linux newbie).

Thanks

Stuart

geyperman
Posts: 65
Joined: Sun Jun 06, 2010 9:52 pm

Re: UPS support possible?

Post by geyperman » Thu Mar 17, 2011 1:47 pm

Hi PokAlice,

Try with Mijzelf’s kernel modules package: viewtopic.php?f=242&t=2094
It seems to be one of them for HID support (kernel/drivers/hid/hid.ko).

I suppose you must extract the package in /lib/modules/2.6.24.4 but I don’t know if there is something else to do.

Good luck! ;)

PokAlice
Posts: 14
Joined: Tue Mar 15, 2011 11:43 am

Re: UPS support possible?

Post by PokAlice » Thu Mar 17, 2011 4:43 pm

Thanks. Is the file I need modules.2.063.tar.bz2?

If so are there any instructions/hints on how to apply that?

I'm also running the 2.064 firmware - so not sure if that is an issue.

Sorry - these are probably basic questions - I'm learning (slowly). I know how to recover the drive now though, so I'm not scared to experiment :)

geyperman
Posts: 65
Joined: Sun Jun 06, 2010 9:52 pm

Re: UPS support possible?

Post by geyperman » Thu Mar 17, 2011 6:49 pm

Yes, it is the file I talk about.

I'm not very skilled with linux :? , but I supose you must extract the contents of modules.2.063.tar.bz2 in /lib/modules/2.6.24.4.
  • Install bzip2 if you don't have it installed.
    Download Mijzelf's modules.
    Extract package contents in /lib/modules/2.6.24.4

Code: Select all

apt-get install bzip2
wget http://downloads.iomega.nas-central.org/Users/Mijzelf/HMNHD/modules.2.063.tar.bz2
tar jxvf modules.2.063.tar.bz2 -C /lib/modules/2.6.24.4
Then, connect your UPS to the NAS and look if the correct module is loaded doing a "dmesg" in your NAS prompt.

PokAlice
Posts: 14
Joined: Tue Mar 15, 2011 11:43 am

Re: UPS support possible?

Post by PokAlice » Fri Mar 18, 2011 12:40 am

Thanks for that! I followed the code line for line and it completed without errors. However, I still can't get apctest (for apcupsd) to work as it still can't detect the UPS device. When I run this: ls -l /sys/bus/usb/drivers/
i still don't see hid or hiddev in the list, which makes me think the drivers aren't getting loaded?

Thanks

Stuart

geyperman
Posts: 65
Joined: Sun Jun 06, 2010 9:52 pm

Re: UPS support possible?

Post by geyperman » Fri Mar 18, 2011 7:33 am

May be this helps you:http://www.linuxfromscratch.org/hints/d ... sd-usb.txt

It's possible you need to add the modules you need to load in /etc/modules (I'm not sure)

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: UPS support possible?

Post by Mijzelf » Fri Mar 18, 2011 9:07 am

Here is some infromation too.

PokAlice
Posts: 14
Joined: Tue Mar 15, 2011 11:43 am

Re: UPS support possible?

Post by PokAlice » Fri Mar 18, 2011 9:45 am

Thanks to both of you. That may well be beyond my current capabilities (I think this is compiling a kernel, right?), but I will read through the documentation and see if I manage it!

Thanks

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: UPS support possible?

Post by Mijzelf » Sat Mar 19, 2011 9:47 am

PokAlice wrote:Thanks to both of you. That may well be beyond my current capabilities (I think this is compiling a kernel, right?), but I will read through the documentation and see if I manage it!
Maybe the current kernel with the extra modules is just enough. Maybe the only thing you need to do is

Code: Select all

modprobe usbhid
and download apcupsd, and compile and install it (on the nas) following the intructions at 3.4 in geyperman's link.

PokAlice
Posts: 14
Joined: Tue Mar 15, 2011 11:43 am

Re: UPS support possible?

Post by PokAlice » Tue Mar 22, 2011 11:25 pm

Hi,

Thanks for the suggestions. I tried to this and get the following:

FATAL: Module usbhid not found

Am I doing something wrong (ran this as root from /home/nascentral#)? Or is is that the module isn't available?

Thanks

Stuart

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: UPS support possible?

Post by Mijzelf » Wed Mar 23, 2011 8:48 am

PokAlice wrote:I tried to this and get the following:

FATAL: Module usbhid not found

Am I doing something wrong (ran this as root from /home/nascentral#)? Or is is that the module isn't available?
I had a look in the tarball, and indeed, it's not there. I'll update the package and let you know when it's done.
(You could also try to build it yourself. It's not hard)

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: UPS support possible?

Post by Mijzelf » Thu Mar 24, 2011 9:11 am

The usbhid module doesn't load on the stock kernel. So you'll need to install a new kernel also. Does that bother you?

PokAlice
Posts: 14
Joined: Tue Mar 15, 2011 11:43 am

Re: UPS support possible?

Post by PokAlice » Thu Mar 24, 2011 10:23 am

Hi Mijzelf - appreciated your continued assistance on this!

I'm happy to try pretty much anything if I have instructions to follow! I know how to recover back to the default firmware (via the instructions you provided elsewhere on this site) if needbe and have already done this a few times after playing and messing things up :).

Thanks

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: UPS support possible?

Post by Mijzelf » Thu Mar 24, 2011 7:42 pm

OK, finally my NAS is ready compiling. The new kernel and modules can be found here.

Install instructions:
Download and extract the file in the root of the system partition:

Code: Select all

su
cd /
wget -O- http://downloads.iomega.nas-central.org/Users/Mijzelf/HMNHD/reloaded/reload-kernel.tgz | tar -xz
Then install the kernel:

Code: Select all

dd if=/boot/uImage.2.6.24.4-usb of=/dev/sda bs=512 seek=300
Reboot the box.

PokAlice
Posts: 14
Joined: Tue Mar 15, 2011 11:43 am

Re: UPS support possible?

Post by PokAlice » Fri Mar 25, 2011 9:26 am

Thanks for this. After running this command:

wget -O- http://downloads.iomega.nas-central.org ... kernel.tgz | tar -xz .

(with the point), I get this error:

tar: .: Not found in archive
tar: Error exit delayed from previous errors

Am I doing something wrong (I'm running from the root).

Thanks

Post Reply