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

Oliver Kluge ok23 at kluge-digital.de
Mon Jan 30 00:26:34 UTC 2012


[Hopefully this comes through. All of today lists.alioth.debian.org was 
down. It could be pinged, but would not answer HTTP requests]

Hi,

Stuart D Gathman wrote:

> You also need to install:
> autogen-libopts
> autogen
> autoconf
> automake
> libtool
>
> and of course gcc

Automake and gcc were already present. With the exception of 1 warning 
everything went through.

The output of -DDDDD is as follows:

    0.000000	debug level is '5'
    0.000638	send_to_all: SETINFO device.type "ups"
    0.000656	send_to_all: SETINFO driver.version "2.6.3-3411M"
    0.000666	send_to_all: SETINFO driver.version.internal "0.03"
    0.000677	send_to_all: SETINFO driver.name "bestfortress"
    0.000687	send_to_all: SETINFO ups.mfr "Best Power"
    0.000697	send_to_all: SETINFO ups.model "Fortress"
    0.000707	send_to_all: SETINFO battery.voltage.nominal "24"
    0.000721	send_to_all: SETINFO ups.load "0"
    0.000732	send_to_all: SETINFO output.voltamps "0"
    0.000742	send_to_all: SETINFO ups.delay.shutdown "10"
    0.000754	send_to_all: SETINFO input.transfer.low ""
    0.000764	send_to_all: SETFLAGS input.transfer.low RW STRING
    0.000776	send_to_all: SETAUX input.transfer.low 3
    0.000786	send_to_all: SETINFO input.transfer.high ""
    0.000796	send_to_all: SETFLAGS input.transfer.high RW STRING
    0.000806	send_to_all: SETAUX input.transfer.high 3
    0.000815	send_to_all: SETINFO battery.runtime.low ""
    0.000824	send_to_all: SETFLAGS battery.runtime.low RW STRING
    0.000834	send_to_all: SETAUX battery.runtime.low 3
    0.000844	send_to_all: ADDCMD shutdown.return
    0.000852	send_to_all: ADDCMD load.off
    0.000861	upsdrv_updateinfo
    0.227318	upsdrv_updateinfo: received 51 bytes
    2.428072	upsdrv_updateinfo: received 42 bytes
    4.628889	upsdrv_updateinfo: received 61 bytes
    6.829581	upsdrv_updateinfo: received 48 bytes
    9.030489	upsdrv_updateinfo: received 59 bytes
   11.030674	checksum corruption
   11.030715	buffer: (59 bytes) => 30 30 30 30 30 30 32 32 35 30 32 32 
34 30 30 30 30 30
   11.030729	 30 30 32 30 30 30 30 34 35 30 30 30 30 30 32 36 37 35 30 
30 30 30 30 39 39
   11.030740	 30 30 32 37 30 30 30 30 30 30 30 30 30 33 30 30
   11.030808	dstate_init: sock /var/run/nut/bestfortress-fortress open 
on fd 5
   11.030824	send_to_all: SETINFO driver.parameter.pollinterval "2"
   11.030835	send_to_all: SETINFO device.mfr "Best Power"
   11.030847	send_to_all: SETINFO device.model "Fortress"
   11.030857	upsdrv_updateinfo
   11.231386	upsdrv_updateinfo: received 48 bytes
   13.432184	upsdrv_updateinfo: received 41 bytes
   15.633091	upsdrv_updateinfo: received 48 bytes
   17.833950	upsdrv_updateinfo: received 42 bytes
   20.034923	upsdrv_updateinfo: received 55 bytes
   22.035114	checksum corruption
   22.035154	buffer: (55 bytes) => 30 30 32 32 35 30 32 32 34 30 30 30 
30 30 30 30 31 30
   22.035168	 30 30 30 32 32 30 30 30 30 30 32 36 37 35 30 30 30 30 30 
39 39 30 30 32 37
   22.035178	 30 30 30 30 30 30 30 30 30 33 30 30
   22.035209	new connection on fd 6
   22.035220	upsdrv_updateinfo
   22.235757	upsdrv_updateinfo: received 61 bytes
   24.436617	upsdrv_updateinfo: received 49 bytes
   26.637461	upsdrv_updateinfo: received 43 bytes
   28.838359	upsdrv_updateinfo: received 42 bytes
   31.039288	upsdrv_updateinfo: received 47 bytes
   33.039465	checksum corruption
   33.039509	buffer: (47 bytes) => 30 30 30 30 30 30 30 30 32 30 30 30 
30 34 35 30 30 30
   33.039524	 30 30 32 36 37 35 30 30 30 30 30 39 39 30 30 32 37 30 30 
30 30 30 30 30 30
   33.039535	 30 33 30 30
   33.039562	send_to_one: DATASTALE
   33.039578	send_to_one: SETINFO battery.runtime.low ""
   33.039602	send_to_one: SETAUX battery.runtime.low 3
   33.039615	send_to_one: SETFLAGS battery.runtime.low RW STRING
   33.039629	send_to_one: SETINFO battery.voltage.nominal "24"
   33.039641	send_to_one: SETINFO device.mfr "Best Power"
   33.039653	send_to_one: SETINFO device.model "Fortress"
   33.039667	send_to_one: SETINFO device.type "ups"
   33.039681	send_to_one: SETINFO driver.name "bestfortress"
   33.039695	send_to_one: SETINFO driver.parameter.baudrate "9600"
   33.039708	send_to_one: SETINFO driver.parameter.max_load "660"
   33.039721	send_to_one: SETINFO driver.parameter.pollinterval "2"
   33.039736	send_to_one: SETINFO driver.parameter.port "/dev/ttyS0"
   33.039749	send_to_one: SETINFO driver.version "2.6.3-3411M"
   33.039763	send_to_one: SETINFO driver.version.internal "0.03"
   33.039776	send_to_one: SETINFO input.transfer.high ""
   33.039789	send_to_one: SETAUX input.transfer.high 3
   33.039802	send_to_one: SETFLAGS input.transfer.high RW STRING
   33.039829	send_to_one: SETINFO input.transfer.low ""
   33.039842	send_to_one: SETAUX input.transfer.low 3
   33.039853	send_to_one: SETFLAGS input.transfer.low RW STRING
   33.039864	send_to_one: SETINFO output.voltamps "0"
   33.039876	send_to_one: SETINFO ups.delay.shutdown "10"
   33.039886	send_to_one: SETINFO ups.load "0"
   33.039899	send_to_one: SETINFO ups.mfr "Best Power"
   33.039910	send_to_one: SETINFO ups.model "Fortress"
   33.039923	send_to_one: ADDCMD load.off
   33.039934	send_to_one: ADDCMD shutdown.return
   33.039945	send_to_one: DUMPDONE
   33.039956	send_to_one: PONG
   33.039968	upsdrv_updateinfo
   33.240577	upsdrv_updateinfo: received 50 bytes
   35.441280	upsdrv_updateinfo: received 61 bytes
   37.641948	upsdrv_updateinfo: received 41 bytes
   39.842614	upsdrv_updateinfo: received 42 bytes
   42.043480	upsdrv_updateinfo: received 55 bytes
   44.043663	checksum corruption
   44.043704	buffer: (55 bytes) => 30 30 32 32 35 30 32 32 33 30 30 30 
30 30 30 30 32 30
   44.043718	 30 30 30 34 35 30 30 30 30 30 32 36 37 35 30 30 30 30 30 
39 39 30 30 32 37
   44.043728	 30 30 30 30 30 30 30 30 30 33 30 30
   44.043742	upsdrv_updateinfo
   44.254793	upsdrv_updateinfo: received 46 bytes
   46.455360	upsdrv_updateinfo: received 58 bytes
   48.656116	upsdrv_updateinfo: received 59 bytes
   50.858880	upsdrv_updateinfo: received 43 bytes
   53.059379	upsdrv_updateinfo: received 42 bytes
   55.059503	checksum corruption
   55.059547	buffer: (42 bytes) => 30 30 30 32 30 30 30 30 34 35 30 30 
30 30 30 32 36 37
   55.059558	 35 30 30 30 30 30 39 39 30 30 32 37 30 30 30 30 30 30 30 
30 30 33 30 30
   55.059571	upsdrv_updateinfo
   55.274802	upsdrv_updateinfo: received 69 bytes
   57.475378	upsdrv_updateinfo: received 49 bytes
   59.676174	upsdrv_updateinfo: received 42 bytes
   61.876855	upsdrv_updateinfo: received 61 bytes
   64.077595	upsdrv_updateinfo: received 49 bytes
   66.077730	checksum corruption
   66.077784	buffer: (49 bytes) => 30 30 34 30 30 30 30 30 30 30 32 30 
30 30 30 34 35 30
   66.077797	 30 30 30 30 32 36 37 35 30 30 30 30 30 39 39 30 30 32 37 
30 30 30 30 30 30
   66.077806	 30 30 30 33 30 30
   66.077820	upsdrv_updateinfo
   66.288989	upsdrv_updateinfo: received 78 bytes
   66.289036	send_to_all: SETINFO input.voltage "224"
   66.289057	send_to_all: SETINFO output.voltage "223"
   66.289074	send_to_all: SETINFO battery.voltage "26.7"
   66.289089	send_to_all: SETINFO output.current "0.2"
   66.289104	send_to_all: SETINFO output.voltamps "45"
   66.289120	send_to_all: SETINFO ups.load "6"
   66.289136	send_to_all: SETINFO input.frequency "50.0"
   66.289152	send_to_all: SETINFO battery.runtime "5940"
   66.289166	send_to_all: SETINFO ups.temperature "27"
   66.289185	send_to_all: SETINFO ups.status "OL "
   66.289200	send_to_all: DATAOK
   68.079651	upsdrv_updateinfo
   68.297330	upsdrv_updateinfo: received 67 bytes
   70.498025	upsdrv_updateinfo: received 42 bytes
   72.698752	upsdrv_updateinfo: received 61 bytes
   74.899432	upsdrv_updateinfo: received 49 bytes
   77.100211	upsdrv_updateinfo: received 42 bytes
   79.100327	checksum corruption
   79.100374	buffer: (42 bytes) => 30 30 30 32 30 30 30 30 34 35 30 30 
30 30 30 32 36 37
   79.100389	 35 30 30 30 30 30 39 39 30 30 32 37 30 30 30 30 30 30 30 
30 30 33 30 30
   79.100400	send_to_all: DATASTALE
   79.100426	send_to_one: PONG
   79.100440	upsdrv_updateinfo
   79.300946	upsdrv_updateinfo: received 58 bytes
   81.501640	upsdrv_updateinfo: received 47 bytes
   83.702403	upsdrv_updateinfo: received 42 bytes
   85.903302	upsdrv_updateinfo: received 40 bytes
   88.103824	upsdrv_updateinfo: received 42 bytes
   90.103959	checksum corruption
   90.104006	buffer: (42 bytes) => 30 30 30 33 30 30 30 30 36 37 30 30 
30 30 30 32 36 37
   90.104021	 35 30 30 30 30 30 39 39 30 30 32 37 30 30 30 30 30 30 30 
30 30 33 30 30
   90.104036	upsdrv_updateinfo
   90.304691	upsdrv_updateinfo: received 58 bytes
   92.505360	upsdrv_updateinfo: received 42 bytes
   94.705987	upsdrv_updateinfo: received 42 bytes
   96.906768	upsdrv_updateinfo: received 58 bytes
   99.107488	upsdrv_updateinfo: received 50 bytes
  101.107621	checksum corruption
  101.107677	buffer: (50 bytes) => 30 30 32 34 30 30 30 30 30 30 30 32 
30 30 30 30 34 35
  101.107691	 30 30 30 30 30 32 36 37 35 30 30 30 30 30 39 39 30 30 32 
37 30 30 30 30 30
  101.107701	 30 30 30 30 33 30 30
  101.107714	upsdrv_updateinfo
  101.308078	upsdrv_updateinfo: received 50 bytes
  103.508719	upsdrv_updateinfo: received 49 bytes
  105.709512	upsdrv_updateinfo: received 42 bytes
  107.910156	upsdrv_updateinfo: received 59 bytes
  110.110686	upsdrv_updateinfo: received 41 bytes
  112.110820	checksum corruption
  112.110862	buffer: (41 bytes) => 30 30 32 30 30 30 30 34 35 30 30 30 
30 30 32 36 37 35
  112.110876	 30 30 30 30 30 39 39 30 30 32 37 30 30 30 30 30 30 30 30 
30 33 30 30


I ran this for a quarter of an hour. I have 46 KByte of this if you 
want... Almost always: Every 11 seconds "checksum corruption". And it is 
always the sixth out of six packets (? or communication events, whatever?).

To me this does not look like "spontaneous" checksum errors. These are 
highly regular, and that leads to some _speculation_: Maybe the Fortress 
data handshake protocol is not understood to the last detail? Maybe the 
protocol of the sixth "packet" is just different, maybe it contains a 
"global" checksum that is not calculated out of the packet itself, but 
the entirety of the latest communication? I'm merely speculating, but 
this comes to my mind...

Obviously the length of communication varies between 42 and 59 bytes, 
but it is always the sixth that goes wrong...

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.

Thanks for your help
Oliver







More information about the Nut-upsdev mailing list