Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-08 Thread Arnaud Quette
Hello Panagiotis

2015-04-08 13:38 GMT+02:00 Panagiotis Kritikakos <
panagiotis.kritika...@nikitec.gr>:

>  Hello Arno,
>
> FreeNAS doesn't come with a compiler and I had to compile with the patch
> on FreebBSD-9.3 and then copy the produced mge-shut. Unfortunately it
> didn't work out. For every try I was getting "Connection Refused" and when
> I tried /usr/local/libexec/nut/mge-shut -D -a  I was always
> getting 'No matching HID UPS found'.
>
> I returned back to the USB connection now which seem to work better.
>

sad to hear that we did not worked out the SHUT issue.
but glad to hear to you have a solution! USB is still the path forward.
anyway, if you one day have time to get back on this, let me know, and
we'll see, if the issue is still opened, how to address that.


> Thank you very much for your help anyway.
>

thanks and cheers,
Arno
-- 
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-08 Thread Panagiotis Kritikakos

Hello Arno,

FreeNAS doesn't come with a compiler and I had to compile with the patch 
on FreebBSD-9.3 and then copy the produced mge-shut. Unfortunately it 
didn't work out. For every try I was getting "Connection Refused" and 
when I tried /usr/local/libexec/nut/mge-shut -D -a  I was 
always getting 'No matching HID UPS found'.


I returned back to the USB connection now which seem to work better.

Thank you very much for your help anyway.

Best regards,
Panagiotis

On 7/4/2015 10:20 πμ, Arnaud Quette wrote:

Hi Panagiotis

2015-04-06 9:13 GMT+02:00 Panagiotis Kritikakos 
>:


Hello Arno,

Can apply the patch directly or should I recompile nut?


not sure to fully understand your comment, but...
this is a source code patch, so you indeed have to apply it to the NUT 
source code (from within the source tree, "patch -p1 < 
../path/to/patch_file), and then recompile (make, at least, or configure).
note that the configure flags should be adapted to your specific 
distro to ensure easier testing.

not sure about FreeNas ones, but that can be found in their package repos.

cheers,
Arno
--
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr


On 3/4/2015 5:06 μμ, Arnaud Quette wrote:

Hello Panagiotis

2015-04-03 14:28 GMT+02:00 Panagiotis Kritikakos
mailto:panagiotis.kritika...@nikitec.gr>>:

Hello Arno,

Question: have you also tested oldmge-shut?
Otherwise, that might be interesting to do so and send
back the results of these tests...

Yes, I've tried this as well with worse results
unfortunately. This driver seems to be even more unstable.
When it gets able to set communication with the UPS (which is
not always the case), it usually lost it again after a while.

~# /usr/local/libexec/nut/oldmge-shut -DD -a ups-filesrv01
Network UPS Tools - Eaton / SHUT driver 0.70 (2.7.2)
   0.00 debug level is '2'
   0.000882 entering upsdrv_initups()
   0.001019 entering shut_ups_start()

   0.028445 Communication with UPS established
   0.028457 entering shut_get_descriptor(n 21, 9)
   0.111394 shut_wait_ack(): ACK received
   0.185328 entering shut_get_descriptor(n 01, 18)
   0.273455 shut_wait_ack(): ACK received
   0.423238 Device Descriptor:
bLength:0x12
bDescriptorType: 0x01
bcdUSB: 0x0110
bDeviceClass:   0x00
bDeviceSubClass: 0x00
bDeviceProtocol:0x00
bMaxPacketSize0: 0x08
idVendor:   0x0463
idProduct:  0x
bcdDevice: 0x0100
iManufacturer:  0x01
iProduct:0x02
iSerialNumber:  0x03
bNumConfigurations: 0x01

   0.423251 entering shut_get_descriptor(n 22, 1538)
   0.525087 shut_wait_ack(): ACK received
   9.705471 Unable to get Report Descriptor


It there a possibility to be an issue of the UPS, or the
connection between the serial port of the machine and the UPS?



thanks for the confirmation with oldmge-shut. I'm not astonished
on the results, but was worth a try.

I've double checked the related code difference for mge-shut
between 2.7.1 and 2.7.2.
Again, the only diff I see is the one pointed previously
(setline...).
So, it would be great if you could test this patch (through some
reboots) and report back.

Then, I don't think it's an issue with the device.
There is a long run TODO (mentioned in the header of libshut.c)
that is the baudrate negotiation.
The driver still communicates at 2400bauds, which is not that
much for such verbose units. We could go at least for 9600 on
these units, which is 4 times faster already.
This may cause some slowness and behavior issues as you're
experiencing, under some circumstances.
For example, the test using a 5SC750 on Linux (Debian Jessie)
shows that report descriptor (size 1538) takes ~10 seconds to be
retrieved, which is quite long.
Then, even if this "new"mge-shut is a lot better than the
oldmge-shut, it can still be perfected on the error handling (and
not optimal cases), which you may be hitting.
And finally, the notification handling could also help to poll
less the unit, while being notified of critical status changes.

cheers,
Arno
-- 
Eaton Data Center Automation - Opensource Leader

NUT (Network UPS Tools) Project Leader -
http://www.networkupstools.org
Debian Developer - http://www.debian

Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-07 Thread Arnaud Quette
Hi Panagiotis

2015-04-06 9:13 GMT+02:00 Panagiotis Kritikakos <
panagiotis.kritika...@nikitec.gr>:

>  Hello Arno,
>
> Can apply the patch directly or should I recompile nut?
>

not sure to fully understand your comment, but...
this is a source code patch, so you indeed have to apply it to the NUT
source code (from within the source tree, "patch -p1 <
../path/to/patch_file), and then recompile (make, at least, or configure).
note that the configure flags should be adapted to your specific distro to
ensure easier testing.
not sure about FreeNas ones, but that can be found in their package repos.

cheers,
 Arno
-- 
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr


> On 3/4/2015 5:06 μμ, Arnaud Quette wrote:
>
> Hello Panagiotis
>
> 2015-04-03 14:28 GMT+02:00 Panagiotis Kritikakos <
> panagiotis.kritika...@nikitec.gr>:
>
>> Hello Arno,
>>
>>  Question: have you also tested oldmge-shut?
>>> Otherwise, that might be interesting to do so and send back the results
>>> of these tests...
>>>
>>  Yes, I've tried this as well with worse results unfortunately. This
>> driver seems to be even more unstable. When it gets able to set
>> communication with the UPS (which is not always the case), it usually lost
>> it again after a while.
>>
>> ~# /usr/local/libexec/nut/oldmge-shut -DD -a ups-filesrv01
>> Network UPS Tools - Eaton / SHUT driver 0.70 (2.7.2)
>>0.00 debug level is '2'
>> 0.000882 entering upsdrv_initups()
>>0.001019 entering shut_ups_start()
>>
>>0.028445 Communication with UPS established
>>0.028457 entering shut_get_descriptor(n 21, 9)
>>0.111394 shut_wait_ack(): ACK received
>>0.185328 entering shut_get_descriptor(n 01, 18)
>>0.273455 shut_wait_ack(): ACK received
>>0.423238 Device Descriptor:
>> bLength:0x12
>> bDescriptorType:0x01
>> bcdUSB: 0x0110
>> bDeviceClass:   0x00
>> bDeviceSubClass:0x00
>> bDeviceProtocol:0x00
>> bMaxPacketSize0:0x08
>> idVendor:   0x0463
>> idProduct:  0x
>> bcdDevice:  0x0100
>> iManufacturer:  0x01
>> iProduct:   0x02
>> iSerialNumber:  0x03
>> bNumConfigurations: 0x01
>>
>>0.423251 entering shut_get_descriptor(n 22, 1538)
>>0.525087 shut_wait_ack(): ACK received
>>9.705471 Unable to get Report Descriptor
>>
>>
>> It there a possibility to be an issue of the UPS, or the connection
>> between the serial port of the machine and the UPS?
>>
>
>
>  thanks for the confirmation with oldmge-shut. I'm not astonished on the
> results, but was worth a try.
>
>  I've double checked the related code difference for mge-shut between
> 2.7.1 and 2.7.2.
>  Again, the only diff I see is the one pointed previously (setline...).
>  So, it would be great if you could test this patch (through some
> reboots) and report back.
>
>  Then, I don't think it's an issue with the device.
>  There is a long run TODO (mentioned in the header of libshut.c) that is
> the baudrate negotiation.
>  The driver still communicates at 2400bauds, which is not that much for
> such verbose units. We could go at least for 9600 on these units, which is
> 4 times faster already.
>  This may cause some slowness and behavior issues as you're experiencing,
> under some circumstances.
>  For example, the test using a 5SC750 on Linux (Debian Jessie) shows that
> report descriptor (size 1538) takes ~10 seconds to be retrieved, which is
> quite long.
>  Then, even if this "new"mge-shut is a lot better than the oldmge-shut,
> it can still be perfected on the error handling (and not optimal cases),
> which you may be hitting.
>  And finally, the notification handling could also help to poll less the
> unit, while being notified of critical status changes.
>
>  cheers,
>  Arno
>  --
>  Eaton Data Center Automation - Opensource Leader
> NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
> Debian Developer - http://www.debian.org
> Free Software Developer - http://arnaud.quette.fr
>
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-06 Thread Panagiotis Kritikakos

Hello Arno,

Can apply the patch directly or should I recompile nut?

Best regards,
Panagiotis

On 3/4/2015 5:06 μμ, Arnaud Quette wrote:

Hello Panagiotis

2015-04-03 14:28 GMT+02:00 Panagiotis Kritikakos 
>:


Hello Arno,

Question: have you also tested oldmge-shut?
Otherwise, that might be interesting to do so and send back
the results of these tests...

Yes, I've tried this as well with worse results unfortunately.
This driver seems to be even more unstable. When it gets able to
set communication with the UPS (which is not always the case), it
usually lost it again after a while.

~# /usr/local/libexec/nut/oldmge-shut -DD -a ups-filesrv01
Network UPS Tools - Eaton / SHUT driver 0.70 (2.7.2)
   0.00 debug level is '2'
   0.000882 entering upsdrv_initups()
   0.001019 entering shut_ups_start()

   0.028445 Communication with UPS established
   0.028457 entering shut_get_descriptor(n 21, 9)
   0.111394 shut_wait_ack(): ACK received
   0.185328 entering shut_get_descriptor(n 01, 18)
   0.273455 shut_wait_ack(): ACK received
   0.423238 Device Descriptor:
bLength:0x12
bDescriptorType: 0x01
bcdUSB: 0x0110
bDeviceClass:   0x00
bDeviceSubClass: 0x00
bDeviceProtocol:0x00
bMaxPacketSize0: 0x08
idVendor:   0x0463
idProduct:  0x
bcdDevice: 0x0100
iManufacturer:  0x01
iProduct:  0x02
iSerialNumber:  0x03
bNumConfigurations: 0x01

   0.423251 entering shut_get_descriptor(n 22, 1538)
   0.525087 shut_wait_ack(): ACK received
   9.705471 Unable to get Report Descriptor


It there a possibility to be an issue of the UPS, or the
connection between the serial port of the machine and the UPS?



thanks for the confirmation with oldmge-shut. I'm not astonished on 
the results, but was worth a try.


I've double checked the related code difference for mge-shut between 
2.7.1 and 2.7.2.

Again, the only diff I see is the one pointed previously (setline...).
So, it would be great if you could test this patch (through some 
reboots) and report back.


Then, I don't think it's an issue with the device.
There is a long run TODO (mentioned in the header of libshut.c) that 
is the baudrate negotiation.
The driver still communicates at 2400bauds, which is not that much for 
such verbose units. We could go at least for 9600 on these units, 
which is 4 times faster already.
This may cause some slowness and behavior issues as you're 
experiencing, under some circumstances.
For example, the test using a 5SC750 on Linux (Debian Jessie) shows 
that report descriptor (size 1538) takes ~10 seconds to be retrieved, 
which is quite long.
Then, even if this "new"mge-shut is a lot better than the oldmge-shut, 
it can still be perfected on the error handling (and not optimal 
cases), which you may be hitting.
And finally, the notification handling could also help to poll less 
the unit, while being notified of critical status changes.


cheers,
Arno
--
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr

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

Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-03 Thread Arnaud Quette
Hello Panagiotis

2015-04-03 14:28 GMT+02:00 Panagiotis Kritikakos <
panagiotis.kritika...@nikitec.gr>:

> Hello Arno,
>
>  Question: have you also tested oldmge-shut?
>> Otherwise, that might be interesting to do so and send back the results
>> of these tests...
>>
> Yes, I've tried this as well with worse results unfortunately. This driver
> seems to be even more unstable. When it gets able to set communication with
> the UPS (which is not always the case), it usually lost it again after a
> while.
>
> ~# /usr/local/libexec/nut/oldmge-shut -DD -a ups-filesrv01
> Network UPS Tools - Eaton / SHUT driver 0.70 (2.7.2)
>0.00 debug level is '2'
>0.000882 entering upsdrv_initups()
>0.001019 entering shut_ups_start()
>
>0.028445 Communication with UPS established
>0.028457 entering shut_get_descriptor(n 21, 9)
>0.111394 shut_wait_ack(): ACK received
>0.185328 entering shut_get_descriptor(n 01, 18)
>0.273455 shut_wait_ack(): ACK received
>0.423238 Device Descriptor:
> bLength:0x12
> bDescriptorType:0x01
> bcdUSB: 0x0110
> bDeviceClass:   0x00
> bDeviceSubClass:0x00
> bDeviceProtocol:0x00
> bMaxPacketSize0:0x08
> idVendor:   0x0463
> idProduct:  0x
> bcdDevice:  0x0100
> iManufacturer:  0x01
> iProduct:   0x02
> iSerialNumber:  0x03
> bNumConfigurations: 0x01
>
>0.423251 entering shut_get_descriptor(n 22, 1538)
>0.525087 shut_wait_ack(): ACK received
>9.705471 Unable to get Report Descriptor
>
>
> It there a possibility to be an issue of the UPS, or the connection
> between the serial port of the machine and the UPS?
>


thanks for the confirmation with oldmge-shut. I'm not astonished on the
results, but was worth a try.

I've double checked the related code difference for mge-shut between 2.7.1
and 2.7.2.
Again, the only diff I see is the one pointed previously (setline...).
So, it would be great if you could test this patch (through some reboots)
and report back.

Then, I don't think it's an issue with the device.
There is a long run TODO (mentioned in the header of libshut.c) that is the
baudrate negotiation.
The driver still communicates at 2400bauds, which is not that much for such
verbose units. We could go at least for 9600 on these units, which is 4
times faster already.
This may cause some slowness and behavior issues as you're experiencing,
under some circumstances.
For example, the test using a 5SC750 on Linux (Debian Jessie) shows that
report descriptor (size 1538) takes ~10 seconds to be retrieved, which is
quite long.
Then, even if this "new"mge-shut is a lot better than the oldmge-shut, it
can still be perfected on the error handling (and not optimal cases), which
you may be hitting.
And finally, the notification handling could also help to poll less the
unit, while being notified of critical status changes.

cheers,
Arno
-- 
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-03 Thread Panagiotis Kritikakos

Hello Arno,


Question: have you also tested oldmge-shut?
Otherwise, that might be interesting to do so and send back the 
results of these tests...
Yes, I've tried this as well with worse results unfortunately. This 
driver seems to be even more unstable. When it gets able to set 
communication with the UPS (which is not always the case), it usually 
lost it again after a while.


~# /usr/local/libexec/nut/oldmge-shut -DD -a ups-filesrv01
Network UPS Tools - Eaton / SHUT driver 0.70 (2.7.2)
   0.00 debug level is '2'
   0.000882 entering upsdrv_initups()
   0.001019 entering shut_ups_start()

   0.028445 Communication with UPS established
   0.028457 entering shut_get_descriptor(n 21, 9)
   0.111394 shut_wait_ack(): ACK received
   0.185328 entering shut_get_descriptor(n 01, 18)
   0.273455 shut_wait_ack(): ACK received
   0.423238 Device Descriptor:
bLength:0x12
bDescriptorType:0x01
bcdUSB: 0x0110
bDeviceClass:   0x00
bDeviceSubClass:0x00
bDeviceProtocol:0x00
bMaxPacketSize0:0x08
idVendor:   0x0463
idProduct:  0x
bcdDevice:  0x0100
iManufacturer:  0x01
iProduct:   0x02
iSerialNumber:  0x03
bNumConfigurations: 0x01

   0.423251 entering shut_get_descriptor(n 22, 1538)
   0.525087 shut_wait_ack(): ACK received
   9.705471 Unable to get Report Descriptor


It there a possibility to be an issue of the UPS, or the connection 
between the serial port of the machine and the UPS?


Cheers,
Panagiotis

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


Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-03 Thread Arnaud Quette
2015-04-02 16:50 GMT+02:00 Panagiotis Kritikakos <
panagiotis.kritika...@nikitec.gr>:

>  Hello Arno,
>

Hello Panagiotis


> Thanks for the quick reply. FreeNAS is FreeBSD-based.
>
> Yes, I could test a patch.
>
> As I have mentioned, this behavior is not seen at every single reboot but
> after most reboots. Also, some times, the connectivity can be lost without
> even rebooting. That is not very often can have happened a few times.
>

thanks for the clarification, I was not sure.

Question: have you also tested oldmge-shut?
Otherwise, that might be interesting to do so and send back the results of
these tests...

thanks and cheers,
Arno
-- 
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-02 Thread Panagiotis Kritikakos

Hello Arno,

Thanks for the quick reply. FreeNAS is FreeBSD-based.

Yes, I could test a patch.

As I have mentioned, this behavior is not seen at every single reboot 
but after most reboots. Also, some times, the connectivity can be lost 
without even rebooting. That is not very often can have happened a few 
times.


Best regards,
Panagiotis

On 2/4/2015 5:44 μμ, Arnaud Quette wrote:

Hello Panagiotis

2015-04-01 16:28 GMT+02:00 Panagiotis Kritikakos 
>:


Hello all,

OS name: FreeNAS 9.3
NUT version: 2.7.2
NUT installed method: Bundled with FreenNAS 9.3
Device: EATON 5SC 1000

(http://powerquality.eaton.com/Products-services/Backup-Power-UPS/5SC.aspx?cx=5&wtredirect=www.eaton.com/5SC&GUID=B81251A4-F34E-4373-94B3-B4FB3D0CBCA8)

Problem description:

This was originally reported as bug to FreeNAS
(https://bugs.freenas.org/issues/8049#change-41087) and was asked
to post this upstream, so here it goes.

The issue with the driver has been seen in FreeNAS 9.3-STABLE.
While the serial connection with the UPS (Eaton 5 5SC Serial with
mge-shut driver) is working initially, almost after every reboot,
the driver is failing with the message "UPS failed - Driver not
connected". This was not the case with FreeNAS 9.2 and NUT 2.7.1.

Additional information:

~# /usr/local/libexec/nut/mge-shut -DD -a ups-filesrv01
Network UPS Tools - Generic HID driver 0.38 (2.7.2)
SHUT communication driver 0.84
Warning: This is an experimental driver.
Some features may not function correctly.

   0.00 debug level is '2'
   0.000901 upsdrv_initups...
   0.000911 libshut_open: using port /dev/cuau0
   0.001034 entering shut_synchronise()
   0.037281 Communication with UPS established
   0.037289 entering shut_get_descriptor(n 01, 18)
   0.120208 shut_wait_ack(): ACK received
   0.371873 shut_wait_ack(): ACK received
   9.504230 shut_wait_ack(): Nothing received
   9.589858 shut_wait_ack(): ACK received
   9.742965 shut_wait_ack(): Nothing received
   9.867744 shut_wait_ack(): ACK received
   9.971912 - VendorID: 0463
   9.971919 - ProductID: 
   9.971923 - Manufacturer: Eaton
   9.971926 - Product: unknown
   9.971929 - Serial Number: unknown
   9.971932 - Bus: serial
   9.971935 Device matches
   9.971939 entering shut_get_descriptor(n 21, 9)
  13.027594 shut_wait_ack(): Nothing received
  16.028593 shut_wait_ack(): Nothing received
  16.055659 shut_wait_ack(): Nothing received
  16.055670 Max tries reached while waiting for ACK, still
getting errors
  16.055674 entering shut_synchronise()
  16.197941 Unable to get HID descriptor ()
  16.197949 No matching HID UPS found

Thank you in advance!


The only diff I see between shut in 2.7.1 and 2.7.2 is the following:

--- ../nut-2.7.1/drivers/libshut.c2013-10-02 14:16:42.0 +0200
+++ drivers/libshut.c2014-02-25 16:39:34.0 +0100
@@ -312,7 +312,7 @@
 /* FIXME: add variable baudrate detection */
 *upsfd = ser_open(device_path);
 ser_set_speed(*upsfd, device_path, B2400);
-setline(*upsfd, 0);
+setline(*upsfd, 1);

 /* initialise communication */
 if (!shut_synchronise(*upsfd))


This is tied to the PnP feature, and was reverted with the following 
commit:

https://github.com/networkupstools/nut/commit/75b0ce8b952d7c55880f7a019ba61ec05b45e6a7

Never had time to get the complete consideration on this, so I'm still 
lacking visibility.
it's still unclear to me why it does not work for you. Is FreeNAS 
linux based or BSD?
I've just tested a pristine 2.7.2 on Debian Jessie + 5SC700, and it 
works fine.


would you be able to test a patch or a git branch?

thanks and cheers,
Arno
--
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr

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

Re: [Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-02 Thread Arnaud Quette
Hello Panagiotis

2015-04-01 16:28 GMT+02:00 Panagiotis Kritikakos <
panagiotis.kritika...@nikitec.gr>:

> Hello all,
>
> OS name: FreeNAS 9.3
> NUT version: 2.7.2
> NUT installed method: Bundled with FreenNAS 9.3
> Device: EATON 5SC 1000 (http://powerquality.eaton.
> com/Products-services/Backup-Power-UPS/5SC.aspx?cx=5&
> wtredirect=www.eaton.com/5SC&GUID=B81251A4-F34E-4373-94B3-B4FB3D0CBCA8)
>
> Problem description:
>
> This was originally reported as bug to FreeNAS (https://bugs.freenas.org/
> issues/8049#change-41087) and was asked to post this upstream, so here it
> goes.
>
> The issue with the driver has been seen in FreeNAS 9.3-STABLE. While the
> serial connection with the UPS (Eaton 5 5SC Serial with mge-shut driver) is
> working initially, almost after every reboot, the driver is failing with
> the message "UPS failed - Driver not connected". This was not the case with
> FreeNAS 9.2 and NUT 2.7.1.
>
> Additional information:
>
> ~# /usr/local/libexec/nut/mge-shut -DD -a ups-filesrv01
> Network UPS Tools - Generic HID driver 0.38 (2.7.2)
> SHUT communication driver 0.84
> Warning: This is an experimental driver.
> Some features may not function correctly.
>
>0.00 debug level is '2'
>0.000901 upsdrv_initups...
>0.000911 libshut_open: using port /dev/cuau0
>0.001034 entering shut_synchronise()
>0.037281 Communication with UPS established
>0.037289 entering shut_get_descriptor(n 01, 18)
>0.120208 shut_wait_ack(): ACK received
>0.371873 shut_wait_ack(): ACK received
>9.504230 shut_wait_ack(): Nothing received
>9.589858 shut_wait_ack(): ACK received
>9.742965 shut_wait_ack(): Nothing received
>9.867744 shut_wait_ack(): ACK received
>9.971912 - VendorID: 0463
>9.971919 - ProductID: 
>9.971923 - Manufacturer: Eaton
>9.971926 - Product: unknown
>9.971929 - Serial Number: unknown
>9.971932 - Bus: serial
>9.971935 Device matches
>9.971939 entering shut_get_descriptor(n 21, 9)
>   13.027594 shut_wait_ack(): Nothing received
>   16.028593 shut_wait_ack(): Nothing received
>   16.055659 shut_wait_ack(): Nothing received
>   16.055670 Max tries reached while waiting for ACK, still getting
> errors
>   16.055674 entering shut_synchronise()
>   16.197941 Unable to get HID descriptor ()
>   16.197949 No matching HID UPS found
>
> Thank you in advance!
>

The only diff I see between shut in 2.7.1 and 2.7.2 is the following:

--- ../nut-2.7.1/drivers/libshut.c2013-10-02 14:16:42.0 +0200
+++ drivers/libshut.c2014-02-25 16:39:34.0 +0100
@@ -312,7 +312,7 @@
 /* FIXME: add variable baudrate detection */
 *upsfd = ser_open(device_path);
 ser_set_speed(*upsfd, device_path, B2400);
-setline(*upsfd, 0);
+setline(*upsfd, 1);

 /* initialise communication */
 if (!shut_synchronise(*upsfd))


This is tied to the PnP feature, and was reverted with the following commit:
https://github.com/networkupstools/nut/commit/75b0ce8b952d7c55880f7a019ba61ec05b45e6a7

Never had time to get the complete consideration on this, so I'm still
lacking visibility.
it's still unclear to me why it does not work for you. Is FreeNAS linux
based or BSD?
I've just tested a pristine 2.7.2 on Debian Jessie + 5SC700, and it works
fine.

would you be able to test a patch or a git branch?

thanks and cheers,
Arno
-- 
Eaton Data Center Automation - Opensource Leader
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

[Nut-upsuser] mge-shut driver fails almost after every reboot

2015-04-01 Thread Panagiotis Kritikakos

Hello all,

OS name: FreeNAS 9.3
NUT version: 2.7.2
NUT installed method: Bundled with FreenNAS 9.3
Device: EATON 5SC 1000 
(http://powerquality.eaton.com/Products-services/Backup-Power-UPS/5SC.aspx?cx=5&wtredirect=www.eaton.com/5SC&GUID=B81251A4-F34E-4373-94B3-B4FB3D0CBCA8)


Problem description:

This was originally reported as bug to FreeNAS 
(https://bugs.freenas.org/issues/8049#change-41087) and was asked to 
post this upstream, so here it goes.


The issue with the driver has been seen in FreeNAS 9.3-STABLE. While the 
serial connection with the UPS (Eaton 5 5SC Serial with mge-shut driver) 
is working initially, almost after every reboot, the driver is failing 
with the message "UPS failed - Driver not connected". This was not the 
case with FreeNAS 9.2 and NUT 2.7.1.


Additional information:

~# /usr/local/libexec/nut/mge-shut -DD -a ups-filesrv01
Network UPS Tools - Generic HID driver 0.38 (2.7.2)
SHUT communication driver 0.84
Warning: This is an experimental driver.
Some features may not function correctly.

   0.00 debug level is '2'
   0.000901 upsdrv_initups...
   0.000911 libshut_open: using port /dev/cuau0
   0.001034 entering shut_synchronise()
   0.037281 Communication with UPS established
   0.037289 entering shut_get_descriptor(n 01, 18)
   0.120208 shut_wait_ack(): ACK received
   0.371873 shut_wait_ack(): ACK received
   9.504230 shut_wait_ack(): Nothing received
   9.589858 shut_wait_ack(): ACK received
   9.742965 shut_wait_ack(): Nothing received
   9.867744 shut_wait_ack(): ACK received
   9.971912 - VendorID: 0463
   9.971919 - ProductID: 
   9.971923 - Manufacturer: Eaton
   9.971926 - Product: unknown
   9.971929 - Serial Number: unknown
   9.971932 - Bus: serial
   9.971935 Device matches
   9.971939 entering shut_get_descriptor(n 21, 9)
  13.027594 shut_wait_ack(): Nothing received
  16.028593 shut_wait_ack(): Nothing received
  16.055659 shut_wait_ack(): Nothing received
  16.055670 Max tries reached while waiting for ACK, still getting 
errors

  16.055674 entering shut_synchronise()
  16.197941 Unable to get HID descriptor ()
  16.197949 No matching HID UPS found

Thank you in advance!


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