Commit Graph

2576 Commits

Author SHA1 Message Date
Andre Puschmann 09b8d3ba6b ue,rrc_nr: add message handler/sender for SA until security mode command 2022-01-19 18:37:24 +01:00
Xavier Arteaga 0812a90d21 Removed unused attribute and fix end-of-burst in NR UE SA PHY 2022-01-19 18:33:39 +01:00
Xavier Arteaga d089653bd2 Fix concurrent access in UE NR PHY clear pending states 2022-01-19 18:33:39 +01:00
Andre Puschmann e9252c731e ue,rrc: fix cell selection and RRC setup procedure
* fix event processing in RRC procedures
* add UE timer and constants
* parse SRB setup
2022-01-18 18:20:04 +01:00
Andre Puschmann c13797d287 ue,mac: remove double newlines in logs 2022-01-18 18:20:04 +01:00
Francisco 3c25b6cb24 asn1: remove presence flag for lists and octet strings, as the size of the latter implicitly tell if the asn1 field is present 2022-01-17 11:58:00 +00:00
Xavier Arteaga ae0fb4f4fc UE NR PHY cell select minor fixes 2022-01-17 10:55:38 +01:00
Xavier Arteaga 8854ba49b9 UE RRC NR includes cell search in the initial cell selection procedure 2022-01-17 10:55:38 +01:00
Xavier Arteaga c26f030edb UE PHY SA Slot synchronization integrated 2022-01-17 10:55:38 +01:00
Xavier Arteaga d661db032d Ammended UE NR RRC to perform cell selection without a procedure 2022-01-17 10:55:38 +01:00
Xavier Arteaga 98f304bfa8 Add in srsue and srsenb SSB configuration in log 2022-01-17 10:55:38 +01:00
Codebot 141073050e Merge branch 'next' into agpl_next 2022-01-16 23:12:26 +01:00
Ismael Gomez 89f910e79e srsue,phy: do not queue set_scell command in background if running from set_cells_to_meas comman 2022-01-13 22:01:23 +01:00
Ismael Gomez 552e0816f7 ue: store new EARFCN in the foreground of cell_select to avoid race conditions with the other cmd_worker 2022-01-13 17:25:20 +01:00
faluco 1ec8e8a94e Raise C++ version to 14 and fix ill-formed code that is considered by this new standard. 2022-01-13 13:35:58 +00:00
Xavier Arteaga 2c7287e4d4 Fix successful related typos 2022-01-12 10:27:33 +01:00
Xavier Arteaga e8095529d7 Fix NR UE SFN Sync 2022-01-12 10:27:33 +01:00
Xavier Arteaga db19941985 Minor changes on UE SA PHY 2022-01-12 10:27:33 +01:00
Xavier Arteaga e2b2007293 Fix srsue compilation 2022-01-12 10:27:33 +01:00
Xavier Arteaga 5760080b27 Fix multiple nr_phy_test tests 2022-01-12 10:27:33 +01:00
Xavier Arteaga d6ee282796 Created dummy radio and moved UE dummy PHY into real UE SA PHY 2022-01-12 10:27:33 +01:00
Xavier Arteaga 3b396c8a9a Implement and test initial SFN synchronization for UE standalone mode 2022-01-12 10:27:33 +01:00
Xavier Arteaga 4f86c2fac7 Added more information in NR PHY SA cell search test 2022-01-12 10:27:33 +01:00
Xavier Arteaga d4fd4c8350 Fix deadlock 2022-01-12 10:27:33 +01:00
Xavier Arteaga a5130673f6 More cell search development 2022-01-12 10:27:33 +01:00
Francisco Paisana 61e225d762 asn1: move setup_release_c from rrc_nr_asn1 to asn1_utils and improved interface 2022-01-11 22:59:38 +00:00
Fabian Eckermann 4182a9f164 Add cell group update without random access. 2022-01-10 21:09:03 +01:00
Fabian Eckermann cb6809c9b2 Add SA RRC reconfiguration test. 2022-01-10 21:09:03 +01:00
Fabian Eckermann a6c1098afe Add decoding of RRC reconfiguration. 2022-01-10 21:09:03 +01:00
Fabian Eckermann a9724fced1 Remove unused code from test. 2022-01-10 21:09:03 +01:00
Xavier Arteaga 6c4c1ea155 NR UE PHY: interfaced fix wideband CQI reporting in nr_phy_test 2022-01-10 18:50:53 +01:00
Codebot b1e5bd3c31 Merge branch 'next' into agpl_next 2022-01-02 23:12:21 +01:00
Ismael Gomez 4d382905fd ue,lte: run parse_meas_config after RACH is complete to avoid race condition with PHY reset 2021-12-22 22:41:24 +01:00
Ismael Gomez 2d31e11144 ue,lte: update rx_gain_offset more frequently. Avoid calling UHD driver when getting rx_gain 2021-12-22 22:41:24 +01:00
Ismael Gomez 120ad5c72f ue: store new EARFCN in the foreground of cell_select to avoid race conditions with the other cmd_worker 2021-12-22 22:41:24 +01:00
Robert Falkenberg 226001709d srsUE: refactor option to filter N_id_1 / SSS to configuration
* pick the cell with strongest peak (instead of last match)
* proper selection if N_id_2 was forced too
* add comment explaining potential occlusion of cells
2021-12-22 17:13:21 +01:00
Matan Perelman 0dff58613f srsUE: Add option to filter N_id_1 / SSS to configuration 2021-12-22 17:13:21 +01:00
Codebot 0673d45338 Adding AGPL copyright to new files 2021-12-19 23:12:26 +01:00
Codebot 21525935ab Merge branch 'next' into agpl_next
# Conflicts:
#	srsue/hdr/phy/ue_lte_phy_base.h
#	srsue/hdr/phy/ue_nr_phy_base.h
2021-12-19 23:12:24 +01:00
Andre Puschmann dd28f173b0 ue: log fixes 2021-12-15 12:15:33 +01:00
Fabian Eckermann 7f6fd45b1f Add NSA TDD/FDD tests for new RRC reconfiguration interface. 2021-12-14 18:00:49 +01:00
Fabian Eckermann 6252d94ef4 Change NSA RRC reconfiguration interface to prepare for SA. 2021-12-14 18:00:49 +01:00
Fabian Eckermann 1407983c75 Add decoding of RRC setup. 2021-12-14 18:00:49 +01:00
Fabian Eckermann 93210d9bb3 Add unit tests for new functions. 2021-12-14 18:00:49 +01:00
Fabian Eckermann affdacd9b4 Add decoding of sib1. 2021-12-14 18:00:49 +01:00
Ismael Gomez 0ea7dbee2d srsue,phy: initialize NR PHY only if NR carriers are defined in ue.conf 2021-12-09 21:15:16 +01:00
Andre Puschmann 2e70256548 ue,nsa,rrc: fix RRC's unfinished PHY config for CSI in NSA mode
if this commit brakes the attach in SA, we need to investigate again
and provide another fix that works for both NSA/SA.
2021-12-09 12:58:28 +01:00
Ismael Gomez f04227c3fb srsue,nr: add default NAS 5G ia5g and ea5g arguments 2021-12-03 12:49:38 +01:00
Ismael Gomez 825d363d44 srsue,nr: fix crnti mac CE not being added in msg3 2021-12-03 11:29:23 +01:00
Codebot c2dfa7e78c Adding AGPL copyright to new files 2021-12-03 09:27:07 +01:00
Codebot fc3ac4d491 Merge branch 'next' into agpl_next 2021-12-03 09:27:03 +01:00
Ismael Gomez 3c929ed24c ue,sa: Sends PRACH and receives RAR, then Msg4, resolves contention resolution and pushes ConnectionSetup to RRC 2021-12-01 22:36:10 +01:00
Ismael Gomez 15025f5d57 Merge remote-tracking branch 'origin/sa_ue_rrc2' into feature_nr_sa_igm 2021-12-01 10:50:27 +01:00
Ismael Gomez 46f4be458a ue,sa: can sync and receive pbch successfully 2021-12-01 10:18:27 +01:00
Andre Puschmann 38da5a9c94 ue,rrc,test: add RRC conn setup testcase 2021-11-30 18:13:31 +01:00
Andre Puschmann 28bd93be40 ue,sa: add minimal cell selection and setup request procedure
skeleton based on EUTRA procedures
2021-11-30 18:13:23 +01:00
Ismael Gomez 219bae4fd3 srsue,sa: dummy rrc_nr to initiate dummy cell_select and phy_cfg 2021-11-30 14:45:26 +01:00
Ismael Gomez c71ab70b83 Completed basic sync module with bypass camping. Removed ue_phy_nr and ue_phy_lte base classes 2021-11-30 14:45:26 +01:00
Ismael Gomez 6947f87bcb Add minimum NR SA logic in parent PHY class 2021-11-30 14:45:26 +01:00
Ismael Gomez fb897d2998 Refactor PHY interfaces to remove difference between SA and NSA PHY 2021-11-30 14:45:26 +01:00
Ismael Gomez 58ab8086ff Added multi gNb simulation and RF 2021-11-30 14:45:26 +01:00
Xavier Arteaga f5446422bc UE NR SA interface expects PBCH message instead of spare fields 2021-11-30 14:45:26 +01:00
Xavier Arteaga fb17e3326f More development in UE NR SA cell search 2021-11-30 14:45:26 +01:00
Xavier Arteaga 47b857db25 Initial gnb emulator 2021-11-30 14:45:26 +01:00
Xavier Arteaga b1bcc1a8c0 Initial UE NR SA PHY classes 2021-11-30 14:45:26 +01:00
Andre Puschmann 7227f03314 ue,rrc_nr: refactor reconfig procedure to own source file
preparation to add next procedure
2021-11-29 12:44:32 +01:00
Andre Puschmann ccd4334672 rrc_nr: add basic interface for NAS 2021-11-29 12:44:32 +01:00
Andre Puschmann a15962c817 ue,rrc: move NR RRC into own folder 2021-11-29 12:44:32 +01:00
Codebot dd2c1f7695 Merge branch 'next' into agpl_next 2021-11-28 23:12:22 +01:00
Codebot e0734e584d Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/rrc/nr/rrc_nr_cfg_utils.h
#	lib/src/rrc/CMakeLists.txt
#	lib/src/rrc/nr/rrc_nr_cfg_utils.cc
2021-11-21 23:12:38 +01:00
Fabian Eckermann 8bac4eceda Add ue MAC procedures for PDCCH orders. 2021-11-18 14:56:31 +01:00
Fabian Eckermann d0c07fc86e Add packing of dci format 1A for pdcch orders. 2021-11-18 14:56:31 +01:00
Francisco e8beb2ef81 nr,rrc: redesign fetching of asn1 obj ids for comparison and addmod/rem to asn1 lists 2021-11-16 19:04:51 +00:00
Andre Puschmann b687f58ff0 ue,cc_worker: print coreset info in debug mode 2021-11-16 12:57:20 +01:00
Codebot 63fe471fa6 Merge branch 'next' into agpl_next 2021-11-07 23:12:22 +01:00
Carlo Galiotto 2eaf9add48 rrc,nr: rename boolean variable 2021-11-03 19:31:47 +01:00
Carlo Galiotto ba50bbfb76 rlc,rrc,nr: remove rb_type from rlc_um_config
Signed-off-by: Carlo Galiotto <carlo@srs.io>
2021-11-03 19:31:47 +01:00
Carlo Galiotto 9c2099f680 rrc,rlc,nr: fix RB label in RLC-NR for UE logs + ..
add rb_type in rlc_um_config

Signed-off-by: Carlo Galiotto <carlo@srs.io>
2021-11-03 19:31:47 +01:00
faluco dfd16718fe Fix data race in proc_sr_nr. 2021-10-29 12:45:47 +02:00
Codebot 5275f33360 Merge branch 'next' into agpl_next 2021-10-29 07:42:28 +02:00
faluco 3b2f0d2f65 Fix several issues in GW class:
- Avoid triggering an assertion when the  gw thread is pending termination.
- Re-order gw::stop method to avoid a race condition when closing the TUN device while the gw thread is still running.
2021-10-28 17:42:08 +02:00
Codebot 1cd26af06b Merge branch 'next' into agpl_next 2021-10-28 13:01:49 +02:00
Alejandro Leal Conejos eb889d740d Fixes coverity 369513 2021-10-27 19:47:45 +02:00
Bedran Karakoc fa87715724 Increase context rx count for handled messages 2021-10-27 19:37:49 +02:00
Bedran Karakoc b6b0dd911b Apply NAS security for Identity Response 2021-10-27 19:37:49 +02:00
Bedran Karakoc 66ed8b9065 Add NSSAI slice differentiator, currently only 0 supported 2021-10-27 19:37:49 +02:00
Bedran Karakoc 4e60475200 Apply security to Deregistration Request (UE Originating) 2021-10-27 19:37:49 +02:00
faluco f1385640c4 Fix data race in proc_bsr and ul_harq classes. 2021-10-27 18:15:28 +02:00
faluco 3f0d4f0293 Fix data races in proc_bsr_nr and proc_ra_nr. 2021-10-27 18:15:28 +02:00
Fabian Eckermann 1c75ed10a8 Initialize variable. 2021-10-27 17:39:51 +02:00
Ismael Gomez d972fb368c
Some LGTM fixes (#3564)
* Fix LGTM issues

* ue: add logging to switch on function

* Fix new LGTM issues
2021-10-26 21:15:36 +02:00
Alejandro Leal Conejos 2a2518b7e4 Fixes coverity 372096 2021-10-26 21:09:44 +02:00
Ismael Gomez bdbaf7357a ue,nr: Protect pending_cfgs in PHY worker_pool 2021-10-26 19:04:02 +02:00
faluco b058945142 Fix data race in sync::current_earfcn. 2021-10-26 19:04:02 +02:00
faluco 92b81b200f Fix data race in ul_harq_process::current_irv. 2021-10-26 19:04:02 +02:00
faluco dc31fb05a3 Fix ODR issue detected by ASAN in arch for the srsran_verbose global variable. 2021-10-26 16:56:11 +02:00
Pedro Alvarez a40a2dc191 Disable integrity/encription at PDCP-NR, as it will break when packets arrive out-of-order. 2021-10-26 14:59:40 +02:00
Codebot 2cda208936 Merge branch 'next' into agpl_next 2021-10-26 10:32:37 +02:00
faluco 91677a9dcb Fix data race in sync::state, the stop() did not acquire the required lock. 2021-10-25 20:30:57 +02:00
Xavier Arteaga ebab12403f
Asynchronous NR PHY configuration (#3527)
* Fix a race condition when accessing the NR PHY cfg by the RRC and phy workers.
Rework how the phy cfg is handled, now workers have their own copy that gets updated after a reconfig moving it out of the state class.

* Default initialize sf_len member in sf_worker for consistency.

* Asynchronous NR PHY configuration

* Fix compilation

* Corrected method override and fix unitialised value

* Added carrier equal comparison to avoid aligment byte padding comparison

Co-authored-by: faluco <borja.ferrer@softwareradiosystems.com>
2021-10-25 10:51:02 +02:00
faluco 28887a4384 Relax memory ordering for atomic load for the ul_harq::current_tx_nb member. 2021-10-23 21:26:00 +02:00
faluco 3ecc8bb4c6 Fix data race in gw::deactivate_eps_bearer. 2021-10-23 21:26:00 +02:00
faluco 5f93ff6ed0 Batch of data race fixes in the following classes: RLC AM, Intra measure, UL HARQ, PHY common. 2021-10-23 21:26:00 +02:00
Andre Puschmann dd5eda04e3 ue,rrc_nr: clear DRB to LCID lookup during RRC release 2021-10-23 21:09:26 +02:00
Pedro Alvarez fbcffb84bd Check if RLC is suspended before transmiting PDCP SDU.
This was done to avoid integrity issues, when the UE's RRC erroneously sent
measurement reports while the re-establishment was already in progress.

As errously sending PDCP PDUs on DRBs can cause issues as well, this was
disabled too.
2021-10-22 17:27:32 +01:00
faluco 904d05d4c4 Fix data race in bsr_proc::print_state().
While there, early exit if the log info channel is disabled to avoid formatting a string that will not be used.
2021-10-22 12:41:46 +02:00
Ismael Gomez c096270fc7 ue,nr: ignore NDI if received on T-CRNTI or RAR 2021-10-21 22:17:30 +02:00
Ismael Gomez 0de984d12f srsue: protect access to phy common shared measurement 2021-10-21 21:31:21 +02:00
Pedro Alvarez 7155de91ca Added command to forcefully flush the buffers on srsenb and srsue. 2021-10-21 14:50:44 +01:00
Codebot e39b9f3191 Adding AGPL copyright to new files 2021-10-21 12:36:22 +02:00
Codebot 9d7836817c Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/common/signal_handler.h
2021-10-21 12:36:20 +02:00
faluco d7e8d6bf65 Fix data race in mux_nr::add_bsr_ce. 2021-10-20 18:08:41 +02:00
Carlo Galiotto 4e3564a8a2 mac,stdout: add PUSCH and PUCCH SINR to stdout
This commit implements the PUCCH and PUSCH metrics in the MAC,
to be displayed in the eNB console.

Signed-off-by: Carlo Galiotto <carlo@srs.io>
2021-10-20 17:47:00 +02:00
Carlo Galiotto ebaa71d190 ue,stdout: fix the SNR formatting in UE console (NR)
When the SNR value is INF, the conversion to (int) causes
-2147483648 to be displayed in the UE console.
This commit fixes the formatting, so that the values INF or
NaN would be displayed as N/A

NOTE: The issue of getting an INF value for the reported SNR metric
still needs to be addressed separately.
2021-10-20 17:47:00 +02:00
Ismael Gomez d32bfa3756 remove warning when UE is already in camping 2021-10-19 15:16:52 +02:00
Andre Puschmann 97d43eb044 mac_nr_test: add PDU packing test for two SDUs from different LCs 2021-10-19 11:51:39 +02:00
Andre Puschmann d4a4da7ecc mux_nr: fix tiny issue in mux unit when adding SDUs of different logical channels
this issue has a tiny affect when adding new SDUs from different logical channels
to an UL MAC PDU.

Since the MAC subPDU header is accounted for twice, less SDU payload may be packed.

The patch calculates the required header space and accounts for it in the scheduling.
Howerver, it is only substracted from the available space when an SDU was actually added.
2021-10-19 11:51:39 +02:00
Andre Puschmann cc87af2986 ue,rrc: simplify code 2021-10-16 21:50:07 +02:00
Francisco 08c96b0e35 nr,ue,mac: added TODO comment warning about missing functionality in srsue::mac_nr::reset method 2021-10-15 18:28:09 +01:00
Francisco 81174bda64 nr,ue,rrc: release NR logical channels during RRC release 2021-10-15 18:28:09 +01:00
Xavier Arteaga e93503bae3 Minor changes 2021-10-15 18:19:04 +02:00
Xavier Arteaga 3c40cd2840 Improved NR PHY logging info 2021-10-15 18:19:04 +02:00
faluco dacf40f63e Delete move constructor and move assignment operator explictly for mac_pcap_base and s1ap_pcap classes.
Move emergency handlers header file into the support folder.

Refactored signal handling:
- Remove the dependency with the running static variable in the header file.
- Move implementations down to cc files.
- Allow specifying a new signal handler that will be used to stop the applications.
- Move signal handling files to support.
2021-10-15 15:05:37 +02:00
faluco 9075251627 Move the cleanup code from the signal handlers down to the new emergency handlers for the ue, epc and enb. 2021-10-15 15:05:37 +02:00
Bedran Karakoc 0507d9df2b nas,nr: Fix ciphering and sequence numbers in NAS 2021-10-15 14:47:22 +02:00
Andre Puschmann c467c3c0e6 ue,rrc_nr: remove warning when zp_csi_rs_res_to_add_mod_list is not present
we currently don't enable ZP CSI in the eNB so the warning can be removed.
2021-10-15 10:58:31 +02:00
faluco 5f648d195c Implement JSON reporting in the scell search test. 2021-10-15 10:44:37 +02:00
Andre Puschmann 908c469f30 sync: don't fail camping on cell if current and target srate match
this fixes #3437. The check/requirement for target srate to be different
to current srate isn't needed, and in fact fails for 6 PRBs where both are
indentical always.
2021-10-14 21:21:58 +02:00
Andre Puschmann 1068a84bd0 sync: fix typo 2021-10-14 21:21:58 +02:00
Andre Puschmann fed53c91d0 mac_nr_test: add TC to reproduce #3325
extend the rlc_dummy to allow providing different RLC PDUs.
add TC for issue #3325 but leave the original TV because it is very large.
2021-10-14 11:16:37 +02:00
Andre Puschmann 7cbd3d50b7 mac_sch_pdu_nr,bsr: fix length check for BSR
fix nasty bug where the length calucation for the LCID
was taking the bsr_format_nr_t that was having the same name.
2021-10-14 11:16:37 +02:00
Xavier Arteaga 1bffebe0bf Removed cached PRACH signals 2021-10-14 09:46:15 +02:00
Alejandro Leal Conejos 1a64c6adad Enum fixes so clang 12 can build the repo 2021-10-14 08:48:04 +02:00
Xavier Arteaga 753edc7d7b Force NR PRACH scaling to 0.99 of the DAC dynamic range 2021-10-13 11:00:03 +02:00
Xavier Arteaga c7940f455c More clear equation to calculate number of PRACH subframes 2021-10-13 11:00:03 +02:00
Xavier Arteaga 4cea3d92bd NR PHY accepts multiple SF PRACH sequence 2021-10-13 11:00:03 +02:00
David Rupprecht 5c44d774d0 Added 5G Metrics 2021-10-12 10:48:10 +02:00
David Rupprecht 59e847ba08 Added NAS 5G args 2021-10-12 10:48:10 +02:00
David Rupprecht 5910d8847a Split NAS security ctxt 2021-10-12 10:48:10 +02:00
Codebot cf4b0f1739 Merge branch 'next' into agpl_next 2021-10-10 23:12:22 +02:00
Francisco b8976ca463 nr,ue,rrc: avoid configuring the CSI until NR RA is complete 2021-10-08 12:15:55 +01:00
Xavier Arteaga 9d4fd1c5cc Add NR SFN from SSB assertion and fix dummy SSB scheduling 2021-10-08 09:49:07 +02:00
Xavier Arteaga 954d6f5f8d Removed sfn_4lsb from debug trace 2021-10-08 09:49:07 +02:00
Xavier Arteaga 5afe20e7da UE loads SSB config from helper method 2021-10-08 09:49:07 +02:00
Francisco 47e5e85449 refactor: clean unnecessary includes of the asn1/rrc_nr.h 2021-10-07 23:08:07 +01:00
Joaquim 82ae0e6c37
nr_phy test: add AWGN channel simulator, add High Speed Train channel (#3288)
Add channel simulator to nr_phy tests.

UL and DL channel simulators added, with AWGN and CFO using the HST scenario. The DL AWGN is adjusted according to signal power.
2021-10-07 16:14:46 +02:00
Ismael Gomez 9d35c5d018 srsue: stop rx stream after finishing sync thread to avoid deadlock at stop 2021-10-07 15:28:10 +02:00
Ismael Gomez 8fff7f6646 Fix potential overflow in rssi_read_cnt 2021-10-07 11:38:45 +02:00
Bedran Karakoc 1e1e1420b1 Return AUTS in authentication failure for case AUTH_SYNCH_FAILURE 2021-10-06 20:01:00 +02:00
Bedran Karakoc 361ff3f37a Extend identity type handling in Identity Response 2021-10-06 20:01:00 +02:00