Project

General

Profile

OsmocomTETRA » History » Version 6

laforge, 02/19/2016 10:52 PM
link to faq

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