From a401f3196600f6d784870629957f18e148ca9d12 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 24 Nov 2010 22:06:57 +0100 Subject: gsm-receive: import dieters A5 / configuration support into the USRP version --- gsm-receiver/src/python/gsm_receive_usrp.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gsm-receiver') diff --git a/gsm-receiver/src/python/gsm_receive_usrp.py b/gsm-receiver/src/python/gsm_receive_usrp.py index 9107f80..1cde651 100755 --- a/gsm-receiver/src/python/gsm_receive_usrp.py +++ b/gsm-receiver/src/python/gsm_receive_usrp.py @@ -111,25 +111,30 @@ class gsm_receiver_first_blood(gr.top_block): return interpolator def _set_receiver(self): - receiver = gsm.receiver_cf(self.tuner_callback, self.synchronizer_callback, self.options.osr, "0000000000000000") + receiver = gsm.receiver_cf(self.tuner_callback, self.synchronizer_callback, self.options.osr, self.options.key.replace(' ', '').lower(), self.options.configuration.upper()) return receiver def _process_options(self): parser = OptionParser(option_class=eng_option) parser.add_option("-d", "--decim", type="int", default=112, help="Set USRP decimation rate to DECIM [default=%default]") + parser.add_option("-r", "--osr", type="int", default=4, + help="Oversampling ratio [default=%default]") parser.add_option("-I", "--inputfile", type="string", default="cfile", help="Input filename") parser.add_option("-O", "--outputfile", type="string", default="cfile2.out", help="Output filename") parser.add_option("-R", "--rx-subdev-spec", type="subdev", default=None, help="Select USRP Rx side A or B (default=first one with a daughterboard)") - parser.add_option("-r", "--osr", type="int", default=4, - help="Oversampling ratio [default=%default]") parser.add_option("-f", "--freq", type="eng_float", default="950.4M", help="set frequency to FREQ", metavar="FREQ") parser.add_option("-g", "--gain", type="eng_float", default=None, help="Set gain in dB (default is midpoint)") + parser.add_option("-k", "--key", type="string", default="AD 6A 3E C2 B4 42 E4 00", + help="KC session key") + parser.add_option("-c", "--configuration", type="string", default="", + help="Decoder configuration") + (options, args) = parser.parse_args () return (options, args) @@ -147,5 +152,3 @@ def main(): if __name__ == '__main__': main() - - -- cgit v1.2.3