osmocom-bb/src/target/fake_trx
Vadim Yanitskiy ab7eb390cb fake_trx: implement a new tool for TRX protocol sniffing
This change introduces a new tool, which could be used to sniff a
single connection between L1 and TRX in both directions, filter
captured bursts by direction, timeslot and/or frame number, and
finally write them to a binary file for further analysis.

Sniffing capability is based on Scapy framework, so it should
be installed in order to run this tool. Please also note,
that sniffing requires root access. For details, see:

https://github.com/secdev/scapy
https://scapy.readthedocs.io/en/latest/

Usage example:

  sudo ./trx_sniff --frame-count 30 --timeslot 2 -o /tmp/bursts

This command will capture 30 frames on timeslot number 2, and
write them to a binary file. The format of this file is based
on TLV (Tag Length Value), that wraps each burst:

  ... |-TAG (byte)-|-LEN (byte)-|-BURST (LEN bytes)-| ...

  TAG 0x01 - a message coming from L1 to TRX
  TAG 0x02 - a message coming from TRX to L1

Change-Id: I6e65e1d657574cc3e67bc7cdb1c01ef6bf08ecde
2018-01-21 02:13:47 +06:00
..
.gitignore target/fake_trx: initial release of virtual transceiver 2017-11-19 17:35:07 +07:00
README fake_trx: implement a new tool for TRX protocol sniffing 2018-01-21 02:13:47 +06:00
burst_fwd.py fake_trx: implement simple freq. filter 2017-11-19 17:35:07 +07:00
burst_gen.py fake_trx: correct brief descriptions of files 2017-11-21 18:39:11 +07:00
burst_send.py fake_trx/burst_send.py: indicate actual burst source 2018-01-20 16:44:19 +06:00
clck_gen.py fake_trx/clck_gen.py: reset the clck_src when calling stop() 2017-12-09 01:24:05 +07:00
ctrl_cmd.py fake_trx: correct brief descriptions of files 2017-11-21 18:39:11 +07:00
ctrl_if.py fake_trx/ctrl_if.py: allow adding custom params to response 2017-11-19 17:35:07 +07:00
ctrl_if_bb.py fake_trx: implement simple freq. filter 2017-11-19 17:35:07 +07:00
ctrl_if_bts.py fake_trx: don't sent clock indications until POWERON 2017-12-09 01:25:52 +07:00
data_if.py fake_trx: correct brief descriptions of files 2017-11-21 18:39:11 +07:00
fake_pm.py fake_trx: implement power measurement emulation 2017-11-19 17:35:07 +07:00
fake_trx.py fake_trx: don't sent clock indications until POWERON 2017-12-09 01:25:52 +07:00
rand_burst_gen.py fake_trx: whitespace fix 2017-11-19 17:35:07 +07:00
trx_sniff.py fake_trx: implement a new tool for TRX protocol sniffing 2018-01-21 02:13:47 +06:00
udp_link.py fake_trx: fix compatibility with Python 3 2017-11-19 17:35:07 +07:00

README

This is a set of tools for creating a virtual Um-interface between
OsmocomBB and OsmoBTS. It may be extremely useful for testing and
development of GSM stack, including both sides (MS and BTS). This
software implements OsmoTRX (Osmocom's fork of OpenBTS transceiver)
style clock (CLCK), control (CTRL) and data interfaces. So, OsmoBTS
source code doesn't require any modifications, while for OsmocomBB
you will need to use a new application - trxcon, which can be found
in the 'fixeria/trx' branch until one is merged to master.

Brief description of available applications:

  - fake_trx.py - main application, that allows to connect both
    OsmocomBB and OsmoBTS without actual RF hardware. Currently
    only a single MS may work with a single BTS.

  - clck_gen.py - a peripheral tool aimed to emulate TDMA frame
    clock generator. Could be used for testing and clock
    synchronization of multiple applications. It should be noted,
    that one relays on generic system timer (via Python), so
    a random clock jitter takes place.

  - ctrl_cmd.py - another peripheral tool, which could be used
    for sending CTRL commands directly in manual mode, and also
    for application fuzzing.

  - burst_gen.py - a tool for sending GSM bursts either to L1
    (OsmoBTS or OsmocomBB) or to TRX (OsmoTRX and GR-GSM TRX).
    Currently it is only possible to generate random bursts of
    different types: NB, FB, SB, AB.

  - burst_send.py - a tool for sending existing bursts from file
    or standard input either to L1 (OsmoBTS or OsmocomBB) or to
    TRX (OsmoTRX and GR-GSM TRX).

  - trx_sniff.py - Scapy-based TRX protocol sniffer. Allows one
    to observe a single connection between TRX and L1, and vice
    versa. Also provides some capabilities for filtering bursts
    by direction, frame and timeslot numbers, and for recording
    captured messages to a binary file.