[Nut-upsdev] NUT-2.0.5: newhidups on RedHat ES4
Patrick Agrain
patrick.agrain at alcatel-lucent.fr
Tue Mar 27 16:34:00 CET 2007
At 16:12 27/03/2007, Arnaud Quette wrote:
>Hi Patrick,
>
>first, did you see my mail on the 64b issue?
>I've made a test with a Pulsar M2200 on a 32b system without problem too.
>Next step is to test with this unit and the 64b system...
>thanks to send me the required details for hunting this.
Target machine is 32 bits.
>2007/3/27, Patrick Agrain <patrick.agrain at alcatel-lucent.fr>:
>>Hello everybody,
>>
>>After succeeded in "tuning" nut-2.0.0's hidups and 2.0.3's newhidups on
>>customized Linux kernels, we are now facing a new challenge : trying to
>>install nut-2.0.5 on a RedHat ES4 which is based on a 2.6.9 kernel.
>>
>>I picked up the 2.0.5 source package and follow the INSTALL doc until step
>>6. So far so good.
>
>Why not using updated RPMs? For example:
>http://opensource.mgeups.com/beta/rhfc/
Ouppss... Not seen.
Picked up and used.
>>RH ES4 is managed by udev, therefore I presume we don't have to care about
>>which /dev the UPS will be linked to.
>>But, instead, we have to implement the udev rules.
>>
>>Am I right ?
>
>right, but as you discovered, the hotplug to udev transition has not
>been a smooth road...
Hmm... quite true.
>>Using the furnished udev rules in scripts/hotplug-ng ( and rename it to
>>52-nut.rules in /etc/udev/rules.d ) result in syntax errors in the syslog.
>>These errors come from :
>>a) the "==". In this distro, the default 50-udev.rules file is filled only
>>with "=". Replacing "==" by "=" removes the errors in the syslog.
>>b) first and last uncommented lines have to be removed also.
>>For information, in this distro, udev is udev-039-10.12.EL4 and libusb is
>>0.1.8-3
>>
>>Now, 52-nut.rules looks like this :
>>
>># udev rules for the NUT USB drivers
>># MGE UPS SYSTEMS - usbhid-ups
>>SYSFS{idVendor}="0463", SYSFS{idProduct}="ffff", MODE="664", GROUP="nobody"
>>SYSFS{idVendor}="0463", SYSFS{idProduct}="0001", MODE="664", GROUP="nobody"
>
>you will also need the line that only consider _usb_ devices _add_ition
>you can send me your file for validation.
Included below in the logs
>>Which is the file I have to look at to check that the rule was granted ?
>>Is it still /proc/bus/usb/BBB/DDD ?
>
>BBB and DDD are given by lsubs Bus and Device numbers.
>
>>Step 7 gives an ups.conf like :
>>[mgeups]
>> driver = newhidups
>> port = auto
>>
>>And my "big" concern is the start of the driver :
>>Command "/usr/local/ups/bin newhidups -u root -a mgeups -DDDDD" result in
>>an :
>>"Unable to get Report Descriptor (-32) : Broken Pipe error, though
>>identification data from UPS ( 0463/ffff, MGE UPS SYSTEMS Extreme ) and
>>reportlen ( 1536 ) were correctly discovered. The last with both methods.
>>
>>What do you think ? Which point(s) should I carefully check ?
>
>it depends if the udev rule as succeeded in setting the rights.
>can you check this and send back the newhidups startup output?
>
>btw, is it still a 64b system?
No, 32 bits
Logs :
udev rules :
# MGE UPS SYSTEMS - usbhid-ups
SYSFS{idVendor}=="0463", SYSFS{idProduct}=="ffff", MODE="664", GROUP="nut"
SYSFS{idVendor}=="0463", SYSFS{idProduct}=="0001", MODE="664", GROUP="nut"
syslog output:
Mar 28 04:16:39 sxb udev[2579]: parse error
/etc/udev/rules.d/nut-usbups.rules, line 4:0, rule skipped
Mar 28 04:16:39 sxb udev[2579]: parse error
/etc/udev/rules.d/nut-usbups.rules, line 5:0, rule skipped
and :
# MGE UPS SYSTEMS - usbhid-ups
SYSFS{idVendor}="0463", SYSFS{idProduct}="ffff", MODE="664", GROUP="nut"
SYSFS{idVendor}="0463", SYSFS{idProduct}="0001", MODE="664", GROUP="nut"
--> No more errors in the syslog
=================================================
[root at sxb ~]# ls -als /var/state/
total 16
4 drwxr-xr-x 3 root root 4096 mar 28 04:09 .
8 drwxr-xr-x 24 root root 4096 mar 27 02:44 ..
4 drwx------ 2 nut nut 4096 mar 28 04:09 ups
[root at sxb ~]#
=================================================
ups.conf :
# Network UPS Tools: example ups.conf
#
[mgeups]
driver = newhidups
port = auto
=================================================
Plug-in of the UPS :
[root at sxb ~]# ls -als /proc/bus/usb/001
total 0
0 dr-xr-xr-x 2 root root 0 mar 28 2007 .
0 drwxr-xr-x 3 root root 0 mar 28 2007 ..
0 -rw-r--r-- 1 root root 43 mar 28 2007 001
0 -rw-r--r-- 1 root root 52 mar 28 04:38 002
--> 002 still bound to root...
--> No syslog output about udev rule.
Mar 28 04:38:57 sxb kernel: usb 1-1: new full speed USB device using address 2
Mar 28 04:38:57 sxb kernel: usbhid: probe of 1-1:1.0 failed with error -5
[root at sxb ~]# cat /proc/bus/usb/devices
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0463 ProdID=ffff Rev= 1.00
S: Manufacturer=MGE UPS SYSTEMS
S: Product=EXtreme
S: SerialNumber=885B25011
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 20mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
============================================
Start of the driver :
[root at sxb ~]# newhidups -u root -a mgeups -DDDDD
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5)
debug level is '5'
Checking device (0463/FFFF) (001/002)
- VendorID: 0463
- ProductID: ffff
- Manufacturer: MGE UPS SYSTEMS
- Product: EXtreme
- Serial Number: 885B25011
- Bus: 001
Trying to match device
Device matches
HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 63 06
i=0, extra[i]=09, extra[i+1]=21
HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 63 06
HID descriptor retrieved (Reportlen = 1635)
Unable to get Report descriptor (-32): Broken pipe
Checking device (0000/0000) (001/001)
- VendorID: 0000
- ProductID: 0000
- Manufacturer: Linux 2.6.9-34.EL uhci_hcd
- Product: UHCI Host Controller
- Serial Number: 0000:00:07.2
- Bus: 001
Trying to match device
Device does not match - skipping
No appropriate HID device found
No matching HID UPS found
[root at sxb ~]#
Can we conclude to a udev issue ?
Regards,
Patrick Agrain
More information about the Nut-upsdev
mailing list