Sorry but I forget this attachment:<br><br>this is the end of debug log file:<br><br> 338.634175    send: (6 bytes) =&gt; 01 95 02 01 09 a2<br> 338.710497    read: Interrupted system call<br> 338.712327    send: (6 bytes) =&gt; 01 90 02 01 04 98<br>
 338.738567    read: (8 bytes) =&gt; 01 95 04 01 09 01 f4 99<br> 338.738624    write 30 bytes to socket 6 failed<br> 338.740555    send: (6 bytes) =&gt; 01 94 02 01 01 99<br> 338.801372    read: checksum error: (8 bytes) =&gt; 01 90 04 01 01 01 0e aa<br>
 338.801388    Failed reading bitfield #1<br> 339.224630    Signal 15: exiting<br>Network UPS Tools - Liebert ESP-II serial UPS driver 0.03 (2.4.3-2462M)<br>Warning: This is an experimental driver.<br>Some features may not function correctly.<br>
<br>maybe this help<br><br><div class="gmail_quote">2010/7/30 Robert Jobbagy <span dir="ltr">&lt;<a href="mailto:jobbagy.robert@gmail.com">jobbagy.robert@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><br><div class="gmail_quote"><div class="im">2010/7/30 Arjen de Korte <span dir="ltr">&lt;<a href="mailto:nut%2Bdevel@de-korte.org" target="_blank">nut+devel@de-korte.org</a>&gt;</span><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div>Citeren Robert Jobbagy &lt;<a href="mailto:jobbagy.robert@gmail.com" target="_blank">jobbagy.robert@gmail.com</a>&gt;:<br>
<br>
</div><div class="im"><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I use nut rev2462 and I put shutdown commands in end of upsdrv_updateinfo<br>
before these calls<br>
<br>
status_commit();<br>
<br>
 dstate_dataok();<br>
</blockquote>
<br></div>
Well, in that case you&#39;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().<br>

</div></blockquote><div><br>I tried these commands in  upsdrv_shutdown() but there didnt performed and I dont know why?<br></div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>
I test manual shutdown commands , If I run upsc<br></div>
liebert-esp2@localhostcommand then call upsdrv_updateinfo if I think<br>
it right ?<br>
</blockquote>
<br>
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&#39;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.<div>

<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
This is the all modify in this driver.<br>
</blockquote>
<br></div>
It helps attaching a diff.</blockquote></div><div><br><br>This is my shutdown function:<br><br>void upsdrv_shutdown(void)<br>{<br>    int ret;<br><br>    fprintf(stderr,&quot;SHUTDOWN 1&quot;);<br><br>    ret = ser_send_buf(upsfd, cmd_UPSShutdown0, SHUTDOWN_CMD_LEN);<br>

    if (ret &lt; 0) {<br>        upsdebug_with_errno(2, &quot;send&quot;);<br>        return -1;<br>    }<br>    else if (ret &lt; 6) {<br>        upsdebug_hex(2, &quot;send: truncated&quot;, cmd_UPSShutdown0, ret);<br>        return -1;<br>

    }<br><br>    upsdebug_hex(2, &quot;send&quot;, cmd_UPSShutdown0, SHUTDOWN_CMD_LEN);<br><br>    fprintf(stderr,&quot;SHUTDOWN 2&quot;);<br><br>    ret = ser_send_buf(upsfd, cmd_UPSShutdown1, SHUTDOWN_CMD_LEN);<br><br>
    if (ret &lt; 0) {<br>
        upsdebug_with_errno(2, &quot;send&quot;);<br>        return -1;<br>    }<br>    else if (ret &lt; 6) {<br>        upsdebug_hex(2, &quot;send: truncated&quot;, cmd_UPSShutdown1, ret);<br>        return -1;<br>    }<br>

<br>    upsdebug_hex(2, &quot;send&quot;, cmd_UPSShutdown1, SHUTDOWN_CMD_LEN);<br><br>    fprintf(stderr,&quot;SHUTDOWN 3&quot;);<br><br>    ret = ser_send_buf(upsfd, cmd_UPSShutdown2, SHUTDOWN_CMD_LEN);<br>    if (ret &lt; 0) {<br>

        upsdebug_with_errno(2, &quot;send&quot;);<br>        return -1;<br>    }<br>    else if (ret &lt; 8) {<br>        upsdebug_hex(2, &quot;send: truncated&quot;, cmd_UPSShutdown2, ret);<br>        return -1;<br>    }<br>

<br>    upsdebug_hex(2, &quot;send&quot;, cmd_UPSShutdown2, SHUTDOWN_CMD_LEN);<br>    <br>}<br><br>These commands works other way , but in this function didnt work <br><br>And I cant found the &quot;SHUTDOWN 1,2,3&quot; test texts in debug.log, so I think dont sent these commands to UPS.<br>

<br>Do you have any idea what&#39;s wrong?<br><br>Thanks your help and your time.<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div><br>
<br>
Best regards, Arjen<br>
-- <br>
Please keep list traffic on the list<br>
<br>
<br>
_______________________________________________<br>
Nut-upsdev mailing list<br>
<a href="mailto:Nut-upsdev@lists.alioth.debian.org" target="_blank">Nut-upsdev@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev</a><br>
</div></div></blockquote></div></div><br><br clear="all"><br>-- <br>Best Regards,<br><font color="#888888"><br>Robert <br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br><br>Robert <br>