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

Arjen de Korte nut+users at de-korte.org
Thu Oct 30 20:19:27 UTC 2008


Citeren Kjell Claesson <kjell.claesson at epost.tidanet.se>:

[ crossposting to nut-upsdev ]

> Hm, maybe I'm wrong this time too. The answer is about 120 mS and the delay
> for answer in the read-buf is 250 mS, then a respond delay (sleep) of 200 mS.
>
> So 250-120=130+200=330 mS
>
> So the ups have about 330 mS to respond. This should be more than enough,
> but I have seen slower equipment.

Actually, it is even longer. :-)

The delay after the last character is written to the serial port is  
50ms. After that the driver sleeps for 200ms. When it wakes up again,  
within 250ms there must be something available for reading (not  
necessarily the full status, a single character would be sufficient).

Sending one character to the UPS takes about 8ms, so the UPS has close  
to half a second for the first character of the reply. After reception  
of the first character, each subsequent read is subject to a new  
timeout of 250ms. Theoretically this means that it may take up to 100  
+ 200 + 14 x 250 = 3.8 seconds for a status poll in this driver.

Nevertheless, I think it would be worthwhile to make a difference  
between real timeouts (where we don't get any reply at all) and  
failure to read full replies (which could also be due to receiver  
overruns). I will check the compatibility of such a change with the  
existing drivers before making this change.

Best regards, Arjen
-- 
Please keep list traffic on the list



More information about the Nut-upsdev mailing list