[Nut-upsuser] Return on experience with an Emerson/Liebert GXT3

Charles Lepple clepple at gmail.com
Thu Oct 2 01:03:21 UTC 2014


On Oct 1, 2014, at 9:46 AM, paul.chavent at fnac.net wrote:

> (3) I did some tests with /lib/nut/usbhid-ups, lsusb and usbhid-dump
> It doesn't work out of the box.
> After some investigation, it seems that the GXT3 usb device is a bit susceptible and "crash" after some USB requests.
> I used wireshark to check at the protocol level (modprobe usbmon before launching wireshark). Here is what i can say :
>  - after usb cable plugin, issue an 'lsusb -v' -> after the GET DESCRIPTOR Request DEBUG, the device sends Malformed responses.
>  - after usb cable plugin, issue an 'usbhid-ups ... ' -> after the SET INTERFACE Request that succeed, all subsequent GET DESCRIPTOR responses are malformed.
>  - after usb cable plugin, issue an 'usbhid-dump' -> the device proudly survive
> These observations would need more insight.
> 
> But as a workaround, I've commented the "usb_set_altinterface(udev, 0);" call at line 225 of the drivers/libusb.c source file.
> Thanks to this hack, the driver can dialog with the device.

We independently ran across problems with the usb_set_altinterface() call. The plan is to remove it before 2.7.3 is released:

https://github.com/networkupstools/nut/issues/138

That issue also includes an override setting, so if I can't get any other testers, I plan to merge it as-is.

> # upsdrvctl -u nut start
> Network UPS Tools - UPS driver controller 2.6.4
> Network UPS Tools - Generic HID driver 0.38 (2.7.2.5)
> USB communication driver 0.32
> Using subdriver: Belkin HID 0.17
> 
> (4) I tryed to launch the server either by hand or with "service nut-server start".
> It doesn't work out of the box due to setuid issues (the program runs as nobody).

It should run as user "nut" in Debian. You may want to reinstall the nut-server package, and check the post-inst error messages to make sure that the "nut" user is created, and that it is in the "nut" group as well.

> As we can read in the man upsdrvctl :
> "This [the setuid user] may be set in ups.conf with "user" in the global section."
> This is also suggested in the Q.6 of the faq.
> 
> However, the drivers/upsdrvctl.c do_upsconf_args function do not handle "user" global declaration (at least in the git repository, i haven't checked the debian patches).

Not sure that is where the "user" declaration is being parsed. upsdrvctl just passes arguments to the drivers via the command line (including "-u", although that is not read from the configuration file, but from upsdrvctl's command line).

> So i think that either the manual or the implementation is broken. 

Can you show us the exact configuration syntax you are using?

> (6) Future.
> I'm not sure that the subdriver is the best match for this device. What do you think about trying the liebert-hid one ?

You are welcome to try the liebert-hid subdriver, but it does not look similar.

There are some fixes that were added in 2.6.4 to try and work around incorrect exponents in the voltages. You can try starting the usbhid-ups driver directly, adding "-DDD" to see if any messages are logged about "assuming correction factor =". It could be that we did not cover all the different ways those values could be wrong.

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list