[Nut-upsuser] Cyberpower/powerpanel error: Data stale

Seann Clark nombrandue at tsukinokage.net
Tue Oct 28 16:39:25 UTC 2008


Arjen de Korte wrote:
> Citeren Seann Clark <nombrandue at tsukinokage.net>:
>
>> This output is after everything has been shut down and all NUT 
>> related items killed out of memory after a init script being run to 
>> stop the main items. The output of the debug is:
>> debug level is '3'
>> Trying binary protocol...
>> read: (20 bytes) => 2e 4f 50 31 35 30 30 20 20 20 20 2e 78 2e 3c 2e 
>> 35 31
>> 30 30
>> CyberPower UPS with binary protocol on /dev/ttyS0 detected
>
> The autodetection for the protocol works at least, it is reporting an 
> OP1500 model.
>
>> send: (3 bytes) => 52 02 0d
>> read: (2 bytes) => 52 00
>> send: (3 bytes) => 52 04 0d
>> read: (2 bytes) => 52 00
>> send: (3 bytes) => 52 08 0d
>> read: (2 bytes) => 52 00
>> send: (3 bytes) => 52 18 0d
>> read: (2 bytes) => 52 00
>
> Here a couple of settings from the UPS are read. It is using the table 
> for the OP series, so this is correct too.
>
>> send: (2 bytes) => 44 0d
>> read: (14 bytes) => 23 7d 00 22 2e d6 80 b1 2e 09 f6 00 ff 0d
>> dstate_init: sock /var/run/nut/powerpanel-cyberpower-ups open on fd 6
>> send: (2 bytes) => 44 0d
>> read: (14 bytes) => 23 7c 00 21 2e d6 7f b1 2e 09 f6 00 ff 0d
>> send: (2 bytes) => 44 0d
>> read: (14 bytes) => 23 7d 00 22 2e d6 80 b1 2e 09 f6 00 ff 0d
>> send: (2 bytes) => 44 0d
>> read: (14 bytes) => 23 7d 00 22 2e d6 80 b2 2e 09 f6 00 ff 0d
>
> We succeeded to poll for the status four times in a row (without 
> retries), so the communication is fine so far.
>
>> send: (2 bytes) => 44 0d
>> read: timed out
>> Communications with UPS lost: Status read failed!
>
> ...but here the problems start.
>
> It looks like we suddenly have developed a communication problem here, 
> the UPS doesn't want to talk/listen to us anymore. Usually this has to 
> do with the cable power for the UPS. Currently, the 'powerpanel' 
> driver clears RTS and sets DTR. I noticed that both the 'cyberpower' 
> and 'nitram' drivers set both. Could you try if changing line 93 in 
> powerpanel.c to
>
>     ser_set_rts(upsfd, 1);
>
> fixes the problem? I suspect that clearing RTS might be a mistake here.
>
> Best regards, Arjen
> --Please keep list traffic on the list
After compiling the modified driver I am seeing this:

Tue Oct 28-11:33:30-root at haruhi:drivers> ./powerpanel -DDD -u nut -a 
cyberpower-ups
Network UPS Tools -  CyberPower text/binary protocol UPS driver 0.23 (2.2.2)
Warning: This is an experimental driver.
Some features may not function correctly.

debug level is '3'
Trying binary protocol...
read: (4 bytes) => 2e 09 f6 ff
Expected 20 bytes but only got 4
read: (20 bytes) => 2e 4f 50 31 35 30 30 20 20 20 20 2e 78 2e 3c 2e 35 31
 30 30
CyberPower UPS with binary protocol on /dev/ttyS0 detected
send: (3 bytes) => 52 02 0d
read: (2 bytes) => 52 00
send: (3 bytes) => 52 04 0d
read: (2 bytes) => 52 00
send: (3 bytes) => 52 08 0d
read: (2 bytes) => 52 00
send: (3 bytes) => 52 18 0d
read: (2 bytes) => 52 00
send: (2 bytes) => 44 0d
read: (14 bytes) => 23 7e 00 21 2e d6 80 b2 2e 09 f6 00 ff 0d
dstate_init: sock /var/state/ups/powerpanel-cyberpower-ups open on fd 6
send: (2 bytes) => 44 0d
read: (14 bytes) => 23 7e 00 22 2e d6 80 b2 2e 09 f6 00 ff 0d
send: (2 bytes) => 44 0d
read: (14 bytes) => 23 7c 00 22 2e d6 7f b2 2e 09 f6 00 ff 0d
send: (2 bytes) => 44 0d
read: (14 bytes) => 23 7b 00 22 2e d6 80 b2 2e 09 f6 00 ff 0d
send: (2 bytes) => 44 0d
read: (14 bytes) => 23 7e 00 22 2e d6 80 b2 2e 09 f6 00 ff 0d
send: (2 bytes) => 44 0d
read: (14 bytes) => 23 7c 00 21 2e d6 81 b2 2e 09 f6 00 ff 0d
send: (2 bytes) => 44 0d
read: (14 bytes) => 23 7d 00 22 2e d6 80 b2 2e 09 f6 00 ff 0d
send: (2 bytes) => 44 0d
read: timed out
Communications with UPS lost: Status read failed!
send: (2 bytes) => 44 0d
read: timed out
Communications with UPS lost: Status read failed!
send: (2 bytes) => 44 0d
read: timed out
Communications with UPS lost: Status read failed!
send: (2 bytes) => 44 0d
read: timed out
Communications with UPS lost: Status read failed!
send: (2 bytes) => 44 0d
read: timed out
Communications with UPS lost: Status read failed!
^CSignal 2: exiting

So that didn't fix the issue, but judging from your statements, related 
to it, it wasn't expected to really solve it, more just to change it to 
be more like the old driver that 'works'. It looks like it got a few 
more reads into that though before failing on the status.


Regards,
Seann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5614 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20081028/c00b80c4/attachment-0001.bin 


More information about the Nut-upsuser mailing list