# Run gr-gsm with LimeSDR-Mini

**URL:** <https://discourse.myriadrf.org/t/run-gr-gsm-with-limesdr-mini/5881>\
**Category:** LimeSDR\
**Created:** [12 March 2020 15:19 UTC](https://discourse.myriadrf.org/t/run-gr-gsm-with-limesdr-mini/5881 "2020-03-12T15:19:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![L00pback](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/l00pback/32/3146_2.png) [@L00pback](https://discourse.myriadrf.org/u/L00pback)\
**Post date:** [12 March 2020 15:19 UTC](https://discourse.myriadrf.org/t/run-gr-gsm-with-limesdr-mini/5881/1 "2020-03-12T15:19:52Z")

</div>

I eagerly expect to make gr-gsm work thoroughly on my limeSDR-Mini.  
So I checked this

> [@GRGSM LimeSDR-Mini Ubuntu 18.04 LTS](https://discourse.myriadrf.org/t/grgsm-limesdr-mini-ubuntu-18-04-lts/3890/1):
>
> Am trying to get LimeSdr Mini to work with grgsm\_scanner on Ubuntu Server is impossible to install UHD drivers anymore does anymone has an image of working LimeSdr mini with GR-GSM??

and the project that was mentioned in this topic

> **[MyriadRF / gr-gsm · GitLab](https://gitlab.com/myriadrf/gr-gsm)**
>
> Fork of gr-gsm with LimeSDR (gr-limesdr) support

I found something that inspired me!

It seems that this project can only make _ **grgsm\_scanner** _ available on limeSDR with gr-limesdr support until now.  
I speculate that these following scripts in class `wideband_scanner` are **decisive** :

* * *

in constructor ` __init__ `

```auto
self.rtlsdr_source = limesdr.source("", 0, "")
self.rtlsdr_source.set_sample_rate(sample_rate)
self.rtlsdr_source.set_center_freq(carrier_frequency - 0.1e6, 0)
self.rtlsdr_source.set_bandwidth(sample_rate,0)
self.rtlsdr_source.set_gain(int(gain),0)

```

in method `set_carrier_frequency`

```auto
def set_carrier_frequency(self, carrier_frequency):
        self.carrier_frequency = carrier_frequency
        self.rtlsdr_source.set_rf_freq(carrier_frequency - 0.1e6, 0)

```

* * *

I compared this file with the original one at

> **[GitHub - ptrkrysik/gr-gsm: Gnuradio blocks and tools for receiving GSM...](https://github.com/ptrkrysik/gr-gsm)**
>
> Gnuradio blocks and tools for receiving GSM transmissions

and found that the source seems to be initialized by these scripts

* * *

in constructor ` __init__ `

```auto
self.rtlsdr_source = osmosdr.source(args="numchan=" + str(1) + " " +
                str(grgsm.device.get_default_args(args)))

self.rtlsdr_source.set_sample_rate(sample_rate)
self.rtlsdr_source.set_center_freq(carrier_frequency - 0.1e6, 0)
self.rtlsdr_source.set_freq_corr(ppm, 0)
self.rtlsdr_source.set_dc_offset_mode(2, 0)
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)

```

in method `set_carrier_frequency`

```auto
def set_carrier_frequency(self, carrier_frequency):
        self.carrier_frequency = carrier_frequency
        self.rtlsdr_source.set_center_freq(carrier_frequency - 0.1e6, 0)

```

* * *

I hope to get answers to these two questions:

### 1. The difference between `set_rf_freq()` and `set_center_freq()` in gr-limesdr, and what they do.

### 2. For other functions using source blocks in **gr-gsm** like

[https://gitlab.com/myriadrf/gr-gsm/-/blob/master/apps/helpers/grgsm\_capture](https://gitlab.com/myriadrf/gr-gsm/-/blob/master/apps/helpers/grgsm_capture)

### they also have similar scripts such as

```auto
self.rtlsdr_source = osmosdr.source( args="numchan=" + str(1) + " " + args )
self.rtlsdr_source.set_sample_rate(samp_rate)
self.rtlsdr_source.set_center_freq(fc - shiftoff, 0)
self.rtlsdr_source.set_freq_corr(ppm, 0)
self.rtlsdr_source.set_dc_offset_mode(2, 0)
self.rtlsdr_source.set_iq_balance_mode(2, 0)
self.rtlsdr_source.set_gain_mode(True, 0)
self.rtlsdr_source.set_gain(gain, 0)
self.rtlsdr_source.set_if_gain(20, 0)
self.rtlsdr_source.set_bb_gain(20, 0)
self.rtlsdr_source.set_antenna("", 0)
self.rtlsdr_source.set_bandwidth(250e3+abs(shiftoff), 0)

```

### Just by modifying the codes about the initialization of source block like this, can I make it work via a gr-limesdr source directly rather than gr-osmosdr? If not, what other modification should be done?

@andrewback

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [20 March 2020 11:19 UTC](https://discourse.myriadrf.org/t/run-gr-gsm-with-limesdr-mini/5881/2 "2020-03-20T11:19:29Z")

</div>

@Garmus would be best positioned to advise.
