mgp25 / OpenLTE

An open source 3GPP LTE implementation.
GNU Affero General Public License v3.0
225 stars 84 forks source link

OpenLTE, soapyUD, LImesdrMini #4

Closed Dastgsm closed 5 years ago

Dastgsm commented 5 years ago

I’m trying openlte with soapyUHD and limesdrmini after patching applying this patch patch_openlte.patch that i give on the last of topic for the resolving the compiling error. i got this error when i execute LTE_fdd_enodeb command (note that uhd_usrp_probe run correctly) :

– Make connection: ‘LimeSDR Mini [USB 3.0] 1D3AC779327FE0’
– Reference clock 40.00 MHz
– Device name: LimeSDR-Mini
– Reference: 40 MHz
– LMS7002M calibration values caching Disable

UHD Error:
Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
– Rx calibration finished

UHD Warning:
popping from TX, samples popped 540/1020

UHD Warning:

any idea for solving this problem, please ?

chazanov commented 5 years ago

@Dastgsm Please link the patch.

mgp25 commented 5 years ago

@chazanov

patch_openlte.patch

patch_openlte.patch : 
diff --git a/LTE_fdd_enodeb/src/LTE_fdd_enb_radio.cc b/LTE_fdd_enodeb/src/LTE_fdd_enb_radio.cc
index 7e03e08..9f1a011 100755
--- a/LTE_fdd_enodeb/src/LTE_fdd_enb_radio.cc
+++ b/LTE_fdd_enodeb/src/LTE_fdd_enb_radio.cc
@@ -822,7 +822,7 @@ LTE_FDD_ENB_ERROR_ENUM LTE_fdd_enb_radio_bladerf::setup(uint32 idx,
         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 +842,7 @@ LTE_FDD_ENB_ERROR_ENUM LTE_fdd_enb_radio_bladerf::setup(uint32 idx,

     // 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 +974,7 @@ void LTE_fdd_enb_radio_bladerf::receive(LTE_FDD_ENB_RADIO_PARAMS_STRUCT *radio_p
     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

Reference: https://discourse.myriadrf.org/t/open-lte-with-limesdrmini/3919

mgp25 commented 5 years ago

Possible solution: “insufficient gain”, you need to increase transmitter gain. by ricardas

Reference: https://discourse.myriadrf.org/t/cant-get-limesdr-to-work-tx-calibration-mcu-error-5/2829/2

Feel free to reopen if you think the issue persists.

Alcinoos commented 5 years ago

where did i change the code for the uhd, any patch or like that? i see the function LMS_SetNormalizedGain or LMS_SetGaindB but on coding i don't know where to put it

Alcinoos commented 5 years ago

it's for the insufficient gain on the openlte that i ask for this patch of LMS_SetNormalizedGain or LMS_SetGaindB