Added gain option to the wideband_scanner - so changing gain parameter have effect
diff --git a/apps/grgsm_scanner b/apps/grgsm_scanner
index 1688310..3913713 100755
--- a/apps/grgsm_scanner
+++ b/apps/grgsm_scanner
@@ -198,7 +198,7 @@
 
 
 class wideband_scanner(gr.top_block):
-    def __init__(self, rec_len=3, sample_rate=2e6, carrier_frequency=939e6, ppm=0, args=""):
+    def __init__(self, rec_len=3, sample_rate=2e6, carrier_frequency=939e6, gain=24, ppm=0, args=""):
         gr.top_block.__init__(self, "Wideband Scanner")
 
         self.rec_len = rec_len
@@ -209,7 +209,7 @@
         # if no file name is given process data from rtl_sdr source
         print "Args=", args
         self.rtlsdr_source = osmosdr.source(args="numchan=" + str(1) + " " + args)
-
+        self.rtlsdr_source.set_min_output_buffer(int(sample_rate*rec_len))
         self.rtlsdr_source.set_sample_rate(sample_rate)
 
         # capture half of GSM channel lower than channel center (-0.1MHz)
@@ -226,7 +226,9 @@
         self.rtlsdr_source.set_iq_balance_mode(0, 0)
         self.rtlsdr_source.set_gain_mode(True, 0)
         self.rtlsdr_source.set_bandwidth(sample_rate, 0)
-
+        self.rtlsdr_source.set_gain(gain, 0)
+        self.rtlsdr_source.set_if_gain(32, 0)
+        self.rtlsdr_source.set_bb_gain(30, 0)
         self.head = blocks.head(gr.sizeof_gr_complex * 1, int(rec_len * sample_rate))
 
         # shift again by -0.1MHz in order to align channel center in 0Hz
@@ -349,7 +351,7 @@
             scanner = wideband_scanner(rec_len=6 - options.speed,
                                        sample_rate=options.samp_rate,
                                        carrier_frequency=current_freq,
-                                       ppm=options.ppm, args=options.args)
+                                       ppm=options.ppm, gain=options.gain, args=options.args)
 
             # start recording
             scanner.start()