169 Commits (cfd24f6a0ec7b3f54f0420bacaae15de87f7cbf8)

Author SHA1 Message Date
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 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
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 c6f4776a6f send the nassdus sooner in the rrc reconf procedure 4 years ago
Francisco Paisana fc49b5a030 implemented rrc reconfiguration procedure that includes a continuation when phy configuration is complete 4 years ago
Francisco Paisana b3eb9651d6 disable cqi in scells during handover procedure 4 years ago
Francisco Paisana 8a9a95a937 ensure sibs are acquired if cell selection calls cell search 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
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
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
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 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
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
Andre Puschmann b616944a13 ue,rrc: fix security config during HO/reestablishment
we fix a number of very related issues for HO/reestablishment
in the success/error case:

* this patch removes the hard-coded check that intra-cell HO aren't
allowed. There are cases where eNBs use this method to update
the security context.

* the patch also fixes an issue after failed HO where the security context
of the source eNB should be used for the reestablishment.

* update security keys according to specs when mobilitycontrol
indicated change of key
4 years ago
Andre Puschmann 6827c2df21 rrc_meas: disable layer3 filtering until quantity config is received
the filter alpha was initialized to zero by default which causes an
issue because the first measurement for a cell can't be updated,
because the filtering function will always return the current value.

According to 36.331 Sec 5.5.3.2 Note 2, a k-value of 0 should turn
off filtering, which should be used as the default value until
an update is received from the network.
4 years ago
Ismael Gomez f49fbd6d02
Fix the order of HO/reest measurement actions (#1696) 4 years ago
Ismael Gomez 06a5bdaab2 Process all calls to RLF in the main RRC task 4 years ago
Francisco Paisana 92221eb780 update of rrc_interface_mac to remove signal from mac to rrc that RA failed in case of handover failure 4 years ago
Francisco Paisana fddcc3d8ea In the case of Handover, postpone the activation of the CQI and SR config present in the HO command for after the RA proc completion to the target eNB 4 years ago
Francisco Paisana 5242f9422b fix deadlock in handover 4 years ago
Francisco Paisana 834c0b3929 integrated new observer pattern into phy controller fsm 4 years ago
Francisco Paisana 48dd436d86 integrated observer pattern into rrc phy ctrl fsm 4 years ago
Francisco Paisana b1670c005b remove shadowed variables for reestablishment during handover 4 years ago
Francisco Paisana 8d10aa906e move defer_task to switch case in the rrc 4 years ago
Francisco Paisana 4fb8011a6d updated phy controller to use task scheduler 4 years ago
Francisco Paisana 9c5471b094 more ergonomic event callback 4 years ago
Francisco Paisana 58a9610efa use of stack event loop to propagate cell search and selection results 4 years ago
Francisco Paisana d48a45976e moved cell selection/search complete event signalling out of phy_controller 4 years ago
Francisco Paisana 48138b5281 removal of phy cell selection procedure as it now it is replaced by phy controller 4 years ago
Francisco Paisana 489969722e implemented phy controller FSM to perform cell selection & search. The controller also tracks the phy sync state 4 years ago
Francisco Paisana 5e06430455 removal of stack handler interface 4 years ago
Francisco Paisana 8c920837d6 fix issue when adding neighbour cell that matches serving cell 4 years ago
Francisco Paisana d746115130 moved serving cell to meas_cell_list 4 years ago
Francisco Paisana 928459408e fix cell meas sorting issue 4 years ago
Francisco Paisana d2dd30c8cb rrc_meas_test failing 4 years ago
Francisco Paisana 9a1f69113f created class for managing neighbor cells of rrc 4 years ago
Francisco Paisana 069dc1f751 moved cell struct of srsue::rrc to separate file 4 years ago
Francisco Paisana d12b037e0d make cell reselection periodic and with period of 20msec 4 years ago
Francisco Paisana c6f422d23e improved cell selection test in srsue::rrc 4 years ago
Francisco Paisana 3e016b8095 select serving cell during cell selection if it is stronger than neighbors 4 years ago
Andre Puschmann e981d5ee70 rrc,ue: refactor wait conditions before transition to RRC idle
before entering RRC idle, after receiving a RRC connection release for example,
we need to wait until the RLC for SRB1 or SRB2 have been flushed, i.e.
the RLC has acknowledged the reception of the message.

Previously we have only waited for SRB1 but the message can also be received on SRB2
and in this case both bearers need to be checked.

The method is now streamlined to check both SRBs and is also used when
checking the msg transmission of an detach request.
4 years ago
Ismael Gomez 54b331c504
Adds best neighbour to CSV and stdout metrics (#1440) 4 years ago
Xavier Arteaga de230826b9 Added string helper for removing spaces and parsing list
Fix

Fix string parser
4 years ago
Francisco Paisana 81848deae2 extended handover procedure to accommodate all the handover (phy cell select + ra) 4 years ago
Francisco Paisana 556fcb69e7 fix handover my defering to next tti the reestablishment of bearers 4 years ago
Francisco Paisana 37ce475398 fix+refactor of the ue rrc handover preparation procedure to avoid deadlocking 4 years ago
Francisco Paisana 8f4f37e89b remove more unused rrc variables 4 years ago
Francisco Paisana 29fd147d41 remove unused rrc variables 4 years ago
Francisco Paisana b2aae8763b made mac_nr and rrc_nr final to avoid using virtual dtors 4 years ago
Francisco Paisana 452c043370 created a global map of lcids to srbs/drbs for NR 5 years ago
Francisco Paisana 6a164e032d added srsue::rrc_nr 5 years ago
Francisco Paisana af9ca9f9e5 remove unecessary moves 5 years ago
yagoda 8e0b106c22 fixing some warnings from LGTM 5 years ago
Xavier Arteaga 89dcd6339f More LGTM fixes 5 years ago
Xavier Arteaga 25312e81b4 SRSUE: cell select RRC MEAS CFO is carried to PHY Cell object 5 years ago
Xavier Arteaga 051e8fcc52 SRSUE: Apply default PHY config to SCell as well 5 years ago
Xavier Arteaga 6d355ab61e SRSUE: Fix HO initial CFO 5 years ago
Francisco Paisana aeed623734 removed pdu processing from the ue rrc cmd queue. Instead, now the rrc processes the incoming pdus right away. This is essential to fix the security cmd issue in the ue 5 years ago
Francisco Paisana 82cb6baef0 now the whole ue and enb mac uses the logmap 5 years ago
Francisco Paisana 45bc123967 remove manual tti counters from the rrc 5 years ago
Francisco Paisana d3f49d0e3c changed interface sync-stack to allow tti jumps > 1 5 years ago
Xavier Arteaga e832769ae6 Updated copyright 5 years ago
Pedro Alvarez 96c82b3fc6 Moved PDCP configs to pdcp_config.h. Added `as_security_cfg_t` structure to hold access stratum keys.
Refactored PDCP, RRC and USIM accordingly.
5 years ago
Andre Puschmann 51864bc03c rrc: print release cause when receiving rrc connection release 5 years ago
Francisco Paisana 5a64fc0a93 sib_acquire_proc is not tti-driven anymore. No need to call run explicitly 5 years ago
Francisco Paisana 925ac862cb sib acquiring is failing for sib2 5 years ago
Francisco Paisana c29f08d8d5 refactored si acquisition procedure to use stack timers. Also created an interface that is going to be used for the task/timer handling 5 years ago
Francisco Paisana 22f51bb30b made cell select non-blocking using background threads 5 years ago
Francisco Paisana c76cdc6cea refactored the serving cell config procedure. there was one more state than it was needed. 5 years ago
Xavier Arteaga 4d3c28ff97 SRSUE: wait for valid RSRP measurement before adquiring SIBs during cell search 5 years ago
Xavier Arteaga f8294fb9df SRSUE: RRC measurements refactor and more fixes 5 years ago
Ismael Gomez 52716f8716 Process HO complete in the background to avoid heap-after-use bug when PHY measurements are reported during a HO
rrc_meas refactor. Need to split commit

Fix typo

Temporal commit

Apply rx_gain_offset to neighbour cell measurements

srsLTE: modify TESTASSERT Macro to follow codeline

SRSUE: prevent RRC from having serving cell in neighbour list

SRSUE: DL HARQ does not need Time Aligment Timer. UL is disabled using PUCCH resources release

SRSUE: extend intra-frequency to CA SCell

SRSUE: fix confusing/ambiguous code in the RRC measurements and fix concurrency issue

SRSUE: remove RRC measurement report triggers when measurements are modified or HO succesful

SRSUE: fix compilation issues and Reest SIB indexes

Fixes sync using incorrect cell configuration when search cell does not find a correct cell

Small refactor to remove measurement report triggers always after removing measurement

SRSUE: Removed SIC PSS from UE

SRSUE: fix inter-frequency reestablishment and added more traces

SRSUE: Fix compilation issue
5 years ago
Pedro Alvarez c5979f59eb Clang format UE, eNB and lib (#850)
* Clang-formated UE, eNB and lib.
* Fixed compiling errors from clang-format.
* Fix linking issues introduced by clang-format
* Fix poor formating in initializing arrays of arrays.
* Fix mistake in conflict resolution on rm_turbo.c
* Re-apply clang format to gtpc_ies.h
5 years ago
Andre Puschmann 8a064cd3a6 pass msg_type from caller when logging RRC message
before the type of some message wasn't displayed correctly,
like SIBs, for example because the logger didn't
know the filed to retrieve the type string
5 years ago
Andre Puschmann fa2821a4e7 fixing periodic measurment reporting
fixes various issues with unset timers, interval parameters, etc.
with those fixes, TC_8_3_1_1 and TC_8_3_1_2 pass
5 years ago
Francisco Paisana d59016ae68 use of srslte::log* type for ASN1 logging. Initialization of the asn1 and rrc_asn1 loggers done now in both the ue and enb 5 years ago
Xavier Arteaga 6d896ee453 Fixed more static code analysis warnings 5 years ago
Xavier Arteaga b4b1ab94af SRSUE RRC: new PHY unknown sync state, cell select waits for PHY in-sync 5 years ago
Andre Puschmann 8ef0d6c6ca do not automatically consider cells for which a measurment has been received as "in sync"
the in_sync flag has been misused in some parts of the code
receiving a PHY measurement for a cell does not automatically
mean that we are "in sync", as it is used in RRC as a condition
to indicate if we are camping on cell

the in_sync/out_of_sync condition should only be altered by the
corresponding functions sent from the PHY for the currently selected
cell (and not automatically for all cells)

the commit also removes the deletion of cells which are not "in sync"
from the list of neighbor cells. Instead, RRC calls a clean-up function
peridically that deletes old cells eventually.
5 years ago
Xavier Arteaga f5e4ff9f4d SRSUE: RRC Reest Procedure Refactor 5 years ago
Xavier Arteaga f37a096f10 SRSUE: Refactored/Fixed RRC connection Re-establishment and minor CLang Format/Tidy fixes 5 years ago
Francisco Paisana 177e880293 removed extra threads from enb rrc 5 years ago
Francisco Paisana d2c56caf7e applied new timer class to the whole code base 5 years ago
Francisco Paisana b254bdbb93 typedefed the proc_result_t<void> to become proc_state_t 5 years ago
Francisco Paisana f2d88e5a5b simplified NAS rrc connection request procedure
move non-type-specific methods of proc_t to its base class.
procedure state machine was simplified via a future-type. Now procedures dont get stuck until the user reads the procedure outcome.
made the NAS procedures more event trigger/reaction-based.
5 years ago
Francisco Paisana 8864787f59 added the continuation functionality to procedures via the "then()" method. 5 years ago
Francisco Paisana c1be118d1d new wrapper-based design for stack procedures. Removes extra base class, gets rid of spurious copies/moves during the pop(), and allows the use of a non-default ctor() 5 years ago
Francisco Paisana 8980810061 added some util print functions and fixed the issue with sync::cell_select when the last cell search was not successful 5 years ago
Andre Puschmann 82e3fd1052 fix uninitialized vars in RRC 5 years ago
Andre Puschmann c24b25f42e after RLF store PCI of current serving cell
the PCI is needed for the reestablishment request in case
the new serving cell has changed
5 years ago
Andre Puschmann 35307a047a make UE switch_on non-blocking
this allows a simpler main that just signals NAS to switch on the UE
but doesn't block until the action is completed.

For making sure the UE also attached if the first attempt failed
the NAS needs to be extended to support the correct timers.
5 years ago
Francisco Paisana 81a466a641 since we moved cell search to the background thread, cell reselection prints a error message that it cannot start. In fact it already started. It is just waiting for the cell search to finish. This PR fixes this 5 years ago
Francisco Paisana b1496317d5 fixed the pcch proc issue by letting the cell selection explicitly propagate its result to the pcch_process_proc 5 years ago
Francisco Paisana 2fb830fcfa moved cell search to background task thread pool, and provided a stack interface to rrc to call "start_cell_search". Once completed, the background task signals back to RRC 5 years ago
Andre Puschmann 0467d8bc84 rework neighbor cell handling 5 years ago
Francisco Paisana fc9bb3c934 removed rrc asn1 header include from the ue_interfaces and phy 5 years ago
Ismael Gomez a3932f9bea Minor change to fix coverty issue 5 years ago