Re: [Nut-upsuser] Device not supported?

2017-07-05 Thread Ambrogio Coletti
>From section 4.23 of the Developer Guide:

"There are a few USB UPS devices that are not HID devices. These devices
typically implement some version of the manufacturer’s serial protocol over
USB (which is a really dumb idea, by the way). An example is the Tripplite
USB. Such devices are *not* supported by the usbhid-ups driver, and are not
covered in this document."

I guess that applies to me?

On Wed, Jul 5, 2017 at 3:19 PM Ambrogio Coletti <ambroj...@gmail.com> wrote:

> I've eventually installed Manuel's packages (nut and nut-client).
>
> When I run the driver as root (for my tripplite ups) I get:
>
> /usr/sbin/upsdrvctl start
> Network UPS Tools - Generic HID driver 0.42 (v2.7.4-418-gb1314c62.7.4.1)
> USB communication driver (libusb 0.1) 0.33
> writepid: fopen /var/run/nut/usbhid-ups-trippliteups.pid: Permission denied
> Can't claim USB device [09ae:1330]: could not detach kernel driver from
> interface 0: Operation not permitted
> Driver failed to start (exit status=1)
>
> And I had to create manually /var/run/nut.
>
> What is the problem there?
>
> On Fri, Jun 23, 2017 at 8:27 PM Manuel Wolfshant <wo...@nobugconsulting.ro>
> wrote:
>
>> On 06/24/2017 04:52 AM, Charles Lepple wrote:
>> > On Jun 23, 2017, at 5:50 PM, Ambrogio Coletti <ambroj...@gmail.com>
>> wrote:
>> >> "This TrippLite device (09ae:1330) is not (or perhaps not yet)
>> supported by usbhid-ups. [...]"
>> >> but my device (SU2200RTXLCD2U) is supported, as clearly state here.
>> > No, the HCL also mentions "protocol 4001". For Tripp-Lite, a USB PID
>> other than 0001 is generally the protocol number. So your SU2200* model is
>> different.
>> >
>> > https://github.com/networkupstools/nut/issues/64
>> >
>> >> Then I thought I needed the last src code (2.7.4), hence I built it
>> for my machine, but when I run it by:
>> >> /usr/local/ups/sbin/upsdrvctl start
>> > The Protocol 1330 support was added after 2.7.4 was released. You might
>> be able to use a 2.7.4 tarball with "productid = 1330" in ups.conf, but
>> voltages might be off by a factor of 10. You will also need to adjust the
>> udev files manually to fix /dev/bus/usb permissions.
>> >
>> > If you do choose to build using the latest source code from Git, be
>> aware that you will need more tools, as specified in the Developer Guide:
>> http://networkupstools.org/docs/developer-guide.chunked/ar01s03.html#building
>> >
>> > It may be easier to use the 2.7.4 tarball, and add the patch which
>> introduces Protocol 1330 support to the RPM spec file:
>> https://github.com/networkupstools/nut/commit/4eff5b7068e9873ce11b5a296f403e8cdf0e3580
>> I've uploaded to http://wolfy.fedorapeople.org/nut a new set of packages
>> based on the latest source code from git. Unfortunately they do not
>> include any man pages, I did not have time to find a workaround for the
>> hard requirement of newer versions for the tools used by the build
>> process to create the man pages. I will fix that in a later set of
>> packages.
>>
>> ___
>> Nut-upsuser mailing list
>> Nut-upsuser@lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
>>
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Device not supported?

2017-07-05 Thread Ambrogio Coletti
I've eventually installed Manuel's packages (nut and nut-client).

When I run the driver as root (for my tripplite ups) I get:

/usr/sbin/upsdrvctl start
Network UPS Tools - Generic HID driver 0.42 (v2.7.4-418-gb1314c62.7.4.1)
USB communication driver (libusb 0.1) 0.33
writepid: fopen /var/run/nut/usbhid-ups-trippliteups.pid: Permission denied
Can't claim USB device [09ae:1330]: could not detach kernel driver from
interface 0: Operation not permitted
Driver failed to start (exit status=1)

And I had to create manually /var/run/nut.

What is the problem there?

On Fri, Jun 23, 2017 at 8:27 PM Manuel Wolfshant <wo...@nobugconsulting.ro>
wrote:

> On 06/24/2017 04:52 AM, Charles Lepple wrote:
> > On Jun 23, 2017, at 5:50 PM, Ambrogio Coletti <ambroj...@gmail.com>
> wrote:
> >> "This TrippLite device (09ae:1330) is not (or perhaps not yet)
> supported by usbhid-ups. [...]"
> >> but my device (SU2200RTXLCD2U) is supported, as clearly state here.
> > No, the HCL also mentions "protocol 4001". For Tripp-Lite, a USB PID
> other than 0001 is generally the protocol number. So your SU2200* model is
> different.
> >
> > https://github.com/networkupstools/nut/issues/64
> >
> >> Then I thought I needed the last src code (2.7.4), hence I built it for
> my machine, but when I run it by:
> >> /usr/local/ups/sbin/upsdrvctl start
> > The Protocol 1330 support was added after 2.7.4 was released. You might
> be able to use a 2.7.4 tarball with "productid = 1330" in ups.conf, but
> voltages might be off by a factor of 10. You will also need to adjust the
> udev files manually to fix /dev/bus/usb permissions.
> >
> > If you do choose to build using the latest source code from Git, be
> aware that you will need more tools, as specified in the Developer Guide:
> http://networkupstools.org/docs/developer-guide.chunked/ar01s03.html#building
> >
> > It may be easier to use the 2.7.4 tarball, and add the patch which
> introduces Protocol 1330 support to the RPM spec file:
> https://github.com/networkupstools/nut/commit/4eff5b7068e9873ce11b5a296f403e8cdf0e3580
> I've uploaded to http://wolfy.fedorapeople.org/nut a new set of packages
> based on the latest source code from git. Unfortunately they do not
> include any man pages, I did not have time to find a workaround for the
> hard requirement of newer versions for the tools used by the build
> process to create the man pages. I will fix that in a later set of
> packages.
>
> ___
> Nut-upsuser mailing list
> Nut-upsuser@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] SU2200RTXLCD2U and protocol 4006

2017-07-03 Thread Ambrogio Coletti
Hi Larry and thanks for your answer.
I will have a look.

Tripplite will send you the pdf of the protocol if you communicate them the
UPS serial number.

Ambrogio

On Mon, Jul 3, 2017 at 2:16 PM Charles Lepple <clep...@gmail.com> wrote:

> On Jul 3, 2017, at 12:48 PM, Ambrogio Coletti wrote:
> >
> > I wouldn't use the NUT at this point because I don't think I will be
> able to write a software update to adapt the NUT to my needs.
> >
> > My idea was first to test the protocol via a serial terminal client
> directly connected to the UPS, and then write some simple code from scratch
> to implement the protocol and use it for my basic needs.
> >
>
> Ambrogio,
>
> If you are considering writing serial code from scratch, I don't think it
> is that much more complicated to modify the existing NUT drivers (if that
> is even needed). In general, protocol revisions from Tripp Lite have not
> been very different from the previous versions.
>
> First, which OS and distribution are you using?
>
> Rudimentary support for the 4006 protocol over USB has been in the
> usbhid-ups driver since NUT 2.6.0, but since that information was
> apparently added from another project, we don't have an entry in the HCL
> for that protocol. So I would try the USB connection first.
>
> Bear in mind that some UPS firmware cannot switch between USB and serial
> without first powering down completely (including disconnecting AC). We
> don't have good data on which UPSes require this low-level reset, but it is
> something to try.
>
> I have an older Tripp-Lite UPS that uses a different driver, so when I run
> "lsusb -d 09ae:", I see the following:
>
> $ lsusb -d 09ae:
> Bus 006 Device 002: ID 09ae:0001 Tripp Lite
>
> Yours will probably say "09ae:4006" instead.
>
> A note: drivers/tripplite_usb.c was written for older models which seem to
> have a rudimentary USB-to-serial converter built in. Some of the commands
> and responses match those in drivers/tripplite.c (which talks to a serial
> port). It would be interesting to see where your UPS fails during detection
> with the drivers/tripplite.c code. I seem to remember it does not have much
> in the way of debugging (but strace should work).
>
> You mentioned "set the communication parameters to those indicated in the
> protocol spec" - is this published somewhere?
>
> Larry,
> Thanks for the kind words!
>
> - Charles
> ___
> Nut-upsuser mailing list
> Nut-upsuser@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] SU2200RTXLCD2U and protocol 4006

2017-07-03 Thread Ambrogio Coletti
Thank you for your answer.
I will try to investigate the possibility that the Tripplite serial cable
has a different pinout than a standard RS-232 serial cable.

I wouldn't use the NUT at this point because I don't think I will be able
to write a software update to adapt the NUT to my needs.

My idea was first to test the protocol via a serial terminal client
directly connected to the UPS, and then write some simple code from scratch
to implement the protocol and use it for my basic needs.

Do you think that is a feasible approach?

Ambrogio

On Mon, Jul 3, 2017 at 10:17 AM Larry Fahnoe <fah...@fahnoetech.com> wrote:

> I don't have the Tripp-Lite model that you have, however the NUT HCL
> http://networkupstools.org/stable-hcl.html suggests that the SU2200RTXLCD2U
> ought to work via USB.  Tripp-Lite sometimes uses proprietary serial
> cables, so you may need to hunt down a pinout for the serial cable this
> unit requires.  If you need to use a serial connection, I'd start by
> looking at how their PowerAlert software connects to the UPS and then go
> from there to see if you can provide a similar connection to your NUT
> master.
>
> --Larry
>
> On Mon, Jul 3, 2017 at 10:38 AM, Ambrogio Coletti <ambroj...@gmail.com>
> wrote:
>
>> Hello
>>
>> I asked Tripplite the serial protocol implemented in the UPS model
>> SU2200RTXLCD2U.
>>
>> The protocol is the 4006, which is not supported by the NUT.
>>
>> I connected my UPS unit to a serial terminal client (both from a Windows
>> machine and a Linux machine), set the communication parameters to those
>> indicated in the protocol spec, and tried to open the communication,
>> unfortunately with no success.
>>
>> I couldn't get much support from Tripplite. They couldn't even tell me if
>> I should expect to be able to connect that way an see any type of "welcome
>> message" as the device communication is open.
>>
>> So I am asking you guys, do you know if I am supposed to be able to open
>> a straight serial connection with the UPS as described above, using a
>> normal serial terminal cliente (e.g. Putty)?
>>
>> Regards
>> Ambrogio
>>
>> ___
>> Nut-upsuser mailing list
>> Nut-upsuser@lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
>>
>
>
>
> --
> Larry Fahnoe, Fahnoe Technology Consulting, fah...@fahnoetech.com
>Minneapolis, Minnesota   www.FahnoeTech.com
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

[Nut-upsuser] Device not supported?

2017-06-23 Thread Ambrogio Coletti
Hello

I am trying to install the NUT on CentOS 6 (2.6.32-696.3.1.el6.x86_64).

First I installed it using:
yum install epel-release --enablerepo=extras
yum install nut

And when I run it by:
sbin/upsdrvctl start
(that's where it installed it using the package)

I had the following message:
"This TrippLite device (09ae:1330) is not (or perhaps not yet) supported by
usbhid-ups. [...]"
but my device (SU2200RTXLCD2U) is supported, as clearly state here
.

Then I thought I needed the last src code (2.7.4), hence I built it for my
machine, but when I run it by:
/usr/local/ups/sbin/upsdrvctl start

I had, in order, this message
"writepid: fopen /var/state/ups/usbhid-ups-trippliteups.pid: Permission
denied"
and...the same message above about the not supported device!

What's wrong in there?

Regards
Ambrogio

P.S. I also performed the installation notes for the driver in here
.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

[Nut-upsuser] CentOS rpm package installation

2017-06-22 Thread Ambrogio Coletti
Hello

I am not a linux expert.

The output of uname -r on my system returns:
2.6.32-696.3.1.el6.x86_64

hence I am trying to install this rpm:
sudo yum install nut-2.7.4-9.fc27.x86_64.rpm

but I got failed dependencies.

Is there a repository I am supposed to set up to get those dependencies
from?


Regards
Ambrogio
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser