[Nut-upsdev] blazer_usb: compatibility with Ippon BackPro UPSes (Phoenix Power Co., Ltd usb-to-serial controller)
Alexey Loukianov
mooroon2 at mail.ru
Fri Jan 8 09:35:09 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
07.01.2010 16:11, Alexey Loukianov wrote:
> 07.01.2010 15:28, Arjen de Korte wrote:
>> Citeren Alexey Loukianov <mooroon2 at mail.ru>:
>
>> That is an option (although this was not what your patch originally
>> did). Can you checkout the latest version from the SVN trunk?
>
Checked out, going to give changes a try.
There were another problem with autoconf I had to fixed when been trying to build nut-trunk on CentOS4:
[allukjanov at server nut-trunk]$ autoconf -f
configure.in:84: error: possibly undefined macro: AC_TYPE_LONG_DOUBLE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:85: error: possibly undefined macro: AC_TYPE_LONG_LONG_INT
Looks like there are references in configure.in to a macros AC_TYPE_* that are not known
to RHEL4 autoconf version. Removing appropriate AC_CHECK_FUNCS call from configure.in
don't break anything for RHEL4 as far as I had tested:
[allukjanov at server nut-trunk]$ svn diff configure.in
Index: configure.in
===================================================================
- --- configure.in (revision 2240)
+++ configure.in (working copy)
@@ -78,13 +78,6 @@
AC_CHECK_FUNCS(seteuid setsid getpassphrase)
AC_CHECK_FUNCS(on_exit)
- -dnl the following may add stuff to LIBOBJS (is this still needed?)
- -AC_CHECK_FUNCS(vsnprintf snprintf, [], [
- - AC_LIBOBJ(snprintf)
- - AC_TYPE_LONG_DOUBLE
- - AC_TYPE_LONG_LONG_INT
- -])
- -
AC_REPLACE_FUNCS(setenv inet_aton strerror atexit)
dnl
- -------------------------------------------------------------------
As for modified driver, running on CentOS4 with updated libusb (0.1.12):
[root at server drivers]# ./blazer_usb -u root -DDDD -a ippon-ext-hdd1 -x subdriver=ippon -x runtimecal=60,100,378,50 -x
novendor 2>&1 | tee blazer_usb_ippon.log
Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.4.1-2240M)
0.000000 debug level is '4'
0.001677 Checking device (0000/0000) (003/001)
0.001772 - VendorID: 0000
0.001781 - ProductID: 0000
0.001788 - Manufacturer: Linux 2.6.9-67.0.4.EL ohci_hcd
0.001795 - Product: OHCI Host Controller
0.001802 - Serial Number: 0000:00:03.1
0.001809 - Bus: 003
0.001815 Trying to match device
0.001879 Device does not match - skipping
0.001898 Checking device (06DA/0003) (002/002)
0.028550 - VendorID: 06da
0.028568 - ProductID: 0003
0.028576 - Manufacturer: OMRON
0.028583 - Product: USB UPS
0.028590 - Serial Number: unknown
0.028597 - Bus: 002
0.028604 Trying to match device
0.028684 Device matches
0.036587 Trying megatec protocol...
0.042565 send: Q1
0.298225 read: (21
0.298349 blazer_status: parsing failed
0.298360 Status read 1 failed
0.302562 send: Q1
0.554193 read: (21
0.554249 blazer_status: parsing failed
0.554259 Status read 2 failed
0.558556 send: Q1
0.810160 read: (21
0.810213 blazer_status: parsing failed
0.810223 Status read 3 failed
0.810230 Trying mustek protocol...
0.814550 send: QS
1.210108 read: QS
1.210137 blazer_status: invalid start character [51]
1.210146 Status read 1 failed
1.214541 send: QS
1.610055 read: QS
1.610083 blazer_status: invalid start character [51]
1.610092 Status read 2 failed
1.614533 send: QS
2.010005 read: QS
2.010031 blazer_status: invalid start character [51]
2.010039 Status read 3 failed
2.010048 Trying megatec/old protocol...
2.015522 send: D
2.409953 read: D
2.409982 blazer_status: invalid start character [44]
2.409990 Status read 1 failed
2.414513 send: D
2.809903 read: D
2.809931 blazer_status: invalid start character [44]
2.809940 Status read 2 failed
2.814506 send: D
3.209851 read: D
3.209880 blazer_status: invalid start character [44]
3.209888 Status read 3 failed
3.209896 No supported UPS detected
[root at server drivers]# ./blazer_usb -u root -DDDD -a ippon-ext-hdd1 -x subdriver=phoenix -x runtimecal=60,100,378,50 -x
novendor 2>&1 | tee blazer_usb_phoenix.log
0.000000 debug level is '4'
0.001716 Checking device (0000/0000) (003/001)
0.001799 - VendorID: 0000
0.001808 - ProductID: 0000
0.001815 - Manufacturer: Linux 2.6.9-67.0.4.EL ohci_hcd
0.001822 - Product: OHCI Host Controller
0.001829 - Serial Number: 0000:00:03.1
0.001835 - Bus: 003
0.001842 Trying to match device
0.001905 Device does not match - skipping
0.001924 Checking device (06DA/0003) (002/002)
0.006763 - VendorID: 06da
0.006782 - ProductID: 0003
0.006790 - Manufacturer: unknown
0.006797 - Product: unknown
0.006803 - Serial Number: unknown
0.006811 - Bus: 002
0.006818 Trying to match device
0.006895 Device matches
0.009805 Trying megatec protocol...
0.012076 dump: (8 bytes) => 2e 38 20 30 30 37 20 35
0.028078 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
1.029744 flush: could not set alt intf 0/0: Connection timed out
1.033743 send: Q1
1.243910 read: (218.8 218.3 218.3 007 50.1 13.5 25.0 00001001
1.244117 Status read in 1 tries
1.244129 Supported UPS detected with megatec protocol
1.259917 dump: (8 bytes) => 2e 33 20 30 30 37 20 35
1.276294 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
2.277705 flush: could not set alt intf 0/0: Connection timed out
2.281713 send: F
2.395767 read: #220.0 003 12.00 50.0
2.395854 Ratings read in 1 tries
2.395932 battery runtime exponent : 2.655
2.395946 battery runtime nominal : 60.0
2.395970 battery runtime estimate : 49.8
2.395980 No charge time specified, using built in default [43200 seconds]
2.395989 No idle load specified, using built in default [10.0 %]
2.411773 dump: (8 bytes) => 00 00 00 00 00 00 00 00
2.427768 dump: (8 bytes) => 23 32 32 30 2e 30 20 30
2.443765 dump: (8 bytes) => 30 33 20 31 32 2e 30 30
2.459765 dump: (8 bytes) => 20 35 30 2e 30 0d 00 00
2.475763 dump: (8 bytes) => 00 00 00 00 00 00 00 00
3.476682 flush: could not set alt intf 0/0: Connection timed out
3.481688 send: Q1
3.692596 read: (218.3 218.8 218.3 007 50.1 13.5 25.0 00001001
3.692935 dstate_init: sock /var/lib/ups/blazer_usb-ippon-ext-hdd1 open on fd 8
3.708613 dump: (8 bytes) => 2e 33 20 30 30 37 20 35
3.724599 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
4.725652 flush: could not set alt intf 0/0: Connection timed out
4.729662 send: Q1
4.956434 read: (218.3 218.3 218.3 008 50.1 13.5 25.0 00001001
5.708354 dump: (8 bytes) => 2e 33 20 30 30 38 20 35
5.724344 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
6.725615 flush: could not set alt intf 0/0: Connection timed out
6.729617 send: Q1
6.956178 read: (218.8 218.8 218.3 007 50.1 13.5 25.0 00001001
7.708098 dump: (8 bytes) => 2e 33 20 30 30 37 20 35
7.724087 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
8.725568 flush: could not set alt intf 0/0: Connection timed out
8.730575 send: Q1
8.955921 read: (218.3 218.3 218.3 007 50.1 13.5 25.0 00001001
9.707842 dump: (8 bytes) => 2e 33 20 30 30 37 20 35
9.723831 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
10.725522 flush: could not set alt intf 0/0: Connection timed out
10.730531 send: Q1
10.955665 read: (218.3 218.3 218.3 006 50.1 13.5 25.0 00001001
11.707589 dump: (8 bytes) => 2e 33 20 30 30 36 20 35
11.723575 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
12.724479 flush: could not set alt intf 0/0: Connection timed out
12.728489 send: Q1
12.940411 read: (218.8 218.3 218.8 007 50.1 13.5 25.0 00001001
13.708324 dump: (8 bytes) => 2e 38 20 30 30 37 20 35
13.724452 dump: (8 bytes) => 30 2e 31 20 31 33 2e 35
.... and so on ....
Haven't got time at the moment to figure out what's wrong with ippon subdriver, will try to do it this evening.
- --
Best regards,
Alexey Loukianov mailto:mooroon2 at mail.ru
System Engineer, Mob.:+7(926)218-1320
*nix Specialist
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLRvxNAAoJEPB9BOdTkBUL6SwIAIUtUV38LP4hZhoJfM/Efrfi
8D2a1v+SdAwoQ29a8WfOJHCFSu4m2w2xv5HIaE3+IwJ7YaKkWsWh/cxVwKeBGMdu
IyElN02ikxsM0fXMCwNjXhjTCdpqLYmukjcYm1a73bN1kSKIySHtQpfLfoC3YhDO
dA21jB4g/Yb3sTNjX8VnceSd1s4SwmoB4cSKWc8uwN21JKhAUdRcCB57ECqNnLjr
poZvquO50AEJmhvxLrVZP8QG8o4+JWf1ofPJP0O5GJkuF6fbx9BtDuh6V+85Fwai
vLFpqqCMQty0OoAUHd9cbEIEjRQCKelWMiJc/T9UJ+GpdOfYVkaRFp0UEs8X+VU=
=mPNC
-----END PGP SIGNATURE-----
More information about the Nut-upsdev
mailing list