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. 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 ? 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" Which is the file I have to look at to check that the rule was granted ? Is it still /proc/bus/usb/BBB/DDD ? 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 ? Thanks in advance. Best regards, Patrick Agrain
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. 2007/3/27, Patrick Agrain <patrick.agrain@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/> 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...> 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.> 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? Arnaud -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/
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@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@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@sxb ~]# ================================================ups.conf : # Network UPS Tools: example ups.conf # [mgeups] driver = newhidups port = auto ================================================Plug-in of the UPS : [root@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@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@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@sxb ~]# Can we conclude to a udev issue ? Regards, Patrick Agrain
Patrick Agrain
2007-Apr-02 16:04 UTC
[Nut-upsdev] NUT-2.0.5: newhidups on RedHat ES4 ( cont'd )
Hi all, I removed the udev rules and put instead the libhidups and libhid.usermap in the /etc/hotplug/usb directory. Plug in the UPS now shows the correct user / permissions on /proc/bus/usb/BBB/DDD. That's the good news. -------------- [root@sxb ~]# ls -als /proc/bus/usb/001 total 0 0 dr-xr-xr-x 2 root root 0 avr 3 2007 . 0 drwxr-xr-x 3 root root 0 avr 3 2007 .. 0 -rw-r--r-- 1 root root 43 avr 3 2007 001 0 -rw-rw-r-- 1 root nut 52 avr 3 09:58 003 -------------- Unfortunately, the test of the driver still fails and exits with a broken pipe. -------- [root@sxb ~]# /sbin/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/003) - 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@sxb ~]# ---------------------------------------- The USB traffic analyzer shows two things. First : During the enumeration process of the USB peripheral, the set_address process always output address 1, even if you plug/unplug the UPS several times. See the log up there, the UPS should have address 3 and the USB traffic analyzer gives address 1. Comparison performed with other machine show that the Device Number and its USB address should be similar. OK. Let's it aside, it's not the topic of this mailing-list. Second : During the Get_Descriptor (HID Report) process, only 588 bytes out of 1635 (?) are retrieved. The analyzer points out a "Missing Status" for the last transaction, but it seems more to be a complete transfer stop, because the last 8-bytes transfer (bytes 580 to 587) is complete. Question : Total Length of the Report Descriptor is wrong. The Report of this UPS has only 1536 bytes. Any idea about the reason of this "digit mix" ? Regards, Patrick Agrain
Patrick Agrain
2007-Apr-03 11:58 UTC
[Nut-upsdev] NUT-2.0.5: newhidups on RedHat ES4 ( cont'd )
Hi, At 18:03 02/04/2007, Patrick Agrain wrote:>Hi all, > >I removed the udev rules and put instead the libhidups and libhid.usermap >in the /etc/hotplug/usb directory. > >Plug in the UPS now shows the correct user / permissions on >/proc/bus/usb/BBB/DDD. That's the good news. >-------------- >[root@sxb ~]# ls -als /proc/bus/usb/001 >total 0 >0 dr-xr-xr-x 2 root root 0 avr 3 2007 . >0 drwxr-xr-x 3 root root 0 avr 3 2007 .. >0 -rw-r--r-- 1 root root 43 avr 3 2007 001 >0 -rw-rw-r-- 1 root nut 52 avr 3 09:58 003 >-------------- > >Unfortunately, the test of the driver still fails and exits with a broken >pipe. >-------- >[root@sxb ~]# /sbin/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/003) >- 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@sxb ~]# >---------------------------------------- > >The USB traffic analyzer shows two things. >First : >During the enumeration process of the USB peripheral, the set_address >process always output address 1, even if you plug/unplug the UPS several times. >See the log up there, the UPS should have address 3 and the USB traffic >analyzer gives address 1. >Comparison performed with other machine show that the Device Number and >its USB address should be similar. >OK. Let's it aside, it's not the topic of this mailing-list. > >Second : >During the Get_Descriptor (HID Report) process, only 588 bytes out of 1635 >(?) are retrieved. >The analyzer points out a "Missing Status" for the last transaction, but >it seems more to be a complete transfer stop, because the last 8-bytes >transfer (bytes 580 to 587) is complete. > >Question : Total Length of the Report Descriptor is wrong. The Report of >this UPS has only 1536 bytes. Any idea about the reason of this "digit mix" ?Sorry, I made a mistake in my interpretation, but it seems that this UPS has really 1635 bytes in its Report Descriptor. ( Seen on another system with newhidups 2.0.3 ).>Regards, >Patrick Agrain > > >_______________________________________________ >Nut-upsdev mailing list >Nut-upsdev@lists.alioth.debian.org >http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev