OsmocomTETRA » History » Version 3
laforge, 02/19/2016 10:52 PM
link to sources and list
1 | 2 | laforge | = Osmocom TETRA MAC/PHY layer experimentation code = |
---|---|---|---|
2 | 1 | ||
3 | 2 | laforge | This code aims to implement the sending and receiving part of the |
4 | 2 | laforge | TETRA MAC/PHY layer. |
5 | 1 | ||
6 | 2 | laforge | If you read the ETSI EN 300 392-2 (TETRA V+D Air Interface), you will |
7 | 2 | laforge | find this code implementing the parts between the MAC-blocks (called |
8 | 2 | laforge | type-1 bits) and the bits that go to the DQPSK-modulator (type-5 bits). |
9 | 1 | ||
10 | 3 | laforge | It is most useful to look at Figure 8.5, 8.6, 9.3 and 19.12 of the |
11 | 3 | laforge | abovementioned specification in conjunction with this program. |
12 | 1 | ||
13 | 3 | laforge | |
14 | 3 | laforge | == Source Code == |
15 | 3 | laforge | The source code is available via read-only git access at |
16 | 3 | laforge | {{{ |
17 | 3 | laforge | git clone git://git.osmocom.org/osmo-tetra.git |
18 | 3 | laforge | }}} |
19 | 3 | laforge | |
20 | 3 | laforge | You can also browse the source code at git://cgit.osmocom.org/ |
21 | 3 | laforge | |
22 | 1 | You will need [http://bb.osmocom.org/trac/wiki/libosmocore libosmocore] to link. |
|
23 | 3 | laforge | |
24 | 3 | laforge | == Mailing List == |
25 | 3 | laforge | There is a public mailing list regarding development of this project, you can |
26 | 3 | laforge | visit the subscription page at https://lists.osmocom.org/mailman/listinfo/tetra |
27 | 3 | laforge | |
28 | 3 | laforge | This list is '''for discussion between software developers''' who intend to improve the |
29 | 3 | laforge | Osmocom TETRA software. It is not a forum for individuals asking how they can tap |
30 | 3 | laforge | into police radio (which is encrypted anyway). |
31 | 1 | ||
32 | 2 | laforge | == Demodulator == |
33 | 1 | ||
34 | 2 | laforge | src/demod/python/cpsk.py |
35 | 2 | laforge | * contains a gnuradio based pi4/DQPSK demodulator, courtesy of KA1RBI |
36 | 2 | laforge | src/demod/python/tetra-demod.py |
37 | 2 | laforge | * call demodulator on a 'cfile' containing complex baseband samples |
38 | 2 | laforge | src/demod/python/usrp1-tetra_demod.py |
39 | 2 | laforge | * use demodulator in realtime with a USRP1 SDR |
40 | 2 | laforge | src/demod/python/usrp2-tetra_demod.py |
41 | 2 | laforge | * use demodulator in realtime with a USRP2 SDR |
42 | 1 | ||
43 | 2 | laforge | The output of the demodulator is a file containing one float value for each symbol, |
44 | 2 | laforge | containing the phase shift (in units of pi/4) relative to the previous symbol. |
45 | 1 | ||
46 | 2 | laforge | You can use the "float_to_bits" program to convert the float values to unpacked |
47 | 2 | laforge | bits, i.e. 1-bit-per-byte |
48 | 1 | ||
49 | 1 | ||
50 | 2 | laforge | == PHY/MAC layer == |
51 | 2 | laforge | |
52 | 2 | laforge | === library code === |
53 | 2 | laforge | |
54 | 2 | laforge | Specifically, it implements: |
55 | 2 | laforge | lower_mac/crc_simple.[ch] |
56 | 2 | laforge | * CRC16-CCITT (currently defunct/broken as we need it for |
57 | 2 | laforge | non-octet-aligned bitfields) |
58 | 2 | laforge | lower_mac/tetra_conv_enc.[ch] |
59 | 2 | laforge | * 16-state Rate-Compatible Punctured Convolutional (RCPC) coder |
60 | 2 | laforge | lower_mac/tetra_interleave.[ch] |
61 | 2 | laforge | * Block interleaving (over a single block only) |
62 | 2 | laforge | lower_mac/tetra_rm3014.[ch] |
63 | 2 | laforge | * (30, 14) Reed-Muller code for the ACCH (broadcast block of |
64 | 2 | laforge | each downlink burst) |
65 | 2 | laforge | lower_mac/tetra_scramb.[ch] |
66 | 2 | laforge | * Scrambling |
67 | 2 | laforge | lower_mac/viterbi*.[ch] |
68 | 2 | laforge | * Convolutional decoder for signalling and voice channels |
69 | 2 | laforge | phy/tetra_burst.[ch] |
70 | 2 | laforge | * Routines to encode continuous normal and sync bursts |
71 | 2 | laforge | phy/tetra_burst_sync.[ch] |
72 | 2 | laforge | |
73 | 2 | laforge | |
74 | 2 | laforge | === Receiver Program === |
75 | 2 | laforge | |
76 | 2 | laforge | The main receiver program 'tetra-rx' expects an input file containing a |
77 | 2 | laforge | stream of unpacked bits, i.e. 1-bit-per-byte. |
78 | 2 | laforge | |
79 | 2 | laforge | |
80 | 2 | laforge | === Transmitter Program === |
81 | 2 | laforge | |
82 | 2 | laforge | The main program conv_enc_test.c generates a single continuous downlinc sync |
83 | 2 | laforge | burst (SB), contining: |
84 | 2 | laforge | * a SYNC-PDU as block 1 |
85 | 2 | laforge | * a ACCESS-ASSIGN PDU as broadcast block |
86 | 2 | laforge | * a SYSINFO-PDU as block 2 |
87 | 2 | laforge | |
88 | 2 | laforge | Scrambling is set to 0 (no scrambling) for all elements of the burst. |
89 | 2 | laforge | |
90 | 2 | laforge | It does not actually modulate and/or transmit yet. |
91 | 2 | laforge | |
92 | 2 | laforge | |
93 | 2 | laforge | == Quick example == |
94 | 2 | laforge | |
95 | 2 | laforge | assuming you have generated a file samples.cfile at a sample rate of 195.312kHz (100MHz/512 == USRP2 at decimation 512) |
96 | 2 | laforge | |
97 | 2 | laforge | {{{ |
98 | 2 | laforge | ./src/demod/python/tetra-demod.py -i /tmp/samples.cfile -o /tmp/out.float -s 195312 -c 0 |
99 | 2 | laforge | ./src/float_to_bits /tmp/out.float /tmp/out.bits |
100 | 2 | laforge | ./src/tetra-rx /tmp/out.bits |
101 | 2 | laforge | }}} |
102 | 1 | ||
103 | 1 | For a complete list of local wiki pages, see TitleIndex. |