[OpenTRV-dev] Residual Receive Strangeness
gary.gladman at talktalk.net
gary.gladman at talktalk.net
Sun Jul 12 00:04:53 BST 2015
Hi,
I am now confident that I have evidence that receive overrun is the primary cause of !RXerr F2.
Regards Gary
----Original Message----
From: gary.gladman at talktalk.net
Date: 11/07/2015 19:53
To: <opentrv-dev at lists.opentrv.org.uk>
Subj: [OpenTRV-dev] Residual Receive Strangeness
Hi
I have been investigating and trying to resolve a number of receive transmit issues.
I have made a number of changes to both resolve and investigate (latest changes attached including a log file as examples/evidence of what is still being observed with relevant logging is enabled).
I have implemented Listen Before Transmit (LBT) for JSON statistics. Practically in my two node system (boiler/hub, leaf) LBT activates rarely if at all.
Overall I beleive the system is now operating better with more regular results, but my testing is limited to my system and mode of use, and I still see inexplicably bad runs so I cannot guarantee the changes - your mileage may vary.
I continue to observe residual corrupt receptions which IMHO demonstrate
damage of a systematic rather than random nature which implies to me a
system implementation rather than an RF noise cause. The changes I have
made do seem to have resolved/regularised some of these issues which
reinforces the view that there is an underlying systematic rather than
noise concern.
Corrupt receptions are still seen and IMHO still massively imply a system rather than a noise concern. My understanding is limited and I have been unable to resolve the underlying cause of these.
Some typical examples ...
The bulk of the content of each and every reception in error (seems) uniformly correct.
Typical damage:
~90% - The lead byte(s) are in error. A repeated value is present instead. The value is 0.
e.g. (from logs which may not be presented well here)
689:40:1 R=36
0000CCE33338E38E38E3338CE338CE3333333333338CCE38CE333333333338E38E338E333370493569FE5000000000000000000000000000000000000000
. . L c 3 8 c . 8 c 3 . c 8 N 3 3 3 3 3 3 . N 8 N 3 3 3 3 3 8 c . 3 . 3 3 p I 5 i ~ P . . . . . . . . . . . . . . . . . . .
!RXerr F2
693:20:4 R=38 002240223A2231663261222C222B223A362C22547C433136223A3536302C227661637C68223A302C22767C25223A30FD5A00000000000000000000000000
. " @ " : " 1 f 2 a " , " + " : 6 , " T | C 1 6 " : 5 6 0 , " v a c | h " : 0 , " v | % " : 0 } Z . . . . . . . . . . . . .
!RXerr F2
Where
R= ... is the background RSSI
0000CCE33338E38E38 ... is the RX buffer content as hex
. . L c 3 8 c . 8 ... is the RX buffer content as printable ascii otherwise ".".
~5% - The tail byte(s) are in error. A repeated value is present instead. The value is 0.
e.g.
686:20:2 R=36
7B2240223A2231663261222C222B223A322C22547C433136223A3532312C227661637C68223A302C22767C25223A30000000000000000000000000000000
{ " @ " : " 1 f 2 a " , " + " : 2 , " T | C 1 6 " : 5 2 1 , " v a c | h " : 0 , " v | % " : 0 . . . . . . . . . . . . . . .
!RXerr F5
~2% - The tail byte(s) are in error. A repeated value is present instead. The value is the last (valid?) value.
672:20:4 R=35
7B2240223A2231663261222C222B223A332C22547C433136223A3431392C224F223A312C227661637C68223A302C22767C25223A30FDFDFDFDFDFDFDFDFD
{ " @ " : " 1 f 2 a " , " + " : 3 , " T | C 1 6 " : 4 1 9 , " O " : 1 , " v a c | h " : 0 , " v | % " : 0 } } } } } } } } }
!RXerr F5
The last issue is interesting because it is conceivable that this behaviour is seen in all scenarios, even valid receives.
Has anyone got any idea what could be causing these systematic errors within the system?
I have a suspicion (based on little evidence and the RFM22/23B manuals unclear definition of operation) one or more of following combined with OpenTRV variable Tx sizes and variable timing may explain the evidence:
o Tx is overrunning (due to incorrect Tx control) causing over long Tx of something.
o Tx is transmitting the last byte repeatedly (due to incorrect Tx control) causing last byte to be repeated.
o Rx is overrunning (due to either Tx overrun, or incorrect Rx control) causing over long Rx of something which fills/ overfills/ cycles through the RX FIFO/buffer corrupting beginning of FIFO (other wise how can FIFO be so radically uniformly corrupted at the beginning having just so succesfully received preamble and sync word with rest of buffer being received without error?)
o Rx is receiving background noise repeatedly (due to incorrect Rx control) causing a uniform resulting value to be extracted from noise.
o Tx length is overlong on occaison (due to incorrect calculation) causing intended content to be truncated which may explain occaisional JSON F5 error where CRC is likely missing.
RFM22/23B Tx Rx operation/behaviour through FIFO's is not well explained in the mode OpenTRV is using. It is not clear to me what other than changing mode stops a Tx or Rx once begun. OpenTRV operation tries to save power by checking status occaisionally which means when large/FIFO filling transmissions occur it is conceivable that they execute for significantly longer than (strictly) intended potentially resulting in TX/RX FIFO overflow the practical results of which are unclear.
Note: In the mode OpenTRV operates the RFM22/23B the preamble+sync is present in the TX FIFO but removed before entering the RX FIFO meaning that for any given transfer the Tx is bigger (in the FIFO) than the Rx.
Other issues:
?DROPPED stats:
o Local stats are overwriting received stats
o Depth 1 buffers are vulnerable
o 2 buffers (1*FHT8V stats, 1*JSON stats) multiply up depth 1 vulnerability
Might be better for many reasons (not just DROPPED stats issues) to reorganise OpenTRV receive processing to separate a) reception from b) (post) analysis then presentation via one receive depth 2 buffer, rather than current organisation of a) reception then analysis from b) (post) presentation via two distinct single depth 1 buffers.
Probably too much to digest at once - apologies.
Regards Gary_______________________________________________
OpenTRV-dev mailing list
OpenTRV-dev at lists.opentrv.org.uk
http://lists.opentrv.org.uk/listinfo/opentrv-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opentrv.org.uk/pipermail/opentrv-dev/attachments/20150712/94097f53/attachment.html>
More information about the OpenTRV-dev
mailing list