# Testing OpenLTE

**URL:** https://discourse.myriadrf.org/t/testing-openlte/2460
**Category:** RAN Forum
**Created:** [13 March 2018 19:30 UTC](https://discourse.myriadrf.org/t/testing-openlte/2460 "2018-03-13T19:30:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cswiger](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/cswiger/32/197_2.png) [@cswiger](https://discourse.myriadrf.org/u/cswiger)
#### Post date: [13 March 2018 19:30 UTC](https://discourse.myriadrf.org/t/testing-openlte/2460/1 "2018-03-13T19:30:34Z")

</div>

Gang - having some success with OpenLTE - at least with LTE\_fdd\_dl\_scan of local towers. This is a UHD app using Soapy/grosmo so discovering what antenna it was using was a mystery. Putting (hack in, in my case) a few informative statements in the source openlte\_v00-20-05/LTE\_fdd\_dl\_scan/src/LTE\_fdd\_dl\_scan\_flowgraph.cc helped, plus testing different antenna, also playing around with other ‘get’ methods:

> GLOBAL VARIABLES  
> osmosdr::gain\_range\_t grange;
> 
> ```
> switch(hardware_type)
> {
> case LTE_FDD_DL_SCAN_HW_TYPE_USRP_B:
> printf("hw type USRP_B and LimeSDR\n");
> samp_src->set_sample_rate(15360000);
> samp_src->set_gain_mode(false);
> samp_src->set_gain(61); // set for max
> samp_src->set_bandwidth(10000000);
> std::cout << "Using antenna: " << samp_src->get_antenna() << std::endl;
> grange = samp_src->get_gain_range();
> printf("gains: %f to %f, step %f\n",grange.start(),grange.stop(),grange.step());
> break;
> 
> ```

compile and run prints in the scanner window, when started:

> – Using subdev spec ‘0:0 1:1’.  
> hw type USRP\_B and LimeSDR  
> – RX LPF configured  
> Using antenna: LNAH  
> gains: -12.000000 to 61.000000, step 0.100000

then in the telnet control window have fun band scanning:

> \*\*\* LTE FDD DL SCAN \*\*\*  
> Type help to see a list of commands  
> write band 5  
> info channel\_found\_begin freq=2130000000 dl\_earfcn=2150 freq\_offset=1.53009 phys\_cell\_id=244 sfn=454 n\_ant=4 phich\_dur=Normal phich\_res=1/6 bandwidth=10  
> info channel\_found\_end freq=2130000000 dl\_earfcn=2150 freq\_offset=1.53009 phys\_cell\_id=244

---

<div class="post-metadata">

### Author: ![cswiger](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/cswiger/32/197_2.png) [@cswiger](https://discourse.myriadrf.org/u/cswiger)
#### Post date: [25 March 2018 00:04 UTC](https://discourse.myriadrf.org/t/testing-openlte/2460/2 "2018-03-25T00:04:27Z")

</div>

Made some progress - I know the ebay phone SGS4Mini is European from the bands supported

> Band 3 - dl 1805 to 1880  
> Band 7 - dl 2620 to 2690  
> Band 8 - dl 925 to 960  
> Band 20 - dl 791 to 821

and from the IMEI it’s made in Finland { [Find Out Galaxy Smartphone Country Of Origin From IMEI Code - SamsungSFour.Com](http://www.samsungsfour.com/tutorials/find-out-galaxy-smartphone-country-of-origin-from-imei-code.html) } - the OAI France MCC/MNC does not work, neither does a UK one, but testing with Finland 244 / 91 worked.  
Picked Band 20 so I could watch with a usrp/tvrx on 806Mhz (earfcn 6300) and after turning gains up to levels like in the OAI config (tx/rx\_gain 100) they are talking, but so far the phone just registers over and over. Not using a proper duplexer, just antenna at 180°- maybe try various gains.

Just goes up the C-RNTI re-registering over and over it looks like:

> 03/24/2018 19:20:38.238954 info phy LTE\_fdd\_enb\_phy.cc 485 Received PDSCH schedule from MAC CURRENT\_TTI:MAC=1588,PHY=1586 N\_dl\_allocs=1 N\_ul\_allocs=0  
> 03/24/2018 19:20:38.247943 info phy LTE\_fdd\_enb\_phy.cc 513 Received PUSCH schedule from MAC CURRENT\_TTI:MAC=1594,PHY=1592 N\_ul\_decodes=1  
> 03/24/2018 19:20:38.338181 info user LTE\_fdd\_enb\_user\_mgr.cc 166 C-RNTI=336 assigned  
> 03/24/2018 19:20:38.338285 info mac LTE\_fdd\_enb\_mac.cc 1071 RAR scheduled 1  
> 03/24/2018 19:20:38.338438 info mac LTE\_fdd\_enb\_mac.cc 1274 RAR sent 1684 1691 1688 1694 430020C80C0150  
> 03/24/2018 19:20:38.338477 warning msgq LTE\_fdd\_enb\_msgq.cc 234 phy\_to\_mac circular buffer empty on receive  
> 03/24/2018 19:20:38.339321 info phy LTE\_fdd\_enb\_phy.cc 485 Received PDSCH schedule from MAC CURRENT\_TTI:MAC=1688,PHY=1686 N\_dl\_allocs=1 N\_ul\_allocs=0  
> 03/24/2018 19:20:38.347902 info phy LTE\_fdd\_enb\_phy.cc 513 Received PUSCH schedule from MAC CURRENT\_TTI:MAC=1694,PHY=1692 N\_ul\_decodes=1  
> 03/24/2018 19:20:42.937929 info user LTE\_fdd\_enb\_user\_mgr.cc 623 C-RNTI allocation timer expiry C-RNTI=332  
> 03/24/2018 19:20:42.938042 info user LTE\_fdd\_enb\_user\_mgr.cc 194 C-RNTI=332 released  
> 03/24/2018 19:20:43.038294 info user LTE\_fdd\_enb\_user\_mgr.cc 623 C-RNTI allocation timer expiry C-RNTI=333  
> 03/24/2018 19:20:43.038396 info user LTE\_fdd\_enb\_user\_mgr.cc 194 C-RNTI=333 released  
> 03/24/2018 19:20:43.138164 info user LTE\_fdd\_enb\_user\_mgr.cc 623 C-RNTI allocation timer expiry C-RNTI=334  
> 03/24/2018 19:20:43.138268 info user LTE\_fdd\_enb\_user\_mgr.cc 194 C-RNTI=334 released  
> 03/24/2018 19:20:43.238043 info user LTE\_fdd\_enb\_user\_mgr.cc 623 C-RNTI allocation timer expiry C-RNTI=335  
> 03/24/2018 19:20:43.238144 info user LTE\_fdd\_enb\_user\_mgr.cc 194 C-RNTI=335 released  
> 03/24/2018 19:20:43.337918 info user LTE\_fdd\_enb\_user\_mgr.cc 623 C-RNTI allocation timer expiry C-RNTI=336  
> 03/24/2018 19:20:43.338046 info user LTE\_fdd\_enb\_user\_mgr.cc 194 C-RNTI=336 released

– Make connection: ‘LimeSDR-USB [USB 3.0] 9060B00471F23’  
– Reference clock 30.72 MHz  
– Device name: LimeSDR-USB  
– Reference: 3.072e+07 MHz  
– LMS7002M calibration values caching Disable  
RX Antenna: LNAH  
TX Antenna: BAND1

[![](http://swigerco.com/Screenshot_2018-03-24-23-07-53.png) ](http://swigerco.com/Screenshot_2018-03-24-23-07-53.png)

Interestingly the device can actually detect a local US Band 5 ATT tower.

---

<div class="post-metadata">

### Author: ![dast](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dast](https://discourse.myriadrf.org/u/dast)
#### Post date: [4 November 2018 20:07 UTC](https://discourse.myriadrf.org/t/testing-openlte/2460/3 "2018-11-04T20:07:21Z")

</div>

hey , did you have success to run nodeB with openlte and LimeSDR ? any idea please how to do it ?

---

<div class="post-metadata">

### Author: ![bastienbaranoff](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@bastienbaranoff](https://discourse.myriadrf.org/u/bastienbaranoff)
#### Post date: [4 December 2019 22:01 UTC](https://discourse.myriadrf.org/t/testing-openlte/2460/4 "2019-12-04T22:01:15Z")

</div>

Hello chuck must take a look at this  
— …/openlte-code/LTE\_fdd\_enodeb/src/LTE\_fdd\_enb\_radio.cc 2019-12-02 07:49:57.297553345 +0100  
+++ …/openlte/LTE\_fdd\_enodeb/src/LTE\_fdd\_enb\_radio.cc 2019-12-04 21:58:21.253298602 +0100  
@@ -1,4 +1,4 @@  
-#line 2 “LTE\_fdd\_enb\_radio.cc” // Make **FILE** omit the path  
+// Make **FILE** omit the path  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

```
 Copyright 2013-2017 Ben Wojtowicz

```

@@ -229,7 +229,7 @@  
try  
{  
// Setup the USRP

- 

```
   if(devs[idx-1]["type"] == "x300")

```

- 

```
   if(devs[idx-1]["type"] == "soapy")
   {
       devs[idx-1]["master_clock_rate"] = "184320000";
       master_clock_set = true;

```

## @@ -252,7 +252,8 @@ usrp-\>set\_rx\_freq((double)liblte\_interface\_ul\_earfcn\_to\_frequency(ul\_earfcn)); usrp-\>set\_tx\_gain(tx\_gain); usrp-\>set\_rx\_gain(rx\_gain);

- 

```
       usrp->set_tx_antenna("BAND2");

```

- 

```
       usrp->set_rx_antenna("LNAH");
       // Setup the TX and RX streams
       tx_stream = usrp->get_tx_stream(stream_args);
       rx_stream = usrp->get_rx_stream(stream_args);

```

@@ -822,7 +823,7 @@  
buffer\_size = 1024;  
}  
status = bladerf\_sync\_config(bladerf,

- 

```
                            BLADERF_MODULE_TX,

```

- 

```
                           BLADERF_TX_X1,
                            BLADERF_FORMAT_SC16_Q11_META,
                            BLADERF_NUM_BUFFERS,
                            buffer_size,

```

@@ -842,7 +843,7 @@

```
 // Setup sync RX
 status = bladerf_sync_config(bladerf,

```

- 

```
                            BLADERF_MODULE_RX,

```

- 

```
                           BLADERF_RX_X1,
                            BLADERF_FORMAT_SC16_Q11_META,
                            BLADERF_NUM_BUFFERS,
                            buffer_size,

```

@@ -974,7 +975,7 @@  
if(radio\_params-\>init\_needed)  
{  
// Assume RX\_timestamp and TX\_timestamp difference is 0

- 

```
   bladerf_get_timestamp(bladerf, BLADERF_MODULE_RX, (uint64_t*)&rx_ts);

```

- 

```
   bladerf_get_timestamp(bladerf, BLADERF_RX, (uint64_t*)&rx_ts);
   next_tx_ts = rx_ts + radio_params->samp_rate; // 1 second to make sure everything is setup
   metadata_rx.flags = 0;
   metadata_rx.timestamp = next_tx_ts - (radio_params->N_samps_per_subfr*2); // Retard RX by 2 subframes
```
