Successful srsLTE connection between LimeNET-micro and LimeSDR-mini on same machine

Hello,

I managed to achieve a successful cell attach and registration between a LimeSDR-mini acting as eNB and a LimeNET-micro acting as UE, both running on the same computer.
Getting srsLTE to work was not easy, it seems a regression was introduced this year in the eNB codebase -producing SOAPY_SDR_TIMEOUT stream errors, so I had to use an earlier version of the code.

Software versions:
SoapySDR - tag 0.7.1
LimeSuite - commit 1b0309b385547db64ef116618c774c8ce62de0d5
srsLTE - commit d045213fb9cbf98c83c06d7c17197a9dcbfddacf

Configuration: EARFCN was chosen within the amateur radio band 2305 - 2400 MHz.
time_adv_nsamples was set to 70 for both eNB and UE.
Number of PRBs selected for eNB was 15 to fit within LimeNET-micro USB2.0 bandwidth.

A minor patch was necessary for the Soapy driver of srsLTE. Unfortunately the default code does not allow us to choose between multiple devices so I made a 4 line hack to enable the UE to run on the same machine as the eNB:

diff --git a/lib/src/phy/rf/rf_soapy_imp.c b/lib/src/phy/rf/rf_soapy_imp.c
index 8aebf8be9..4ecaa7b54 100644
--- a/lib/src/phy/rf/rf_soapy_imp.c
+++ b/lib/src/phy/rf/rf_soapy_imp.c
@@ -297,8 +297,14 @@ int rf_soapy_open_multi(char* args, void** h, uint32_t num_requested_channels)
     }
     printf("\n");
   }
+  SoapySDRDevice* sdr;
+  
+  if (args && (strstr(args, "nextdev"))) {
+      sdr = SoapySDRDevice_make(&(soapy_args[1]));
+  } else {
+      sdr = SoapySDRDevice_make(&(soapy_args[0]));
+  }

-  SoapySDRDevice* sdr = SoapySDRDevice_make(&(soapy_args[0]));
   if (sdr == NULL) {
     printf("Failed to create Soapy object\n");
     return SRSLTE_ERROR;

Logs below show successful attach and IP assignment by EPC:

=======================================
Initial UE message: LIBLTE_MME_MSG_TYPE_ATTACH_REQUEST
Received Initial UE message – Attach Request
Attach request – IMSI: 001010123456789
Attach request – eNB-UE S1AP Id: 1
Attach request – Attach type: 1
Attach Request – UE Network Capabilities EEA: 11110000
Attach Request – UE Network Capabilities EIA: 01110000
Attach Request – MS Network Capabilities Present: false
PDN Connectivity Request – EPS Bearer Identity requested: 0
PDN Connectivity Request – Procedure Transaction Id: 1
PDN Connectivity Request – ESM Information Transfer requested: false
Downlink NAS: Sending Authentication Request
UL NAS: Received Authentication Response
Authentication Response – IMSI 001010123456789
UE Authentication Accepted.
Generating KeNB with UL NAS COUNT: 0
Downlink NAS: Sending NAS Security Mode Command.
UL NAS: Received Security Mode Complete
Security Mode Command Complete – IMSI: 001010123456789
Getting subscription information – QCI 7
Sending Create Session Request.
Creating Session Response – IMSI: 1010123456789
Creating Session Response – MME control TEID: 1
Received GTP-C PDU. Message type: GTPC_MSG_TYPE_CREATE_SESSION_REQUEST
SPGW: Allocated Ctrl TEID 1
SPGW: Allocated User TEID 1
SPGW: Allocate UE IP 172.16.0.2
Received Create Session Response
Create Session Response – SPGW control TEID 1
Create Session Response – SPGW S1-U Address: 127.0.1.100
SPGW Allocated IP 172.16.0.2 to IMSI 001010123456789
Adding attach accept to Initial Context Setup Request
Initial Context Setup Request – eNB UE S1AP Id 1, MME UE S1AP Id 1
Initial Context Setup Request – E-RAB id 5
Initial Context Setup Request – S1-U TEID 0x1. IP 127.0.1.100
Initial Context Setup Request – S1-U TEID 0x1. IP 127.0.1.100
Initial Context Setup Request – QCI 7
Received Initial Context Setup Response
E-RAB Context Setup. E-RAB id 5
E-RAB Context – eNB TEID 0x4f0003; eNB GTP-U Address 127.0.1.1
UL NAS: Received Attach Complete
Unpacked Attached Complete Message. IMSI 1010123456789
Unpacked Activate Default EPS Bearer message. EPS Bearer id 5
Received GTP-C PDU. Message type: GTPC_MSG_TYPE_MODIFY_BEARER_REQUEST
Sending EMM Information
Received UE Context Release Request. MME-UE S1AP Id 1
There are active E-RABs, send release access bearers request
Received GTP-C PDU. Message type: GTPC_MSG_TYPE_RELEASE_ACCESS_BEARERS_REQUEST
UE is ECM IDLE.
Received UE Context Release Complete. MME-UE S1AP Id 1
UE is not ECM connected. No need to release S1-U. MME UE S1AP Id 1
UE Context Release Completed.

=======================================

3 Likes

I should also mention that I keep getting an error that I did not manage to track yet from the eNB and UE to the tune of:
[ERROR] Tx Calibration: MCU error 4 (SXT tune failed)

Full eNB log below (UE attach was successful despite above error):

================================
[sudo] password for adrian:
linux; GNU C++ version 6.3.0 20170221; Boost_106200; UHD_003.009.005-0-unknown

Built in Release mode using commit d045213fb on branch HEAD.

— Software Radio Systems LTE eNodeB —

Reading configuration file /etc/srslte/enb.conf…
Opening 1 RF devices with 1 RF channels…
Opening USRP with args:
Error opening UHD: code 11
Soapy has found device #0: addr=24607:1027, driver=lime, label=LimeSDR Mini [USB 3.0] 1D5889714444FC, media=USB 3.0, module=FT601, name=LimeSDR Mini, serial=1D5889714444FC,
Soapy has found device #1: addr=24607:1027, driver=lime, label=LimeNET-Micro [USB 2.0] 583A25BFD101, media=USB 2.0, module=FT601, name=LimeNET-Micro, serial=00583A25BFD101,
[INFO] Make connection: ‘LimeSDR Mini [USB 3.0] 1D5889714444FC’
[INFO] Reference clock 40.00 MHz
[INFO] Device name: LimeSDR-Mini
[INFO] Reference: 40 MHz
[INFO] LMS7002M register cache: Disabled
Setting up Rx stream with 1 channel(s)
Setting up Tx stream with 1 channel(s)
[INFO] RX LPF configured
[INFO] RX LPF configured
Set Rx bandwidth to 2.50 MHz
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 5.00 MHz
[INFO] Filter calibrated. Filter order-2nd, set to 50 MHz
[INFO] TX LPF configured
Set Tx bandwidth to 50.00 MHz
Available device sensors:

  • clock_locked
  • lms7_temp
    Available sensors for Rx channel 0:
  • lo_locked
    [ERROR] Tx Calibration: MCU error 4 (SXT tune failed)
    [INFO] Rx calibration finished
    State of gain elements for Rx channel 0 (AGC not supported):
  • TIA: 9.00 dB
  • LNA: 30.00 dB
  • PGA: -4.00 dB
    State of gain elements for Tx channel 0 (AGC not supported):
  • PAD: 45.00 dB
  • IAMP: 0.00 dB
    Rx antenna set to LNAH
    Tx antenna set to BAND1

Warning burst preamble is not calibrated for device lime_mini. Set a value manually

Setting frequency: DL=2350.0 Mhz, UL=2305.0 MHz
Setting Sampling frequency 3.84 MHz

==== eNodeB started ===
Type to view trace
[INFO] RX LPF configured
Set Rx bandwidth to 2.88 MHz
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 5.00 MHz
[INFO] Filter calibrated. Filter order-2nd, set to 50 MHz
[INFO] TX LPF configured
Set Tx bandwidth to 50.00 MHz
Setting manual TX/RX offset to 70 samples
[INFO] Tx calibration finished
[INFO] Rx calibration finished
t
Enter t to stop trace.
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=2
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=2
RF status: O=0, U=0, L=1
RACH: tti=851, preamble=18, offset=10, temp_crnti=0x46
RACH: tti=871, preamble=7, offset=10, temp_crnti=0x47
RACH: tti=891, preamble=11, offset=10, temp_crnti=0x48
RACH: tti=911, preamble=20, offset=10, temp_crnti=0x49
RACH: tti=931, preamble=36, offset=10, temp_crnti=0x4a
Disconnecting rnti=0x46.
RACH: tti=951, preamble=28, offset=10, temp_crnti=0x4b
Disconnecting rnti=0x47.
RACH: tti=971, preamble=8, offset=10, temp_crnti=0x4c
Disconnecting rnti=0x48.
RACH: tti=991, preamble=20, offset=10, temp_crnti=0x4d
Disconnecting rnti=0x49.
RACH: tti=1011, preamble=6, offset=10, temp_crnti=0x4e
Disconnecting rnti=0x4a.
Disconnecting rnti=0x4b.
Disconnecting rnti=0x4c.
Disconnecting rnti=0x4d.
Disconnecting rnti=0x4e.
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RF status: O=0, U=0, L=1
RACH: tti=1491, preamble=49, offset=22, temp_crnti=0x4f

------DL------------------------------UL----------------------------------
rnti cqi ri mcs brate bler snr phr mcs brate bler bsr
4f 3.00 0 0.0 256 0% 7.42 0.0 0.100 56.0 0% 0.0
User 0x4f connected
4f 3.00 0 0.0 3.22k 0% 3.59 0.0 0.100 4.46k 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
4f 3.00 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0
RF status: O=0, U=0, L=1
4f 2.48 0 0.0 0.0 0% 3.55 0.0 0.100 0.0 0% 0.0

=========================================

Full UE log below, some more errors (MCU calibration error?) that are not fatal but need to be fixed:

=========================================
linux; GNU C++ version 6.3.0 20170221; Boost_106200; UHD_003.009.005-0-unknown

Reading configuration file /etc/srslte/ue.conf…

Built in Release mode using commit d045213fb on branch HEAD.

Opening 1 RF devices with 1 RF channels…
Soapy has found device #0: addr=24607:1027, driver=lime, label=LimeSDR Mini [USB 3.0] 1D5889714444FC, media=USB 3.0, module=FT601, name=LimeSDR Mini, serial=1D5889714444FC,
Soapy has found device #1: addr=24607:1027, driver=lime, label=LimeNET-Micro [USB 2.0] 583A25BFD101, media=USB 2.0, module=FT601, name=LimeNET-Micro, serial=00583A25BFD101,
[INFO] Make connection: ‘LimeNET-Micro [USB 2.0] 583A25BFD101’
[INFO] Reference clock 30.72 MHz
[INFO] Device name: LimeNET-Micro
[INFO] Reference: 30.72 MHz
[INFO] LMS7002M register cache: Disabled
Setting up Rx stream with 1 channel(s)
Setting up Tx stream with 1 channel(s)
[INFO] RX LPF configured
[INFO] RX LPF configured
Set Rx bandwidth to 2.50 MHz
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 5.00 MHz
[INFO] Filter calibrated. Filter order-2nd, set to 50 MHz
[INFO] TX LPF configured
Set Tx bandwidth to 50.00 MHz
Available device sensors:

  • clock_locked
  • lms7_temp
    Available sensors for Rx channel 0:
  • lo_locked
    [ERROR] Tx Calibration: MCU error 4 (SXT tune failed)
    [ERROR] Rx calibration: MCU error 3 (SXR tune failed)
    State of gain elements for Rx channel 0 (AGC not supported):
  • TIA: 9.00 dB
  • LNA: 30.00 dB
  • PGA: -4.00 dB
    State of gain elements for Tx channel 0 (AGC not supported):
  • PAD: 45.00 dB
  • IAMP: 0.00 dB
    Rx antenna set to LNAH
    Tx antenna set to BAND1

Warning burst preamble is not calibrated for device lime_mini. Set a value manually

Waiting PHY to initialize … /home/adrian/projects/gnuradio/srslte/srsue/src/phy/sync.cc.722: Error stopping AGC: not implemented

done!
Attaching UE…
Searching cell in DL EARFCN=9770, f_dl=2350.0 MHz, f_ul=2305.0 MHz
Set Rx bandwidth to 2.50 MHz
[INFO] Rx calibration finished
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 5.00 MHz
[INFO] Filter calibrated. Filter order-2nd, set to 50 MHz
[INFO] TX LPF configured
Set Tx bandwidth to 50.00 MHz
[INFO] Tx calibration finished
Setting manual TX/RX offset to 70 samples
.
Found Cell: Mode=FDD, PCI=1, PRB=15, Ports=1, CFO=0.5 KHz
[INFO] RX LPF configured
Set Rx bandwidth to 2.88 MHz
[INFO] Rx calibration finished
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 5.00 MHz
[INFO] Filter calibrated. Filter order-2nd, set to 50 MHz
[INFO] TX LPF configured
Set Tx bandwidth to 50.00 MHz
[INFO] Tx calibration finished
Setting manual TX/RX offset to 70 samples
RF status: O=0, U=0, L=2
Found PLMN: Id=00101, TAC=7
Random Access Transmission: seq=43, ra-rnti=0x2
LRandom Access Transmission: seq=49, ra-rnti=0x2
Random Access Complete. c-rnti=0x4f, ta=22
RRC Connected
Network attach successful. IP: 172.16.0.2
Software Radio Systems LTE (srsLTE)

Thanks for sharing!

I wondered if you had tried with current srsLTE plus Lime Suite built from git master? I understand that there are some recent updates to Lime Suite which srsLTE use will benefit from. A new Lime Suite release is schedule for the end of the month and this should include these.

@zack may be able to say more on this.

Andrew, yes, I’ve tried and like I mentioned in the first post, the current srsLTE does not work with either SoapySDR 0.7 or 0.8 and the latest LimeSuite from master. The reason is stream timeouts and zero samples being transmitted.
What works is srsLTE release 19.12 with latest LimeSuite from master and SoapySDR 0.7 (possibily also 0.8) using the patch above to enable more than one soapy device on the same computer. Anything later than 19.12 does not work, so a regression must have been introduced somewhere or some documentation is missing on their side.

I’d like your opinion about the two errors I still get, taken from logs above:
[ERROR] Tx Calibration: MCU error 4 (SXT tune failed)
[ERROR] Rx calibration: MCU error 3 (SXR tune failed)

What is the usual cause for these? I don’t see them in qradiolink for either device.

Wonder if @joshblum could comment regarding SoapySDR versions.

Also forwarded details to the team and will aim to have an update in the next few days.

@andrewback I managed to reliably reproduce the above error:

[ERROR] Tx Calibration: MCU error 4 (SXT tune failed)

by removing some of the workarounds I put in my own code a while back.
The issue occurs when trying to set up and start a Soapy TX stream while a Soapy RX stream is running. My workaround was to stop the RX stream during TX stream initialization, and it avoids this error. I’m not sure if this is a limitation or an actual issue.

@adim thanks for the additional info. We’re looking into this.

Any experience using the limenet micro as a small BW eNB? For example only 15 or 6 PRBs? Even more - only in TX mode without RX? That is, only with PSS, SSS, CRS, MIB and SIBs?

Not aware of anyone having tried this. Should be possible with RPi 4, but obviously there is no CM4 to use with LimeNET Micro and if there was, it would need a PCB re-spin to route the additional lines for USB 3.0.

In any case, if you do try this, let us know how you get on. If you don’t have a LimeNET Micro yet, but do have a LimeSDR Mini, you could try this with an RPi 3B, which would be pretty much the same in terms of compute performance.

I wasn’t able to get an UE attach with either 6 or 15 PRBs (tried both). Keep in mind I didn’t use the latest version because I couldn’t get it to run with the Lime HW.
Regarding the CM3, I’m a little skeptical because as far as I know the turbo decoder only has AVX not Neon optimizations. Maybe NB-IoT would be more realistic.

Thanks for the information!

A follow-up question. The turbo decoder is only for the uplink, right. I was thinking about its capability of only acting as a downlink beacon, transmitting PSS, SSS, CRS, MIB and SIB1. Anyone with any experiences there?

Hello,
Thanks for sharing your details. Will you please share your configuration files , i am getting the same problem as you faced .It will be a great help for me and i highly appreciate it.
Regards ,
Rozana

Hi. Do you mean getting latest version to work, or about using 19.12? I was having issues with the latest version which could have been due to some outdated system components, which I might have to investigate again after OS upgrade. Regarding my configuration files, I don’t know if they would be much use to you since I have since changed them trying to play with various settings.
For the Lime hardware, though, this is the setting in enb.conf that I found useful to get it working. It is entirely empirical though and might vary from machine to machine:

time_adv_nsamples = 60