Skip to content

Commit 85cb70d

Browse files
Merge 38a242f into eb08bd4
2 parents eb08bd4 + 38a242f commit 85cb70d

File tree

10 files changed

+3071
-3
lines changed

10 files changed

+3071
-3
lines changed

NEWS.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ https://github.com/networkupstools/nut/milestone/13
4242
- (expected) CI automation for use of data points in drivers that conform
4343
to patterns defined in link:docs/nut-names.txt[]
4444

45+
- Introduced an experimental `apcmicrolink` driver for devices with
46+
the APC Microlink protocol on serial port connections. Tested against
47+
APC Smart-UPS 750 (SMT750RMI2UC). [PR #3406]
48+
4549
- Second-level bullet points listed in this file will now use 4 spaces
4650
(not 3 like before) for easier initial indentation of new entries.
4751

data/driver.list.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"APC" "ups" "1" "Matrix-UPS" "" "apcsmart"
8181
"APC" "ups" "1" "Smart-UPS" "" "apcsmart"
8282
"APC" "ups" "1" "Smart-UPS SMT/SMX/SURTD" "Microlink models with RJ45 socket - they *require* AP9620 SmartSlot expansion card and smart cable" "apcsmart"
83+
"APC" "ups" "1" "Smart-UPS SMT/SMX Microlink" "Microlink serial driver" "apcmicrolink"
8384
"APC" "ups" "3" "Back-UPS Pro USB" "USB" "usbhid-ups"
8485
"APC" "ups" "3" "Back-UPS BK650M2-CH" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/1970
8586
"APC" "ups" "3" "Back-UPS (USB)" "USB" "usbhid-ups"

docs/man/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ endif
976976
# (--with-serial)
977977
SRC_SERIAL_PAGES = \
978978
al175.txt \
979+
apcmicrolink.txt \
979980
apcsmart.txt \
980981
apcsmart-old.txt \
981982
bcmxcp.txt \
@@ -1030,6 +1031,7 @@ SRC_SERIAL_PAGES = \
10301031

10311032
INST_MAN_SERIAL_PAGES = \
10321033
al175.$(MAN_SECTION_CMD_SYS) \
1034+
apcmicrolink.$(MAN_SECTION_CMD_SYS) \
10331035
apcsmart.$(MAN_SECTION_CMD_SYS) \
10341036
apcsmart-old.$(MAN_SECTION_CMD_SYS) \
10351037
bcmxcp.$(MAN_SECTION_CMD_SYS) \
@@ -1148,6 +1150,7 @@ INST_HTML_SERIAL_MANS = \
11481150
upscode2.html \
11491151
ve-direct.html \
11501152
victronups.html \
1153+
apcmicrolink.html \
11511154
apcupsd-ups.html
11521155

11531156
if HAVE_LINUX_SERIAL_H

docs/man/apcmicrolink.txt

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
APCMICROLINK(8)
2+
===============
3+
4+
NAME
5+
----
6+
7+
apcmicrolink - Driver for APC Smart-UPS units using the Microlink serial protocol
8+
9+
SYNOPSIS
10+
--------
11+
12+
*apcmicrolink* -h
13+
14+
*apcmicrolink* -a 'UPS_NAME' ['OPTIONS']
15+
16+
NOTE: This man page documents the hardware-specific features of the
17+
*apcmicrolink* driver. For general information about NUT drivers, see
18+
linkman:nutupsdrv[8].
19+
20+
21+
DESCRIPTION
22+
-----------
23+
24+
The *apcmicrolink* driver talks the APC Microlink protocol used by newer
25+
serial-connected Smart-UPS families such as SMT and SMX units with the
26+
Microlink RJ45 serial port.
27+
28+
This driver is currently experimental. It discovers most values from the
29+
device descriptor blob at runtime and maps supported Microlink objects onto
30+
standard NUT variables where possible. Unknown descriptor fields can also be
31+
published for debugging and reverse-engineering.
32+
33+
34+
SUPPORTED HARDWARE
35+
------------------
36+
37+
This driver is intended for APC Smart-UPS models that expose the Microlink
38+
serial protocol, notably SMT and SMX units with the vendor Microlink serial
39+
cable.
40+
41+
Tested support currently targets:
42+
43+
* APC Smart-UPS SMT/SMX Microlink models
44+
45+
Other APC Microlink devices may work if they expose a compatible descriptor
46+
layout.
47+
48+
49+
CONFIGURATION
50+
-------------
51+
52+
The driver is configured via linkman:ups.conf[5].
53+
54+
A minimal configuration:
55+
56+
----
57+
[apc-microlink]
58+
driver = apcmicrolink
59+
port = /dev/ttyUSB0
60+
----
61+
62+
Optional settings
63+
~~~~~~~~~~~~~~~~~
64+
65+
*baudrate*='num'::
66+
Set the serial line speed. The default is `9600`.
67+
68+
*showinternals*='yes|no'::
69+
Publish additional internal Microlink runtime values. By default this follows
70+
the driver debug level and is enabled automatically when debug logging is on.
71+
72+
*showunmapped*='yes|no'::
73+
Publish descriptor values that do not currently map to a standard NUT variable.
74+
By default this follows the driver debug level and is enabled automatically
75+
when debug logging is on.
76+
77+
78+
IMPLEMENTED FEATURES
79+
--------------------
80+
81+
The driver publishes standard identity, status, runtime and outlet-group data
82+
when these objects are present in the Microlink descriptor.
83+
84+
Writable descriptor-backed variables are exposed as read-write NUT variables
85+
when the device reports them as modifiable. Depending on the connected model,
86+
this can include values such as:
87+
88+
* `ups.id`
89+
* `battery.testinterval`
90+
* `outlet.group.N.oncountdown`
91+
* `outlet.group.N.offcountdown`
92+
* `outlet.group.N.stayoffcountdown`
93+
* `outlet.group.N.minimumreturnruntime`
94+
* `outlet.group.N.lowruntimewarning`
95+
96+
Supported instant commands currently include:
97+
98+
* `test.battery.start`
99+
* `test.battery.stop`
100+
* `test.panel.start`
101+
* `test.panel.stop`
102+
103+
Driver-assisted shutdown is not yet implemented.
104+
105+
106+
CABLING
107+
-------
108+
109+
Use the APC Microlink serial cable appropriate for the UPS. USB-to-serial
110+
adapters can work if they present a standard TTY device to the operating
111+
system.
112+
113+
114+
AUTHORS
115+
-------
116+
117+
* Lukas Schmid <lukas.schmid@netcube.li>
118+
119+
120+
SEE ALSO
121+
--------
122+
123+
The core driver
124+
~~~~~~~~~~~~~~~
125+
126+
linkman:nutupsdrv[8], linkman:ups.conf[5]
127+
128+
Internet resources
129+
~~~~~~~~~~~~~~~~~~
130+
131+
The NUT (Network UPS Tools) home page: https://www.networkupstools.org/

docs/nut.dict

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
personal_ws-1.1 en 3734 utf-8
1+
personal_ws-1.1 en 3741 utf-8
22
AAC
33
AAS
44
ABI
@@ -705,6 +705,7 @@ LogMin
705705
LowBatt
706706
Loyer
707707
Luca
708+
Lukas
708709
Luxeon
709710
Lygre
710711
Lynge
@@ -1113,6 +1114,7 @@ RISC
11131114
RK
11141115
RMCARD
11151116
RMCPplus
1117+
RMI
11161118
RMXL
11171119
RNF
11181120
RNG
@@ -1265,6 +1267,7 @@ Salvia
12651267
Santinoli
12661268
Savia
12671269
Sawatzky
1270+
Schmid
12681271
Schmier
12691272
Schoch
12701273
Schonefeld
@@ -1640,6 +1643,7 @@ apc
16401643
apcc
16411644
apcd
16421645
apcevilhack
1646+
apcmicrolink
16431647
apcsmart
16441648
apctest
16451649
apcupsd
@@ -3209,6 +3213,8 @@ sha
32093213
shellcheck
32103214
shellenv
32113215
shm
3216+
showinternals
3217+
showunmapped
32123218
shutdownArguments
32133219
shutdowncmd
32143220
shutdowndelay
@@ -3397,6 +3403,7 @@ tempmax
33973403
tempmin
33983404
termios
33993405
testime
3406+
testinterval
34003407
testtime
34013408
testuser
34023409
testvar

drivers/Makefile.am

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ endif HAVE_LIBREGEX
147147
NUTSW_DRIVERLIST_DUMMY_UPS = dummy-ups$(EXEEXT)
148148
NUTSW_DRIVERLIST = $(NUTSW_DRIVERLIST_DUMMY_UPS) \
149149
clone clone-outlet failover apcupsd-ups skel
150-
SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \
150+
SERIAL_DRIVERLIST = al175 apcmicrolink bcmxcp belkin belkinunv bestfcom \
151151
bestfortress bestuferrups bestups etapro everups \
152152
gamatronic genericups isbmex liebert liebert-esp2 liebert-gxe masterguard metasys \
153153
mge-utalk microdowell microsol-apc mge-shut nutdrv_hashx oneac optiups powercom powervar_cx_ser rhino \
@@ -234,6 +234,7 @@ upsdrvctl_LDADD = libdummy_upsdrvquery.la $(LDADD_COMMON)
234234

235235
# serial drivers: all of them use standard LDADD and CFLAGS
236236
al175_SOURCES = al175.c
237+
apcmicrolink_SOURCES = apcmicrolink.c apcmicrolink-maps.c
237238
apcsmart_SOURCES = apcsmart.c apcsmart_tabs.c
238239
apcsmart_LDADD = $(LDADD_DRIVERS_SERIAL) $(LIBREGEX_LIBS)
239240
apcsmart_old_SOURCES = apcsmart-old.c
@@ -539,7 +540,7 @@ dist_noinst_HEADERS = \
539540
powercom.h powerpanel.h powerp-bin.h powerp-txt.h powervar_cx.h raritan-pdu-mib.h \
540541
safenet.h serial.h sms_ser.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \
541542
upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \
542-
apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \
543+
apcmicrolink-maps.h apcmicrolink.h apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \
543544
delta_ups-mib.h nutdrv_qx.h nutdrv_qx_bestups.h nutdrv_qx_blazer-common.h \
544545
nutdrv_qx_gtec.h nutdrv_qx_innovart31.h nutdrv_qx_innovart33.h nutdrv_qx_innovatae.h \
545546
nutdrv_qx_masterguard.h nutdrv_qx_mecer.h nutdrv_qx_ablerex.h \

0 commit comments

Comments
 (0)