Commit Graph

11 Commits

Author SHA1 Message Date
Vadim Yanitskiy d9cb065417 fake_trx/data_msg.py: implement ToA parsing support
This change implements ToA (Timing of Arrival) parsing, which
was missing in the DATAMSG_TRX2L1. Since we use integer math,
a ToA value is represented in units of 1/256 symbol periods.

Change-Id: Ib11482c06b977c4cf01b0644f5845a2e49d059fb
2018-02-28 22:34:27 +07:00
Vadim Yanitskiy 9fc30a4102 fake_trx/data_msg.py: use integer math for ToA
In order to avoid both float arithmetic as well as loosing any
precision, let's use integer math fot ToA (Timing of Arrival),
i.e. let's express ToA values in units of 1/256 symbol periods.

Change-Id: I56b88740f4d782ac7591fc096d1969514784a4e1
2018-02-28 22:33:35 +07:00
Vadim Yanitskiy e5480d2c2b fake_trx/udp_link.py: close socket in destructor
Previously it was required to call the UDPLink.shutdown() method
manually in order to close a socket. Let's do this automatically
using the destructor of UDPLink.

Change-Id: I59c3dc61ec58cd9effeb789947d28fd602ca91f4
2018-02-27 04:40:28 +07:00
Vadim Yanitskiy d406afd23e fake_trx/burst_send.py: implement DATA capture support
Previously, this tool was only able to read a hand-crafted text
file with bursts and send them via the DATA interface. This is
not so useful...

This change implements support of reading DATA capture files,
which can be generated e.g. by trx_sniff.py or burst_gen.py.
Both standart input (stdio) and text-files are not supported
anymore.

Usage example:

  ./burst_send.py -m L1 -i capture.bin --timeslot 2

Change-Id: I626662bd1897c874421ab5178970ec19325f8a47
2018-02-20 19:29:00 +07:00
Vadim Yanitskiy 041bfc0b03 fake_trx/burst_send.py: handle both GSM and EDGE bursts
Previously, it was expected that burst length should be equal
to 148. Let's also handle EDGE bursts and use GSM constants.

Change-Id: Iab13dd06f175556137c5e25d2cbddb9bea403b09
2018-01-29 04:19:01 +07:00
Vadim Yanitskiy 630cc5a367 fake_trx/burst_send.py: also handle RSSI and ToA values
Change-Id: Idb9a5ae4a8980a320f6e620c66add7c7393d3ecb
2018-01-29 04:19:01 +07:00
Vadim Yanitskiy d273ebf611 fake_trx: use DATAMSG classes for DATA messages
The DATAMSG API, that was introduced and extended a few commits
before, provides all required methods to create, validate,
generate and parse DATA messages. Let's use it now.

Change-Id: Ibc99126dc05d873c1ba538a5f4e74866de563f56
2018-01-29 04:19:01 +07:00
Vadim Yanitskiy 5da2ac7197 fake_trx: share and use common GSM constants
Previously there were multiple definitions of some common GSM
constants in different modules. Let's share them.

Change-Id: Id6cdfbc6e8688755a0df7e44daa512c9afa7dad2
2018-01-29 03:49:35 +07:00
Vadim Yanitskiy 32462cfd62 fake_trx/burst_send.py: indicate actual burst source
Change-Id: I7e45996f4a7a2aacc962ff9b65107c6b04e7bf68
2018-01-20 16:44:19 +06:00
Vadim Yanitskiy 04aecc7f8d fake_trx: correct brief descriptions of files
Change-Id: Ie76fee4a567681a5380be90e5744621c2aa3e5f0
2017-11-21 18:39:11 +07:00
Vadim Yanitskiy eb56da3743 fake_trx: implement a new tool for burst sending
This change introduces a new tool for sending existing bursts from
file or standard input either to L1 (OsmoBTS or OsmocomBB) or to
TRX (OsmoTRX and GR-GSM TRX).

Change-Id: I2c542583252d31daac466e6c7837317fda8a7020
2017-11-21 18:25:48 +07:00