aboutsummaryrefslogtreecommitdiffstats
path: root/grc
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2018-04-16 22:21:29 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2018-04-16 22:21:29 +0200
commit8a8d41a58320d5f30713a6e6362c86d5db6de1de (patch)
treed95b1badab52b83126d57d410dd8e92e7a255c8e /grc
parent8b9b88d788cc5064c0f6d7aa60a14954aee59eab (diff)
parentfe4db93e6d03e92a958664bfffcd0e2923f20e34 (diff)
Merge branch 'ptrkrysik/trx' into development
Diffstat (limited to 'grc')
-rw-r--r--grc/CMakeLists.txt1
-rw-r--r--grc/flow_control/CMakeLists.txt1
-rw-r--r--grc/flow_control/gsm_burst_type_filter.xml32
-rw-r--r--grc/gsm_block_tree.xml11
-rw-r--r--grc/misc_utils/CMakeLists.txt5
-rw-r--r--grc/misc_utils/gsm_burst_to_fn_time.xml19
-rw-r--r--grc/misc_utils/gsm_trx_burst_if.xml58
-rw-r--r--grc/transmitter/CMakeLists.txt27
-rw-r--r--grc/transmitter/gsm_gen_test_ab.xml19
-rw-r--r--grc/transmitter/gsm_gmsk_mod.xml47
-rw-r--r--grc/transmitter/gsm_preprocess_tx_burst.xml19
-rw-r--r--grc/transmitter/gsm_txtime_bursts_tagger.xml69
-rw-r--r--grc/transmitter/gsm_txtime_setter.xml84
13 files changed, 391 insertions, 1 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index 2b94539..c3646a2 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(transmitter)
install(FILES
gsm_block_tree.xml DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/flow_control/CMakeLists.txt b/grc/flow_control/CMakeLists.txt
index a6a7319..1f98d8f 100644
--- a/grc/flow_control/CMakeLists.txt
+++ b/grc/flow_control/CMakeLists.txt
@@ -21,6 +21,7 @@ install(FILES
gsm_burst_timeslot_splitter.xml
gsm_burst_fnr_filter.xml
gsm_burst_timeslot_filter.xml
+ gsm_burst_type_filter.xml
gsm_dummy_burst_filter.xml
gsm_burst_sdcch_subslot_splitter.xml
gsm_burst_sdcch_subslot_filter.xml
diff --git a/grc/flow_control/gsm_burst_type_filter.xml b/grc/flow_control/gsm_burst_type_filter.xml
new file mode 100644
index 0000000..d7d86f4
--- /dev/null
+++ b/grc/flow_control/gsm_burst_type_filter.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<block>
+ <name>Burst Type Filter</name>
+ <key>gsm_burst_type_filter</key>
+ <import>import grgsm</import>
+ <make>grgsm.burst_type_filter($selected_burst_types)</make>
+
+ <param>
+ <name>Selected burst types</name>
+ <key>selected_burst_types</key>
+ <value>[0,1,2,3,4,5,6,7]</value>
+ <type>int_vector</type>
+ </param>
+
+ <sink>
+ <name>bursts_in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>bursts_out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+
+ <doc>
+This block filters bursts based on their type.
+
+For more information on burst types, see GSM 05.02.
+ </doc>
+</block>
diff --git a/grc/gsm_block_tree.xml b/grc/gsm_block_tree.xml
index c418fab..29a1a43 100644
--- a/grc/gsm_block_tree.xml
+++ b/grc/gsm_block_tree.xml
@@ -22,6 +22,14 @@
<block>gsm_input</block>
</cat>
<cat>
+ <name>Transmitter</name>
+ <block>gsm_txtime_bursts_tagger</block>
+ <block>gsm_txtime_setter</block>
+ <block>gsm_gmsk_mod</block>
+ <block>gsm_preprocess_tx_burst</block>
+ <block>gsm_gen_test_ab</block>
+ </cat>
+ <cat>
<name>Logical channels demapping</name>
<block>gsm_universal_ctrl_chans_demapper</block>
<block>gsm_bcch_ccch_demapper</block>
@@ -45,6 +53,7 @@
<block>gsm_burst_timeslot_filter</block>
<block>gsm_burst_sdcch_subslot_filter</block>
<block>gsm_burst_fnr_filter</block>
+ <block>gsm_burst_type_filter</block>
<block>gsm_dummy_burst_filter</block>
<block>gsm_uplink_downlink_splitter</block>
</cat>
@@ -66,6 +75,8 @@
<block>gsm_clock_offset_corrector_tagged</block>
<block>gsm_msg_to_tag.xml</block>
<block>gsm_tmsi_dumper</block>
+ <block>gsm_trx_burst_if</block>
+ <block>gsm_burst_to_fn_time</block>
</cat>
</cat>
</cat>
diff --git a/grc/misc_utils/CMakeLists.txt b/grc/misc_utils/CMakeLists.txt
index da41d6c..78f66c9 100644
--- a/grc/misc_utils/CMakeLists.txt
+++ b/grc/misc_utils/CMakeLists.txt
@@ -32,6 +32,9 @@ install(FILES
gsm_burst_file_source.xml
gsm_message_file_sink.xml
gsm_message_file_source.xml
+ gsm_trx_burst_if.xml
gsm_msg_to_tag.xml
- gsm_controlled_fractional_resampler_cc.xml DESTINATION share/gnuradio/grc/blocks
+ gsm_controlled_fractional_resampler_cc.xml
+ gsm_burst_to_fn_time.xml
+ DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/misc_utils/gsm_burst_to_fn_time.xml b/grc/misc_utils/gsm_burst_to_fn_time.xml
new file mode 100644
index 0000000..0471605
--- /dev/null
+++ b/grc/misc_utils/gsm_burst_to_fn_time.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<block>
+ <name>Burst to fn_time</name>
+ <key>gsm_burst_to_fn_time</key>
+ <import>import grgsm</import>
+ <make>grgsm.burst_to_fn_time()</make>
+
+ <sink>
+ <name>bursts_in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>fn_time_out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+</block>
diff --git a/grc/misc_utils/gsm_trx_burst_if.xml b/grc/misc_utils/gsm_trx_burst_if.xml
new file mode 100644
index 0000000..99427b3
--- /dev/null
+++ b/grc/misc_utils/gsm_trx_burst_if.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<block>
+ <name>TRX Burst Interface</name>
+ <key>gsm_trx_burst_if</key>
+ <import>import grgsm</import>
+ <make>grgsm.trx_burst_if($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>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>bursts</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+
+ <doc>
+ OsmoTRX like UDP burst interface for external applications.
+
+ There are two UDP connections, where each message carries
+ one radio burst with header. Give a base port B (5700 by default).
+ One connection at port P=B+100+2 is used for sending received bursts
+ to an external application. Another one at port P=B+2 is used to
+ obtain to be transmitted bursts.
+
+ Received burst format:
+ 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"
+
+ To be transmitted burst format:
+ 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>
diff --git a/grc/transmitter/CMakeLists.txt b/grc/transmitter/CMakeLists.txt
new file mode 100644
index 0000000..4df2abb
--- /dev/null
+++ b/grc/transmitter/CMakeLists.txt
@@ -0,0 +1,27 @@
+# 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_gmsk_mod.xml
+ gsm_txtime_bursts_tagger.xml
+ gsm_txtime_setter.xml
+ gsm_preprocess_tx_burst.xml
+ gsm_gen_test_ab.xml
+ DESTINATION share/gnuradio/grc/blocks
+)
diff --git a/grc/transmitter/gsm_gen_test_ab.xml b/grc/transmitter/gsm_gen_test_ab.xml
new file mode 100644
index 0000000..3cb8b11
--- /dev/null
+++ b/grc/transmitter/gsm_gen_test_ab.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<block>
+ <name>Gen Test AB</name>
+ <key>gsm_gen_test_ab</key>
+ <import>import grgsm</import>
+ <make>grgsm.gen_test_ab()</make>
+
+ <sink>
+ <name>bursts_in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>bursts_out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+</block>
diff --git a/grc/transmitter/gsm_gmsk_mod.xml b/grc/transmitter/gsm_gmsk_mod.xml
new file mode 100644
index 0000000..4aad01b
--- /dev/null
+++ b/grc/transmitter/gsm_gmsk_mod.xml
@@ -0,0 +1,47 @@
+<block>
+ <name>GMSK Modulator for GSM</name>
+ <key>gsm_gmsk_mod</key>
+ <import>from grgsm import gsm_gmsk_mod</import>
+ <make>gsm_gmsk_mod(
+ BT=$BT,
+ pulse_duration=$pulse_duration,
+ sps=$sps,
+)</make>
+ <callback>set_BT($BT)</callback>
+ <callback>set_pulse_duration($pulse_duration)</callback>
+ <callback>set_sps($sps)</callback>
+ <param>
+ <name>3 dB Time-Bandwidth Product</name>
+ <key>BT</key>
+ <value>4</value>
+ <type>raw</type>
+ </param>
+ <param>
+ <name>Pulse Duration</name>
+ <key>pulse_duration</key>
+ <value>4</value>
+ <type>raw</type>
+ </param>
+ <param>
+ <name>Samples/Symbol</name>
+ <key>sps</key>
+ <value>4</value>
+ <type>raw</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ <vlen>1</vlen>
+ <optional>1</optional>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ <vlen>1</vlen>
+ <optional>1</optional>
+ </source>
+ <doc>Piotr Krysik
+GMSK Modulator for GSM
+ </doc>
+ <grc_source>gr-gsm/hier_blocks/transmitter/gsm_gmsk_mod.grc</grc_source>
+</block>
diff --git a/grc/transmitter/gsm_preprocess_tx_burst.xml b/grc/transmitter/gsm_preprocess_tx_burst.xml
new file mode 100644
index 0000000..70b447e
--- /dev/null
+++ b/grc/transmitter/gsm_preprocess_tx_burst.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<block>
+ <name>Preprocess Tx burst</name>
+ <key>gsm_preprocess_tx_burst</key>
+ <import>import grgsm</import>
+ <make>grgsm.preprocess_tx_burst()</make>
+
+ <sink>
+ <name>bursts_in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>bursts_out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+</block>
diff --git a/grc/transmitter/gsm_txtime_bursts_tagger.xml b/grc/transmitter/gsm_txtime_bursts_tagger.xml
new file mode 100644
index 0000000..4e42886
--- /dev/null
+++ b/grc/transmitter/gsm_txtime_bursts_tagger.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<block>
+ <name>txtime_bursts_tagger</name>
+ <key>gsm_txtime_bursts_tagger</key>
+ <import>import grgsm</import>
+ <make>grgsm.txtime_bursts_tagger($init_fn, $init_time, $time_hint, $timing_advance, $delay_correction)</make>
+ <callback>set_fn_time_reference($init_fn, $init_time)</callback>
+ <callback>set_time_hint($time_hint)</callback>
+ <callback>set_timing_advance($timing_advance)</callback>
+ <callback>set_delay_correction($delay_correction)</callback>
+
+ <param>
+ <name>init_fn</name>
+ <key>init_fn</key>
+ <value>None</value>
+ <type>raw</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>init_time</name>
+ <key>init_time</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>time_hint</name>
+ <key>time_hint</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>timing_advance</name>
+ <key>timing_advance</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>delay_correction</name>
+ <key>delay_correction</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <sink>
+ <name>fn_time</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <sink>
+ <name>bursts</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>bursts</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+</block>
diff --git a/grc/transmitter/gsm_txtime_setter.xml b/grc/transmitter/gsm_txtime_setter.xml
new file mode 100644
index 0000000..648f4d9
--- /dev/null
+++ b/grc/transmitter/gsm_txtime_setter.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<block>
+ <name>txtime_setter</name>
+ <key>gsm_txtime_setter</key>
+ <import>import grgsm</import>
+ <make>grgsm.txtime_setter($init_fn if ($init_fn is not None) else 0xffffffff, $init_time_secs, $init_time_fracs, $time_hint_secs, $time_hint_fracs, $timing_advance, $delay_correction)</make>
+
+ <callback>set_fn_time_reference($init_fn, $init_time_secs, $init_time_fracs)</callback>
+ <callback>set_time_hint($time_hint_secs, $time_hint_secs)</callback>
+ <callback>set_timing_advance($timing_advance)</callback>
+ <callback>set_delay_correction($delay_correction)</callback>
+
+ <param>
+ <name>init_fn</name>
+ <key>init_fn</key>
+ <value>None</value>
+ <type>raw</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>init_time_secs</name>
+ <key>init_time_secs</key>
+ <value>0</value>
+ <type>int</type>
+ <hide>part</hide>
+ </param>
+ <param>
+ <name>init_time_fracs</name>
+ <key>init_time_fracs</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>time_hint_secs</name>
+ <key>time_hint_secs</key>
+ <value>0</value>
+ <type>int</type>
+ <hide>part</hide>
+ </param>
+ <param>
+ <name>time_hint_fracs</name>
+ <key>time_hint_fracs</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>timing_advance</name>
+ <key>timing_advance</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <param>
+ <name>delay_correction</name>
+ <key>delay_correction</key>
+ <value>0</value>
+ <type>float</type>
+ <hide>part</hide>
+ </param>
+
+ <sink>
+ <name>fn_time</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <sink>
+ <name>bursts_in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>bursts_out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+</block>