[Nut-upsdev] bestfortress driver establishes/loses/establishes communication and so on...

Stuart D. Gathman stuart at bmsi.com
Tue Jan 31 21:32:32 UTC 2012

Long ago, Nostradamus foresaw that on Jan 31, Arnaud Quette would write:

>> Obviously the length of communication varies between 42 and 59 bytes, but it
>> is always the sixth that goes wrong...
> sadly, I only see 1 valid answer (highlighted above)
> all other requests get corrupted answers.
> AFAICT (I'm not the driver author, nor have any specific knowledge in
> this protocol):
> "upsdrv_updateinfo: received XX bytes" messages are within the same update loop.
> we are asking the device to send (again) the same frame, probably
> because of checksum errors.
> after 5 unsuccessful attempts, we log the "checksum corruption" message.

>> Btw, what about RS232 handshake? On Windows, COM1: to which the Fortress
>> is attached, is set to 9600 8N1, I see no way to tell the bestfortress
>> driver how to set handshake.

You are correct, this is not the occasional errors I get.

There is no handshake.  The record length is 80 bytes.  The UPS does not
send the 80 byte record until you ask it to.  So you just need a buffer with 81 bytes for the data.  The COM/serial driver is returning too soon, and doesn't
have a big enough buffer.

 	      Stuart D. Gathman <stuart at bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

More information about the Nut-upsdev mailing list