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

connection between srsue and srsenb only works the first time #1284

Open docfate111 opened 5 months ago

docfate111 commented 5 months ago

Issue Description

Connection over wire works but only the first time I attempt to connect UE and eNB. If I disconnect then reconnect all future attempts until I turn off everything for more than 20 minutes and retry do not work.

Setup Details

Cyclone IV based SDR Nuand BladeRF, RM502Q-AE based Pi Hat, SMA cables, and 2 ubuntu 22.04 laptops

$ apt-get update -y && \
    apt install -y zsh git software-properties-common build-essential cmake libfftw3-dev \
    wget libmbedtls-dev \
    libboost-program-options-dev libconfig++-dev libsctp-dev tree vim g++ make pkg-config \
    swig libi2c-dev libusb-1.0-0-dev libfftw3-dev libconfig++-dev gnuradio python3-numpy && \
    # build SoapySDR - maybe later we will try another SDR like lime idk  
    cd ~ && wget https://github.com/pothosware/SoapySDR/archive/refs/tags/soapy-sdr-0.8.1.zip && unzip soapy-sdr-0.8.1.zip && \
    cd SoapySDR-soapy-sdr-0.8.1 && \
    mkdir build && cd build && cmake .. && make -j`nproc` && make install && \
    ldconfig && cd ~ && \
    # build BladeRF
    git clone https://github.com/Nuand/bladeRF.git && \
    cd bladeRF/host/ && mkdir build && cd build/ && \
    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DINSTALL_UDEV_RULES=ON -DBLADERF_GROUP=plugdev .. && make -j`nproc` && make install && ldconfig && \
    mkdir -p /etc/Nuand/bladeRF/ && wget https://www.nuand.com/fpga/hostedx40-latest.rbf --output-document /etc/Nuand/bladeRF/hostedx40.rbf && cd ~ && \
    # build SoapyBladeRF
    git clone https://github.com/pothosware/SoapyBladeRF.git && cd SoapyBladeRF && \
    mkdir build && cd build && cmake .. && make -j`nproc` && make install && cd ~ && \
    cd ~ && git clone https://github.com/srsRAN/srsRAN_4G.git && \
    cd srsRAN_4G && mkdir build && cd build && cmake ../ && make -j`nproc` \
    && make install && ldconfig && \
    # default setup for now later might need custom config files
    ./srsran_install_configs.sh user

Expected Behavior

image

Found Cell:  Mode=FDD, PCI=1, PRB=50, Ports=1, CP=Normal, CFO=0.1 KHz
RF status: O=15, U=0, L=0
Found PLMN:  Id=00101, TAC=7
Random Access Transmission: seq=48, tti=9141, ra-rnti=0x2
Random Access Transmission: seq=23, tti=9161, ra-rnti=0x2
0Random Access Transmission: seq=28, tti=9181, ra-rnti=0x2
Random Access Transmission: seq=9, tti=9201, ra-rnti=0x2
Random Access Transmission: seq=2, tti=9221, ra-rnti=0x2
Random Access Transmission: seq=47, tti=9241, ra-rnti=0x2
Random Access Transmission: seq=34, tti=9261, ra-rnti=0x2
Random Access Transmission: seq=6, tti=9281, ra-rnti=0x2
Random Access Transmission: seq=28, tti=9301, ra-rnti=0x2
0Random Access Transmission: seq=16, tti=9321, ra-rnti=0x2
0000000000000RF status: O=15, U=0, L=0
00000000000RF status: O=11, U=0, L=0
00000000000000RF status: O=14, U=0, L=0
00000000RF status: O=8, U=0, L=0
00000000000RF status: O=11, U=0, L=0
0000000000RF status: O=10, U=0, L=0
000000000000000RF status: O=15, U=0, L=0
0000000000000000RF status: O=16, U=0, L=0
000000000000000000RF status: O=18, U=0, L=0
00000000000000RF status: O=14, U=0, L=0
000000000000000RF status: O=15, U=0, L=0
000000000000000000RF status: O=18, U=0, L=0
0000000000000000000000RF status: O=22, U=0, L=0
00000000000000RF status: O=14, U=0, L=0
00000000RF status: O=8, U=0, L=0
Attach failed (attempt 5/5)

Steps to reproduce the problem

Default config for all - ./srsran_install_configs.sh user

Additional Information

docfate111 commented 5 months ago

uefails.log ueworks.zip Here are the logs for the UE when it fails and when it succeeds.

If I reboot the srsue laptop and try again then it works the first time again but not any times after that after stopping UE with ctrl+C