Page 2 of 3

Re: HID device that used to work on bubba2 fails on b3

Posted: 27 Jan 2012, 09:36
by GettinSadda
So, 11 months and still no solution.

Wow!

Re: HID device that used to work on bubba2 fails on b3

Posted: 29 Jan 2012, 12:13
by rxmd
aardric wrote: Now the driver won't load and I receive the following message:
Network UPS Tools - Generic HID driver 0.34 (2.4.3)
USB communication driver 0.31
Can't claim USB device [051d:0002]: could not detach kernel driver from interface 0: Operation not permitted
0.010556 Driver failed to start (exit status=1)
This sounds like there is a permission error encountered by the driver when opening the USB connection. I just had exactly the same problem today with a Tripp-Lite UPS on the B3.

You seem to have an UPS by APC. Did you add a line such as "productid=1002" to your ups.conf?
In that case, try adding a "user=root" line to the ups.conf in front of the UPS block, like this:

Code: Select all

user = root
[myups]
   driver = usbhid-ups
   port = auto
   productid = 1002
That will make the driver try and connect to the UPS as root.

If that makes the problem go away, we need to tell the USB subsystem that the device for your UPS needs to be readable by the nut user. This is done by editing /lib/udev/rules.d/52-nut-usbups.rules and adding a line such as:

Code: Select all

#  my particular APC UPS  - usbhid-ups
ATTR{idVendor}=="051d", ATTR{idProduct}=="1002", MODE="664", GROUP="nut"
After that, you should be able to remove the "user=root" line from ups.conf (the productid=1002 line needs to remain in there, though).

The underlying problem behind this situation is that the version of nut that comes with Debian stable for the B3 is positively ancient (2.4.3, while now they're at 2.6.something). In the meantime, out-of-the-box support for a lot of UPSes was added to nut, but if you want to use Debian stable you need to resolve to hackish ways to make them work.

Re: HID device that used to work on bubba2 fails on b3

Posted: 02 Feb 2012, 00:47
by natsuto
I can not let the nut log in to My UPS via USB - HID. I have set up udev rules, but they do not seem any different.

Re: HID device that used to work on bubba2 fails on b3

Posted: 06 Feb 2012, 12:30
by ingo2
The root cause seems to be quite simple:

the module 'usbhid.ko' is missing in the kernel(-sources), see here: http://b3.update.excito.org/dists/stable/Contents-armel.

You may check yourselfs by

Code: Select all

locate usbhid
on you device.

I just have ordered my b3 as well an it is disappointing that it does not support APC-UPS out of the box. I myself do not have a tool chain to cross-compile the missing module, so it must be either reported as a bug to Excito, or one has to compile it on the box.

Is there any bug tracker for excito-b3?
Ingo

Re: HID device that used to work on bubba2 fails on b3

Posted: 07 Feb 2012, 05:46
by ingo2
I further found out that the HID is compiled fix into the kernel, but not enabled.
Here the configuration obtained from /boot/config-2.6.39.4-9 in http://b3.update.excito.org/pool/main/l ... _armel.deb:

Code: Select all

# USB Input Devices
#
CONFIG_USB_HID=y
# CONFIG_HID_PID is not set
# CONFIG_USB_HIDDEV is not set
On normal Squeeze this looks like this (compiled as a module and enabled):

Code: Select all

# USB Input Devices
#
CONFIG_USB_HID=m
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
So, at the end we need a new b3-kernel from excito. Where can I report this?

Best regards,
Ingo

Re: HID device that used to work on bubba2 fails on b3

Posted: 07 Feb 2012, 16:21
by Cheeseboy
Hi Ingo,

Just email support@excito.com...

Cheers,

Cheeseboy

Re: HID device that used to work on bubba2 fails on b3

Posted: 13 Feb 2012, 11:59
by ingo2
Cheeseboy wrote:Hi Ingo,

Just email support@excito.com...
That's what I have done already on Wed. 8. Feb., with precise description how to fix, but no answer until now :-(

Regards,
Ingo

Re: HID device that used to work on bubba2 fails on b3

Posted: 14 Feb 2012, 13:43
by Cheeseboy
You are right.
After several failed attempts, I eventually managed to compile what (so far) appears to be a working B3 kernel with CONFIG_USB_HID=y.

And my UPS now shows up as /dev/usb/hiddev0 like it does on the bubba2.
I would also very much like this to be included in the kernel by default.

Cheers,

Cheeseboy

Re: HID device that used to work on bubba2 fails on b3

Posted: 14 Feb 2012, 14:08
by ingo2
Cheeseboy wrote:You are right.

And my UPS now shows up as /dev/usb/hiddev0 like it does on the bubba2.
I would also very much like this to be included in the kernel by default.
Thanks for confirmation, that's exactly what I asked for at support. Please could you confirm to them as well?
Title of confirmation for my mail was:
[Excito Support #5554] AutoReply: Please enable CONFIG_USB_HIDDEV=y in kernel 2.6.39 to support APC-UPS

Kind regards,
Ingo

Re: HID device that used to work on bubba2 fails on b3

Posted: 14 Feb 2012, 14:22
by Cheeseboy
Please could you confirm to them as well?
Done.

Re: HID device that used to work on bubba2 fails on b3

Posted: 14 Feb 2012, 14:37
by ingo2
Did you also enable "CONFIG_HID_PID=y", maybe apcupsd or udev needs it?

Ingo

EDIT: for the time beeing I can also shutdown my B3 via network while the UPS is attached to my nas running 'apcupsd'. I just have to configure the setup.

Re: HID device that used to work on bubba2 fails on b3

Posted: 14 Feb 2012, 14:54
by Cheeseboy
Yes:

Code: Select all

niklas@b3:~/kernel/linux-2.6.39.4$ grep HID .config | grep -e '=y' -e '=m'
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HIDRAW=y
CONFIG_USB_HID=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
CONFIG_HID_3M_PCT=m
CONFIG_HID_A4TECH=m
CONFIG_HID_APPLE=m
CONFIG_HID_BELKIN=m
CONFIG_HID_CHERRY=m
CONFIG_HID_CHICONY=m
CONFIG_HID_CYPRESS=m
CONFIG_HID_DRAGONRISE=m
CONFIG_HID_EZKEY=m
CONFIG_HID_KYE=m
CONFIG_HID_GYRATION=m
CONFIG_HID_TWINHAN=m
CONFIG_HID_KENSINGTON=m
CONFIG_HID_LOGITECH=m
CONFIG_HID_MICROSOFT=m
CONFIG_HID_MOSART=m
CONFIG_HID_MONTEREY=m
CONFIG_HID_NTRIG=m
CONFIG_HID_ORTEK=m
CONFIG_HID_PANTHERLORD=m
CONFIG_HID_PETALYNX=m
CONFIG_HID_QUANTA=m
CONFIG_HID_SAMSUNG=m
CONFIG_HID_SONY=m
CONFIG_HID_STANTUM=m
CONFIG_HID_SUNPLUS=m
CONFIG_HID_GREENASIA=m
CONFIG_HID_SMARTJOYPLUS=m
CONFIG_HID_TOPSEED=m
CONFIG_HID_THRUSTMASTER=m
CONFIG_HID_ZEROPLUS=m
I'm curious about CONFIG_HIDRAW=y.
On the B3 I get this in the syslog:

Code: Select all

generic-usb 0003:051D:0002.0002: hiddev0,hidraw0: USB HID v1.10 Device [American Power Conversion Back-UPS CS 350 FW:807.q8.I USB FW:q8] on usb-orion-ehci.0-1.1/input0
On the bubba2 it was only hiddev0.

I haven't actually tested it with apcupsd yet. I'll get back to you on that.

Cheers,

Cheeseboy

EDIT:
Have just tested and it works just fine!

Re: HID device that used to work on bubba2 fails on b3

Posted: 14 Feb 2012, 16:23
by ingo2
Hi,

just for your information: I checked the syslog on my PC with Squeeze-amd64 which reports:

Code: Select all

Feb 14 22:00:07 pp kernel: [    7.758532] generic-usb 0003:051D:0002.0001: hiddev0,hidraw0: USB HID v1.10 Device [American Power Conversion Back-UPS CS 650 FW:817.v4.I USB FW:v4] on usb-0000:00:02.0-1/input0
So, perfect what you achieved - congratulations!

Cheers,
Ingo

P.S.: I do not have anymore entries on my QNAP TS-109 running Lenny-armel for Orion (not Kirkwood like B3). It's so long ago since I rebooted ;-)

Re: HID device that used to work on bubba2 fails on b3

Posted: 17 Feb 2012, 12:44
by ingo2
Good News:

I just got an answer on my ticket:
Hi Ingo,

Yes, we have seen this and it's on the list for the next kernel update.
Thanks a lot for sharing so we can make this work for all our users!
Cheers,
Ingo

Re: [Solved] HID device that used to work on bubba2 fails on

Posted: 08 May 2013, 13:53
by pcrene
Hello All

i have a APC 1500 smart ups on the network, how can i connect the B3 to the notification of another server?

PcRene