After connecting the SPIRIT1 board to the RaspberryPi it didn't take long to start reading data from the chip via SPI. This was just the first step and to be honest the following days saw me going back and forth trying to comprehend what was needed and how it should work. The result was a small Python module that spoke to the SPIRIT1 chip and allowed me to configure it to permit both receiving and transmitting data.

Configuration

Once I had the reception working I started gathering data and comparing what I had captured with the output I got from the RTL-SDR captures. Following quite a lot of trial and error I ended up using this configuration for the radio

  • 868.2MHz
  • Bandwidth of 50,000
  • Modulation GFSK-BT1

Getting the bandwidth right proved to be the final missing piece in my early attempts. Eventually the URH configuration of 20 samples/bit for a bandwidth of 1,000,000Hz proved to be the hint I needed.

The Basic Packet configuration I am using is

  • 5 byte preamble
  • 4 Sync Words [ 0x5a, 0x47, 0x52, 0x50 ]
  • No CRC
  • Data whitening OFF (this wasn't what I expected)
  • FEC Off
  • Variable length with a max size of 100 bytes

This allows me to capture packets that match the length and sequences that I have observed via RTL-SDR.

Using the various filtering options the packets captured have the correct preamble and sync words. The length bits are also processed so the resulting captures are the pure payload. Suddenly processing becomes a lot simpler :-)

FIFO?

I'm still experimenting with how to best read from the FIFO, but what I am currently capturing looks very sensible.

Packet Data

Here is a dump of 32 full packets.

: a7 46 99 73 c6 80 95 f5 f8 ab 64 8a 1b f9 ca dc 56 d7 04 57 c7 9a a7 cd 56 ca 36 69 6e 1b 91 e3 33 0f 25 c4 7d bd 96 c4 26 b1 56 a0 21 bb 30 93 d5 97 c6 04 e6 2a 13 d1 f0 85 73 4d ff 3c 61 9d 92 fe f0 67 bf b0 f8 1f
: ff 0e c9 51 a3 9f 1f ff 9f ff e7 7f d0 54 3f fc e1 7d 38 87 43 9f 46 7f 8e 62 6e d1 b1 ff f9 94 8a d3 71 c3 9a 96 f7 ba f7 02 82
: f4 8a d3 51 a3 9b 1f f7 ff f8 83 0e 4f e1 9f 70 67 14 ff 14 9f ff 30 08 13 91 91 60 64 ef 06 97 0e c9 71 c3 9a 96 d3 98 2e e6 fe a8 2a 1b 02 5f 3e d5 7c 5a 40 a2 b7 60 b6 c2 85 a0 31 73 a8 a7 8d 87 50 ed 0c
: f4 8a d3 51 a3 9b 1f f3 f8 7f 07 7a 47 9f 95 ff ca 53 ff 94 9f fe f0 40 04 e8 e3 e7 42 40 58
: a7 46 99 71 c3 9b 97 71 fe 36 fe 8a 1b f9 ca da 66 f7 3c 5a 39 c6 ba 18 47 da 9d 24 5a 2f e2 b0 93 b8 20 e6 13 a9 7b b2
: f4 8a d3 51 a3 9b 17 f1 b8 f0 9b 48 17 99 93 67 ff 7f f1 14 9f fe b0 40 00 c6 22 73 81 c4 1d
: ff 0e c9 51 a3 9b 17 53 9a bc fd 3f c8 2a 1f 06 20 9e a4 62 f2 7f 14 30 de 90 e9 41 c8 73 4c 94 8a d3 71 c3
: f4 8a d3 51 a3 9b 1f f1 fc f4 85 28 57 fb f3 01 f8 07 2a 14 9f fe f0 30 8b 84 71 92 94 1b 46 97 0e c9 71 c3 9a 96 d3 9c 2a f8 fe a8 2a 1b 3c 0f 5e bd 44 1f e4 fc 76 81 e2 11 60 42 08 90 56 6e d6 03 2f 8f ec 64
: f4 8b d3 51 a3 9b 1f f3 bc 6b 19 1a 07 ff f7 09 bd fe a6 94 9f fe f0 10 07 9f fb 03 9a 81 04
: ff 0e c9 51 a3 9f 1f 75 98 ab e5 3f c8 2a 1f 4e 08 bf fc 7f ff fa 0f e2 17 90 3f f9 77 f0 b9
: f4 8a d3 51 a3 9b 17 ff ff f2 9d 2e 4d c1 ff 53 3c 53 b1 94 9f ff 31 fb b8 44 e9 00 c0 00 1e 97 0e c9 71 c3 9a 96 d1 9a 32 e0 fe a8 2a 1b 7a 27 16 ad 64 ba a7 83 7e 52 9e 2d 71 4a 6b 1b 1b 22 de 9c f5 40
: f4 8b d3 51 a3 9f 1f f1 fa 73 01 dc 5f a7 fd 7c 15 41 2c 94 9f ff 30 16 89 92 90 b1 e2 98 41
: ff 0e c9 51 a3 9b 17 54 1a a8 f9 3f c8 2a 1b 08 48 9e 8c 5f e6 55 18 71 98 7d 1e 0c bf 7d e4
: f4 8b d3 51 a3 9b 1f fe 3c f0 81 70 35 99 f3 1f 7c 60 16 14 9f ff f0 02 0c 79 80 9c c5 ec 2c 97 0e c9 71 c3 9a 97 d5 9e 2c e0 fe a8 2a 1b 5c 57 56 85 4c b0 20 b5 c2 0c bf fc c9 99 5f 3f 5f 1b 19 ef 72 d3 c9
: f4 8a d3 51 a3 9b 17 ff fe 7d 01 1c 1f c7 fd fb 29 3a 3d 14 9f ff 31 ff b7 3a 36 d0 99 b1 c3
: ff 0e c9 51 a3 9b 17 52 18 af e1 3e c8 2a 1b 26 58 df fc 3f 9c 98 dd 01 64 ff c0 77 53 ec 8e 94 8a d3 71 c3 9a 96 f2 38 ef 00 fc 6d a3
: fc 8b d3 51 a3 9f 1f f0 3f fe 99 f6 2f 81 ff cf d8 34 8f 94 9f ff 31 ff b6 c1 10 5b e2 91 e0 97 0e c9 71 c3 9a 96 d7 98 34 f8 fe a8 2a 1b 14 17 1e bd 03 e8 f7 05 7e ed e2 a3 9f 32 fb cd af 06 bd
: f4 8b d3 51 a3 9b 1f ff f8 75 19 7a 47 ff fd fe 91 17 ff 14 9f ff f1 ff ba 20 00 14 fe 14 f1
: ff 0f c9 51 a3 9b 17 52 1c ab ff 3f c8 2a 1f e0 20 cf f4 71 f0 1f ff 8d 9f ff ff e7 e3 ff c7 94 8a d3 f1 c3 9b 96 f2 3c eb 1e 9c 2d e3
: f4 8a d3 51 a3 9b 17 f0 3f f2 87 16 7f c1 ff 29 bf 08 f6 94 9f ff 31 ff 7b ac 18 ad 10 98 22 97 0e c9 71 c3 9a 96 d5 1d 29 7c fe a8 2a 1b 4c 67 4e 85 34 ac 79 e7 16 63 c6 eb 40 6c 42 86 77 d7 5f 3a 86
: f4 8e d3 51 a3 9b 1f f7 7f f1 3a 24 ff 8b aa 1d 8c 2f fd 29 3f ff e0 10 00 3e 59 80 c2 e1 08
: ff 0f c9 51 a3 9b 1f d4 1e fd ef 7f d0 54 36 00 01 7f f8 0f c1 cf d3 e7 c0 58 b4 0f ff c7 fc 94 8a d3 71 c3
: f4 8a d3 51 a3 9b 17 fe 38 f4 9f 10 7f f9 d3 ff 7f fc fd 14 9f ff f0 44 07 10 cc a1 1a 42 4d 97 0e c9 71 c3 9a 96 d7 1b 31 64 fe a8 2a 1b 02 6f 4e ad 3d f2 71 da 59 29 83 38 4c f6 bd 64 f1 45 ce 5b
: f4 8b d3 51 a3 9f 1f ff 3f f0 85 54 2f ff fd 3f fe 38 f4 94 9f ff 30 27 0c fb 7e 97 00 7c 67
: ff 0e c9 51 a3 9b 1f 54 9d b9 7f 3e c8 2a 1b 3e 50 ce 9c 37 1e 41 cc 8a 9a 72 8a 87 d5 1b e8 94 8b d3 71 c3 9a 96 f4 bd e8 9a 94 5d fb ed 53
: f4 8a d3 51 a3 9b 17 ff ff f1 03 1e 1f f9 fb 3f dc 71 2e 94 9f ff 31 ff ba 04 3e 13 84 40 3f 97 0e c9 71 c3 9a 96 d3 1f 2f 64 fe a8 2a 1b 74 17 1e bd 20 90 73 13 9b b1 26 4f a8 44 07 ca c5 94 ca c5 8d 84 89
: f4 8b d3 51 a3 9b 1f f3 3f fe 85 14 7f ff ff fc 42 43 e5 14 9f ff 31 ff b6 34 38 49 10 20 9d
: ff 0f c9 51 a3 9b 1f 52 9f ff e3 3f c8 2a 1f 08 08 ff fc 0f 8f e3 47 9e 4e 53 ff 94 7f ff c3 94 8a d3 71 c3 9a 96 f2 bf
: f4 8a d3 51 a3 9b 17 f0 b9 ff 1b 18 07 c1 f3 fc 50 27 f5 14 9f fe f0 04 88 c6 1b 04 40 79 f7 97 0f c9 71 c3 9a 97 d1 19 37 7c fe a8 2a 1b 0c 67 6e e7 d5 db 1d a8 af b2 23 07 f6 bf 8e 4d 7d 61 4c 31 43 bf
: f4 8a d3 51 a3 9b 17 f1 39 ff 9f 52 3f a7 d5 e9 fa 7c 7f 14 9f fe f1 ff b5 ac 44 7a 80 be 49
: fe 09 49 51 a3 9f 1f 72 9f ff fd 7f c8 2a 1f d8 68 ff 94 5f e7 e9 fc 8f 99 a3 c7 c1 ba 04 e4
: fe 09 49 51 a3 9f 1f f0 9f f3 e7 3f c8 3a 1f f0 38 cf fc 0f ff 82 c7 82 78 ba 1f 0f 87 f8 01
Hex dump of 32 captured packets.

The following is the same packets with just the first 7 bytes displayed.

: a7 46 99 73 c6 80 95 
: ff 0e c9 51 a3 9f 1f 
: f4 8a d3 51 a3 9b 1f 
: f4 8a d3 51 a3 9b 1f 
: a7 46 99 71 c3 9b 97 
: f4 8a d3 51 a3 9b 17 
: ff 0e c9 51 a3 9b 17 
: f4 8a d3 51 a3 9b 1f 
: f4 8b d3 51 a3 9b 1f 
: ff 0e c9 51 a3 9f 1f 
: f4 8a d3 51 a3 9b 17 
: f4 8b d3 51 a3 9f 1f 
: ff 0e c9 51 a3 9b 17 
: f4 8b d3 51 a3 9b 1f 
: f4 8a d3 51 a3 9b 17 
: ff 0e c9 51 a3 9b 17 
: fc 8b d3 51 a3 9f 1f 
: f4 8b d3 51 a3 9b 1f 
: ff 0f c9 51 a3 9b 17 
: f4 8a d3 51 a3 9b 17 
: f4 8e d3 51 a3 9b 1f 
: ff 0f c9 51 a3 9b 1f 
: f4 8a d3 51 a3 9b 17 
: f4 8b d3 51 a3 9f 1f 
: ff 0e c9 51 a3 9b 1f 
: f4 8a d3 51 a3 9b 17 
: f4 8b d3 51 a3 9b 1f 
: ff 0f c9 51 a3 9b 1f 
: f4 8a d3 51 a3 9b 17 
: f4 8a d3 51 a3 9b 17 
: fe 09 49 51 a3 9f 1f 
: fe 09 49 51 a3 9f 1f 
The first 7 bytes of 32 captured packets

There is an obvious structure evident. I need to run some additional captures to give me more data to work with, but hopefully I can start to make some sense of it?

Module Code

I need to clean up the code and figure out how to make it simpler to use before I publish it, but I do plan on putting it on github at some point.