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