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