On 09/19/2013 12:20 PM, Gregory Edigarov wrote:
Hello, everybody.
A few days ago I've bought a new ups, as a replacement for my old one, which
got it's last way to junkyard.
The old one had RS232 порт, and the new one is an USB ups.
Trying different ways to connect it to OpenBSD, but everything I've tried fails.
The UPS reports itself as:
uhidev2 at uhub3 port 2 configuration 1 interface 0 "ATCL FOR UPS ATCL FOR UPS"
rev 2.00/0.00 addr 4
uhidev2: iclass 3/0
uhid2 at uhidev2: input=8, output=8, feature=0
I've connected it to Windows via USB, and installed software which came with
it, snooped the protocol, and I am dead sure it is an old and frayed
Megatec/Q1, which should work with blazer_usb driver from nut. But it isn't.
Seems I've tried nearly every option and allowed option combinations with no
result.
I cannot get you the usbdevs && usbhidctl right now, because I left it
connected to windows, and it is at home.
So, my question is: could it the differences in usb stack between various
OSes, that are giving the trouble? Will try connect it to linux and NetBSD
later, but I am willing to solve the puzzle with OpenBSD.
Ok, guys. so here's the continuation of story, no success so far, but may be
somebody will sched a light...
Having add the UPS as a quirk to usb_quirks.c (thanks Martin) and recompiled
the kernel I have:
# nut-scanner
Cannot load SNMP library (libnetsnmp) : file not found. SNMP search disabled.
Cannot load XML library (libneon) : file not found. XML search disabled.
Scanning USB bus.
No start IP, skipping NUT bus (old connect method)
Scanning NUT bus (avahi method).
Failed to create client: Daemon not running
[nutdev1]
driver = "blazer_usb"
port = "auto"
vendorid = "0001"
productid = "0000"
product = "ATCL FOR UPS"
serial = "ATCL FOR UPS"
vendor = "ATCL FOR UPS"
bus = "001"
I have this in my ups.conf:
[prologix]
driver = "blazer_usb"
port = "auto"
vendorid = "0001"
productid = "0000"
running blazer_usb in debug mode:
...
1.096515 Checking device (0001/0000) (001/004)
1.100225 - VendorID: 0001
1.100237 - ProductID: 0000
1.100245 - Manufacturer: unknown
1.100252 - Product: ATCL FOR UPS
1.100269 - Serial Number: ATCL FOR UPS
1.100291 - Bus: 001
1.100310 Trying to match device
1.100321 Device matches
1.100721 send: QS
1.100732 read: QS
1.100741 blazer_status: short reply
1.100749 Status read 1 failed
1.100764 send: QS
1.100787 read: QS
1.100805 blazer_status: short reply
1.100811 Status read 2 failed
1.100822 send: QS
1.100827 read: QS
1.100838 blazer_status: short reply
1.100843 Status read 3 failed
1.100855 Trying megatec/old protocol...
1.100861 send: D
1.100871 read: D
1.100876 blazer_status: short reply
1.100888 Status read 1 failed
1.100894 send: D
1.100918 read: D
1.100929 blazer_status: short reply
1.100934 Status read 2 failed
1.100940 send: D
1.100950 read: D
1.100955 blazer_status: short reply
1.100967 Status read 3 failed
1.100972 Trying zinto protocol...
1.100983 send: Q1
1.102258 read: Input/output error
1.102300 blazer_status: short reply
1.102312 Status read 1 failed
1.117362 Checking device (8086/0000) (000/001)
....
The input/output error && short reply are strange in here.
I also tried run it as an usbhid-ups with other kernel:
[p1]
driver ="usbhid-ups"
port="auto"
vendorid = "0001"
productid = "0000"
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 addr 2: high speed, self powered, config 1, Rate Matching Hub(0x0024),
Intel(0x8087), rev 0.00
port 1 addr 3: low speed, power 100 mA, config 1, product 0x0103(0x0103),
vendor 0x04f3(0x04f3), rev 1.07
port 2 addr 4: low speed, power 98 mA, config 1, ATCL FOR UPS(0x0000), ATCL
FOR UPS(0x0001), rev 0.00, iSerialNumber ATCL FOR UPS
port 3 addr 5: low speed, power 100 mA, config 1, Optical Mouse(0x003a),
Genius(0x0458), rev 1.00
port 4 powered
port 5 powered
port 6 powered
port 2 powered
# usbhid-ups -a p1 -DDDDDDDDDDDDDDDDDD
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
0.000000 debug level is '18'
0.000377 upsdrv_initups...
0.033537 Checking device (8086/0000) (000/001)
0.033730 - VendorID: 8086
0.033739 - ProductID: 0000
0.033754 - Manufacturer: Intel
0.033759 - Product: EHCI root hub
0.033771 - Serial Number: unknown
0.033776 - Bus: 000
0.033803 Trying to match device
0.033811 Device does not match - skipping
0.033864 Checking device (8087/0024) (000/002)
0.033880 - VendorID: 8087
0.033885 - ProductID: 0024
0.033890 - Manufacturer: unknown
0.033900 - Product: unknown
0.033905 - Serial Number: unknown
0.033928 - Bus: 000
0.033940 Trying to match device
0.033945 Device does not match - skipping
0.033966 Checking device (8086/0000) (001/001)
0.034045 - VendorID: 8086
0.034062 - ProductID: 0000
0.034068 - Manufacturer: Intel
0.034073 - Product: EHCI root hub
0.034085 - Serial Number: unknown
0.034089 - Bus: 001
0.034100 Trying to match device
0.034105 Device does not match - skipping
0.034130 Checking device (8087/0024) (001/002)
0.034148 - VendorID: 8087
0.034158 - ProductID: 0024
0.034164 - Manufacturer: unknown
0.034174 - Product: unknown
0.034192 - Serial Number: unknown
0.034204 - Bus: 001
0.034209 Trying to match device
0.034220 Device does not match - skipping
0.034243 Checking device (04F3/0103) (001/003)
0.034262 - VendorID: 04f3
0.034267 - ProductID: 0103
0.034272 - Manufacturer: unknown
0.034283 - Product: unknown
0.034288 - Serial Number: unknown
0.034299 - Bus: 001
0.034304 Trying to match device
0.034328 Device does not match - skipping
0.034348 Checking device (0001/0000) (001/004)
0.038736 - VendorID: 0001
0.038749 - ProductID: 0000
0.038757 - Manufacturer: ATCL FOR UPS
0.038765 - Product: ATCL FOR UPS
0.038773 - Serial Number: ATCL FOR UPS
0.038788 - Bus: 001
0.038820 Trying to match device
0.038832 Device does not match - skipping
0.038861 Checking device (0458/003A) (001/005)
0.040976 - VendorID: 0458
0.040987 - ProductID: 003a
0.040994 - Manufacturer: Genius
0.041001 - Product: Optical Mouse
0.041017 - Serial Number: unknown
0.041038 - Bus: 001
0.041057 Trying to match device
0.041063 Device does not match - skipping
0.041087 No appropriate HID device found
0.041104 No matching HID UPS found - check permissions on /dev/ugen* and
/dev/usb*
--
With best regards,
Gregory Edigarov