[snip hex dump analysis]
>
> It is possible that the blazer_usb driver initialization has put the UPS
> into a bad state. If you can schedule some downtime, you might want to try
> usbhid-ups again after powering the UPS down completely and unplugging it
> for a little while. (Often, a few seconds after the output is off and the
> AC has been removed, you will hear relays disengage.)

Ok I am new to UPS and I can say that I would have never thought of that.

So:

1) Shutdown the PC
2) Shutdown the UPS - several minutes (I am writing this e-mail)
3) Try to find a cirquit breaker - found one. Lucky!
4) Power up the UPS
5) Power up the PC - it is configured to start the nut-server with usbhid-ups
6) It failed to deal with the UPS
7) service nut-server stop (checked with ps all nut services are gone)
7) #mv delme delme.orig (previous file)
8) #/lib/nut/usbhid-ups -DDD -x explore -a turbo-x 2>&1 | tee > delme
9) strip the timings for diffing
   # sed 's/  [0-9\.]*\t//g' < delme.orig  > delme.orig.1
   # sed 's/  [0-9\.]*\t//g' < delme  > delme.1
10) diff
   # diff -ur delme.orig.1 delme.1 | colordiff | less -SR

--- delme.orig.1        2016-09-08 16:15:57.222453200 +0300
+++ delme.1     2016-09-08 16:16:05.206556873 +0300
@@ -1,25 +1,47 @@
  debug level is '3'
  upsdrv_initups...
- Checking device (067B/2305) (008/006)
+ Checking device (1D6B/0002) (008/001)
+ - VendorID: 1d6b
+ - ProductID: 0002
+ - Manufacturer: unknown
+ - Product: unknown
+ - Serial Number: unknown
+ - Bus: 008
+ - Device release number: 0407
+ Trying to match device
+ Device does not match - skipping
+ Checking device (1D6B/0002) (007/001)
+ - VendorID: 1d6b
+ - ProductID: 0002
+ - Manufacturer: unknown
+ - Product: unknown
+ - Serial Number: unknown
+ - Bus: 007
+ - Device release number: 0407
+ Trying to match device
+ Device does not match - skipping
+ Checking device (067B/2305) (006/003)
  - VendorID: 067b
  - ProductID: 2305
  - Manufacturer: unknown
  - Product: unknown
  - Serial Number: unknown
- - Bus: 008
+ - Bus: 006
  - Device release number: 0202
  Trying to match device
  Device does not match - skipping
- Checking device (0001/0000) (008/002)
+ Checking device (0001/0000) (006/002)
  - VendorID: 0001
  - ProductID: 0000
  - Manufacturer: MEC
  - Product: MEC0002
  - Serial Number: unknown
- - Bus: 008
+ - Bus: 006
  - Device release number: 0100
  Trying to match device
  Device matches
+ failed to claim USB device: could not claim interface 0: Device or
resource busy
+ detached kernel driver from USB device...
  nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0)
  HID descriptor, method 1: (9 bytes) => 09 21 00 01 00 01 22 70 02

**** device or resource busy?

11) retrying as root
   #/lib/nut/usbhid-ups -DDD -u root -x explore -a turbo-x 2>&1 | tee 
delme.root
12) stripping, diffing -- no diffs

Here is the root run output

   0.000000     debug level is '3'
   0.000538     upsdrv_initups...
   0.143639     Checking device (1D6B/0002) (008/001)
   0.167674     - VendorID: 1d6b
   0.167685     - ProductID: 0002
   0.167688     - Manufacturer: Linux 4.7.0-1-amd64 ehci_hcd
   0.167741     - Product: EHCI Host Controller
   0.167749     - Serial Number: 0000:00:1d.7
   0.167753     - Bus: 008
   0.167802     - Device release number: 0407
   0.167849     Trying to match device
   0.167899     Device does not match - skipping
   0.167976     Checking device (1D6B/0002) (007/001)
   0.168131     - VendorID: 1d6b
   0.168140     - ProductID: 0002
   0.168186     - Manufacturer: Linux 4.7.0-1-amd64 ehci_hcd
   0.168194     - Product: EHCI Host Controller
   0.168278     - Serial Number: 0000:00:1a.7
   0.168287     - Bus: 007
   0.168330     - Device release number: 0407
   0.168338     Trying to match device
   0.168345     Device does not match - skipping
   0.179609     Checking device (067B/2305) (006/003)
   0.188178     - VendorID: 067b
   0.188188     - ProductID: 2305
   0.188192     - Manufacturer: Prolific Technology Inc.
   0.188251     - Product: IEEE-1284 Controller
   0.188301     - Serial Number: unknown
   0.188310     - Bus: 006
   0.188358     - Device release number: 0202
   0.188366     Trying to match device
   0.188432     Device does not match - skipping
   0.188488     Checking device (0001/0000) (006/002)
   0.211178     - VendorID: 0001
   0.211187     - ProductID: 0000
   0.211191     - Manufacturer: MEC
   0.211252     - Product: MEC0002
   0.211301     - Serial Number: unknown
   0.211310     - Bus: 006
   0.211357     - Device release number: 0100
   0.211365     Trying to match device
   0.211439     Device matches
   0.211509     nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   0.216183     HID descriptor, method 1: (9 bytes) => 09 21 00 01 00 01 22 70 
02
   0.216193     HID descriptor length (method 1) 624
   0.216250     HID descriptor, method 2: (9 bytes) => 09 21 00 01 00 01 22 70 
02
   0.216259     HID descriptor length (method 2) 624
   0.216262     HID descriptor length 624
   0.297182     Report Descriptor size = 624
   0.297196     Report Descriptor: (624 bytes) => 05 86 09 04 a1 01 05 84 09
1e a1 00 85 01
   0.297299      09 1f 65 00 75 04 95 01 15 00 25 0f 65 00 b1 02 75 04 95 01
b1 03 09 40 75
   0.297354      10 95 01 67 21 d1 f0 00 55 07 15 00 26 fa 00 b1 02 09 42 75
10 95 01 66 01
   0.297408      f0 55 00 15 00 25 3c b1 02 09 53 75 10 95 01 67 21 d1 f0 00
55 07 15 00 26
   0.297463      fa 00 b1 02 09 54 75 10 95 01 67 21 d1 f0 00 55 07 15 00 26
fa 00 b1 02 09
   0.297530      fd 09 fe 09 ff 75 08 95 03 26 ff 00 65 00 b1 00 c0 05 84 09
1e a1 00 85 02
   0.297585      09 1f 65 00 75 04 95 01 15 00 25 0f 65 00 b1 02 95 01 75 04
b1 03 09 40 75
   0.297640      10 95 01 67 21 d1 f0 00 55 07 15 00 26 fa 00 b1 02 09 42 75
10 95 01 66 01
   0.297705      f0 55 00 15 00 25 3c b1 02 09 43 75 10 95 01 66 21 d1 55 07
15 00 27 fe ff
   0.297760      00 00 b1 02 09 44 95 01 75 10 66 21 d1 55 07 15 00 27 fe ff
00 00 b1 02 09
   0.297815      56 75 18 95 01 66 01 10 55 00 15 00 27 fe ff 00 00 b1 02 09
57 75 18 95 01
   0.297870      66 01 10 55 00 15 00 27 fe ff 00 00 b1 02 c0 05 84 09 10 a1
00 85 03 09 11
   0.297907      65 00 75 04 95 01 15 00 25 0f 65 00 b1 02 75 04 95 01 b1 03
09 02 a1 02 09
   0.297917      6d 09 61 75 01 95 02 15 00 25 01 b1 02 75 06 95 01 b1 03 c0
09 30 75 18 95
   0.297930      01 67 21 d1 f0 00 55 05 27 fe ff 00 00 b1 02 09 36 75 10 95
01 67 01 00 01
   0.297939      00 27 fe ff 00 00 b1 02 09 58 75 01 95 06 15 00 25 01 81 02
75 02 95 01 81
   0.297948      03 09 58 75 01 95 04 15 00 25 01 b1 02 75 04 95 01 b1 03 c0
05 84 09 16 a1
   0.297957      00 85 04 09 17 75 04 95 01 15 00 25 0f 65 00 81 02 75 04 95
01 81 03 09 1a
   0.297966      a1 00 09 1b 09 1f 75 04 95 02 15 00 25 0f 65 00 81 02 09 02
a1 02 09 61 75
   0.297975      01 95 01 15 00 25 01 81 02 75 07 95 01 81 03 c0 09 30 75 10
95 01 67 21 d1
   0.297983      f0 00 55 05 27 fe ff 00 00 81 02 09 32 75 10 95 01 66 01 f0
55 05 27 fe ff
   0.297992      00 00 81 02 c0 09 1c a1 00 85 05 09 1d 09 1f 75 04 95 02 15
00 25 0f 65 00
   0.298001      81 02 09 30 75 10 95 01 67 21 d1 f0 00 55 05 27 fe ff 00 00
81 02 09 32 75
   0.298010      10 95 01 66 01 f0 55 05 27 fe ff 00 00 81 02 09 35 75 10 95
01 15 00 26 ff
   0.298028      00 81 02 09 02 a1 02 09 65 09 6e 09 6f 75 01 95 03 15 00 25
01 65 00 81 02
   0.298035      75 05 95 01 81 03 c0 c0 c0 c0
   0.298098     Using subdriver: EXPLORE HID 0.1
   0.298103     36 HID objects found
   0.302190     refresh_report_buffer: expected 13 bytes, but got 8 instead
   0.302204     Report[err]: (8 bytes) => 08 03 4d 00 45 00 43 00
   0.302213     Path: 00860004.Flow.FlowID, Type: Feature, ReportID: 0x01,
Offset: 0, Size: 4, Value: 3
   0.302219     Report[buf]: (13 bytes) => 08 03 4d 00 45 00 43 00 00 00 00 00 
00
   0.302228     Path: 00860004.Flow.ConfigVoltage, Type: Feature, ReportID:
0x01, Offset: 8, Size: 16, Value: 77
   0.302234     Report[buf]: (13 bytes) => 08 03 4d 00 45 00 43 00 00 00 00 00 
00
   0.302245     Path: 00860004.Flow.ConfigFrequency, Type: Feature, ReportID:
0x01, Offset: 24, Size: 16, Value: 5
   0.302252     Report[buf]: (13 bytes) => 08 03 4d 00 45 00 43 00 00 00 00 00 
00
   0.302259     Path: 00860004.Flow.LowVoltageTransfer, Type: Feature,
ReportID: 0x01, Offset: 40, Size: 16, Value: 67
   0.302266     Report[buf]: (13 bytes) => 08 03 4d 00 45 00 43 00 00 00 00 00 
00
   0.302281     Path: 00860004.Flow.HighVoltageTransfer, Type: Feature,
ReportID: 0x01, Offset: 56, Size: 16, Value: 0
   0.302287     Report[buf]: (13 bytes) => 08 03 4d 00 45 00 43 00 00 00 00 00 
00
   0.302292     Path: 00860004.Flow.iManufacturer, Type: Feature, ReportID:
0x01, Offset: 72, Size: 8, Value: 0
   0.302305     Report[buf]: (13 bytes) => 08 03 4d 00 45 00 43 00 00 00 00 00 
00
   0.302315     Path: 00860004.Flow.iProduct, Type: Feature, ReportID: 0x01,
Offset: 80, Size: 8, Value: 0
   0.302320     Report[buf]: (13 bytes) => 08 03 4d 00 45 00 43 00 00 00 00 00 
00
   0.302325     Path: 00860004.Flow.iSerialNumber, Type: Feature, ReportID:
0x01, Offset: 88, Size: 8, Value: 0
   0.307186     Report[get]: (16 bytes) => 10 03 4d 00 45 00 43 00 30 00 30 00
30 00 32 00
   0.307201     Path: 00860004.Flow.FlowID, Type: Feature, ReportID: 0x02,
Offset: 0, Size: 4, Value: 3e+07
   0.307209     Report[buf]: (16 bytes) => 10 03 4d 00 45 00 43 00 30 00 30 00
30 00 32 00
   0.307216     Path: 00860004.Flow.ConfigVoltage, Type: Feature, ReportID:
0x02, Offset: 8, Size: 16, Value: 77
   0.307223     Report[buf]: (16 bytes) => 10 03 4d 00 45 00 43 00 30 00 30 00
30 00 32 00
   0.307229     Path: 00860004.Flow.ConfigFrequency, Type: Feature, ReportID:
0x02, Offset: 24, Size: 16, Value: 5
   0.307241     Report[buf]: (16 bytes) => 10 03 4d 00 45 00 43 00 30 00 30 00
30 00 32 00
   0.307248     Path: 00860004.Flow.ConfigApparentPower, Type: Feature,
ReportID: 0x02, Offset: 40, Size: 16, Value: 67
   0.307261     Report[buf]: (16 bytes) => 10 03 4d 00 45 00 43 00 30 00 30 00
30 00 32 00
   0.307266     Path: 00860004.Flow.ConfigActivePower, Type: Feature,
ReportID: 0x02, Offset: 56, Size: 16, Value: 48
   0.307276     Report[buf]: (16 bytes) => 10 03 4d 00 45 00 43 00 30 00 30 00
30 00 32 00
   0.307282     Path: 00860004.Flow.DelayBeforeStartup, Type: Feature,
ReportID: 0x02, Offset: 72, Size: 24, Value: 48
   0.307288     Report[buf]: (16 bytes) => 10 03 4d 00 45 00 43 00 30 00 30 00
30 00 32 00
   0.307307     Path: 00860004.Flow.DelayBeforeShutdown, Type: Feature,
ReportID: 0x02, Offset: 96, Size: 24, Value: 12800
   0.478190     Report[get]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.478206     Path: 00860004.BatterySystem.BatterySystemID, Type: Feature,
ReportID: 0x03, Offset: 0, Size: 4, Value: 3
   0.478213     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.478219     Path: 00860004.BatterySystem.PresentStatus.Used, Type:
Feature, ReportID: 0x03, Offset: 8, Size: 1, Value: 1
   0.478225     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.478231     Path: 00860004.BatterySystem.PresentStatus.Good, Type:
Feature, ReportID: 0x03, Offset: 9, Size: 1, Value: 0
   0.478236     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.478244     Path: 00860004.BatterySystem.Voltage, Type: Feature, ReportID:
0x03, Offset: 16, Size: 24, Value: 204.8
   0.478256     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.478263     Path: 00860004.BatterySystem.Temperature, Type: Feature,
ReportID: 0x03, Offset: 40, Size: 16, Value: 8.3e+06
   0.478269     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.478276     Path: 00860004.BatterySystem.Test, Type: Input, ReportID:
0x03, Offset: 0, Size: 1, Value: 100000
   0.478281     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.478291     Path: 00860004.BatterySystem.Test, Type: Feature, ReportID:
0x03, Offset: 56, Size: 1, Value: 0
   0.490193     Report[get]: (8 bytes) => 16 03 55 00 50 00 53 00
   0.490209     Path: 00860004.PowerConverter.PowerConverterID, Type: Input,
ReportID: 0x04, Offset: 0, Size: 4, Value: 300000
   0.490216     Report[buf]: (8 bytes) => 16 03 55 00 50 00 53 00
   0.490223     Path: 00860004.PowerConverter.Input.InputID, Type: Input,
ReportID: 0x04, Offset: 8, Size: 4, Value: 500000
   0.490228     Report[buf]: (8 bytes) => 16 03 55 00 50 00 53 00
   0.490235     Path: 00860004.PowerConverter.Input.FlowID, Type: Input,
ReportID: 0x04, Offset: 12, Size: 4, Value: 500000
   0.490240     Report[buf]: (8 bytes) => 16 03 55 00 50 00 53 00
   0.490252     Path: 00860004.PowerConverter.Input.PresentStatus.Good, Type:
Input, ReportID: 0x04, Offset: 16, Size: 1, Value: 0
   0.490257     Report[buf]: (8 bytes) => 16 03 55 00 50 00 53 00
   0.490264     Path: 00860004.PowerConverter.Input.Voltage, Type: Input,
ReportID: 0x04, Offset: 24, Size: 16, Value: 0.8
   0.490270     Report[buf]: (8 bytes) => 16 03 55 00 50 00 53 00
   0.490281     Path: 00860004.PowerConverter.Input.Frequency, Type: Input,
ReportID: 0x04, Offset: 40, Size: 16, Value: 8.3e+06
   0.508193     Report[get]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508253     Path: 00860004.PowerConverter.Output.OutputID, Type: Input,
ReportID: 0x05, Offset: 0, Size: 4, Value: 300000
   0.508264     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508358     Path: 00860004.PowerConverter.Output.FlowID, Type: Input,
ReportID: 0x05, Offset: 4, Size: 4, Value: 0
   0.508369     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508462     Path: 00860004.PowerConverter.Output.Voltage, Type: Input,
ReportID: 0x05, Offset: 8, Size: 16, Value: 0.85
   0.508472     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508568     Path: 00860004.PowerConverter.Output.Frequency, Type: Input,
ReportID: 0x05, Offset: 24, Size: 16, Value: 8e+06
   0.508575     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508582     Path: 00860004.PowerConverter.Output.PercentLoad, Type: Input,
ReportID: 0x05, Offset: 40, Size: 16, Value: 8.3e+06
   0.508592     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508681     Path: 00860004.PowerConverter.Output.PresentStatus.Overload,
Type: Input, ReportID: 0x05, Offset: 56, Size: 1, Value: 0
   0.508691     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508797     Path: 00860004.PowerConverter.Output.PresentStatus.Boost,
Type: Input, ReportID: 0x05, Offset: 57, Size: 1, Value: 0
   0.508807     Report[buf]: (9 bytes) => 16 03 55 00 50 00 53 00 20
   0.508900     Path: 00860004.PowerConverter.Output.PresentStatus.Buck, Type:
Input, ReportID: 0x05, Offset: 58, Size: 1, Value: 0
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
   0.508980     Report descriptor retrieved (Reportlen = 624)
   0.508987     Found HID device
   0.509036     Detected a UPS: MEC/MEC0002
   0.509047     find_nut_info: unknown info type: load.off.delay
   0.509103     find_nut_info: unknown info type: load.on.delay
   0.509155     find_nut_info: unknown info type: load.off.delay
   0.509212     upsdrv_initinfo...
   0.509271     upsdrv_updateinfo...
   0.761199     libusb_get_interrupt: Connection timed out
   0.761220     Got 0 HID objects...
   0.761227     Quick update...
   0.761283     dstate_init: sock /var/run/nut/usbhid-ups-turbo-x open on fd 5
   0.761299     upsdrv_updateinfo...
   1.013199     libusb_get_interrupt: Connection timed out
   1.013213     Got 0 HID objects...
   1.013218     Quick update...
   2.763063     upsdrv_updateinfo...
   3.015236     libusb_get_interrupt: Connection timed out
   3.015248     Got 0 HID objects...
   3.015254     Quick update...
   4.764823     upsdrv_updateinfo...
   5.016274     libusb_get_interrupt: Connection timed out
   5.016287     Got 0 HID objects...
   5.016292     Quick update...
   6.766584     upsdrv_updateinfo...
   7.018312     libusb_get_interrupt: Connection timed out
   7.018324     Got 0 HID objects...
   7.018330     Quick update...
   8.768346     upsdrv_updateinfo...
   9.020354     libusb_get_interrupt: Connection timed out
   9.020368     Got 0 HID objects...
   9.020373     Quick update...






>
> The other PDC HID UPSes would usually report some changes every few
> seconds. If you do not see any changes after "rebooting" the UPS
> (something other than "Got 0 HID objects..."), try toggling the AC power
> (recommend using a circuit breaker or power strip to keep the ground and
> neutral attached) to see what an "on battery" event looks like.
>


Regards

     Vassilis Virvilis


_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to