Commit Graph

1821 Commits

Author SHA1 Message Date
Francisco Paisana 349646a9da created a new class for timers. It uses a priority queue to avoid incrementing all timers every tti (step_all() went from O(N) to O(1)), and that is not bounded in number of timers. Not being bounded will be useful for layers that require one or more timers per UE 2019-10-23 19:25:48 +01:00
Francisco Paisana 15bde8660a getting a future of an already finished proc is dangerous 2019-10-23 18:19:25 +02:00
Francisco Paisana 248583ecdf added extra logging and removed uneeded member from proc_t 2019-10-23 18:19:25 +02:00
Francisco Paisana b254bdbb93 typedefed the proc_result_t<void> to become proc_state_t 2019-10-23 18:19:25 +02:00
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.
2019-10-23 18:19:25 +02:00
Francisco Paisana 8864787f59 added the continuation functionality to procedures via the "then()" method. 2019-10-23 18:19:25 +02:00
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() 2019-10-23 18:19:25 +02:00
Ismael Gomez 3828e03f33
Refactor in eNodeB, add channel emulator and fixes in OFDM
* Added channel emulator to srsENB. Added support for fixed delay

* Bug in OFDM when using nonguru mode

* A few changes and refactor in eNodeB
2019-10-23 11:09:39 -05:00
Xavier Arteaga 73517f981e Minor fixes 2019-10-21 16:17:37 +02:00
Xavier Arteaga 423475173d Refactored magnitude and argument extraction from sf_worker 2019-10-21 16:17:37 +02:00
Xavier Arteaga 10480f62b3 SRSENB: Split sf_worker and cc_worker 2019-10-21 16:17:37 +02:00
Andre Puschmann d5835fc8a0 add info_long() method to log filter 2019-10-18 16:38:55 +02:00
Andre Puschmann 891a66a2e5 make the establishment cause a paramter when sending a connection request
needed to signal a mo_sig establishment cause after a RLF
2019-10-18 16:38:55 +02:00
Xavier Arteaga 4227da9bd0 Fixed DCI Format1B length 2019-10-18 13:02:10 +02:00
Xavier Arteaga 73cf593891 SRSENB: Fixed PUCCH resource selection 2019-10-16 15:40:30 +02:00
Andre Puschmann 2d730389fe fix type mismatch in bzero 2019-10-16 10:35:03 +02:00
Andre Puschmann 626259eede add helper method to obtain thread name
this is helpful to, for example, print the name of
the thread that calls a function, i.e.:

log.console("%s from %s\n", __PRETTY_FUNCTION__, thread::get_name().c_str());
2019-10-15 10:13:21 +02:00
Pedro Alvarez fd01c44d4e Fix compilation error on GCC 8.x due to usage of strncpy in zmq_imp_rx/tx.
Fixed also order in which zmq object is zero'ed out.
2019-10-15 10:12:26 +02:00
Xavier Arteaga ba6a68825c UE DL: Extended ack test for FDD 2019-10-14 11:20:35 +02:00
Xavier Arteaga 0b00e6d94a SRSUE: fixed CSI and HARQ collision for CA 2019-10-14 11:20:35 +02:00
Ismael Gomez 1d83bb08e2 Changes in ACK procedure to support CA. Tested 1 cell in SISO/MIMO 2019-10-14 11:20:35 +02:00
Andre Puschmann d8fedf2e19 fix parsing of corrupted MAC PDUs 2019-10-11 17:35:52 +02:00
Andre Puschmann 89889d6df5 add packing and unpacking test for MAC PDU only containing padding bytes 2019-10-11 17:35:52 +02:00
Andre Puschmann 80afe5ca40 rlc_um: add missing lock in get_buffer_state() 2019-10-09 13:26:15 +02:00
Andre Puschmann c5f52adfba nas: fix issue in which NAS wouldn't allow to attach once it failed
the main issue was the plmn_selected variable. the solution
was to create a function to enter the deregistered state that resets the variable
and performs all other actions that need to be performed, like clearing
EPS bearers.

The patch also extends the SS to support AT commands to enable/disable
data services and now succesfully passes TC_9_2_2_1_7
2019-10-09 11:34:49 +02:00
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 2019-10-04 22:01:44 +02:00
Andre Puschmann f07a9277a0 fix RLC AM issue where an invalid status PDU was generated
happens when very small grant is provided and the status
PDU generation fails because of a too small grant

add extra check to prevent that ACK_SN is also in NACKS list
2019-10-04 16:29:03 +02:00
Francisco Paisana a2f1998350 fix issue with thread pool shut down 2019-10-04 10:24:21 +02:00
Francisco Paisana 3f1fad3f4e bug fix: avoid renaming thread in worker ctor 2019-10-04 10:24:21 +02:00
Andre Puschmann c7f0caa24a add TTI field to MAC dl/ul grants and fix PCAP to include TTI 2019-10-02 16:49:46 +02:00
Andre Puschmann d73965e887 fix tear-down of worker 2019-10-02 11:04:47 +02:00
Francisco Paisana 6db0e474be moved RA waiting procedure to a background task of the stack thread pool 2019-10-02 11:04:47 +02:00
Francisco Paisana c413fadea9 created a queue-based thread pool. Tasks are inserted into a queue and then popped by the thread pool workers to be processed. 2019-10-02 11:04:47 +02:00
Xavier Arteaga 665f899a74 Fixed some coverity and Clang tidy warnings 2019-10-02 11:03:03 +02:00
Andre Puschmann 50999d8116 allow integrity protection for identity response 2019-10-01 20:59:00 +02:00
Andre Puschmann 3e4bbbda5c fix PSS threshold value in cell_search 2019-10-01 16:54:42 +02:00
Andre Puschmann 2deaab8ded fix synch_file example to work with sample rates other than 1.92 2019-10-01 16:54:42 +02:00
Francisco Paisana e92632e729 zero-initialized mbms rrc interface types 2019-09-30 21:05:32 +02:00
Francisco Paisana fc9bb3c934 removed rrc asn1 header include from the ue_interfaces and phy 2019-09-30 21:05:32 +02:00
Ismael Gomez 4b5353e87a BladeRF: tx gain range was incorrectly obtained from rx module 2019-09-28 23:17:55 +02:00
Ismael Gomez 9325aaddf2 Do not change master clock rate if not necessary. Hint in ue/enb configs for low BW cells 2019-09-27 18:59:55 +02:00
Ismael Gomez 5689d6513d Fix not checking for explicit value 2019-09-27 16:33:44 +02:00
Andre Puschmann 2f47010eb6 fix various uninitialized vars 2019-09-24 13:23:30 +02:00
David Rupprecht f9a668861a Fixed USRP capture sync due to missing channel ptr 2019-09-23 14:36:08 +02:00
Andre Puschmann b0fd588a23 fixing zmq includes 2019-09-22 15:08:49 +02:00
Xavier Arteaga 191e8d6520 ZMQ: Fixed for more stability 2019-09-20 18:32:38 +02:00
Xavier Arteaga 125f1e7282 ZMQ: Split Tx and Rx, bug fixes and clean up 2019-09-20 18:32:38 +02:00
Ismael Gomez cf550f6e56 Fix incorrect pointer passing in rf_uhd 2019-09-20 17:58:28 +02:00
Andre Puschmann c99d5077c8 add RLC UM NR transmitter 2019-09-20 16:33:25 +02:00
Xavier Arteaga 11109460e6 Fix continuous_tx parsing 2019-09-20 16:26:33 +02:00
Xavier Arteaga f8dcb8bf67 CRS SCell searcher: Minimal simplification 2019-09-20 16:20:31 +02:00
Xavier Arteaga 9ee8cc0ad2 CRS SCell searcher: Fixed memory leaks 2019-09-20 16:20:31 +02:00
Xavier Arteaga 9ea9aab39d Added High Speed Train model to channel emulator 2019-09-20 16:20:31 +02:00
Xavier Arteaga 6eb26be34e Fixed include headers 2019-09-20 16:20:31 +02:00
Xavier Arteaga 35f85c651c SRSUE: Added SCell synchronizer and measurements based on reference signals 2019-09-20 16:20:31 +02:00
Xavier Arteaga 8e17aba5d8 Improved SSS decoding and improved scell_search_test 2019-09-20 16:20:31 +02:00
Xavier Arteaga dedf0f2f78 Added initial time to delay channel simulator 2019-09-20 16:20:31 +02:00
Xavier Arteaga 368690ea6b SRSUE: Added intra frequency SCell search test 2019-09-20 16:20:31 +02:00
Xavier Arteaga d7c1a0bda9 Added High Speed Train model to channel emulator 2019-09-20 16:20:31 +02:00
Xavier Arteaga 78fcc11a30 Fixes minor unitialised/leaked memory 2019-09-20 16:03:37 +02:00
Xavier Arteaga 703bbb44a3 Removed master clock rate for soapy. Tested with LimeSDR. 2019-09-20 15:43:07 +02:00
Xavier Arteaga 531ea2d0cd Cleaned up unused RF functions. Integrated Soapy Master Clock Rate in set srate. 2019-09-20 15:43:07 +02:00
Xavier Arteaga db5a21e659 Remove set_master_clock_rate from PHY RF API 2019-09-20 15:43:07 +02:00
Xavier Arteaga 9984e14170 BladeRF: Solved all clang tidy warnings 2019-09-20 15:43:07 +02:00
Ismael Gomez 0984debe1b
Fix issues with RLF in B210 and X300 (#669)
* Calling tx_end() from radio_reset() causes long execution time in B210. Using boolean to call later instead. Fixes RLF failing in B210. Checked in X300

* Fix issue #655
2019-09-20 15:41:16 +02:00
Andre Puschmann a2ab043c0d fix memleaks and uninitialized vars found by cppcheck 2019-09-20 10:55:29 +02:00
Francisco Paisana 946ead06e8 using an interface between the stack and lower mac to process demux pdus. 2019-09-19 10:19:46 +02:00
Andre Puschmann 57317fab7c expose debug_long to class log and use in RRC to log ASN1 structs 2019-09-18 16:12:24 +02:00
Andre Puschmann 7ad2b217df fix logging all in error level 2019-09-18 15:15:41 +02:00
Francisco Paisana 7e67aee839 resolved the uninit variable issue in the queue_test 2019-09-18 12:18:33 +02:00
Francisco Paisana 14267640ee implemented andre's PR review requests 2019-09-18 12:18:33 +02:00
Francisco Paisana b2bc05c50a make queue_test less dependent on thread timings 2019-09-18 12:18:33 +02:00
Francisco Paisana ceba00f00e extended multiqueue to support blocking push 2019-09-18 12:18:33 +02:00
Francisco Paisana 63457f195c extented queue test 2019-09-18 12:18:33 +02:00
Francisco Paisana 647c624423 created a multiqueue handler, and started using it for the ue stack 2019-09-18 12:18:33 +02:00
Andre Puschmann 95b2239dd5 add base class for socket handler using netsource object 2019-09-17 21:56:47 +02:00
Andre Puschmann 6baa89cd2c add MAC NR PDU packing and associated unit tests 2019-09-17 17:19:13 +02:00
Andre Puschmann 090f2b4110 add MAC-NR PCAP support 2019-09-17 17:19:13 +02:00
Ismael Gomez a3932f9bea Minor change to fix coverty issue 2019-09-17 14:22:38 +02:00
Francisco Paisana 94667beb00 added a bound checker to bit_ref packer, and other fixes 2019-09-17 14:15:43 +02:00
Ismael Gomez f74efe908b
Fix blocking in resume() after RLF in 100 PRB (#654) 2019-09-17 11:42:42 +02:00
Francisco Paisana cd521a84cb bigger log buffer. Now it is 1024 chars (#649)
Use dynamic string for debug_long() function and known relation of size between log_str and log_filter
2019-09-17 11:42:17 +02:00
Andre Puschmann 5189bbad69 add stop() to logger_file
this allows to close and currently running log process, flush the content
to the file, continue logging during that time, open a new file
and write the new log entries to that new file

basically it allows to use the logger_file multiple times without
needing to destroy the object

this is used in the UE tester to write each testcase into a separate
log file
2019-09-16 21:39:15 +02:00
Andre Puschmann 4869509c7b add write function to netsource
this is useful for listening sockets to also send responses,
i.e. implement bi-directional communication
2019-09-16 21:39:15 +02:00
Francisco Paisana e768989074 added a packer/unpacker for bytes. This should a faster version than normal bit_ref::pack, when we want to pack multiple bytes, and the bit_ref::offset is 0. Also added a way to skip a fixed number of bits 2019-09-13 21:09:26 +02:00
Ismael Gomez 6bb0790cf1
Fix coverty issues (#652) 2019-09-13 15:06:20 +02:00
Xavier Arteaga 1a567a764e SRSUE: Call Radio tx-end when PHY is reseted and removed redundant attribute is_start_of_burst. 2019-09-12 09:49:56 +02:00
Andre Puschmann 4ea9ed058c fix reporting of Tx gain stages in rf_soapy
reported by DreamNik
2019-09-11 21:44:03 +02:00
Pedro Alvarez 1d3e541069 Fixed warning on bytes_to_mnc 2019-09-10 13:46:21 +02:00
Pedro Alvarez 9b20a0de16 Added comment to zuc.cc and zuc.h 2019-09-10 13:46:21 +02:00
Pedro Alvarez 004db4a067 Applied clang-format to zuc_support PR. 2019-09-10 13:46:21 +02:00
Pedro Alvarez 595185d4b5 Fixed small compiler warning. 2019-09-10 13:46:21 +02:00
David Rupprecht 50332089ce Add EEA3 and EIA3 support for UE/enodeb and MME 2019-09-10 13:46:21 +02:00
David Rupprecht f05bb12c78 Process with EIA3 test cases and fix EIA3 2019-09-10 13:46:21 +02:00
David Rupprecht d580a94dab Add EIA3 and test case 2019-09-10 13:46:21 +02:00
David Rupprecht 7e13860dd5 Add decryption function and all tests for enc 2019-09-10 13:46:21 +02:00
David Rupprecht 0841d837de Make ZUC state ful no global vars 2019-09-10 13:46:21 +02:00
David Rupprecht ef4cf7aa52 First ZUC working test case 2019-09-10 13:46:21 +02:00
Andre Puschmann 8da610d68b fix gcc (<= 5) warning with type-limits by casting vr_r to a signed type
this warning is a bit annoying as it is really safe to do
that kind of comparision, it's just that for vr_r==0, any other
unsigned number is >= 0.
2019-09-10 13:43:57 +02:00
Andre Puschmann 49279c89d8 send DL-DCCH on SRB2 after it has been established 2019-09-09 17:16:22 +02:00
Harald Welte 2e426948fe [ENB] Add CFSB support
This commit introduces CSFB (circuit switched fall-back) capabilities to
srsLTE.  Actually, all the eNB has to do is to send a
RrcConnectionRelease with the RedirectedCarrierInfo IE.

The MME triggers this by the S1AP CS Fallback Indicator IE, which may
be present either in the Initial Context Setup Requst or in the
UE Context Modification Request.

As srsLTE has no support for the UE Context Modification Request at all
yet (!), basic support for this message is introduced in this patch.

Both Mobile Originated and Mobile Terminated CSFB with a coupel of
different UE models have been verified using this patch in a setup
consisting of srsENB attached to an undisclosed EPC connected via SGsAP
to a complete  Osmocom 2G network.

Closes: #358
Closes: #363
2019-09-09 16:59:00 +02:00
Andre Puschmann d9577f0e1e suppress type-limit warning issued by some compilers by making var signed
Used to happen with older gcc giving:

"rlc_am.cc:1791:22: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]"
2019-09-09 16:30:48 +02:00
Andre Puschmann a9bea7e30c add -Werror to compile flags 2019-09-09 16:30:48 +02:00
Ismael Gomez bfddc55148
RRC-PHY interface (#639)
RRC-PHY interface refactor. Moved RRC-MAC interface to rrc_asn1_utils and created RRC-PHY interface also in rrc_asn1_utils. All ASN1 includes should be made from rrc_asn1_utils only keeping ue_interfaces clean of ASN1

Tested with different common and dedicated configurations (64QAM UL, 256QAM, CA, SRS enabled/disabled, etc)
2019-09-04 16:59:10 +02:00
Merlin Chlosta 2079c1324c UHD: Wait for `lo_locked` after frequency change (#635)
* UHD: clang-tidy rf_uhd_imp.c
* UHD: wait for LO_lock after frequency change
2019-09-04 16:51:02 +02:00
Ismael Gomez c92c61d560
Optimized front-end logging processing (#641)
Avoid memory allocation and stringstream in log frontend calls (executed from worker threads). Uses a buffer pool of fixed buffer and vsnprintf
2019-09-04 15:32:29 +02:00
Francisco Paisana 67d6a25194 Moving mac timers to stack timers (#638)
* first step towards moving MAC timers to stack. Mac is still using its own timers. srslte::timers class can be restructured.

* moved timers out of the UE MAC
2019-09-04 15:28:09 +02:00
Ismael Gomez 69edee4e6c
Fix issues in uplink QoS (#636)
Fix bugs in Long BSR and Truncated BSR and added unit tests
2019-09-02 22:48:41 +02:00
Francisco Paisana ef61f0408c fix asn1 version separator string 2019-09-02 20:21:54 +02:00
Francisco Paisana ad64207a32 added test for unknown group extensions, and the asn1 lib version in its generated files 2019-09-02 20:21:54 +02:00
Francisco Paisana 939c8905cb now the unknown group exts are also consumed 2019-09-02 20:21:54 +02:00
Francisco Paisana 116dc0a57b fixed group extensions, removed extra presence flag for copy_ptr<T> types as it was just a source of bugs. 2019-09-02 20:21:54 +02:00
Robert Falkenberg bf35f83a5e Fixed inverted interpretation of new data indication (ndi) field in dci_format1As_pack() function 2019-08-29 20:49:24 +02:00
Robert Falkenberg c75f314c3f Fixed incorrect DCI location assignment in pdsch_enodeb.c example 2019-08-29 20:49:16 +02:00
Mark Rohrbacher 4a76801459 Fixed duplex spacing for bands 65 to 70 2019-08-29 20:49:10 +02:00
Robert Falkenberg 3cf4431c66 Fixed inverted handling of fseek result value in srslte_filesource_seek 2019-08-29 20:48:57 +02:00
Igor Kim dd613c1514 Fix TBS table with auto-generated one (#368) 2019-08-29 20:47:07 +02:00
Andre Puschmann ada4e6644f fixing various issues in NB-IoT sync code detected by Coverity and clang-tidy 2019-08-08 11:12:49 +02:00
Francisco Paisana c9d3b61038 added resumable procedures to make RRC and NAS non-blocking 2019-08-08 10:56:54 +02:00
Andre Puschmann e42449532b fix wrong namespace definition in various places 2019-08-07 15:32:49 +02:00
Andre Puschmann deb3cbec28 soapy: start rx stream without extra flags and print error if not successful 2019-08-05 11:11:04 +02:00
Andre Puschmann 80655db4a4 fix missing include in filesink 2019-08-05 11:11:04 +02:00
Andre Puschmann 95a5c2dcdb adding NB-IoT sync code 2019-08-05 11:11:04 +02:00
Ismael Gomez d887624e74 Increased PSS threshold to detect RLF after change to number of missed subframes 2019-07-31 16:57:21 +02:00
Ismael Gomez 19066c49ab Ad Rel10 info to dci logs 2019-07-30 18:18:44 +02:00
Pedro Alvarez 6efa944b5e Removed srslte prefix from pdcp_config_t 2019-07-30 15:01:50 +02:00
Pedro Alvarez 0e7c5634f1 Added comment to PDCP maximum SDU size. 2019-07-30 15:01:50 +02:00
Pedro Alvarez dd56d08269 Replaced byte_buffer by array in PDCP base 2019-07-30 15:01:50 +02:00
Pedro Alvarez 8c10eabf23 Changed PDCP LTE to use unique_lock. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 3da0391fff Adding default initializers to PDCP config. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 494be243c0 Changed security direction to use an enum. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 61051b4cb3 Changed PDCP NR read_data_header to return SN. 2019-07-30 15:01:50 +02:00
Pedro Alvarez f90b69e5f4 More clang-format for PDCP 2019-07-30 15:01:50 +02:00
Pedro Alvarez 491695ab77 Clang-formated PDCP NR PR. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 38bbc55631 Added tests for PDCP NR Rx with SN Len = 18. In-sequence reception seems to work. 2019-07-30 15:01:50 +02:00
Pedro Alvarez d4aeb12db8 Adding more TX tests to PDCP NR entity. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 39e3800781 Fixed header packing for SN length 18 for PDCP NR. First TX test is passing. 2019-07-30 15:01:50 +02:00
Pedro Alvarez d399c65082 Starting to add PDCP SN len 18 unit tests. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 7a69e8ba64 Removed comment. 2019-07-30 15:01:50 +02:00
Pedro Alvarez adfe9f950e Fixed issue in computing the SN. Added test for packets received in sequence for PDCP NR. Test is passing now. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 2104e6bbcf Added test for more TX packets in PDCP NR. Tests passing for TX_NEXT = 0, 2048 and 4096 2019-07-30 15:01:50 +02:00
Pedro Alvarez ecd164ed65 Starting to add more tx tests to PDCP NR tests. 2019-07-30 15:01:50 +02:00
Pedro Alvarez af2b593b8c Added check for integrity in test. First Rx PDCP NR test passing. 2019-07-30 15:01:50 +02:00
Pedro Alvarez d3b6828082 Changed PDCP configuration to explicitly have tx and rx direction. Decrypt on PDCP NR seems fine. 2019-07-30 15:01:50 +02:00
Pedro Alvarez ea3c44e9ac Removing header before decrypting. Continuing to add decryption tests to PDCP NR 2019-07-30 15:01:50 +02:00
Pedro Alvarez 7e6725f0a2 Fixing up PDCP NR tx test. Starting to add rx test. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 378c8d247e Starting to add the mechanisms to store the last PDU in the PDCP tests. 2019-07-30 15:01:50 +02:00
Pedro Alvarez a42726f836 Fixed hdr_len_bytes in PDCP NR. Tx seems OK now. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 73e30743d1 Added enum to PDCP config to replace two bools. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 457f35699d Reverted back to a single config structure between PDCP NR and PDCP LTE. 2019-07-30 15:01:50 +02:00