[Nut-upsdev] Masterguard/Phoenixtec USB driver

Edgar Fuß ef at math.uni-bonn.de
Mon Feb 26 22:20:55 CET 2007


> Can you post the driver here, even if it is not completely ready?
See attachements (it's split into several files).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data.c
Type: application/octet-stream
Size: 8204 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/data-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data.h
Type: application/octet-stream
Size: 2841 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/data-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: driver.c
Type: application/octet-stream
Size: 12190 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/driver-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io.c
Type: application/octet-stream
Size: 2596 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/io-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io.h
Type: application/octet-stream
Size: 260 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/io-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb_dummy.c
Type: application/octet-stream
Size: 401 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/usb_dummy-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb_netbsd.c
Type: application/octet-stream
Size: 3270 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/usb_netbsd-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb.h
Type: application/octet-stream
Size: 270 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070226/6fa44e0c/usb-0001.obj
-------------- next part --------------
io.c handles opening/probing USB (and eventually serial ports),  
sending command strings and receiving reply strings.
data.c dissects various reply strings (in particular WH and Q3).
usb_netbsd.c hadles USB I/O on NetBSD.
usb_dummy.c makes the project compile and link on a non-NetBSD system.
driver.c is the actual NUT driver.

> Yes, input.frequency.low/high. See 'docs/new-names.txt'.
OK, I incorporated all the new variables I could support. Due to  
extremly kind people at Masterguard providing me with detailed  
documentation on the phone, I also added a few more features like  
setting the output voltage and disabling the buzzer (both untested at  
the moment). I also corrected the use of the various delay values.

A few more questions arose in the meantime:

I can disable the buzzer, but I cant't tell (I think) whether it's  
currently buzzing or not. What shall I put into ups.beeper.status if  
it's not disabled? If I disabled it, I guess I have to put "muted"  
into the var? Or should it only say "muted" if it would be making a  
noise if not disabled?

One of the status flags can inform me of an internal UPS error. Any  
means of propagating that?

I also have a "test in progress" flag. Should I set CAL for that.

Last, there's a "shutdown in progress" flag. Any place for that one?


More information about the Nut-upsdev mailing list