[Nut-upsuser] N-Power MEV-3000LT compatibility report and problem

Александр Безруков phmagic at mail.ru
Sun Aug 11 22:09:27 UTC 2013


> What do you get from the "I" command?

A string of 8 spaces.

>> So I believe the compatibility list deserves two new lines.
>Probably best to delay adding this to the HCL until we can get the driver to shut down the UPS properly.

I debugged the problem. From the source, drivers/blazer.c:418

                 * If a command is invalid, it will be echoed back
                if (blazer_command(buf, buf, sizeof(buf)) > 0) {
                        upslogx(LOG_ERR, "instcmd: command [%s] failed", cmdname);
                        return STAT_INSTCMD_FAILED;

I see the following differences from the protocol implemented in the driver.

1. Instead of echoing back the command on failure, the UPS does the following:
 a. Returns " \r" (space, then CR) if the command was not recognized.
    This is where echo is expected.
 b. Returns "NAK\r" in the case where command was recognized but failed. By the
    way, according to my records my old Ippon behaved the same way.
 c. Returns "ACK\r" on success.

2. It doesn't support the Q (toggle quiet) command, it always returns "NAK\r"

3. On Q1, it doesn't reset the second number (the voltage when failure last sensed).
Probably it does once the voltage is normal again but I live in a place where it is never
normal, otherwise I were not be using such an expensive UPS, so I don't have a
practical way to check this.

For my UPS, the existing code misinterpret any "ACK\r" response as failure
(the blazer_command() function normally returns the number of octets received). And the
 calling function doesn't attempt to continue, drivers/blazer.c:777

void upsdrv_shutdown(void)
        int     retry;

        for (retry = 1; retry <= MAXTRIES; retry++) {

                if (blazer_instcmd("shutdown.stop", NULL) != STAT_INSTCMD_HANDLED) {

                if (blazer_instcmd("shutdown.return", NULL) != STAT_INSTCMD_HANDLED) {

                fatalx(EXIT_SUCCESS, "Shutting down in %d seconds", offdelay);

        fatalx(EXIT_FAILURE, "Shutdown failed!");

In order to support this flavor of protocol, a response "ACK" to a command should be considered


More information about the Nut-upsuser mailing list