Skip to content

srsRAN 4G with RTL-SDR #1453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AnilSarode opened this issue Feb 12, 2025 · 0 comments
Open

srsRAN 4G with RTL-SDR #1453

AnilSarode opened this issue Feb 12, 2025 · 0 comments

Comments

@AnilSarode
Copy link

I am trying to scan the LTE cell for downlink frequencies or EARFCN.
My goal is to get the NAS data in Wireshark for downlink.

The process shows the result


Active RF plugins: libsrsran_rf_soapy.so
Inactive RF plugins: 
Couldn't open , trying /root/.config/srsran/ue.conf
Reading configuration file /root/.config/srsran/ue.conf...
WARNING: cpu0 scaling governor is not set to performance mode. Realtime processing could be compromised. Consider setting it to performance mode before running the application.

Built in Release mode using commit ec29b0c1f on branch master.

Opening 1 channels in RF device=default with args="driver=rtlsdr"
Supported RF device list: soapy file
Trying to open RF device 'soapy'
Found Elonics E4000 tuner
Soapy has found device #0: driver=rtlsdr, label=Generic RTL2832U OEM :: 00000010, manufacturer=Nooelec, product=SMArt XTR v5, serial=00000010, tuner=Elonics E4000, 
Selecting Soapy device: 0
[INFO] Opening Generic RTL2832U OEM :: 00000010...
Found Elonics E4000 tuner
Setting up Rx stream with 1 channel(s)
[INFO] Using format CF32.
Available device sensors: 
Available sensors for Rx channel 0: 
State of gain elements for Rx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
State of gain elements for Tx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
Rx antenna set to RX
Tx antenna set to RX
RF device 'soapy' successfully opened
Invalid length for K: 0 should be 32
Invalid length for OPc: 0 should be 32
Invalid length for IMSI: 0 should be 15
Invalid length for IMEI: 0 should be 15
Waiting PHY to initialize ... done!
Attaching UE...
Trying to start a plot but plots are disabled (ENABLE_GUI constant in sf_worker.cc)
Allocating 15 zero-copy buffers
........................................................................................................................................................
...............................................................
.............................................................................................
..
................................................................................................
....................................
......
.....................
..
.
...............................................
......................
...............................
.......................................................................
...........
..................
............
..........................
.....
.........
................................
.....................................................
............................
.................................................................................................................
.....................................................
......................................................................................................................................................
...................................
...................................................................................................................................................
...
..............
.....................
...............................................................................................................
....
.........
....................
......
.........
......................................................................................................................................................................................................................
..
.......................
............
..........................
...
...................................................................
............
........
....
............................
........
.............................................................
..........................................^CStopping ..
....Saving NAS PCAP file (DLT=148) to /tmp/ue_nas.pcap 
---  exiting  ---

but on the other hand /cell_search -b I got the frequencies.


Aspire-A324-31:~/srsRAN_4G/build/lib/examples$ ./cell_search -b 3
Active RF plugins: libsrsran_rf_soapy.so
Inactive RF plugins: 
Opening RF device...
Supported RF device list: soapy file
Trying to open RF device 'soapy'
Found Elonics E4000 tuner
Soapy has found device #0: driver=rtlsdr, label=Generic RTL2832U OEM :: 00000010, manufacturer=Nooelec, product=SMArt XTR v5, serial=00000010, tuner=Elonics E4000, 
Selecting Soapy device: 0
[INFO] Opening Generic RTL2832U OEM :: 00000010...
Found Elonics E4000 tuner
Setting up Rx stream with 1 channel(s)
[INFO] Using format CF32.
Available device sensors: 
Available sensors for Rx channel 0: 
State of gain elements for Rx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
State of gain elements for Tx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
Rx antenna set to RX
Tx antenna set to RX
RF device 'soapy' successfully opened
[  0/749]: EARFCN 1200 Freq. 1805.00 MHz looking for PSS.
Allocating 15 zero-copy buffers
[  1/749]: EARFCN 1201 Freq. 1805.10 MHz looking for PSS.
Allocating 15 zero-copy buffers
[  2/749]: EARFCN 1202 Freq. 1805.20 MHz looking for PSS.
[  3/749]: EARFCN 1203 Freq. 1805.30 MHz looking for PSS.
[  4/749]: EARFCN 1204 Freq. 1805.40 MHz looking for PSS.
[  5/749]: EARFCN 1205 Freq. 1805.50 MHz looking for PSS.
Allocating 15 zero-copy buffers
[  6/749]: EARFCN 1206 Freq. 1805.60 MHz looking for PSS.
[  7/749]: EARFCN 1207 Freq. 1805.70 MHz looking for PSS.


[741/749]: EARFCN 1941 Freq. 1879.10 MHz looking for PSS.
[742/749]: EARFCN 1942 Freq. 1879.20 MHz looking for PSS.
[743/749]: EARFCN 1943 Freq. 1879.30 MHz looking for PSS.
[744/749]: EARFCN 1944 Freq. 1879.40 MHz looking for PSS.
[745/749]: EARFCN 1945 Freq. 1879.50 MHz looking for PSS.
[746/749]: EARFCN 1946 Freq. 1879.60 MHz looking for PSS.
[747/749]: EARFCN 1947 Freq. 1879.70 MHz looking for PSS.
[748/749]: EARFCN 1948 Freq. 1879.80 MHz looking for PSS.


Found 5 cells
Found CELL 1815.2 MHz, EARFCN=1302, PHYID=501, 100 PRB, 2 ports, PSS power=-1.0 dBm
Found CELL 1815.3 MHz, EARFCN=1303, PHYID=234, 15 PRB, 4 ports, PSS power=-0.9 dBm
Found CELL 1815.4 MHz, EARFCN=1304, PHYID=0, 150 PRB, 2 ports, PSS power=-0.9 dBm
Found CELL 1843.1 MHz, EARFCN=1581, PHYID=1, 100 PRB, 2 ports, PSS power=-3.7 dBm
Found CELL 1843.8 MHz, EARFCN=1588, PHYID=1, 6 PRB, 4 ports, PSS power=-6.5 dBm

Bye

but when tried to get the cell ID and data ,I am getting the different result

Active RF plugins: libsrsran_rf_soapy.so
Inactive RF plugins: 
Opening RF device with 1 RX antennas...
Supported RF device list: soapy file
Trying to open RF device 'soapy'
Found Elonics E4000 tuner
Soapy has found device #0: driver=rtlsdr, label=Generic RTL2832U OEM :: 00000010, manufacturer=Nooelec, product=SMArt XTR v5, serial=00000010, tuner=Elonics E4000, 
Selecting Soapy device: 0
[INFO] Opening Generic RTL2832U OEM :: 00000010...
Found Elonics E4000 tuner
Setting up Rx stream with 1 channel(s)
[INFO] Using format CF32.
Available device sensors: 
Available sensors for Rx channel 0: 
State of gain elements for Rx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
State of gain elements for Tx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
Rx antenna set to RX
Tx antenna set to RX
RF device 'soapy' successfully opened
Tuning receiver to 1815.200 MHz
Searching for cell...
Allocating 15 zero-copy buffers
*Found Cell_id:   0 FDD, CP: Normal  , DetectRatio=60% PSR=2.32, Power=29.9 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
Decoding PBCH for cell 0 (N_id_2=0)
Allocating 15 zero-copy buffers
Cell not found after [   0] attempts. Trying again... (Ctrl+C to exit)
Searching for cell...
Allocating 15 zero-copy buffers
*Found Cell_id:   0 FDD, CP: Normal  , DetectRatio=60% PSR=2.32, Power=29.9 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
Decoding PBCH for cell 0 (N_id_2=0)
Allocating 15 zero-copy buffers
/home/srsRAN_4G/lib/examples/pdsch_ue.c:519: Invalid number of PRB 125

and some times

Aspire-A324-31:~/srsRAN_4G/build/lib/examples$ sudo ./pdsch_ue -f 1815.2e6 -g 42
Active RF plugins: libsrsran_rf_soapy.so
Inactive RF plugins: 
Opening RF device with 1 RX antennas...
Supported RF device list: soapy file
Trying to open RF device 'soapy'
Found Elonics E4000 tuner
Soapy has found device #0: driver=rtlsdr, label=Generic RTL2832U OEM :: 00000010, manufacturer=Nooelec, product=SMArt XTR v5, serial=00000010, tuner=Elonics E4000, 
Selecting Soapy device: 0
[INFO] Opening Generic RTL2832U OEM :: 00000010...
Found Elonics E4000 tuner
Setting up Rx stream with 1 channel(s)
[INFO] Using format CF32.
Available device sensors: 
Available sensors for Rx channel 0: 
State of gain elements for Rx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
State of gain elements for Tx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
Rx antenna set to RX
Tx antenna set to RX
RF device 'soapy' successfully opened
Tuning receiver to 1815.200 MHz
Searching for cell...
Allocating 15 zero-copy buffers
*Found Cell_id:   0 TDD, CP: Normal  , DetectRatio=71% PSR=5.34, Power=37.8 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
Decoding PBCH for cell 0 (N_id_2=0)
Allocating 15 zero-copy buffers
Cell not found after [   0] attempts. Trying again... (Ctrl+C to exit)
Searching for cell...
Allocating 15 zero-copy buffers
*Found Cell_id:   0 TDD, CP: Normal  , DetectRatio=71% PSR=5.34, Power=37.8 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
Decoding PBCH for cell 0 (N_id_2=0)
Allocating 15 zero-copy buffers
Setting rx sampling rate 1.92 MHz
Allocating 15 zero-copy buffers
 - Type:            TDD   4.0, FrameCnt: 0, State: 1: 0
 - PCI:             0
 - Nof ports:       4
 - CP:              Normal  
 - PRB:             100
 - PHICH Length:    Extended
 - PHICH Resources: 1/6
 - SFN:             772
Decoded MIB. SFN: 772, offset: 2
          CFO: +5073.54 Hz
         RSRP: +50.8 dBm | +50.8 dBm
          SNR:  +2.1 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.118045
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +4715.00 Hz
         RSRP: +50.8 dBm | +50.3 dBm
          SNR:  +2.0 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.222225
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +5860.43 Hz
         RSRP: +50.7 dBm | +50.8 dBm
          SNR:  +2.0 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.158610
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +3744.04 Hz
         RSRP: +51.3 dBm | +51.5 dBm
          SNR:  +2.1 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.302705
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +6362.97 Hz
         RSRP: +51.4 dBm | +51.4 dBm
          SNR:  +2.0 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.267260
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +7179.64 Hz
         RSRP: +50.5 dBm | +50.2 dBm
          SNR:  +2.2 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.401988
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +7611.32 Hz
         RSRP: +51.6 dBm | +51.7 dBm
          SNR:  +2.0 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.320175
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +4200.75 Hz
         RSRP: +51.5 dBm | +51.6 dBm
          SNR:  +2.0 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.144968
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

          CFO: +5200.41 Hz
         RSRP: +50.2 dBm | +50.4 dBm
          SNR:  +1.9 dB
           TM: 1
           Rb:   0.00 /   0.00 /   0.00 Mbps (net/maximum/processing)
   PDCCH-Miss: 100.00%
   PDSCH-BLER:  -nan%
   PDSCH-EVM:  0.00%
         TB 0: mcs=0; tbs=0
         TB 1: mcs=0; tbs=0
sync_err[0][0]=0.085893
sync_err[1][0]=0.000000
sync_err[2][0]=0.000000
sync_err[3][0]=0.000000
Press enter maximum printing debug log of 1 subframe.

  SIGINT received. Exiting...
         RSRP: +49.6 dBm | +49.8 dBm
Bye       SNR:  +1.7 dB

and sometimes this

 sudo ./pdsch_ue -f 1815.2e6 -g 42
Active RF plugins: libsrsran_rf_soapy.so
Inactive RF plugins: 
Opening RF device with 1 RX antennas...
Supported RF device list: soapy file
Trying to open RF device 'soapy'
Found Elonics E4000 tuner
Soapy has found device #0: driver=rtlsdr, label=Generic RTL2832U OEM :: 00000010, manufacturer=Nooelec, product=SMArt XTR v5, serial=00000010, tuner=Elonics E4000, 
Selecting Soapy device: 0
[INFO] Opening Generic RTL2832U OEM :: 00000010...
Found Elonics E4000 tuner
Setting up Rx stream with 1 channel(s)
[INFO] Using format CF32.
Available device sensors: 
Available sensors for Rx channel 0: 
State of gain elements for Rx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
State of gain elements for Tx channel 0 (AGC supported):
 - IF1: 6.00 dB
 - IF2: 9.00 dB
 - IF3: 3.00 dB
 - IF4: 2.00 dB
 - IF5: 3.00 dB
 - IF6: 3.00 dB
 - TUNER: 0.00 dB
Rx antenna set to RX
Tx antenna set to RX
RF device 'soapy' successfully opened
Tuning receiver to 1815.200 MHz
Searching for cell...
Allocating 15 zero-copy buffers
 Found Cell_id:   0 TDD, CP: Normal  , DetectRatio=40% PSR=2.87, Power=26.8 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
*Found Cell_id: 143 FDD, CP: Normal  , DetectRatio=40% PSR=2.77, Power=28.5 dBm
Decoding PBCH for cell 143 (N_id_2=2)
Allocating 15 zero-copy buffers
Cell not found after [   0] attempts. Trying again... (Ctrl+C to exit)
Searching for cell...
Allocating 15 zero-copy buffers
 Found Cell_id:   0 TDD, CP: Normal  , DetectRatio=40% PSR=2.87, Power=26.8 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
*Found Cell_id: 143 FDD, CP: Normal  , DetectRatio=40% PSR=2.77, Power=28.5 dBm
Decoding PBCH for cell 143 (N_id_2=2)
Allocating 15 zero-copy buffers
Cell not found after [   1] attempts. Trying again... (Ctrl+C to exit)
Searching for cell...
Allocating 15 zero-copy buffers
*Found Cell_id:   0 TDD, CP: Normal  , DetectRatio=43% PSR=2.09, Power=54.8 dBm
 Found Cell_id:   1 TDD, CP: Normal  , DetectRatio=100% PSR=2.64, Power=49.7 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
Decoding PBCH for cell 0 (N_id_2=0)
Allocating 15 zero-copy buffers
Setting rx sampling rate 15.36 MHz
Invalid sample rate: 15360000 Hz
setSampleRate Rx fail: setSampleRate failed: RTL-SDR does not support this sample rate
/home/srsRAN_4G/lib/examples/pdsch_ue.c:515: Could not set rx sampling rate : wanted 15360000 got -1.000000

Does RTL-SDR support the srsRAN 4G to catch the downlink data?

@AnilSarode AnilSarode changed the title srsRAN with RTL-SDR srsRAN 4G with RTL-SDR Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant