Seth Galitzer
2012-Jun-06 22:46 UTC
[Nut-upsdev] no serial number for Tripp-Lite SMART3000RM2U?
I'm trying to set up a single host to monitor the state of several UPS in my data center. I have a mix of several APC and Tripp-Lite in production. The former are great, the latter are not so much. With the APCs (using usbhid-ups), I can set up configs for each based on the value they report from ups.serial. With the Tripp-Lites (using tripplite_usb), there is no value returned for ups.serial (serial=12345 in ups.conf), and debug output says the serial is "unknown". The driver does read a "Unit ID" value, but this appears to be the same for all devices and I have not yet found a way to configure this in the device firmware manually. Are there any plans to support this in the near future? Is there anything I can do to help support this? I would like to be able to check all of the UPS from a single host, but without a way to differentiate them, I'm out of luck. Thanks. Seth System specs are as follows: OS: Ubuntu 10.04.4 nut version: 2.4.3 installed from packages (but I also tried building 2.6.4 from tarball and just using that version of tripplite_usb with same results) device: Tripp-Lite SMART3000RM2U device info: http://www.tripplite.com/en/products/model.cfm?txtModelID=3025 debug output: # /lib/nut/tripplite_usb -DD -a tl1 Network UPS Tools - Tripp Lite OMNIVS / SMARTPRO driver 0.20 (2.4.3) Warning: This is an experimental driver. Some features may not function correctly. 0.000000 debug level is '2' 0.000614 Checking device (051D/0002) (007/013) 0.050541 - VendorID: 051d 0.050554 - ProductID: 0002 0.050560 - Manufacturer: American Power Conversion 0.050566 - Product: Smart-UPS 3000 RM XL FW:691.18.D USB FW:7.4 0.050572 - Serial Number: JS0944025542 0.050578 - Bus: 007 0.050583 Trying to match device 0.050591 Device does not match - skipping 0.050603 Checking device (1D6B/0001) (007/001) 0.050635 - VendorID: 1d6b 0.050642 - ProductID: 0001 0.050648 - Manufacturer: unknown 0.050653 - Product: unknown 0.050659 - Serial Number: unknown 0.050664 - Bus: 007 0.050670 Trying to match device 0.050676 Device does not match - skipping 0.050684 Checking device (1D6B/0001) (006/001) 0.050702 - VendorID: 1d6b 0.050709 - ProductID: 0001 0.050715 - Manufacturer: unknown 0.050721 - Product: unknown 0.050726 - Serial Number: unknown 0.050731 - Bus: 006 0.050737 Trying to match device 0.050743 Device does not match - skipping 0.050751 Checking device (04B3/4010) (005/002) 0.050769 - VendorID: 04b3 0.050775 - ProductID: 4010 0.050781 - Manufacturer: unknown 0.050786 - Product: unknown 0.050791 - Serial Number: unknown 0.050797 - Bus: 005 0.050803 Trying to match device 0.050809 Device does not match - skipping 0.050817 Checking device (1D6B/0001) (005/001) 0.050834 - VendorID: 1d6b 0.050840 - ProductID: 0001 0.050846 - Manufacturer: unknown 0.050851 - Product: unknown 0.050857 - Serial Number: unknown 0.050862 - Bus: 005 0.050868 Trying to match device 0.050874 Device does not match - skipping 0.050881 Checking device (1D6B/0001) (004/001) 0.050899 - VendorID: 1d6b 0.050905 - ProductID: 0001 0.050911 - Manufacturer: unknown 0.050917 - Product: unknown 0.050923 - Serial Number: unknown 0.050928 - Bus: 004 0.050934 Trying to match device 0.050940 Device does not match - skipping 0.050948 Checking device (09AE/0001) (003/006) 0.078984 - VendorID: 09ae 0.079000 - ProductID: 0001 0.079006 - Manufacturer: TRIPP LITE 0.079012 - Product: TRIPP LITE SMART3000RM2U 0.079018 - Serial Number: unknown 0.079023 - Bus: 003 0.079028 Trying to match device 0.079036 Device matches 0.079053 failed to claim USB device: could not claim interface 0: Device or resource busy 0.079078 detached kernel driver from USB device... 0.084979 Detected a UPS: TRIPP LITE/TRIPP LITE SMART3000RM2U 0.192966 Using SMARTPRO protocol (3003) 0.960837 Unit ID: 65535 Attached to Tripp Lite SMART3000RM2U 1.728743 dstate_init: sock /var/run/nut/tripplite_usb-tl1 open on fd 5 -- Seth Galitzer Systems Coordinator Computing and Information Sciences Kansas State University http://www.cis.ksu.edu/~sgsax sgsax at ksu.edu 785-532-7790
Charles Lepple
2012-Jun-06 23:29 UTC
[Nut-upsdev] no serial number for Tripp-Lite SMART3000RM2U?
On Jun 6, 2012, at 6:46 PM, Seth Galitzer wrote:> I'm trying to set up a single host to monitor the state of several UPS in my data center. I have a mix of several APC and Tripp-Lite in production. The former are great, the latter are not so much. With the APCs (using usbhid-ups), I can set up configs for each based on the value they report from ups.serial. With the Tripp-Lites (using tripplite_usb), there is no value returned for ups.serial (serial=12345 in ups.conf), and debug output says the serial is "unknown". The driver does read a "Unit ID" value, but this appears to be the same for all devices and I have not yet found a way to configure this in the device firmware manually. > > Are there any plans to support this in the near future? Is there anything I can do to help support this? I would like to be able to check all of the UPS from a single host, but without a way to differentiate them, I'm out of luck.The "ups.serial" value is easy to read during a USB bus scan - since it is in the USB device descriptor, it is possible to read without exclusively opening the device. Tripp-Lite's "Unit ID" is buried deep in their serial-over-USB protocol, and I don't know of a good way to read it until after the device has been matched (skipping over devices which are being handled by other driver instances). (Actually, you should be able to set the Unit ID manually - it is an unsigned 16-bit number, and you would use something like "upsrw -s ups.id=<value> tl1 at localhost". You will be prompted for a username and password that can be specfied in upsd.users. But it isn't as useful due to the problem of matching against it.) Long term, we might be able to restructure the USB bus scan code to handle this, but I don't think we have plans for that. (In particular, libusb doesn't provide a clean way to figure out whether we are attempting to detach a kernel driver from an UPS, or whether it is detaching another userspace process such as a NUT driver.) In your case, you can work around the problem by specifying the USB bus number (which is subject to change as kernels are upgraded, or if intermediate USB hubs are added) in ups.conf. -- Charles Lepple clepple at gmail