Christian Monkman
2007-Mar-10 06:15 UTC
[Nut-upsdev] Belkin F6C900-UNV and the megatec driver
Greetings! Thanks to all the developers who have made this project so far. Searching for a Linux based Belkin UPS monitor led me straight to the Network UPS Tools. I have bought a Belkin F6C900-UNV (900VA) for use on a Slackware 10.2 server to replace an older APC model that died suddenly. So far I have successfully managed to get NUT 2.0.5 compiled and configured and found that this Belkin product uses the Megatec protocol over RS-232. The three daemons, megatec, upsd, and upsmon, start up properly, and using /usr/local/ups/bin/upsc will show the UPS voltage levels, load, etc, correctly. The problem I am having is that the monitor never changes from OL to OB when I tried testing pulling the plug from the wall. Output from the NUT programs looks like this when connected to utility power: root@myhost:~# /usr/local/ups/bin/upsc Belkin900@localhost battery.charge: 100.0 battery.voltage: 27.60 battery.voltage.nominal: 24.0 driver.name: megatec driver.parameter.port: /dev/ttyS0 driver.version: 2.0.5 driver.version.internal: 1.5 input.frequency: 59.9 input.voltage: 122.5 input.voltage.fault: 122.8 output.voltage: 122.5 output.voltage.nominal: 120.0 ups.beeper.status: disabled ups.delay.shutdown: 0 ups.delay.start: 2 ups.load: 7.0 ups.mfr: unknown ups.model: unknown ups.serial: unknown ups.status: OL ups.temperature: 0.0 When disconnected from the wall I get this: root@myhost:~# /usr/local/ups/bin/upsc Belkin900@localhost battery.charge: 98.2 battery.voltage: 26.50 battery.voltage.nominal: 24.0 driver.name: megatec driver.parameter.port: /dev/ttyS0 driver.version: 2.0.5 driver.version.internal: 1.5 input.frequency: 59.9 input.voltage: 122.5 input.voltage.fault: 122.8 output.voltage: 122.5 output.voltage.nominal: 120.0 ups.beeper.status: disabled ups.delay.shutdown: 0 ups.delay.start: 2 ups.load: 8.0 ups.mfr: unknown ups.model: unknown ups.serial: unknown ups.status: OL ups.temperature: 0.0 Using Minicom on the serial port the UPS is connected to set to 2400-8-N-1 and sending the characters Q1<cr> produces this output when utility is connected: (122.5 122.8 122.5 007 59.9 27.6 N/.A 00001001 And this output immediately after the unit is unplugged from the wall: (122.5 122.8 122.5 008 59.9 27.4 N/.A 10001001 Sending the characters F<cr> produces this: #120.0 006 24.00 60.0 Sending T<cr> makes the UPS test for 10 seconds. Sending T01 or T1 doesn't seem to work, the UPS echoes it back. Sending I<cr> doesn't produce any output, but doesn't echo back "I" either. Sending D<cr> echoes D back. I have not tried sending S yet. During the 10 second test, a Q1 returns this: (122.8 122.8 122.8 009 59.9 27.5 N/.A 00001101 I think the stumbling block I have run into is that this UPS sends the characters "N/.A" where the temperature digits are expected, and the driver doesn't see the 8 status bits that follow. I wish I was more of a programmer to be able to solve this and send in a patch to help anybody else who wants to monitor a F6C900-UNV. If this issue has been solved in a testing release, my apologies, I checked the ChangeLog but did not see it. If I can be of any more help with providing output from the UPS' serial port please let me know. Thanks in advance for any advice or help, Christian
Carlos Rodrigues
2007-Mar-10 20:50 UTC
[Nut-upsdev] Belkin F6C900-UNV and the megatec driver
On 3/10/07, Carlos Rodrigues <carlos.efr@mail.telepac.pt> wrote:> That's a violation to the megatec protocol, and that seems to be the > cause of the problem. > > I've added a fix in the development version of NUT, you can pullit > from directly fro NUT's SVN repository.BTW, you can drop "megatec.c" and "megatec.h" from the trunk into your 2.0.5 sources, it should work as well. -- Carlos Rodrigues
Carlos Rodrigues
2007-Mar-11 04:29 UTC
[Nut-upsdev] Belkin F6C900-UNV and the megatec driver
On 3/10/07, Christian Monkman <c.b.monkman@gmail.com> wrote:> Using Minicom on the serial port the UPS is connected to set to > 2400-8-N-1 and sending the characters Q1<cr> produces this output when > utility is connected: > (122.5 122.8 122.5 007 59.9 27.6 N/.A 00001001 > > And this output immediately after the unit is unplugged from the wall: > (122.5 122.8 122.5 008 59.9 27.4 N/.A 10001001 > > During the 10 second test, a Q1 returns this: > (122.8 122.8 122.8 009 59.9 27.5 N/.A 00001101 > > I think the stumbling block I have run into is that this UPS sends the > characters "N/.A" where the temperature digits are expected, and the > driver doesn't see the 8 status bits that follow.That's a violation to the megatec protocol, and that seems to be the cause of the problem. I've added a fix in the development version of NUT, you can pullit from directly fro NUT's SVN repository. -- Carlos Rodrigues