[OpenTRV-dev] New radio module

Damon Hart-Davis dhd at exnet.com
Thu Jul 23 17:18:12 BST 2015


Hi,

With Gary’s prodding I’m completely overhauling the radio driver to be able to support the much high transmitter density that we’ll need to support EnergyDeck is we keep using our current radios and protocol.  (We may yet get to use TinyHAN for example, but I’m trying to fix the many issues that Gary is pointing out first!)

We have a side project working with another start-up that let’s me evaluate the current protocols in an environment with 300 transmitters in total, which will certainly test our sanity.  There will be limits as to what we can so with the current carrier and protocols and so on, but I want to understand them better.

The refactoring is happening in my (DamonHD) GitHub repos in OTRadioLink ("V0.3-alpha" tag, working up to a V0.3 release) and OpenTRV under the COHEAT area (I can supply full URLs if required), and I’m putting in tags at useful points as I go along.

Below is some output from the REV2 on my desk running the new code under development, listening in to the chatter of devices in my house, dumping the raw frames.

You can see what appears to be zeros wrapping round over the start of the RX FIFO if (I assume) I take too long to pick up a frame that has arrived, as I believe Gary has suggested.  Current ‘RX FIFO nearly full’ threshold is set to 45 (maximum FHT8V encoded message) and I see far less than with it at the default of 55.

One byte takes 8/5ms = 1.6ms to send/receive, so I potentially have 102.4ms from receiving the initial frame sync to get to empty the 64-byte RX FIFO without loss.

All RFM23B hardware interrupt handling is turned off at the moment because (a) not all boards support it such as REV1 and (b) I’ll have to think very very hard about ALL the code that touches SPI and the RFM23B and making it interrupt safe before I do.

Rgds

Damon






OpenTRV: board V0.2 REV2; code $Id: b0cc1e292d3e8704dc49417ce50b532607303d40 $ 2015/Jul/23 16:56:54
DEBUG
Resets: 18
ALTERNATE MAIN LOOP...
RSSI 41
RSSI 41
RSSI 43
RSSI 40
RSSI 40
|64  { " @ " : " 3 0 1 5 " , " + " : 5 , " B | m V " : 2 5 1 6 , " v | % " : 0 , " t T | C " : 7FD `00000000000000000000000000000000
RSSI 44
RSSI 43
RSSI 41
RSSI 41
RSSI 43
RSSI 40
|64  { " @ " : " 8 1 9 c " , " T | C 1 6 " : 3 5 4 , " L " : 2 4 4 , " B | c V " : 2 5 5FD110000000000000000000000000000000000000000
RSSI 43
RSSI 44
RSSI 46
RSSI 41
RSSI 41
RSSI 40
|64 CCCCCCE3 38E 3 3 3 3 8CE 38E 3 3 3 3 3 38CCE 8CE 3 3 3 3 3 8E38CE38E 3 3 p O * i ? '00000000000000000000000000000000000000000000
RSSI 41
|64 CCCCCCE3 8CCCCCE 3 8CCE3 8CE 3 3 3 3 3 38CCE 8CE 3 3 3 3 38CE38E 8CE 3 3 p K ) i 3 100000000000000000000000000000000000000000000
RSSI 40
RSSI 43
RSSI 40
RSSI 39
RSSI 41
RSSI 44
RSSI 41
RSSI 44
RSSI 43
RSSI 41
RSSI 42
|64 CCCCCCE3 38CE38CE3 3 38E 38CE3 3 3 3 3 3 8CCE38CE3 3 3 3 3 38E 8E3 38E 3 p M * i + E00000000000000000000000000000000000000000000
RSSI 39
RSSI 45
RSSI 48
RSSI 44
RSSI 135
|64  { " @ " : " 2 d 1 a " , " + " : 7 , " T | C 1 6 " : 3 6 6 , " O " : 1 , " v a c | h " : 1 5 , " v |0000000000000000000000000000
RSSI 44
RSSI 44
RSSI 48
RSSI 39
RSSI 40
RSSI 41
|64 00000000 : " 4 1 4 a " , " + " : 7 , " T | C 1 6 " : 3 4 7 , " O " : 1 , " v a c | h " : 7 , " v | % " : 0FD .000000000000000000
err 4
RSSI 48
?DROPPED recent: 1
RSSI 42
RSSI 45
RSSI 40
RSSI 43
RSSI 42
RSSI 37
RSSI 40
RSSI 45
RSSI 42
RSSI 41
|64 CCCCCCE3 3 38E 38E 38CCE 3 8E3 3 3 3 3 3 8CCE38CE3 3 3 3 3 8CCCE 3 3 3 p A * i < d0000000000000000000000000000000000000000000000
RSSI 41
RSSI 43
RSSI 40
RSSI 41
RSSI 43
RSSI 41
|64 CCCCCCE3 3 38CE3 3 8CCCE 38E 3 3 3 3 3 38CCE 8CE 3 3 3 3 38CCCCCCE 3 3 p K * i & K0000000000000000000000000000000000000000000000
RSSI 45
RSSI 39
RSSI 42
RSSI 40
RSSI 45
RSSI 41
RSSI 41
|64  { " @ " : " 3 0 1 5 " , " + " : 6 , " v C | % " : 0 , " T | C 1 6 " : 3 6 7 , " H | % " : 4 2 , " O0000000000000000000000000000
err 4
RSSI 43
?DROPPED recent: 2
RSSI 42
RSSI 38
RSSI 44
RSSI 47
RSSI 43
|64  H041C B * iF4 H00000000000000000000000000000000000015 U U U U Y99998EC0 #88 E M >8900000000000000000000000015 U U U U Y99998F d
err 4
RSSI 41
?DROPPED recent: 3
RSSI 99
|64  { " @ " : " 0 a 4 5 " , " + " : 2 , " T | C 1 6 " : 3 6 4 , " t T | C " : 7 , " v C | % " : 00000000000000000000000000000000000
err 4
RSSI 39
?DROPPED recent: 4
RSSI 42
RSSI 42
RSSI 41
|64 00000000 38E 3 3 3 3 8CE 38E 3 3 3 3 3 38CCE 8CE 3 3 3 3 3 8E38CE38E 3 3 p O * i ? '00000000000000000000000000000000000000000000
err 4
RSSI 45
?DROPPED recent: 5
RSSI 42
RSSI 41
RSSI 42
RSSI 41
RSSI 41
RSSI 39
RSSI 40
RSSI 45
RSSI 41
RSSI 42
|64 CCCCCCE3 38CE38CE3 3 38E 38CE3 3 3 3 3 3 8CCE38CE3 3 3 3 3 38E 8E3 38E 3 p M * i ) +00000000000000000000000000000000000000000000
RSSI 41
RSSI 42
|64  { " @ " : " 0 d 4 9 " , " + " : 6 , " t T | C " : 7 , " v C | % " : 8 6 2 , " T | C 1 6 " : 3 5 3FD c00000000000000000000000000
err 4
RSSI 42
?DROPPED recent: 6
RSSI 41
RSSI 43
RSSI 39
RSSI 39
RSSI 42
RSSI 42
RSSI 42
RSSI 44
RSSI 41
RSSI 44
|64  { " @ " : " 4 1 4 a " , " + " : 1 , " v a c | h " : 7 , " v | % " : 0 , " t T | C " : 7 , " v C | % " : 00000000000000000000000
RSSI 40
RSSI 42
RSSI 41
RSSI 41
RSSI 45
RSSI 43
RSSI 40
RSSI 41
RSSI 39
|64 CCCCCCE3 3 38E 38E 38CCE 3 8E3 3 3 3 3 3 8CCE38CE3 3 3 3 3 8CCCE 3 3 3 p A * i < d000000000000 C C C C C C C C C C C C C C C C C
RSSI 44
RSSI 45
RSSI 41
RSSI 44
RSSI 44
RSSI 41
|64  v q F L ( i02 &00000000000000000000000000000000000015 U U U U Y99998ECE (C985D   DC0000000000000000000000000000000000000000000
RSSI 43
|64 CCCCCCE3 3 38CE3 3 8CCCE 38E 3 3 3 3 3 38CCE 8CE 3 3 3 3 38CCCCCCE 3 3 p L * i1F 80000000000000000000000000000000000000000000000
RSSI 42
RSSI 46
RSSI 73
RSSI 38
RSSI 39
RSSI 43
RSSI 43



More information about the OpenTRV-dev mailing list