[Nut-upsuser] bug report: apcsmart (WIN) 940-0024C connect fail, problem with command 'E'

Markus Pruehs apc at markus.pruehs.com
Tue Feb 5 13:50:08 UTC 2013


Dear Ladies and Gentlemen,
this is the response from APC concerning the smart protocol commands for UPS
Model 600LS, Part AP600I, Firmware 6JI: (German) Leider haben wir keine
Person, die seit eine so lange Zeit in der Firma gearbeitet gat, die uns
mehr über den Protokol dieser USV mitteilen kann. (English) No employee from
1991 still works for APC to know of this protocol.
Thank you, Michal Soltys, for your answer. These are the APC Smart protocol
driver 2.1 (2.6.1-3057:3116M), APC command table version 2.2 debug log
(because newer drivers do not work) and the corresponding portmon capture
log. Finally a list of all available commands/responses for this UPS
(functional differences are indicated):

ups.conf:
[600LS]
driver=apcsmart
port=COM1

C:\Programme\NUT\bin>apcsmart -a 600LS -DDDDD
Network UPS Tools - APC Smart protocol driver 2.1 (2.6.1-3057:3116M)
APC command table version 2.2
   0.000000     debug level is '5'
   0.000000     w32_serial_open (COM1)
   0.010014     setting initial state on COM1
   0.010014     000007D8 = w32_serial_open (COM1)
   0.010014     Warning: no locking method is available: No error [Der
Vorgang wurde erfolgreich beendet. ]
   0.020029     vmin_ 0, vtime_ 0
   0.120173     action 0
   0.140201     vtime 0, vmin 1

   0.140201     ReadTotalTimeoutConstant -2, ReadIntervalTimeout -1,
ReadTotalTimeoutMultiplier -1
   0.140201     send_to_all: SETINFO device.type "ups"
   0.150216     send_to_all: SETINFO driver.version "2.6.1-3057:3116M"
   0.150216     send_to_all: SETINFO driver.version.internal "2.1"
   0.160230     send_to_all: SETINFO driver.name "apcsmart"
   0.160230     w32_serial_read : ulen 64, vmin_ 1, vtime_ 0, hEvent
000007D4
   0.220317     w32_serial_read : characters are available on input buffer
   0.220317     w32_serial_read : Reading 1 characters
   0.220317     w32_serial_read : total characters read = 1
   0.230331     w32_serial_read : Reading 3 characters
   0.230331     w32_serial_read : total characters read = 4
   0.230331     send_to_all: SETINFO ups.mfr "APC"
   0.240345     Attempting firmware lookup using command 'V'
   0.240345     w32_serial_read : ulen 64, vmin_ 1, vtime_ 0, hEvent
000007D4
   0.240345     w32_serial_read : characters are available on input buffer
   0.250360     w32_serial_read : Reading 1 characters
   0.310446     w32_serial_read : total characters read = 1
   0.310446     w32_serial_read : Reading 4 characters
   0.310446     w32_serial_read : total characters read = 5
   0.320461     Firmware: [6JI]
   0.320461     Not found in table - trying normal method
   0.320461     APC - Attempting to find command set
   0.320461     w32_serial_read : ulen 64, vmin_ 1, vtime_ 0, hEvent
000007D4
   0.330475     w32_serial_read : characters are available on input buffer
   0.330475     w32_serial_read : Reading 1 characters
   0.390561     w32_serial_read : total characters read = 1
   0.390561     w32_serial_read : Reading 3 characters
   0.390561     w32_serial_read : total characters read = 4
   0.400576     APC - Parsing out command set
   0.400576     Unable to split APC version string

corresponding portmon capture log:
0  0.00000000  apcsmart.exe  IRP_MJ_CREATE  Serial0  Options: Open
0  0.00008521  SUCCESS
1  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_WAIT_MASK  Serial0  Mask:
RXCHAR
1  0.00001229  SUCCESS
2  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_TIMEOUTS  Serial0  RI:0 RM:0
RC:0 WM:0 WC:0
2  0.00000531  SUCCESS
3  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_BAUD_RATE  Serial0
3  0.00000419  SUCCESS
4  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_LINE_CONTROL  Serial0
4  0.00000391  SUCCESS
5  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_CHARS  Serial0
5  0.00000363  SUCCESS
6  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_HANDFLOW  Serial0
6  0.00000335  SUCCESS
7  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_BAUD_RATE  Serial0
7  0.00000615  SUCCESS
8  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_LINE_CONTROL  Serial0
8  0.00000363  SUCCESS
9  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_CHARS  Serial0
9  0.00000335  SUCCESS
10  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_HANDFLOW  Serial0
10  0.00000335  SUCCESS
11  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_BAUD_RATE  Serial0  Rate:
9600
11  0.00001620  SUCCESS
12  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_RTS  Serial0
12  0.00000950  SUCCESS
13  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_DTR  Serial0
13  0.00001034  SUCCESS
14  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_LINE_CONTROL  Serial0
StopBits: 1 Parity: NONE WordLength: 8
14  0.00000950  SUCCESS
15  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_CHAR  Serial0  EOF:0 ERR:0
BRK:0 EVT:0 XON:11 XOFF:13
15  0.00000670  SUCCESS
16  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_HANDFLOW  Serial0
Shake:80000001 Replace:80000040 XonLimit:2048 XoffLimit:512
16  0.00000978  SUCCESS
17  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_WAIT_MASK  Serial0  Mask:
RXCHAR
17  0.00000810  SUCCESS
18  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_BAUD_RATE  Serial0
18  0.00000615  SUCCESS
19  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_LINE_CONTROL  Serial0
19  0.00000391  SUCCESS
20  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_CHARS  Serial0
20  0.00000307  SUCCESS
21  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_HANDFLOW  Serial0
21  0.00000307  SUCCESS
22  0.00000000  apcsmart.exe  IOCTL_SERIAL_PURGE  Serial0  Purge: RXABORT
RXCLEAR
22  0.00001117  SUCCESS
23  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
23  0.00001285  SUCCESS
24  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_BAUD_RATE  Serial0
24  0.00000810  SUCCESS
25  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_LINE_CONTROL  Serial0
25  0.00000447  SUCCESS
26  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_CHARS  Serial0
26  0.00000335  SUCCESS
27  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_HANDFLOW  Serial0
27  0.00000335  SUCCESS
28  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_BAUD_RATE  Serial0
28  0.00000419  SUCCESS
29  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_LINE_CONTROL  Serial0
29  0.00000335  SUCCESS
30  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_CHARS  Serial0
30  0.00000335  SUCCESS
31  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_HANDFLOW  Serial0
31  0.00000307  SUCCESS
32  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_BAUD_RATE  Serial0  Rate:
2400
32  0.00001564  SUCCESS
33  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_RTS  Serial0
33  0.00000950  SUCCESS
34  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_DTR  Serial0
34  0.00001062  SUCCESS
35  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_LINE_CONTROL  Serial0
StopBits: 1 Parity: NONE WordLength: 8
35  0.00001006  SUCCESS
36  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_CHAR  Serial0  EOF:0 ERR:0
BRK:0 EVT:0 XON:11 XOFF:13
36  0.00000643  SUCCESS
37  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_HANDFLOW  Serial0
Shake:80000001 Replace:80000040 XonLimit:2048 XoffLimit:512
37  0.00001062  SUCCESS
38  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_DTR  Serial0
38  0.00000950  SUCCESS
39  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_TIMEOUTS  Serial0  RI:-1
RM:-1 RC:-2 WM:0 WC:0
39  0.00000643  SUCCESS
40  0.00000000  apcsmart.exe  IRP_MJ_WRITE  Serial0  Length 1: Y
40  0.00004051  SUCCESS
41  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_TIMEOUTS  Serial0
41  0.00000503  SUCCESS
42  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_TIMEOUTS  Serial0  RI:-1 RM:0
RC:3000 WM:0 WC:0
42  0.00000419  SUCCESS
43  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_WAIT_MASK  Serial0  Mask:
RXCHAR
43  0.00001090  SUCCESS
44  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
44  0.00000782  SUCCESS
45  0.00000000  apcsmart.exe  IOCTL_SERIAL_WAIT_ON_MASK  Serial0
45  0.05105649  SUCCESS
46  0.00000000  apcsmart.exe  IRP_MJ_READ  Serial0  Length 1
46  0.00001313  SUCCESS  Length 1: S
47  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
47  0.00000978  SUCCESS
48  0.00000000  apcsmart.exe  IRP_MJ_READ  Serial0  Length 3
48  0.00001145  SUCCESS  Length 3: M..
49  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
49  0.00000950  SUCCESS
50  0.00000000  apcsmart.exe  IRP_MJ_WRITE  Serial0  Length 1: V
50  0.00003324  SUCCESS
51  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_TIMEOUTS  Serial0
51  0.00000475  SUCCESS
52  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_TIMEOUTS  Serial0  RI:-1 RM:0
RC:3000 WM:0 WC:0
52  0.00000447  SUCCESS
53  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_WAIT_MASK  Serial0  Mask:
RXCHAR
53  0.00001034  SUCCESS
54  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
54  0.00000754  SUCCESS
55  0.00000000  apcsmart.exe  IOCTL_SERIAL_WAIT_ON_MASK  Serial0
55  0.00001285  SUCCESS
56  0.00000000  apcsmart.exe  IRP_MJ_READ  Serial0  Length 1
56  0.05458180  SUCCESS  Length 1: 6
57  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
57  0.00001062  SUCCESS
58  0.00000000  apcsmart.exe  IRP_MJ_READ  Serial0  Length 4
58  0.00001145  SUCCESS  Length 4: JI..
59  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
59  0.00000950  SUCCESS
60  0.00000000  apcsmart.exe  IRP_MJ_WRITE  Serial0  Length 1: a
60  0.00003380  SUCCESS
61  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_TIMEOUTS  Serial0
61  0.00000475  SUCCESS
62  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_TIMEOUTS  Serial0  RI:-1 RM:0
RC:3000 WM:0 WC:0
62  0.00000419  SUCCESS
63  0.00000000  apcsmart.exe  IOCTL_SERIAL_SET_WAIT_MASK  Serial0  Mask:
RXCHAR
63  0.00001006  SUCCESS
64  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
64  0.00000754  SUCCESS
65  0.00000000  apcsmart.exe  IOCTL_SERIAL_WAIT_ON_MASK  Serial0
65  0.00001369  SUCCESS
66  0.00000000  apcsmart.exe  IRP_MJ_READ  Serial0  Length 1
66  0.04943114  SUCCESS  Length 1: C
67  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
67  0.00001006  SUCCESS
68  0.00000000  apcsmart.exe  IRP_MJ_READ  Serial0  Length 3
68  0.00001145  SUCCESS  Length 3: C..
69  0.00000000  apcsmart.exe  IOCTL_SERIAL_GET_COMMSTATUS  Serial0
69  0.00000950  SUCCESS
70  0.00000000  apcsmart.exe  IRP_MJ_WRITE  Serial0  Length 1: R
70  0.00003324  SUCCESS
71  0.00000000  apcsmart.exe  IRP_MJ_CLEANUP  Serial0
71  0.00000531  SUCCESS
72  0.00000000  apcsmart.exe  IRP_MJ_CLOSE  Serial0
72  0.06361144  SUCCESS

smart protocol command table for firmware 6JI:
command answer difference
* NA meaning unknown
3  meaning unknown - values: 00-FF constant set at UPS startup
4  meaning unknown - values: 01-05 variable
7 0F dip switch: 0F if all off, 00 if all on
8 00
9 FF
@xxx *
A OK
B 27.32
C 018.4
E OK meaning unknown - disables alarm and freezes battery voltage on
discharge until low battery (power cycle to reset)
F 50.00
G S
K--K *
L 225.1
M 226.2
N 224.0
O 225.1
P 020.2
Q 08
S OK
T 001.1 hours since UPS startup in decimal format
U OK
V 6JI
W  no answer
X OK
Y SM
Z--Z *
a or c  CB min line voltage - raw hex values (a+12%=N)
b or d CB max line voltage - raw hex values (b+12%=M)
f 100.0
g 024

suggested compatibility table entry:
 { "6JI", "@789ABCFGKLMNOPQSTUVWXYZfg", 0 }




More information about the Nut-upsuser mailing list