[Nut-upsdev] Liebert ESP II driver

Robert Jobbagy jobbagy.robert at gmail.com
Fri Jul 30 13:55:03 UTC 2010


Sorry but I forget this attachment:

this is the end of debug log file:

 338.634175    send: (6 bytes) => 01 95 02 01 09 a2
 338.710497    read: Interrupted system call
 338.712327    send: (6 bytes) => 01 90 02 01 04 98
 338.738567    read: (8 bytes) => 01 95 04 01 09 01 f4 99
 338.738624    write 30 bytes to socket 6 failed
 338.740555    send: (6 bytes) => 01 94 02 01 01 99
 338.801372    read: checksum error: (8 bytes) => 01 90 04 01 01 01 0e aa
 338.801388    Failed reading bitfield #1
 339.224630    Signal 15: exiting
Network UPS Tools - Liebert ESP-II serial UPS driver 0.03 (2.4.3-2462M)
Warning: This is an experimental driver.
Some features may not function correctly.

maybe this help

2010/7/30 Robert Jobbagy <jobbagy.robert at gmail.com>

>
>
> 2010/7/30 Arjen de Korte <nut+devel at de-korte.org<nut%2Bdevel at de-korte.org>
> >
>
>> Citeren Robert Jobbagy <jobbagy.robert at gmail.com>:
>>
>>  I use nut rev2462 and I put shutdown commands in end of upsdrv_updateinfo
>>> before these calls
>>>
>>> status_commit();
>>>
>>>  dstate_dataok();
>>>
>>
>> Well, in that case you've proven that the shutdown commands are working.
>> The upsdrv_updateinfo() is called every pollinterval seconds (typically 2),
>> so this will pretty much instantly kill the UPS when you start the driver.
>> If you want to do something useful with this command, they should go into
>> upsdrv_shutdown() and/or instcmd().
>>
>
> I tried these commands in  upsdrv_shutdown() but there didnt performed and
> I dont know why?
>
>>
>>  I test manual shutdown commands , If I run upsc
>>> liebert-esp2 at localhostcommand then call upsdrv_updateinfo if I think
>>> it right ?
>>>
>>
>> Not at all. Please do read the developer documentation (all of it) before
>> making a fool of yourself. Most of this is documented in
>> docs/new-drivers.txt, so I strongly suggest you start reading there (but
>> please read *all* documentation before asking for help). It also helps
>> looking at other drivers to see how they deal with shutdown commands. I'm
>> really getting quite annoyed by your ignorance to try to figure out this
>> yourself. I have much better things to do than explain what is already
>> documented.
>>
>>
>>  This is the all modify in this driver.
>>>
>>
>> It helps attaching a diff.
>
>
>
> This is my shutdown function:
>
> void upsdrv_shutdown(void)
> {
>     int ret;
>
>     fprintf(stderr,"SHUTDOWN 1");
>
>     ret = ser_send_buf(upsfd, cmd_UPSShutdown0, SHUTDOWN_CMD_LEN);
>     if (ret < 0) {
>         upsdebug_with_errno(2, "send");
>         return -1;
>     }
>     else if (ret < 6) {
>         upsdebug_hex(2, "send: truncated", cmd_UPSShutdown0, ret);
>         return -1;
>     }
>
>     upsdebug_hex(2, "send", cmd_UPSShutdown0, SHUTDOWN_CMD_LEN);
>
>     fprintf(stderr,"SHUTDOWN 2");
>
>     ret = ser_send_buf(upsfd, cmd_UPSShutdown1, SHUTDOWN_CMD_LEN);
>
>     if (ret < 0) {
>         upsdebug_with_errno(2, "send");
>         return -1;
>     }
>     else if (ret < 6) {
>         upsdebug_hex(2, "send: truncated", cmd_UPSShutdown1, ret);
>         return -1;
>     }
>
>     upsdebug_hex(2, "send", cmd_UPSShutdown1, SHUTDOWN_CMD_LEN);
>
>     fprintf(stderr,"SHUTDOWN 3");
>
>     ret = ser_send_buf(upsfd, cmd_UPSShutdown2, SHUTDOWN_CMD_LEN);
>     if (ret < 0) {
>         upsdebug_with_errno(2, "send");
>         return -1;
>     }
>     else if (ret < 8) {
>         upsdebug_hex(2, "send: truncated", cmd_UPSShutdown2, ret);
>         return -1;
>     }
>
>     upsdebug_hex(2, "send", cmd_UPSShutdown2, SHUTDOWN_CMD_LEN);
>
> }
>
> These commands works other way , but in this function didnt work
>
> And I cant found the "SHUTDOWN 1,2,3" test texts in debug.log, so I think
> dont sent these commands to UPS.
>
> Do you have any idea what's wrong?
>
> Thanks your help and your time.
>
>
>>
>> Best regards, Arjen
>> --
>> Please keep list traffic on the list
>>
>>
>> _______________________________________________
>> Nut-upsdev mailing list
>> Nut-upsdev at lists.alioth.debian.org
>> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
>>
>
>
>
> --
> Best Regards,
>
> Robert
>



-- 
Best Regards,

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20100730/460c0bab/attachment.htm>


More information about the Nut-upsdev mailing list