aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2016-07-20 08:12:23 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2016-07-20 08:12:23 +0200
commit2779172936228edeaf2bafe6be591cf1f80396cc (patch)
tree93162644760b1c99dc9298d6a449ceef91d46b1d /apps
parent1e2782767bd3aab47d8e358e84f37484a953f13d (diff)
Updated TCH/F decoding so it writes data to a file. Flowgraph execution never ends.
Diffstat (limited to 'apps')
-rwxr-xr-xapps/grgsm_decode8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/grgsm_decode b/apps/grgsm_decode
index da99719..94a2ba0 100755
--- a/apps/grgsm_decode
+++ b/apps/grgsm_decode
@@ -95,7 +95,9 @@ class grgsm_decoder(gr.top_block):
self.sdcch8_demapper = grgsm.gsm_sdcch8_demapper(self.timeslot)
elif self.chan_mode == 'TCHF':
self.tch_f_demapper = grgsm.tch_f_chans_demapper(self.timeslot)
- self.tch_f_decoder = grgsm.tch_f_decoder(speech_codec, speech_file)
+ self.tch_f_decoder = grgsm.tch_f_decoder(speech_codec)
+ self.tch_f_pdu_to_tagged_stream = blocks.pdu_to_tagged_stream(blocks.byte_t, "packet_len")
+ self.tch_f_file_sink = blocks.file_sink(gr.sizeof_char*1, speech_file, False)
if self.kc != [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]:
self.decryption = grgsm.decryption(self.kc, self.a5)
@@ -198,6 +200,10 @@ class grgsm_decoder(gr.top_block):
self.msg_connect(self.tch_f_decoder, "msgs", self.socket_pdu, "pdus")
self.msg_connect(self.cch_decoder, "msgs", self.socket_pdu, "pdus")
+ self.msg_connect(self.tch_f_decoder, "voice", self.tch_f_pdu_to_tagged_stream, "pdus")
+ self.connect((self.tch_f_pdu_to_tagged_stream, 0), (self.tch_f_file_sink, 0))
+
+
if self.verbose:
self.msg_connect(self.tch_f_decoder, "msgs", self.message_printer, "msgs")
self.msg_connect(self.cch_decoder, "msgs", self.message_printer, "msgs")