From 89fc14ba44723cfbd88c2499ec8ab96ad993c5c4 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 16 Jun 2017 21:00:29 +0700 Subject: Implement transceiver interface This change introduces a new block 'TRX Interface', which is aimed to provide an interface for external applications, such as Osmocom MS side stack implementation - OsmocomBB. Currently one allows to exchange raw GSM bursts between GR-GSM and other applications. Moreover, there is a new 'trx.py' application, which implements a simple follow graph, where all demodulated bursts are being sent to external application via UDP link provided by 'TRX Interface'. OsmoTRX (Osmocom's fork of OpenBTS transceiver) like control interface is used to initialize, configure, start and stop the application. Messages on this interface are human readable ASCII strings, which contain a command and some related parameters. --- grc/CMakeLists.txt | 1 + grc/trx_interface/CMakeLists.txt | 22 +++++++++++++ grc/trx_interface/gsm_trx.xml | 68 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 grc/trx_interface/CMakeLists.txt create mode 100644 grc/trx_interface/gsm_trx.xml (limited to 'grc') diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 2b94539..045d6a5 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -23,6 +23,7 @@ add_subdirectory(demapping) add_subdirectory(receiver) add_subdirectory(flow_control) add_subdirectory(misc_utils) +add_subdirectory(trx_interface) install(FILES gsm_block_tree.xml DESTINATION share/gnuradio/grc/blocks ) diff --git a/grc/trx_interface/CMakeLists.txt b/grc/trx_interface/CMakeLists.txt new file mode 100644 index 0000000..752b7a7 --- /dev/null +++ b/grc/trx_interface/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright 2011,2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +install(FILES + gsm_trx.xml DESTINATION share/gnuradio/grc/blocks +) diff --git a/grc/trx_interface/gsm_trx.xml b/grc/trx_interface/gsm_trx.xml new file mode 100644 index 0000000..cf882ef --- /dev/null +++ b/grc/trx_interface/gsm_trx.xml @@ -0,0 +1,68 @@ + + + TRX interface + grgsm_trx_interface + import grgsm + grgsm.trx($remote_addr, $base_port) + + + base_port + base_port + 5700 + string + + + + remote_addr + remote_addr + 127.0.0.1 + string + + + + bursts + message + + + + OsmoTRX like UDP interface for external applications. + + There are three UDP sockets: CLCK, CTRL and DATA. + Give a base port B (5700 by default), the SCH clock + interface is at port P=B. The TRX-side control interface + is on port P=B+100+1 and the data interface is on an odd + numbered port P=B+100+2. + + Indications on the SCH Clock Interface (CLCK) + The SCH clock interface is output only (from the radio). + CLOCK gives the current value of the BTS clock to + be used by external applications. The indications are + sent whenever a transmission packet arrives that is too + late or too early. + + Commands on Control Interface (CTRL) + The control interface uses a command-response protocol. + Commands are NULL-terminated ASCII strings. Each command + has a corresponding response. This interface isn't handled + by this particular block, and should be implemented outside. + + Messages on the Data Interface + Messages on the data interface carry one radio burst per + UDP message. + + Received Data Burst: + 1 byte timeslot index + 4 bytes GSM frame number, big endian + 1 byte RSSI in -dBm + 2 bytes correlator timing offset in 1/256 symbol steps, + 2's-comp, big endian + 148 bytes soft symbol estimates, 0 -> definite "0", + 255 -> definite "1" + + Transmit Data Burst: + 1 byte timeslot index + 4 bytes GSM frame number, big endian + 1 byte transmit level wrt ARFCN max, -dB (attenuation) + 148 bytes output symbol values, 0 & 1 + + -- cgit v1.2.3