Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bicker serial driver #2448

Merged
merged 23 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a56281b
bicker_ser: Bicker UPSes based on PSZ-1063
ntd May 16, 2024
021472d
bicker_ser: add shutdown support
ntd May 17, 2024
3ae6b50
data/driver.list.in: add bicker_ser based UPSes
ntd May 17, 2024
0b53475
bicker_ser: add big-endian platform support
ntd May 17, 2024
6538f2f
bicker_ser: use length macros to increase expressiveness
ntd May 17, 2024
67ffe25
bicker_ser: add manpage
ntd May 17, 2024
ffd42d1
NEWS.adoc: announce bicker_ser driver [#2318]
ntd May 18, 2024
d5e7ce5
bicker_ser: update protocol documentation
ntd May 21, 2024
162e39e
bicker_ser: explicitly pass the command index
ntd May 21, 2024
8abde1a
bicker_ser: refactor to allow more complex packet handling
ntd May 21, 2024
eaddb34
bicker_ser: add more state variables
ntd May 21, 2024
c659e31
bicker_ser: use variable for low battery limit
ntd May 21, 2024
a4c3767
bicker_ser: add parameter support
ntd May 21, 2024
ee71353
bicker_ser: differentiate between error and unsupported
ntd May 22, 2024
c9fed62
bicker_ser: fix string dstate setting
ntd May 22, 2024
c9ba796
bicker_ser: fix alignment and endianness problems
ntd May 22, 2024
beb26a6
bicker_ser: cosmetic fixes
ntd May 22, 2024
0c80ece
bicker_ser: use uint8_t for bytes instead of char
ntd May 22, 2024
4a33b3a
bicker_ser: use proper format modifiers in logs
ntd May 22, 2024
c78524c
bicker_ser: refactor to clarify packet manipulation
ntd May 22, 2024
27bdc87
bicker_ser: make parameter handling less error prone
ntd May 23, 2024
fca9957
bicker_ser: add sanity checks to bicker_set
ntd May 23, 2024
4cbe12d
bicker_ser: expose mappable parameters
ntd May 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ https://github.com/networkupstools/nut/milestone/11
respective warnings issued by the new generations of analysis tools.
[#823, #2437, link:https://github.com/networkupstools/nut-website/issues/52[nut-website issue #52]]

- bicker_ser: added new driver for Bicker 12/24Vdc UPS via RS-232 serial
Copy link
Member

@jimklimov jimklimov May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity: This mixed casing of Vac scratched my eye a bit - I'm used to seeing acronyms as upper-cased. But lower-case ac/dc seem to be the modern IEEE recommendation, according to internet discussions of many others whose eyes this has also got irritated :)

Copy link
Contributor Author

@ntd ntd May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copy&pasted the adelsystem_cbi announcement, that seems the closer one to the bicker_ser description.

But now the protocol is based on the UPS-Gen² software user manual so, according to that manual, more UPSes are supported (even USB one):

image

Copy link
Contributor Author

@ntd ntd May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the end I think that description is at least incomplete. We'll see if Bicker has anything to say about that.

communication protocol, which supports any UPS shipped with the PSZ-1053
extension module. [PR #2448]


Release notes for NUT 2.8.2 - what's new since 2.8.1
----------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions data/driver.list.in
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@
"Best Power" "ups" "1" "Micro-Ferrups" "" "bestuferrups"
"Best Power" "ups" "1" "Fortress/Ferrups" "f-command support" "bestfcom"

"Bicker" "ups" "3" "UPSIC-1205" "" "bicker_ser"
"Bicker" "ups" "3" "UPSIC-2403" "" "bicker_ser"
"Bicker" "ups" "3" "DC2412-UPS" "" "bicker_ser"
"Bicker" "ups" "3" "DC2412-UPS-LD" "" "bicker_ser"

"Borri" "ups" "2" "B400-010-B/B400-020-B/B400-030-B/B400-010-C/B400-020-C/B400-030-C" "USB" "blazer_usb"
"Borri" "ups" "2" "B400-R010-B/B400-R020-B/B400-R030-B/B400-R010-C/B400-R020-C/B400-R030-C" "USB" "blazer_usb"
"Borri" "ups" "2" "B500-060-B/B500-100-B/B500-060-C/B500-100-C" "USB" "blazer_usb"
Expand Down
3 changes: 3 additions & 0 deletions docs/man/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ SRC_SERIAL_PAGES = \
bestuferrups.txt \
bestups.txt \
bestfcom.txt \
bicker_ser.txt \
blazer-common.txt \
blazer_ser.txt \
clone.txt \
Expand Down Expand Up @@ -477,6 +478,7 @@ MAN_SERIAL_PAGES = \
bestuferrups.8 \
bestups.8 \
bestfcom.8 \
bicker_ser.8 \
blazer_ser.8 \
clone.8 \
dummy-ups.8 \
Expand Down Expand Up @@ -526,6 +528,7 @@ HTML_SERIAL_MANS = \
bestuferrups.html \
bestups.html \
bestfcom.html \
bicker_ser.html \
blazer_ser.html \
clone.html \
dummy-ups.html \
Expand Down
66 changes: 66 additions & 0 deletions docs/man/bicker_ser.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
BICKER_SER(8)
=============

NAME
----

bicker_ser - Driver for Bicker DC UPS via serial port connections

SYNOPSIS
--------

*bicker_ser* -h

*bicker_ser* -a 'UPS_NAME' ['OPTIONS']

NOTE: This man page only documents the hardware-specific features of the
*bicker_ser* driver. For information about the core driver, see
linkman:nutupsdrv[8].

SUPPORTED HARDWARE
------------------

*bicker_ser* supports all Bicker UPSes shipped with the PSZ-1053 extension
module such as UPSIC-1205, UPSIC-2403, DC2412-UPS and DC2412-UPS-LD.

CABLING
-------

The needed cable is a standard pin-to-pin serial cable with pins 2, 3 and 5
(on DB9 connector) connected.

EXTRA ARGUMENTS
---------------

This driver supports no extra arguments from linkman:ups.conf[5].

INSTANT COMMANDS
----------------

*shutdown.return*::
Turn off the load and return when power is back.

KNOWN ISSUES AND BUGS
---------------------

*ups.delay.shutdown is not honored*::
Although that delay is properly set when sending the shutdown command, it seems
some UPS ignore it and use a fixed 2 seconds delay instead.

AUTHOR
------

Nicola Fontana <[email protected]>

SEE ALSO
--------

The core driver:
~~~~~~~~~~~~~~~~

linkman:nutupsdrv[8]

Internet resources:
~~~~~~~~~~~~~~~~~~~

The NUT (Network UPS Tools) home page: https://www.networkupstools.org/
5 changes: 4 additions & 1 deletion docs/nut.dict
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
personal_ws-1.1 en 3149 utf-8
personal_ws-1.1 en 3151 utf-8
AAC
AAS
ABI
Expand Down Expand Up @@ -373,6 +373,7 @@ Fideltronik
Filipozzi
Fiskars
FlossMetrics
Fontana
Forza
Fosshost
Frama
Expand Down Expand Up @@ -858,6 +859,7 @@ PSSENTR
PSUs
PSW
PSX
PSZ
PThreads
PULS
PV
Expand Down Expand Up @@ -1245,6 +1247,7 @@ UPS's
UPSCONN
UPSDESC
UPSHOST
UPSIC
UPSIMAGEPATH
UPSLC
UPSNOTIFY
Expand Down
4 changes: 3 additions & 1 deletion drivers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \
gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \
mge-utalk microdowell microsol-apc mge-shut oneac optiups powercom rhino \
safenet nutdrv_siemens-sitop solis tripplite tripplitesu upscode2 victronups powerpanel \
blazer_ser ivtscd apcsmart apcsmart-old riello_ser sms_ser
blazer_ser ivtscd apcsmart apcsmart-old riello_ser sms_ser bicker_ser
SNMP_DRIVERLIST = snmp-ups
USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \
blazer_usb richcomm_usb riello_usb \
Expand Down Expand Up @@ -186,6 +186,8 @@ riello_ser_SOURCES = riello.c riello_ser.c
riello_ser_LDADD = $(LDADD) -lm
sms_ser_SOURCES = sms_ser.c
sms_ser_LDADD = $(LDADD) -lm
bicker_ser_SOURCES = bicker_ser.c
bicker_ser_LDADD = $(LDADD) -lm

# non-serial drivers: these use custom LDADD and/or CFLAGS

Expand Down
Loading
Loading