[Nut-upsuser] Fwd: Data stale error after short while

Mike Raath
2015-01-05T17:26:31Z

> Hope this helps.


It did - thanks! I managed to hack around a bit earlier and did produce the
driver binary but thought I would try from fresh with your steps and got
the binary.

Unfortunately the problem is still there... after a while connection is
lost, updates stop, and upsc reports stale data. Log attached.

What I'm thinking now is that I should run a cron job that regularly (every
5 minutes?) restarts the driver. Just killing and restarting nutdrv_qx
doesn't work though, since the new process fails with unsupported device
errors. Ideally what I need is for the USB driver to reattach itself in the
cron and I think that would probably work. It's a hack, but should probably
work. No idea where to start on this though. Let me know if you think I'm
barking up the wrong tree.


Something that puzzles me - when I restart the driver after a disconnect,
this is a typical output from the driver with -DDDDD log level. It clearly
can see, but not communicate with, the UPS. I've pasted it inline rather
than gzipped it because it's short output. Hope that's ok within the
forum.

$ sudo ~/nut/nut/drivers/nutdrv_qx -a apollo-ups -DDDDD

Network UPS Tools - Generic Q* USB driver 0.12 (2.7.2-signed-142-gbcaa206)

USB communication driver 0.32

   0.000000 debug level is '5'

   0.001382 upsdrv_initups...

   0.037904 Checking device (0665/5161) (002/004)

   1.031424 - VendorID: 0665

   1.031937 - ProductID: 5161

   1.032277 - Manufacturer: unknown

   1.032583 - Product: WayTech USB-RS232 Interface (V1.0)

Baud rate 2400bps

   1.032743 - Serial Number: unknown

   1.032854 - Bus: 002

   1.032963 Trying to match device

   1.033077 Device matches

   1.033218 nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0)

   1.033353 send_to_all: SETINFO ups.vendorid "0665"

   1.033473 send_to_all: SETINFO ups.productid "5161"

   1.058070 send: QGS

   2.060333 read: No error (-110)

   2.060857 qx_process_answer: short reply (input.voltage)

   2.080004 send: QGS

   3.083062 read: No error (-110)

   3.083557 qx_process_answer: short reply (input.voltage)

   3.103189 send: QGS

   4.105282 read: No error (-110)

   4.105819 qx_process_answer: short reply (input.voltage)

   4.116063 send: M

   5.119279 read: No error (-110)

   5.121211 qx_process_answer: short reply (ups.firmware.aux)

   5.133023 send: M

   6.135221 read: No error (-110)

   6.135755 qx_process_answer: short reply (ups.firmware.aux)

   6.146109 send: M

   7.148251 read: No error (-110)

   7.148774 qx_process_answer: short reply (ups.firmware.aux)

   7.158990 send: M

   8.160351 read: No error (-110)

   8.160908 qx_process_answer: short reply (ups.firmware.aux)

   8.172010 send: M

   9.175280 read: No error (-110)

   9.175757 qx_process_answer: short reply (ups.firmware.aux)

   9.186153 send: M

  10.188259 read: No error (-110)

  10.188747 qx_process_answer: short reply (ups.firmware.aux)

  10.204020 send: QS

  11.206260 read: No error (-110)

  11.206790 qx_process_answer: short reply (input.voltage)

  11.222048 send: QS

  12.224222 read: No error (-110)

  12.224701 qx_process_answer: short reply (input.voltage)

  12.240085 send: QS

  13.242540 read: No error (-110)

  13.243050 qx_process_answer: short reply (input.voltage)

  13.253967 send: D

  14.256905 read: No error (-110)

  14.257403 qx_process_answer: short reply (input.voltage)

  14.268058 send: D

  15.269799 read: No error (-110)

  15.270300 qx_process_answer: short reply (input.voltage)

  15.281049 send: D

  16.284067 read: No error (-110)

  16.284590 qx_process_answer: short reply (input.voltage)

  16.299050 send: Q1

  17.300777 read: No error (-110)

  17.301277 qx_process_answer: short reply (input.voltage)

  17.315854 send: Q1

  18.317540 read: No error (-110)

  18.318041 qx_process_answer: short reply (input.voltage)

  18.333092 send: Q1

  19.335789 read: No error (-110)

  19.336262 qx_process_answer: short reply (input.voltage)

  19.351048 send: Q1

  20.353004 read: No error (-110)

  20.354717 qx_process_answer: short reply (input.voltage)

  20.370944 send: Q1

  21.372268 read: No error (-110)

  21.372835 qx_process_answer: short reply (input.voltage)

  21.387944 send: Q1

  22.389204 read: No error (-110)

  22.389728 qx_process_answer: short reply (input.voltage)

  22.404025 send: Q1

  23.407009 read: No error (-110)

  23.408849 qx_process_answer: short reply (input.voltage)

  23.424381 send: Q1

  24.427777 read: No error (-110)

  24.428277 qx_process_answer: short reply (input.voltage)

  24.443050 send: Q1

  25.446739 read: No error (-110)

  25.447259 qx_process_answer: short reply (input.voltage)

  25.461983 send: Q1

  26.462939 read: No error (-110)

  26.463578 qx_process_answer: short reply (input.voltage)

  26.477954 send: Q1

  27.480749 read: No error (-110)

  27.481263 qx_process_answer: short reply (input.voltage)

  27.496052 send: Q1

  28.499032 read: No error (-110)

  28.499557 qx_process_answer: short reply (input.voltage)

  28.499856 Device not supported!

  28.500069 Device not supported!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150105/b9282709/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nutdr_qx-txt.tar.gz
Type: application/x-gzip
Size: 53857 bytes
Desc: not available
URL:
<http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150105/b9282709/attachment-0001.bin>