srsran / srsRAN_4G

Open source SDR 4G software suite from Software Radio Systems (SRS) https://docs.srsran.com/projects/4g
https://www.srsran.com
GNU Affero General Public License v3.0
3.37k stars 1.11k forks source link

srsRAN_4G end to end using usrp x310 - attach failed #1140

Open xuebashuoge opened 1 year ago

xuebashuoge commented 1 year ago

Issue Description

I am trying to establish an end-to-end 4G network and my UE cannot attach to eNB. I am using the default configuration files and I could not find what is the cause of this problem.

Setup Details

2PC + 2 usrp x310 Ubuntu 20.04, latest srsRAN_4G v22.10.0, uhd v3.15.0.0 PC1 - running the UE with the default ue.conf PC2 - running the EPC with the default epc.conf and eNB with the default enb.conf

Expected Behavior

I want to connect PC1 to PC2 through 4G network. I can ping PC1 on PC2 and ping PC2 on PC1.

Actual Behaviour

UE message show attached failed and radio link failure Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_soapy.so libsrsran_rf_zmq.so
Inactive RF plugins:
Reading configuration file ue.conf...

Built in Release mode using commit 00c972ac4 on branch master.

Opening 1 channels in RF device=default with args=default
Supported RF device list: UHD soapy zmq file
Trying to open RF device 'UHD'
[INFO] [UHD] linux; GNU C++ version 9.4.0; Boost_107100; UHD_3.15.0.0-0-unknown
[INFO] [LOGGING] Fastpath logging disabled at runtime.
Opening USRP channels=1, args: type=x300,master_clock_rate=184.32e6
[INFO] [UHD RF] RF UHD Generic instance constructed
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Maximum frame size: 8000 bytes.
[INFO] [X300] Radio 1x clock: 184.32 MHz
[INFO] [0/DmaFIFO_0] Initializing block control (NOC ID: 0xF1F0D00000000000)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1302 MB/s)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1323 MB/s)
[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000000)
[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000000)
RF device 'UHD' successfully opened
Waiting PHY to initialize ... done!
Attaching UE...
.
Found Cell: Mode=FDD, PCI=1, PRB=50, Ports=1, CP=Normal, CFO=1.6 KHz
Found PLMN: Id=00101, TAC=7
Random Access Transmission: seq=22, tti=6911, ra-rnti=0x2
Random Access Transmission: seq=0, tti=6961, ra-rnti=0x2
Random Access Transmission: seq=33, tti=7011, ra-rnti=0x2
Random Access Transmission: seq=0, tti=7061, ra-rnti=0x2
Random Access Transmission: seq=48, tti=7111, ra-rnti=0x2
Random Access Transmission: seq=38, tti=7161, ra-rnti=0x2
Random Access Transmission: seq=49, tti=7211, ra-rnti=0x2
Random Access Transmission: seq=28, tti=7261, ra-rnti=0x2
Random Access Transmission: seq=47, tti=7311, ra-rnti=0x2
Random Access Transmission: seq=25, tti=7361, ra-rnti=0x2
Attach failed (attempt 1/5)
.
Found Cell: Mode=FDD, PCI=1, PRB=50, Ports=1, CP=Normal, CFO=1.9 KHz
Found PLMN: Id=00101, TAC=7
Random Access Transmission: seq=41, tti=1461, ra-rnti=0x2
Random Access Transmission: seq=8, tti=1511, ra-rnti=0x2
Random Access Transmission: seq=48, tti=1561, ra-rnti=0x2
Random Access Transmission: seq=43, tti=1611, ra-rnti=0x2
Random Access Transmission: seq=44, tti=1661, ra-rnti=0x2
Random Access Transmission: seq=14, tti=1711, ra-rnti=0x2
Random Access Transmission: seq=23, tti=1761, ra-rnti=0x2
Random Access Transmission: seq=42, tti=1811, ra-rnti=0x2
RRC Connected
Random Access Complete. c-rnti=0x57, ta=1
Warning: Detected Radio-Link Failure
RRC IDLE
Attach failed (attempt 2/5)
. Found Cell: Mode=FDD, PCI=1, PRB=50, Ports=1, CP=Normal, CFO=1.5 KHz
Found PLMN: Id=00101, TAC=7
Random Access Transmission: seq=19, tti=6421, ra-rnti=0x2
Random Access Transmission: seq=49, tti=6471, ra-rnti=0x2
Random Access Transmission: seq=37, tti=6521, ra-rnti=0x2
Random Access Transmission: seq=41, tti=6571, ra-rnti=0x2
RRC Connected
Random Access Complete. c-rnti=0x5b, ta=1
Warning: Detected Radio-Link Failure
RRC IDLE
Attach failed (attempt 3/5)
RF status: O=0, U=1, L=0
^[[A.
Found Cell: Mode=FDD, PCI=1, PRB=50, Ports=1, CP=Normal, CFO=1.9 KHz
Found PLMN: Id=00101, TAC=7
Random Access Transmission: seq=14, tti=1141, ra-rnti=0x2
Random Access Transmission: seq=50, tti=1191, ra-rnti=0x2
Random Access Transmission: seq=3, tti=1241, ra-rnti=0x2
Random Access Transmission: seq=39, tti=1291, ra-rnti=0x2
Random Access Transmission: seq=13, tti=1341, ra-rnti=0x2
Random Access Transmission: seq=39, tti=1391, ra-rnti=0x2
Random Access Transmission: seq=29, tti=1441, ra-rnti=0x2
Random Access Transmission: seq=19, tti=1491, ra-rnti=0x2
Random Access Transmission: seq=5, tti=1541, ra-rnti=0x2
Random Access Transmission: seq=18, tti=1591, ra-rnti=0x2
RF status: O=0, U=1, L=0
Attach failed (attempt 4/5)
RF status: O=0, U=1, L=0
.
.
Found Cell: Mode=FDD, PCI=1, PRB=50, Ports=1, CP=Normal, CFO=2.9 KHz
Found PLMN: Id=00101, TAC=7
Random Access Transmission: seq=37, tti=6421, ra-rnti=0x2
Random Access Transmission: seq=38, tti=6471, ra-rnti=0x2
Random Access Transmission: seq=0, tti=6521, ra-rnti=0x2
Random Access Transmission: seq=10, tti=6571, ra-rnti=0x2
Random Access Transmission: seq=6, tti=6621, ra-rnti=0x2
Random Access Transmission: seq=15, tti=6671, ra-rnti=0x2
RRC Connected
Random Access Complete. c-rnti=0x6b, ta=1
Warning: Detected Radio-Link Failure
RRC IDLE
Attach failed (attempt 5/5)
^CStopping ..
Random Access Transmission: seq=38, tti=2581, ra-rnti=0x2
Random Access Transmission: seq=28, tti=2631, ra-rnti=0x2
Random Access Transmission: seq=35, tti=2681, ra-rnti=0x2
Random Access Transmission: seq=36, tti=2731, ra-rnti=0x2
Random Access Transmission: seq=36, tti=2781, ra-rnti=0x2
Random Access Transmission: seq=50, tti=2831, ra-rnti=0x2
RRC Connected
Random Access Complete. c-rnti=0x71, ta=1
Couldn't stop after 5s. Forcing exit.

eNB message Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_zmq.so
Inactive RF plugins:
--- Software Radio Systems LTE eNodeB ---

Reading configuration file enb.conf...

Built in Release mode using commit 00c972ac4 on branch master.

Opening 1 channels in RF device=default with args=default
Supported RF device list: UHD zmq file
Trying to open RF device 'UHD'
[INFO] [UHD] linux; GNU C++ version 9.4.0; Boost_107100; UHD_3.15.0.0-0-unknown
[INFO] [LOGGING] Fastpath logging disabled at runtime.
Opening USRP channels=1, args: type=x300,master_clock_rate=184.32e6
[INFO] [UHD RF] RF UHD Generic instance constructed
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Maximum frame size: 8000 bytes.
[INFO] [X300] Radio 1x clock: 184.32 MHz
[INFO] [0/DmaFIFO_0] Initializing block control (NOC ID: 0xF1F0D00000000000)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1296 MB/s)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1317 MB/s)
[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000000)
[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000000)
RF device 'UHD' successfully opened

==== eNodeB started ===
Type to view trace
Setting frequency: DL=2680.0 Mhz, UL=2560.0 MHz for cc_idx=0 nof_prb=50
RACH: tti=6911, cc=0, pci=1, preamble=22, offset=1, temp_crnti=0x46
RACH: tti=6961, cc=0, pci=1, preamble=0, offset=1, temp_crnti=0x47
Disconnecting rnti=0x46.
RACH: tti=7011, cc=0, pci=1, preamble=33, offset=1, temp_crnti=0x48
Disconnecting rnti=0x47.
RACH: tti=7061, cc=0, pci=1, preamble=0, offset=1, temp_crnti=0x49
Disconnecting rnti=0x48.
RACH: tti=7111, cc=0, pci=1, preamble=48, offset=1, temp_crnti=0x4a
Disconnecting rnti=0x49.

ue.log image

eNB.log image

epc.log image

Steps to reproduce the problem

I use the default configuration files generated by srsran_install_configs.sh. I open the terminal in the folder that contains the default *.conf on both PC. I use the command sudo srsepc epc.conf for EPC, sudo srsenb enb.conf for eNB, and sudo srsue ue.conf for UE.

bigbossolidsnake commented 1 year ago

I think i am facing similar attach issues as you with srsRAN 4G 22.10 with different RF front end. Except in my case i am getting a very brief attach but soon detaches. You are using USRP , i am using LimeSDR USB. See here

nedsana commented 1 year ago

Hi, same problem here. I use the master branch of release_22_10 (commit 254cc719a) with LimeSDR-Mini and antennas. I am trying to connect 2 srsue instances to srsenb using smaller bandwidth (n_prb = 15), in order to save CPU resources. But this does not seem to work.

My setup uses:

I found that only if I set n_prb = 100 in enb.conf, then the srsue, running on the PC is likely to connect. The srsue on the laptop, rarely establishe RRC connection, but never reaches the EPC stack. Below you can see the STDOUT.

UE0 (PC): Found Cell: Mode=FDD, PCI=1, PRB=100, Ports=1, CP=Normal, CFO=-1.8 KHz RF status: O=0, U=0, L=1 [INFO] RX LPF configured [INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 23.04 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active [INFO] TX LPF configured Found PLMN: Id=00101, TAC=7 Random Access Transmission: seq=22, tti=7381, ra-rnti=0x2 RRC Connected Random Access Complete. c-rnti=0x46, ta=14 Network attach successful. IP: 172.16.0.2 LSoftware Radio Systems RAN (srsRAN) 10/5/2023 13:34:54 TZ:0 RF status: O=0, U=0, L=1 Warning: Detected Radio-Link Failure LRRC Connection Reestablishment to PCI=1, EARFCN=1100 (Cause: "otherFailure") RF status: O=0, U=0, L=1 Random Access Transmission: seq=31, tti=7811, ra-rnti=0x2 LRandom Access Transmission: seq=29, tti=7831, ra-rnti=0x2 LRandom Access Transmission: seq=8, tti=7851, ra-rnti=0x2 LRandom Access Transmission: seq=26, tti=7871, ra-rnti=0x2 LRandom Access Transmission: seq=28, tti=7891, ra-rnti=0x2 Timer T301 expired: Going to RRC IDLE RRC IDLE RF status: O=0, U=0, L=4 Service Request with cause mo-Data. LRandom Access Transmission: seq=46, tti=7941, ra-rnti=0x2 RRC Connected Random Access Complete. c-rnti=0x47, ta=14 Service Request successful. RF status: O=0, U=0, L=1

UE1 (Laptop): Found Cell: Mode=FDD, PCI=1, PRB=100, Ports=1, CP=Normal, CFO=-0.2 KHz [INFO] RX LPF configured [INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 23.04 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active [INFO] TX LPF configured RF status: O=0, U=0, L=1 Found PLMN: Id=00101, TAC=7 Random Access Transmission: seq=27, tti=6261, ra-rnti=0x2 RRC Connected Random Access Complete. c-rnti=0x48, ta=14 LLLRF status: O=0, U=0, L=3 LWarning: Detected Radio-Link Failure RRC IDLE LRF status: O=0, U=0, L=2 LLRF status: O=0, U=0, L=2 LRF status: O=0, U=0, L=1 Attach failed (attempt 1/5) [INFO] RX LPF configured [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 L. Found Cell: Mode=FDD, PCI=1, PRB=100, Ports=1, CP=Normal, CFO=-0.4 KHz RF status: O=0, U=0, L=3 [INFO] RX LPF configured [INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 23.04 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active [INFO] TX LPF configured RF status: O=0, U=0, L=1 Found PLMN: Id=00101, TAC=7 Random Access Transmission: seq=32, tti=2261, ra-rnti=0x2 LRandom Access Transmission: seq=25, tti=2281, ra-rnti=0x2 LRandom Access Transmission: seq=29, tti=2301, ra-rnti=0x2 LRandom Access Transmission: seq=27, tti=2321, ra-rnti=0x2 LRandom Access Transmission: seq=48, tti=2341, ra-rnti=0x2 LRandom Access Transmission: seq=15, tti=2361, ra-rnti=0x2 LRandom Access Transmission: seq=48, tti=2381, ra-rnti=0x2 LRandom Access Transmission: seq=41, tti=2401, ra-rnti=0x2 LRandom Access Transmission: seq=41, tti=2421, ra-rnti=0x2 LRandom Access Transmission: seq=33, tti=2441, ra-rnti=0x2 RF status: O=0, U=0, L=9

ENB: Setting frequency: DL=1980.0 Mhz, UL=1900.0 MHz for cc_idx=0 nof_prb=100 [INFO] Tx calibration finished [INFO] Rx calibration finished RACH: tti=7381, cc=0, pci=1, preamble=22, offset=14, temp_crnti=0x46 User 0x46 connected LDisconnecting rnti=0x46. RACH: tti=7941, cc=0, pci=1, preamble=46, offset=14, temp_crnti=0x47 User 0x47 connected RACH: tti=6261, cc=0, pci=1, preamble=27, offset=14, temp_crnti=0x48 Disconnecting rnti=0x48.

ismagom commented 1 year ago

Hi @xuebashuoge, could you attach logs of both sides in info level please?

@nedsana, you can't run the UE and eNB in the same PC, sorry

xuebashuoge commented 1 year ago

Hi @xuebashuoge, could you attach logs of both sides in info level please?

@nedsana, you can't run the UE and eNB in the same PC, sorry

@ismagom I have show the logs (ue.log, enb.log, epc.log) in my post, we can refer to those photos.

nedsana commented 1 year ago

Hi ismagom,

Yes, I have read that ENB and UE are recommended to run on separate machines.

But I have a limited setup: 2 PCs and 4 SDRs. On the first PC I run ENB and 2 UEs. On the second PC I run one UE. Also for the moment I am only interested in signalling, not data transfer.

So I decided to give it a try.

To do so I replaced the antennas, which I used in my previous post, with cables and splitters.

And as I have described above, only if I set n_prb=100 or n_prb=50 in enb.conf and compile the binaries in Release mode, I successfully connect all the UEs to the ENB. OK, I admit this is not 100% success. Now and then some UE fails to connect. But this is not frequent, so for me this is usable.

The problem is that with any value, different from n_prb=100 or n_prb=50, the UEs do not connect. No matter if the UEs runs on the same PC or not.

I have tested the same configuration with ZMQ, instead of SDRs, where I use n_prb=15. And there all works great - all UEs connect.

It seems there is something wrong with the radio data processing for n_prb=6,15,25,75. But I am not familiar with the code and I have no guidelines for debugging.

Greetings.