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.45k stars 1.14k forks source link

ENB detected two preambles #119

Closed liuzhikui closed 6 years ago

liuzhikui commented 6 years ago

When I modified enb.conf file, set prb=15,eNB detected two preambles that happened in phy layer.But UE only transmitted one preamble.And PRACH_DETECT_FACTOR is 60.

There is part of enb.log: 19:08:51.473940 [PHY1] Debug [06091] Worker 1 running 19:08:51.473947 [PHY0] Debug [06090] Processing pending_tti=6091 19:08:51.473978 [PHY1] Debug [06091] Sending to radio 19:08:51.474151 [PHY0] Info [06090] PRACH: 0/2, preamble=1, offset=0.0 us, peak2avg=406.3, max_offset=30.0 us 19:08:51.474315 [PHY0] Debug [06090] Settting TTI=6092, tx_mutex=0, tx_time=39:0.348210 to worker 0 19:08:51.474331 [PHY0] Debug [06092] Worker 0 running 19:08:51.474366 [PHY0] Debug [06092] Sending to radio 19:08:51.474391 [MAC ] Info [06100] SCHED: Added user rnti=0x46 19:08:51.474415 [MAC ] Info [06100] SCHED: Set bearer config lc_id=0, direction=3 19:08:51.474487 [PDCP] Debug Init SRB0 19:08:51.474494 [RRC ] Info Added new user rnti=0x46 19:08:51.474498 [MAC ] Info [06100] RACH: tti=6091, preamble=1, offset=0, temp_crnti=0x46 19:08:51.474516 [PHY0] Info [06092] PRACH: 1/2, preamble=2, offset=87.7 us, peak2avg=253.0, max_offset=30.0 us 19:08:51.475384 [PHY0] Debug [06092] Settting TTI=6093, tx_mutex=1, tx_time=39:0.349210 to worker 1 19:08:51.475421 [PHY1] Debug [06093] Worker 1 running 19:08:51.475479 [MAC ] Debug [06097] SCHED: Allocated DCI L=2, ncce=0 19:08:51.475486 [MAC ] Info [06097] SCHED: RAR, ra_id=0, rnti=0x46, rarnti_idx=2, start_rb=0, n_rb=3, rar_grant_rba=32, rar_grant_mcs=0 19:08:51.475501 [PHY1] Info [06093] PDCCH: DL DCI Format1A rnti=0x2, cce_index=0, L=4, tti_tx=6097 19:08:51.475509 [PHY1] Info [06093] PDSCH: rnti=0x2, l_crb= 3, rb_start=0, harq=0, tbs=7, mcs=0, rv=0, tti_tx=6097 0000: 41 00 00 40 0c 00 46 19:08:51.475534 [PHY1] Debug [06093] Sending to radio 19:08:51.476445 [PHY0] Debug [06092] Settting TTI=6094, tx_mutex=2, tx_time=39:0.350210 to worker 0 19:08:51.476461 [PHY0] Debug [06094] Worker 0 running 19:08:51.476498 [PHY0] Debug [06094] Sending to radio 19:08:51.477508 [PHY0] Debug [06094] Settting TTI=6095, tx_mutex=3, tx_time=39:0.351210 to worker 1 19:08:51.477540 [PHY1] Debug [06095] Worker 1 running 19:08:51.477565 [MAC ] Debug [06103] Set max_retx=4 pid=7 19:08:51.477575 [MAC ] Info [06103] SCHED: RAR tx rnti=0x46, pid=7, dci=0,0, grant=(2,5), n_rtx=0, tbs=7, bsr=0 (0-7)

ismagom commented 6 years ago

What UE are you using? What hardware you use on srsENB?

This happens because the preamble is received too early. In https://github.com/srsLTE/srsLTE/blob/935afe6ef35886956aeb722c4d64f5bde708bd6d/lib/src/radio/radio.cc#L322 the TX/RX offset is defined based on a calibration done for different frontends. You can try overwriting it editing enb.conf option rf.time_adv_nsamples setting a value slightly less than that corresponding to your hardware and nof_prb=15

liuzhikui commented 6 years ago

Thanks.