Andre Puschmann
d6ef66b0dc
mac_test: add periodic BSR test
4 years ago
Andre Puschmann
d5286e70aa
proc_bsr: refactor and add extra print_state() method
...
allows to call the print_state() routine from other places in the BSR
4 years ago
Andre Puschmann
d1ef5bd915
demux: log DL PDUs
...
instead of just printing the LCIDs that contain SDUs,
we use the to_string() function to log the entire MAC DL-SCH PDU
4 years ago
Andre Puschmann
0740154bff
rrc,sync: fix two uninit vars
...
detected by Valgrind when running UE with TDD cell
4 years ago
Andre Puschmann
58776bc227
ue,sync: increase timeout for entering IDLE to 2s ( #1941 )
...
in ZMQ runs we've seen that entering idle could take quite
a bit of time depending how quickly workers get their samples
sent or reconfigurations done.
In one example up to ~160ms
this patch increases the maximum wait time to 2s.
4 years ago
Francisco Paisana
514deaf25b
fix resetting of phy and mac during reestablishment
4 years ago
Xavier Arteaga
03b88f6149
Added noise to neighbour cell search test
4 years ago
Xavier Arteaga
caf37b8e62
Added serving cell index in UCI/CSI report trace
4 years ago
Andre Puschmann
3b1ae970b9
metrics_test: fix uninit variable
4 years ago
Andre Puschmann
a366500a78
rrc_proc: init cs_result to none
...
detected by Coverity CID 363053
4 years ago
Andre Puschmann
d51a060bfa
nas_test: fix potential out of bounds access
4 years ago
Andre Puschmann
1bbbc9d717
rrc_phy_ctrl_test: fix uninit memory
4 years ago
Francisco Paisana
0842ed9db1
fixed phy cell selection state update for the fail path
4 years ago
Francisco Paisana
665b3996bb
now the phy controller handles the scenario where the phy cell selection failed to be initialized
4 years ago
Andre Puschmann
287c653755
proc_bsr: improve BSR logging to print name of triggered BSR instead of enum
4 years ago
Andre Puschmann
3994407f46
proc_bsr: fix BSR insertion in UL PDUs
...
the BSR trigger wasn't reset after includinga regular or periodic
BSR inside a PDU. This caused the muxing to include another BSR in the
next UL grant. For very small grants, for example with 6 PRBs, this
causes the UE to send way too many BSRs.
4 years ago
Andre Puschmann
7352bfa4bd
mac_test: add unit test for retxBSR timer
...
this test varifies the correct operation of the retxBSR timer.
the first PDU includes a long BSR to indicate more LCGs have
data to transmit. The retxBSR timer is started and subsequent
PDUs should not send a regular BSR.
After the retxBSR timer expires, a UL PDU should again include
a BSR.
4 years ago
Andre Puschmann
937067a205
proc_phr: rename start_periodic_timer() and make sure its only started if a valid config is present
4 years ago
Andre Puschmann
fab86382c1
mac,rrc: add interface to set SR config explicitly without touching any other MAC function
...
when releasing PUCCH/SRS (see 5.3.13 in 36.331) we need to reset the SR config as well.
In our case, SR is handled by MAC so we need to (re-)configure MAC, not all of
MAC though, just SR.
4 years ago
Francisco Paisana
e7239163e9
silence noisy unhandled in_sync_ev logs
4 years ago
Francisco Paisana
f185272367
added comments explaining the meaning of the cell reselection procedures
4 years ago
Francisco Paisana
49e7b8e36e
- Change periodicity of cell reselection after a new serving cell has been selected
...
- Enable PHY intra measurements during RRC_IDLE
4 years ago
Francisco Paisana
585d7c923a
refactor and simplification of cell selection procedure. Using now a SIB3 threshold to decide whether to select neighbor cell while in RRC_IDLE
4 years ago
Francisco Paisana
cae116932b
rewrite the rrc::leave_connected() function to better match the standard. The measurements should not stop while in RRC_IDLE.
4 years ago
Pedro Alvarez
5a4e71a6e4
Created k_enb_context structure that holds k_enb, NCC and NH to make it easier to restore context from failed handover.
4 years ago
Pedro Alvarez
bcb422736c
Save and restore NH on handover and handover failure.
4 years ago
Xavier Arteaga
08e24d00af
Fix TA console trace
4 years ago
Pedro Alvarez
3eb525563a
Fix issue reading MNC length in USIM.
4 years ago
Xavier Arteaga
6ae47b6510
SRSUE: Deafult PUCCH/SRS does not imply full PHY dedicated defaults
4 years ago
Andre Puschmann
5e95fd4a43
ul_harq: reduce log level for new_grant_ul() if RNTI isn't found
...
this avoid logging a warning on UE shutdown if the MAC is already reset
but one of the PHY workers still decodes an UL grant for the old RTNI
21:30:29.254844 [RRC ] [I] Going RRC_IDLE
21:30:29.254848 [RRC ] [I] Proc "Go Idle" - Left connected state
21:30:29.259499 [PHY0] [I] [ 3865] Finished setting new PHY configuration cc_idx=0
21:30:29.259512 [PHY0] [I] [ 3865] Setting new PHY configuration cc_idx=0...
21:30:29.264190 [PHY0] [I] [ 3867] Finished setting new PHY configuration cc_idx=0
21:30:29.275036 [PHY1] [I] [ 3872] PHICH: hi=1, corr=1.0, I_lowest=1, n_dmrs=0, I_phich=0
21:30:29.275050 [MAC ] [W] [ 3872] Received grant for unknown rnti=0x46
4 years ago
Andre Puschmann
362461329a
rrc: improve log message when detecting RLF
4 years ago
Andre Puschmann
76c648106f
rrc: remove varMeasState for unknown neighbor cells
...
this fixes issue #1846 that appears to be related
to the enter/exit state for measurements that is kept
even after a cell disappears from the neighbor list
4 years ago
Andre Puschmann
829dfc4e60
metrics_stdout: fix precision calculation for 100%
...
the precision for 100% was causing the default value of -1 which in turn
cause to print the full precision resulting in ugly stdout plots.
before:
--------Signal--------------DL-------------------------------------UL----------------------
cc pci rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler
0 0 -10 74 0.0 0.0 0.0 0.0 200k 0% 0.0 0.0 0.0 0.0 0%
1 0 0.0 0.0 0.0 0.0 0.0 0.0 150k100.000000% 0.0 0.0 0.0 0.0 0%
after:
--------Signal--------------DL-------------------------------------UL----------------------
cc pci rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler
0 0 -10 74 0.0 0.0 0.0 0.0 200k 0% 0.0 0.0 0.0 0.0 0%
1 0 0.0 0.0 0.0 0.0 0.0 0.0 150k 100% 0.0 0.0 0.0 0.0 0%
4 years ago
Andre Puschmann
e72219789e
ul_harq: don't clear payload buffer during HARQ reset
...
this fixes #1791 which was caused by a race between
the PHY workers preparing a new UL-SCH PDU and the Stack resetting
the MAC, which in turn resets the HARQ processeses, which cleared
the buffer and set the length to zero.
Not explicitly clearing the buffer on a HARQ reset seems to be
fine since the PHY worker clears the buffer before starting to
pack a new PDU anyway.
4 years ago
Pedro Alvarez
22a6dc305f
Moved common variables and functions from the usim and pcsc_usim classes into usim_base class.
4 years ago
Francisco Paisana
8a917bdd06
fix RRC phy controller call to phy->set_config. Only the PCell was being configured
4 years ago
Francisco Paisana
4ebe92f6a3
refactor phy configuration in the rrc to keep track of activated scells, and cells configurations
4 years ago
Francisco Paisana
cfc77118d3
disable console print of scell activation command during handover
4 years ago
Francisco Paisana
d910c910a4
rrc::meas_cell now uses stack timers instead of system timers.
4 years ago
Francisco Paisana
49ad1a4312
added unit test for meas cells
4 years ago
Francisco Paisana
023d32975a
avoid use of pointers to meas_cells in ho_proc as they may become dangling
4 years ago
Francisco Paisana
072b7be582
renamed rrc::cell_t to rrc::meas_cell
4 years ago
Andre Puschmann
d02e8135fb
metrics_stdout: reset n_reports var after writing intermediate table header
4 years ago
Andre Puschmann
0ef8e1fdac
rrc: include pci when logging serving cell measurement
...
this should facilitate easier log parsing and plotting
if the cell measurements _always_ include the PCI, even
in the case of the serving cell
15:49:11.357447 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=+0.1 Hz
15:49:11.391610 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.4 Hz
15:49:11.427325 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.6 Hz
15:49:11.463101 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.7 Hz
15:49:11.499817 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.51 dBm, cfo=+0.1 Hz
15:49:11.499828 [RRC ] [I] MEAS: New measurement neighbour cell: earfcn=2850, pci=0, rsrp=-12.16 dBm, cfo=-0.8 Hz
15:49:11.535027 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.46 dBm, cfo=-0.8 Hz
15:49:11.571707 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.46 dBm, cfo=-0.9 Hz
15:49:11.607932 [RRC ] [I] MEAS: New measurement serving cell: earfcn=0, pci=1, rsrp=-11.52 dBm, cfo=-0.8 Hz
4 years ago
Andre Puschmann
6e0abd30dd
ue,phy_common: include Pcell PCI in cell measurements
...
this allows easier plotting in RRC when PHY cell
measurements already include the PCI
4 years ago
Andre Puschmann
baf171d446
rrc: improve SR configuration logging
...
* move logging of SR max attempts into MAC logging
* log new MAC config whenever it is updated
4 years ago
Andre Puschmann
bf7c2b800e
proc_sr: log error when trying to enable faulty SR config
4 years ago
Andre Puschmann
04acc78c7d
metrics_test: add neighbor cell test
...
cleanup test and add neighbor cells so the displaying is tested
--------Signal--------------DL-------------------------------------UL----------------------
cc pci rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler
0 0 -10 74 0.0 0.0 0.0 0.0 200k 0% 0.0 0.0 0.0 0.0 0%
1 0 0.0 0.0 0.0 0.0 0.0 0.0 150k 50% 0.0 0.0 0.0 0.0 0%
--------Signal-------------Neighbour--DL-------------------------------------UL----------------------
cc pci rsrp pl cfo pci rsrp mcs snr turbo brate bler ta_us mcs buff brate bler
0 0 -10 74 0.0 8 -33 0.0 0.0 0.0 200k 0% 0.0 0.0 0.0 0.0 0%
1 0 0.0 0.0 0.0 8 -33 0.0 0.0 0.0 150k 50% 0.0 0.0 0.0 0.0 0%
--------Signal--------------DL-------------------------------------UL----------------------
cc pci rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler
0 0 -10 74 0.0 0.0 0.0 0.0 200k 0% 0.0 0.0 0.0 0.0 0%
1 0 0.0 0.0 0.0 0.0 0.0 0.0 150k 50% 0.0 0.0 0.0 0.0 0%
0 0 -10 74 0.0 0.0 0.0 0.0 200k 0% 0.0 0.0 0.0 0.0 0%
1 0 0.0 0.0 0.0 0.0 0.0 0.0 150k 50% 0.0 0.0 0.0 0.0 0%
4 years ago
Andre Puschmann
ddbf4e1645
metrics_stdout: print new table header if neighbour cells change
...
this fixes an issue where the stdout metrics isn't readable if the only
neighbour cell gets removed during the 10s where no table header is printed.
--------Signal--------------Neighbor----DL-------------------------------------UL----------------------
cc pci rsrp pl cfo pci rsrp mcs snr turbo brate bler ta_us mcs buff brate bler
0 2 -66 61 -3.3k 1 -76 11 18 1.1 8.4M 3% 0.0 21 262 167k 0%
0 2 -65 60 -3.3k 1 -76 12 19 1.1 9.6M 2% 0.0 22 476 214k 0%
0 2 -65 60 -3.3k 1 -76 16 22 1.3 13M 3% 0.0 23 1.1k 734k 0%
0 2 -64 59 -3.3k 1 -76 17 23 1.3 15M 2% 0.0 23 602 424k 0%
0 2 -63 58 -3.3k 1 -77 20 25 1.4 19M 3% 0.0 23 501 304k 0%
0 2 -62 57 -3.3k 1 -77 22 27 1.8 20M 10% 0.0 22 417 418k 0%
0 2 -61 56 -3.3k 1 -77 24 28 1.8 25M 9% 0.0 23 396 439k 0%
0 2 -61 56 -3.3k 1 -77 26 29 1.5 23M 22% 0.0 23 841 407k 0%
0 2 -60 55 -3.3k 1 -77 27 31 1.3 27M 11% 0.0 23 890 1.1M 0%
0 2 -59 54 -3.3k 1 -77 27 32 1.00 30M 3% 0.0 23 583 524k 0%
0 2 -59 54 -3.3k 1 -77 27 32 0.92 32M 1% 0.0 23 1.1k 503k 0%
--------Signal--------------DL-------------------------------------UL----------------------
cc pci rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler
0 2 -59 54 -3.3k 27 31 1.1 30M 4% 0.0 23 1.2k 529k 0%
0 2 -60 55 -3.3k 27 30 1.4 25M 18% 0.0 23 540 442k 0%
0 2 -61 56 -3.3k 26 29 1.6 23M 21% 0.0 23 536 429k 0%
0 2 -62 57 -3.3k 24 28 1.8 23M 13% 0.0 23 834 456k 0%
0 2 -62 57 -3.3k 1 -78 21 26 1.6 20M 7% 0.0 23 723 425k 0%
0 2 -63 58 -3.3k 1 -76 17 22 1.1 15M 3% 0.0 23 470 267k 0%
0 2 -64 59 -3.3k 1 -77 17 22 1.3 15M 3% 0.0 23 167 280k 0%
0 2 -65 60 -3.3k 1 -76 14 21 1.3 11M 2% 0.0 22 57 223k 0%
0 2 -65 60 -3.3k 1 -76 12 19 1.2 9.0M 3% 0.0 21 135 182k 0%
0 2 -66 61 -3.4k 1 -70 9.3 17 1.0 6.9M 2% 0.0 21 246 126k 0%
0 2 -67 62 -3.3k 1 -75 8.2 16 1.1 4.9M 3% 0.0 20 0.0 122k 0%
4 years ago
Pedro Alvarez
2f0125ef4e
Fix issue recovering key state, when the first HO fails (specifically, is_first_ncc was not recovered). Minor improvements in key logging.
4 years ago
Francisco Paisana
1f2cca8909
in the rrc reconf procedure, handle the scenario where the rrc reconfiguration message does not config the phy
4 years ago
Francisco Paisana
edd5c50f9a
pass nas pdus after sending rrc reconf complete
4 years ago
Francisco Paisana
cf89f4300a
fix ttcn3 to signal back to stack that a phy config has been completed
4 years ago
Francisco Paisana
c6f4776a6f
send the nassdus sooner in the rrc reconf procedure
4 years ago
Francisco Paisana
2416e274a7
fix rrc_meas_test. The phy now needs to signal back to the rrc that the phy config is complete
4 years ago
Francisco Paisana
fc49b5a030
implemented rrc reconfiguration procedure that includes a continuation when phy configuration is complete
4 years ago
Andre Puschmann
936e3b7bef
mac_test: add manual test for TC 7.1.4.6
4 years ago
Andre Puschmann
5a9b1865e4
proc_bsr: fix typo
4 years ago
Xavier Arteaga
ef9d77c966
SRSUE: add PRACH config present field in PHY configuration structure
4 years ago
faluco
51b27fc255
Import latest srslog version ( #1796 )
...
* - Import latest srslog version.
- Adjusted the nas_test to create logs correctly.
- Remove timestamp formatting now that is provided by srslog.
4 years ago
Francisco Paisana
924cc4f937
during cell selection, if the serving cell is ok, avoid calling serving cell configuration if the sibs are already acquired
4 years ago
Ismael Gomez
4e88daae21
Set DCI unpacking errors to info ( #1781 )
4 years ago
faluco
dfeed52514
- Rename out_stream function to console.
4 years ago
faluco
62faef7c71
- Replaced all uses of the log::console method.
4 years ago
Francisco Paisana
b3eb9651d6
disable cqi in scells during handover procedure
4 years ago
Ismael Gomez
f4c7021a5f
Appy phy configuration to current_phy_cfg before sending to PHY after HO
4 years ago
Francisco Paisana
8a9a95a937
ensure sibs are acquired if cell selection calls cell search
4 years ago
Francisco Paisana
af3ff5985e
removal of console print of last selected cell during the cell selection procedure.
4 years ago
Francisco Paisana
c33e94fede
fix conformace 8_5_1_1 failure
4 years ago
Francisco Paisana
045f647914
fix edge case where serving cell is good enough for reestablishment but the sibs are not yet acquired
4 years ago
Andre Puschmann
f32d9f8322
ttcn3: call stop in UE dtor
...
fixes stop issue of TTCN3 DUT
4 years ago
Ismael Gomez
d671e39c93
Fix SINR not correctly considering noise. Missed dBm conversion
4 years ago
Francisco Paisana
5ecbe8fb17
cleanup of the reestablishment procedure state machine. It does not need to wait for the serving cell configuration because such procedure is already included in the cell selection procedure
4 years ago
Pedro Alvarez
b3bfe336a9
Make sure that remote address test has a ip mask
4 years ago
Sylvain Munaut
6ce5863f03
test/tft_test: Add a combined test for IPv6 packets
4 years ago
Sylvain Munaut
9ba8b62972
test/tft_test: Update filter test suite
...
The “IPv4 local address type” filter should be 9 bytes since it includes
not only the ip address, but also its subnet mask.
Quoting from 3GPP TS 24.008 10.5.6.12:
"""
For "IPv4 remote address type", the packet filter component value field
shall be encoded as a sequence of a four octet IPv4 address field and a
four octet IPv4 address mask field. The IPv4 address field shall be
transmitted first. For "IPv4 local address type", the packet filter
component value field shall be encoded as defined for "IPv4 remote
address type".
"""
Same for the ToS which also includes a 1 byte mask value
4 years ago
Sylvain Munaut
5783c01cbb
tf_packet_filter: Improve support for the different filter types
4 years ago
Ismael Gomez
bb691f0cbe
Fix priority order in BSR trigger. Was not being triggered if SRB2 data was pending in the buffer ( #1771 )
4 years ago
Ismael Gomez
8c30822350
Fix bug in update_measurements() not reporting in_sync in single carrier
4 years ago
Francisco Paisana
0997daa7a0
now the handover procedure in the srsUE does not wait for the phy cell selection result. It only waits for the RA result
4 years ago
Ismael Gomez
c75c463263
Use SNR instead of SINR for RLF threshold ( #1769 )
...
* Use SNR instead of SINR for RLF threshold
* Send in/out-sync only for cc_idx=0
4 years ago
Ismael Gomez
76bfc78147
Fix issues with Sounding-RS ( #1761 )
...
* Fix deadlock caused by update_measurements calling in_sync
* Fix overlapping SRS condition
* Do not use shortened PUSCH in transmissions and retx from RAR
* Revert "Fix deadlock caused by update_measurements calling in_sync"
This reverts commit f58c8c8c766f8f95baa3a3bf8287d8e25b2057ba.
4 years ago
Francisco Paisana
2d321231df
fix reest proc. The reest proc state has to be set before launching the procedure, because the procedure can complete immediately on launch call
4 years ago
Pedro Alvarez
86f4d469c6
Added some functions to save and restore AS keys for the case of failed handover in the USIM
4 years ago
Francisco Paisana
81ab4c1a65
make sure ho procedure waits for t304 expiry in all cases
4 years ago
Ismael Gomez
b94d24ed98
Take into account CRS from neigbhour cells when measuring interference ( #1757 )
...
* Take into account CRS from neigbhour cells when measuring interference
* fix std::isnormal compilation
* Fixed compilation of test
* Address comments
* Remove unused overrides
4 years ago
Francisco Paisana
cf89d6645b
add comments explaining each function of the reest procedure
4 years ago
Francisco Paisana
d068d594af
implemented rrc reestablishment procedure part after sending reest request
4 years ago
Francisco Paisana
7d6c9a1751
Add cause and cell pci to reestablishment console message
4 years ago
Francisco Paisana
73e21daeb2
refactor reestablishment procedure to more closely follow TS.
4 years ago
Andre Puschmann
1afc137032
[REBASE] Make PHY non-blocking and fefactor HO procedure ( #1753 )
...
* Make PHY non-blocking and fefactor HO procedure
* makes entire PHY non-blocking through command interface
* adds dedicated queue for cell_search/cell_select commands
* refactor HO procedure to run faster, in one stack cycle. Looks closer to the specs
* force ue to always apply SIB2 configuration during reestablishment
* Run update_measurements in all workers
Co-authored-by: Ismael Gomez <ismagom@gmail.com>
4 years ago
Ismael Gomez
399b986d0b
Fix deadlock caused by update_measurements calling in_sync ( #1760 )
4 years ago
Francisco Paisana
eb370642ab
verify cell selection observer is set before calling it
4 years ago
Francisco Paisana
7f8af023b8
added a callback that always gets triggered when the phy cell selection completes. This callback checks if cell selection failed, and if so, sets the rsrp of the selected cell to -infinity
4 years ago
faluco
f0d651ae8e
- Fixed a leak in the MME class not releasing the static byte buffer pool.
...
- Now the pool gets destroyed on program exit using a unique_ptr.
- Removed manual cleanup() calls in all the code base to free the pool instance.
4 years ago
Ismael Gomez
5968157ea5
Protect better the access to shared variables in phy_common and metrics ( #1750 )
4 years ago
Andre Puschmann
eeb2b904aa
ue,rach: fix failing RACH proc when Msg3 grant RNTI matches current CRNTI
...
this was preventing that the Temp-CRNTI used in the RAR to be identical
to the currently configured C-RNTI of the UE.
The issue simply was that the RACH procedure was declared successful too
early, even before the Msg3 UL grant was filled with the Msg3 content.
The patch moves the logic that detects the successful completion of
the RACH procedure below the Msg3 packing.
4 years ago
Andre Puschmann
a36f9bddc2
ttcn3: use RNTI values in RACH provided by tester
...
this patch extends the SS to use the C-RNTI and Temp CRNTI values
provided by the tester for RAR and Msg3.
4 years ago
faluco
e14cb4b405
- Fix a missing thread join in the phy which caused a memory leak.
4 years ago
faluco
5acc1c9a73
- Cleaned up style in the PRACH class:
...
* Removed magic numbers.
* Reduced indentation of statements with early exists.
* Removed elses after a return statement.
* Trimmed unnecessary include files.
* Default initialized members in the class.
4 years ago