General NAS-Central Forums

Welcome to the NAS community
It is currently Wed Nov 22, 2017 1:00 pm

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Fri Mar 25, 2011 10:03 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6074
Hm. I was trying to outsmart myself, I think. Tested it here, and the point should *not* be there. Updated the instruction post.


Top
 Profile  
 
PostPosted: Fri Mar 25, 2011 12:28 pm 
Offline

Joined: Tue Mar 15, 2011 11:43 am
Posts: 14
Thanks - that got me a step further! I then found I had to load the usbhid module as follows:

modprobe usbhid

I also ran the make-hiddev script described on the apcupsd help site.

However on rebooting I could no longer see the hiddev when running ls -l /sys/bus/usb/drivers

So I then used:

echo usbhid >>/etc/modules

Now after rebooting I see hiddev as follows:

When running: ls -l /sys/bus/usb/drivers

total 0
drwxr-xr-x 2 root root 0 Mar 25 13:13 hiddev
drwxr-xr-x 2 root root 0 Mar 25 13:13 hub
drwxr-xr-x 2 root root 0 Mar 25 13:13 libusual
drwxr-xr-x 2 root root 0 Mar 25 13:13 usb
drwxr-xr-x 2 root root 0 Mar 25 13:13 usb-storage
drwxr-xr-x 2 root root 0 Mar 25 13:13 usbfs
drwxr-xr-x 2 root root 0 Mar 25 13:13 usbhid
drwxr-xr-x 2 root root 0 Mar 25 13:13 usblp

However if I run dmesg (as suggested earlier in this post) I don't see my UPS, but I do see this which maybe the issue?

usb 1-1: new low speed USB device using oxnas-ehci and address 2
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new low speed USB device using oxnas-ehci and address 3
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new low speed USB device using oxnas-ehci and address 4
usb 1-1: device not accepting address 4, error -75
usb 1-1: new low speed USB device using oxnas-ehci and address 5
usb 1-1: device not accepting address 5, error -75

Later I see:

usbcore: registered new interface driver usblp
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Adding 524280k swap on /usr/local/swap. Priority:-1 extents:136 across:543216k

I uninstalled apcupsd and reinstalled with apt-get but still see the same issue. Is this a general detection problem with the device (which I checked does work fine on windows).

Not sure how to proceed at this stage!

Thanks


Top
 Profile  
 
PostPosted: Fri Mar 25, 2011 12:42 pm 
Offline

Joined: Tue Mar 15, 2011 11:43 am
Posts: 14
Just realised that I'm missing /dev/usb again (that was populated by running the make-hiddev script). I'm lost :(


Top
 Profile  
 
PostPosted: Fri Mar 25, 2011 1:34 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6074
From the apcupsd manual:
Quote:
Problem
2.6 kernels use udev and some distributions to not configure it to automatically create /dev/usb/hiddev?? as they should, causing apcupsd to fail to locate the UPS.
Workaround

Edit the file /etc/udev/rules.d/50-udev.rules, and add the following:
KERNEL="hiddev*", NAME="usb/hiddev%n"


Top
 Profile  
 
PostPosted: Fri Mar 25, 2011 3:39 pm 
Offline

Joined: Tue Mar 15, 2011 11:43 am
Posts: 14
I tried adding this (I think == is needed based on the existing examples) but still no dice. I'm still not seeing the device in dmesg (I do see a usb thumb drive when added). I noticed when adding the usb pen I see entries in /dev in the format usbdev1.1_epxx but I don't see these when adding the UPS.


Top
 Profile  
 
PostPosted: Fri Mar 25, 2011 8:03 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6074
Done some research. I don't have an UPS, but a simple USB keyboard also uses the usbhid driver, and I could reproduce your results.

Looked again at the apcupsd manual:
Quote:
A USB UPS needs all of these drivers -- the USB device filesystem, the USB hub, the Human Interface Device subsystem driver, and the Human Interface Device driver. If you are compiling your own kernel, you want to enable
CONFIG_USB
CONFIG_USB_HID
CONFIG_USB_HIDDEV
CONFIG_USB_DEVICEFS

...as well as at least one USB Host Controller Driver...
CONFIG_USB_UHCI_HCD (linux-2.6.x)
CONFIG_USB_OHCI_HCD (linux-2.6.x)
There is not UHCI or OHCI in the kernel, only EHCI. Google told me that EHCI is full speed USB (480 Mbit), while UHCI or OHCI are both low- and highspeed (1.5 or 12Mbit). I suppose an UPS is 1.5Mbit, just like a keyboard or mouse. So I compiled an OHCI and UHCI module, but no luck. They load without complains, but it didn't get my keyboard working.

Some more googling brought me this. The WD MyBook World has the same SoC as the Home Media, and UHCI just doesn't work. It seems there might be two (unpopulated) USB 1.1 ports on the SoC, which do UHCI. Well, unless you have extraordinary soldering skills, that doesn't help much.
Now the good news: At the end of the thread someone succeeds in connecting a low speed device, just by putting an USB 2.0 hub in between. This hub translates the low speed in full speed, and the device is recognized.
Alas I don't have a USB 2.0 hub here, so I can't test it. Maybe you have?

Quote:
I tried adding this (I think == is needed based on the existing examples)
I think you are right. I also found this line in the conf file:
Code:
SUBSYSTEMS=="usb", KERNEL=="hiddev*",           NAME="usb/%k"
so I suppose the line can be removed again.


Top
 Profile  
 
PostPosted: Mon Mar 28, 2011 8:25 am 
Offline

Joined: Tue Mar 15, 2011 11:43 am
Posts: 14
I do have a USB hub and I plugged this in between the APC UPS and the HMNHD. As soon as I did that I could successfully run the APCTest utility! Having done some basic testing I now have UPS support! This is great as I live in an area with an unreliable electrical supply and without UPS support I feared leaving the NAS on 24x7.

Thanks you very much for all your help with this and your work - very much appreciated!


Top
 Profile  
 
PostPosted: Mon Mar 28, 2011 11:04 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6074
Great that it worked! Can you write a wiki article about getting an UPS to work?


Top
 Profile  
 
PostPosted: Mon Mar 28, 2011 11:45 am 
Offline

Joined: Tue Mar 15, 2011 11:43 am
Posts: 14
Yes happy to do that. I took a look at the Wiki page, logged in, but can't see how I go about adding a new page. Is their guidance on this anywhere on the site?


Top
 Profile  
 
PostPosted: Mon Mar 28, 2011 11:57 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6074
PokAlice wrote:
Is their guidance on this anywhere on the site?
Actually I don't know. But adding a page is very easy. Just browse to the title you want to use (for instance "http://iomega.nas-central.org/wiki/UPS Support (Home Media)", and yes, spaces are allowed), and the wiki engine will tell you that the page doesn't exist and can be created.


Top
 Profile  
 
PostPosted: Tue May 10, 2011 12:04 pm 
Offline

Joined: Tue Mar 15, 2011 11:43 am
Posts: 14
I haven't forgotten about this - I've just been away with work abroad for a few weeks. I didn't take full notes during the whole process so will need to re-do this based on the notes in this thread. Question before I do this if you have time - what's the best way for me to backup my current entire setup so I can just restore it once I break this again?!

Thanks


Top
 Profile  
 
PostPosted: Tue May 10, 2011 1:29 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6074
Connect the disk to your Linux PC, and mount sdb1. Then
Code:
cd /mountpoint/of/sdb1
# this should be root of sdb1, containing bin, sbin, etc (etc in two meanings here :)

tar -czf /path/to/somewhere/else/mysda1backup.tgz *
# could be on your sdb2, if you mounted it also
Now you have a backup which can be treated the same way as sda1-2064.tgz in the wiki.


Top
 Profile  
 
PostPosted: Sun Jul 20, 2014 4:24 am 
Offline

Joined: Tue Jun 07, 2011 10:59 pm
Posts: 18
Hi Mike,
I have an APC UPS BR1200. But my iX2 didn't work.
My no break is new so I believe that I need a new drive.
There is a way just to update the ups drives?

Regards,
Jonathan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group