2011-01-19 09:40:19 +00:00
|
|
|
TETRA MAC/PHY layer experimentation code
|
2017-03-16 19:34:20 +00:00
|
|
|
========================================
|
|
|
|
|
2016-12-18 15:51:38 +00:00
|
|
|
(C) 2010-2016 by Harald Welte <laforge@gnumonks.org> and contributors
|
2011-01-19 09:40:19 +00:00
|
|
|
|
2011-01-22 11:43:17 +00:00
|
|
|
This code aims to implement the sending and receiving part of the
|
|
|
|
TETRA MAC/PHY layer.
|
2011-01-19 09:40:19 +00:00
|
|
|
|
|
|
|
If you read the ETSI EN 300 392-2 (TETRA V+D Air Interface), you will
|
|
|
|
find this code implementing the parts between the MAC-blocks (called
|
|
|
|
type-1 bits) and the bits that go to the DQPSK-modulator (type-5 bits).
|
|
|
|
|
|
|
|
It is most useful to look at Figure 8.5, 8.6, 9.3 and 19.12 in conjunction
|
|
|
|
with this program.
|
|
|
|
|
2017-03-16 19:37:42 +00:00
|
|
|
You will need
|
|
|
|
[libosmocore](https://osmocom.org/projects/libosmocore/wiki/Libosmocore)
|
|
|
|
to build this softwar
|
|
|
|
|
|
|
|
Homepage
|
|
|
|
--------
|
|
|
|
|
|
|
|
The official homepage of the project is
|
|
|
|
https://osmocom.org/projects/tetra/wiki/OsmocomTETRA
|
|
|
|
|
|
|
|
GIT Repository
|
|
|
|
--------------
|
|
|
|
|
|
|
|
You can clone from the official osmo-tetra.git repository using
|
|
|
|
|
|
|
|
git clone git://git.osmocom.org/osmo-tetra.git
|
|
|
|
|
|
|
|
There is a cgit interface at http://git.osmocom.org/osmo-tetra/
|
|
|
|
|
|
|
|
Mailing List
|
|
|
|
------------
|
|
|
|
|
|
|
|
Discussions related to osmo-tetra are happening on the
|
|
|
|
tetra@lists.osmocom.org mailing list, please see
|
|
|
|
https://lists.osmocom.org/mailman/listinfo/tetra for subscription
|
|
|
|
options and the list archive.
|
|
|
|
|
|
|
|
Please observe the [Osmocom Mailing List
|
|
|
|
Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
|
|
|
|
when posting.
|
|
|
|
|
|
|
|
Contributing
|
|
|
|
------------
|
|
|
|
|
|
|
|
Our coding standards are described at
|
|
|
|
https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
|
|
|
|
|
|
|
|
We us a gerrit based patch submission/review process for managing
|
|
|
|
contributions. Please see
|
|
|
|
https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for
|
|
|
|
more details
|
|
|
|
|
|
|
|
The current patch queue for osmo-tetra can be seen at
|
|
|
|
https://gerrit.osmocom.org/#/q/project:osmo-tetra+status:open
|
2011-01-22 11:43:17 +00:00
|
|
|
|
|
|
|
|
2017-03-16 19:34:20 +00:00
|
|
|
Demodulator
|
|
|
|
===========
|
2011-01-22 11:43:17 +00:00
|
|
|
|
|
|
|
src/demod/python/cpsk.py
|
2017-03-16 19:34:20 +00:00
|
|
|
* contains a gnuradio based pi4/DQPSK demodulator, courtesy of KA1RBI
|
|
|
|
|
2016-12-18 15:51:38 +00:00
|
|
|
src/demod/python/osmosdr-tetra_demod_fft.py
|
2017-03-16 19:34:20 +00:00
|
|
|
* call demodulator on any source supported by gr-osmosdr
|
|
|
|
(uhd, fcd, hackrf, blaerf, etc.)
|
|
|
|
|
2016-12-18 15:51:38 +00:00
|
|
|
src/demod/python/simdemod2.py
|
2017-03-16 19:34:20 +00:00
|
|
|
* call demodulator on a 'cfile' containing complex baseband samples
|
|
|
|
|
2016-12-18 15:51:38 +00:00
|
|
|
src/demod/python/{uhd,fcdp}-tetra_demod.py
|
2017-03-16 19:34:20 +00:00
|
|
|
* use demodulator directly with UHd or FCDP hadware (no gr-osmosdr)
|
2011-01-22 11:43:17 +00:00
|
|
|
|
|
|
|
The output of the demodulator is a file containing one float value for each symbol,
|
|
|
|
containing the phase shift (in units of pi/4) relative to the previous symbol.
|
|
|
|
|
|
|
|
You can use the "float_to_bits" program to convert the float values to unpacked
|
|
|
|
bits, i.e. 1-bit-per-byte
|
|
|
|
|
|
|
|
|
2017-03-16 19:34:20 +00:00
|
|
|
PHY/MAC layer
|
|
|
|
=============
|
2011-01-22 11:43:17 +00:00
|
|
|
|
2017-03-16 19:34:20 +00:00
|
|
|
library code
|
|
|
|
------------
|
2011-01-22 11:43:17 +00:00
|
|
|
|
2011-01-19 09:40:19 +00:00
|
|
|
Specifically, it implements:
|
2011-01-22 11:43:17 +00:00
|
|
|
lower_mac/crc_simple.[ch]
|
2017-03-16 19:34:20 +00:00
|
|
|
* CRC16-CCITT (currently defunct/broken as we need it for
|
|
|
|
non-octet-aligned bitfields)
|
2011-01-22 11:43:17 +00:00
|
|
|
lower_mac/tetra_conv_enc.[ch]
|
2017-03-16 19:34:20 +00:00
|
|
|
* 16-state Rate-Compatible Punctured Convolutional (RCPC) coder
|
2011-01-22 11:43:17 +00:00
|
|
|
lower_mac/tetra_interleave.[ch]
|
2017-03-16 19:34:20 +00:00
|
|
|
* Block interleaving (over a single block only)
|
2011-01-22 11:43:17 +00:00
|
|
|
lower_mac/tetra_rm3014.[ch]
|
2017-03-16 19:34:20 +00:00
|
|
|
* (30, 14) Reed-Muller code for the ACCH (broadcast block of
|
|
|
|
each downlink burst)
|
2011-01-22 11:43:17 +00:00
|
|
|
lower_mac/tetra_scramb.[ch]
|
2017-03-16 19:34:20 +00:00
|
|
|
* Scrambling
|
2011-01-22 11:43:17 +00:00
|
|
|
lower_mac/viterbi*.[ch]
|
2017-03-16 19:34:20 +00:00
|
|
|
* Convolutional decoder for signalling and voice channels
|
2011-01-22 11:43:17 +00:00
|
|
|
phy/tetra_burst.[ch]
|
2017-03-16 19:34:20 +00:00
|
|
|
* Routines to encode continuous normal and sync bursts
|
2011-01-22 11:43:17 +00:00
|
|
|
phy/tetra_burst_sync.[ch]
|
|
|
|
|
|
|
|
|
2017-03-16 19:34:20 +00:00
|
|
|
Receiver Program
|
|
|
|
----------------
|
2011-01-22 11:43:17 +00:00
|
|
|
|
|
|
|
The main receiver program 'tetra-rx' expects an input file containing a
|
|
|
|
stream of unpacked bits, i.e. 1-bit-per-byte.
|
|
|
|
|
|
|
|
|
2017-03-16 19:34:20 +00:00
|
|
|
Transmitter Program
|
|
|
|
-------------------
|
2011-01-19 09:40:19 +00:00
|
|
|
|
|
|
|
The main program conv_enc_test.c generates a single continuous downlinc sync
|
|
|
|
burst (SB), contining:
|
|
|
|
* a SYNC-PDU as block 1
|
|
|
|
* a ACCESS-ASSIGN PDU as broadcast block
|
|
|
|
* a SYSINFO-PDU as block 2
|
|
|
|
|
|
|
|
Scrambling is set to 0 (no scrambling) for all elements of the burst.
|
|
|
|
|
2011-01-22 11:43:17 +00:00
|
|
|
It does not actually modulate and/or transmit yet.
|
2011-01-19 09:40:19 +00:00
|
|
|
|
|
|
|
|
2017-03-16 19:34:20 +00:00
|
|
|
Quick example
|
|
|
|
=============
|
2011-01-19 09:40:19 +00:00
|
|
|
|
2011-01-22 11:43:17 +00:00
|
|
|
# assuming you have generated a file samples.cfile at a sample rate of
|
|
|
|
# 195.312kHz (100MHz/512 == USRP2 at decimation 512)
|
|
|
|
src/demod/python/tetra-demod.py -i /tmp/samples.cfile -o /tmp/out.float -s 195312 -c 0
|
|
|
|
src/float_to_bits /tmp/out.float /tmp/out.bits
|
|
|
|
src/tetra-rx /tmp/out.bits
|
2011-01-19 09:40:19 +00:00
|
|
|
|