On Aug 13, 2008, at 10:14 AM, Jon Bougher wrote:

send_cmd(msg_len=2, type='B')
send_cmd: sending  3a 42 bd 0d 00 00 00 00 '.B......'
send_cmd: received 53 31 34 30 31 00 30 0d 'S1401.0.' (bad)
send_cmd: send_try = 3, recv_try = 10

Error reading B value: Device detached? (error 0: No error)


What if you increase MAX_SEND_TRIES? Under normal operation, this should not slow things down, but increasing it to 5, 10 or 20 might help if the UPS is busy and can't respond immediately.

I think remember where the "error 0" part came from. The USB-to- serial converter always returns 8 bytes if it can, but those bytes may be stale (see above - we sent the 'B' command, but got the leftover 'S' status result).

Arjen had some suggestions about how to rework the reconnection scheme, and based on the error above, it's not going to be simple.

--
Charles Lepple
[EMAIL PROTECTED]



_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to