aboutsummaryrefslogtreecommitdiffstats
path: root/grc
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-06-16 21:00:29 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-07-07 22:12:52 +0700
commit89fc14ba44723cfbd88c2499ec8ab96ad993c5c4 (patch)
treebadecbb881fde1247b3f730f6dd47c3fccee5137 /grc
parent8f121c1e7c3e052ffcb63904f56de4eec7741dc2 (diff)
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.
Diffstat (limited to 'grc')
-rw-r--r--grc/CMakeLists.txt1
-rw-r--r--grc/trx_interface/CMakeLists.txt22
-rw-r--r--grc/trx_interface/gsm_trx.xml68
3 files changed, 91 insertions, 0 deletions
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 @@
+<?xml version="1.0"?>
+<block>
+ <name>TRX interface</name>
+ <key>grgsm_trx_interface</key>
+ <import>import grgsm</import>
+ <make>grgsm.trx($remote_addr, $base_port)</make>
+
+ <param>
+ <name>base_port</name>
+ <key>base_port</key>
+ <value>5700</value>
+ <type>string</type>
+ </param>
+
+ <param>
+ <name>remote_addr</name>
+ <key>remote_addr</key>
+ <value>127.0.0.1</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>bursts</name>
+ <type>message</type>
+ </sink>
+
+ <doc>
+ 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 -&gt; definite "0",
+ 255 -&gt; 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 &amp; 1
+ </doc>
+</block>