Project

General

Profile

OsmocomTETRA » History » Version 2

laforge, 02/19/2016 10:52 PM
add index page

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 2 laforge
It is most useful to look at Figure 8.5, 8.6, 9.3 and 19.12 in conjunction
11 2 laforge
with this program.
12 1
13 2 laforge
You will need [http://bb.osmocom.org/trac/wiki/libosmocore libosmocore] to link.
14 1
15 2 laforge
== Demodulator ==
16 1
17 2 laforge
src/demod/python/cpsk.py
18 2 laforge
        * contains a gnuradio based pi4/DQPSK demodulator, courtesy of KA1RBI
19 2 laforge
src/demod/python/tetra-demod.py
20 2 laforge
        * call demodulator on a 'cfile' containing complex baseband samples
21 2 laforge
src/demod/python/usrp1-tetra_demod.py
22 2 laforge
        * use demodulator in realtime with a USRP1 SDR
23 2 laforge
src/demod/python/usrp2-tetra_demod.py
24 2 laforge
        * use demodulator in realtime with a USRP2 SDR
25 1
26 2 laforge
The output of the demodulator is a file containing one float value for each symbol,
27 2 laforge
containing the phase shift (in units of pi/4) relative to the previous symbol.
28 1
29 2 laforge
You can use the "float_to_bits" program to convert the float values to unpacked
30 2 laforge
bits, i.e. 1-bit-per-byte
31 1
32 1
33 2 laforge
== PHY/MAC layer ==
34 2 laforge
35 2 laforge
=== library code ===
36 2 laforge
37 2 laforge
Specifically, it implements:
38 2 laforge
lower_mac/crc_simple.[ch]
39 2 laforge
        * CRC16-CCITT (currently defunct/broken as we need it for
40 2 laforge
          non-octet-aligned bitfields)
41 2 laforge
lower_mac/tetra_conv_enc.[ch]
42 2 laforge
        * 16-state Rate-Compatible Punctured Convolutional (RCPC) coder
43 2 laforge
lower_mac/tetra_interleave.[ch]
44 2 laforge
        * Block interleaving (over a single block only)
45 2 laforge
lower_mac/tetra_rm3014.[ch]
46 2 laforge
        * (30, 14) Reed-Muller code for the ACCH (broadcast block of
47 2 laforge
          each downlink burst)
48 2 laforge
lower_mac/tetra_scramb.[ch]
49 2 laforge
        * Scrambling
50 2 laforge
lower_mac/viterbi*.[ch]
51 2 laforge
        * Convolutional decoder for signalling and voice channels
52 2 laforge
phy/tetra_burst.[ch]
53 2 laforge
        * Routines to encode continuous normal and sync bursts
54 2 laforge
phy/tetra_burst_sync.[ch]
55 2 laforge
56 2 laforge
57 2 laforge
=== Receiver Program ===
58 2 laforge
59 2 laforge
The main receiver program 'tetra-rx' expects an input file containing a
60 2 laforge
stream of unpacked bits, i.e. 1-bit-per-byte.
61 2 laforge
62 2 laforge
63 2 laforge
=== Transmitter Program ===
64 2 laforge
65 2 laforge
The main program conv_enc_test.c generates a single continuous downlinc sync
66 2 laforge
burst (SB), contining:
67 2 laforge
        * a SYNC-PDU as block 1
68 2 laforge
        * a ACCESS-ASSIGN PDU as broadcast block
69 2 laforge
        * a SYSINFO-PDU as block 2
70 2 laforge
71 2 laforge
Scrambling is set to 0 (no scrambling) for all elements of the burst.
72 2 laforge
73 2 laforge
It does not actually modulate and/or transmit yet.
74 2 laforge
75 2 laforge
76 2 laforge
== Quick example ==
77 2 laforge
78 2 laforge
assuming you have generated a file samples.cfile at a sample rate of 195.312kHz (100MHz/512 == USRP2 at decimation 512)
79 2 laforge
80 2 laforge
{{{
81 2 laforge
./src/demod/python/tetra-demod.py -i /tmp/samples.cfile -o /tmp/out.float -s 195312 -c 0
82 2 laforge
./src/float_to_bits /tmp/out.float /tmp/out.bits
83 2 laforge
./src/tetra-rx /tmp/out.bits
84 2 laforge
}}}
85 1
86 1
For a complete list of local wiki pages, see TitleIndex.
Add picture from clipboard (Maximum size: 48.8 MB)