Skip to content

Commit 234f99d

Browse files
committed
Merge branch 'next' into agpl_next
2 parents 38a520b + 633959f commit 234f99d

27 files changed

+561
-96
lines changed

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Change Log for Releases
22
=======================
33

4+
## 22.04.1
5+
* Various bug fixes in RLC AM and PDCP for NR
6+
* Fix crash when UE attempted to reestablish in SA
7+
* Remove fixed coreset0 index for SSB
8+
* Add support for SIB5 and SIB6 transmission in LTE
9+
410
## 22.04
511
* Added baseline 5G-SA support to srsUE and srsENB
612
* Added dynamic loading of RF libraries

cmake/modules/SRSRANVersion.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020

2121
SET(SRSRAN_VERSION_MAJOR 22)
2222
SET(SRSRAN_VERSION_MINOR 04)
23-
SET(SRSRAN_VERSION_PATCH 0)
23+
SET(SRSRAN_VERSION_PATCH 1)
2424
SET(SRSRAN_VERSION_STRING "${SRSRAN_VERSION_MAJOR}.${SRSRAN_VERSION_MINOR}.${SRSRAN_VERSION_PATCH}")
2525
SET(SRSRAN_SOVERSION 0)

lib/include/srsran/asn1/liblte_mme.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,6 +2430,7 @@ LIBLTE_ERROR_ENUM liblte_mme_pack_security_protected_nas_msg(LIBLTE_BYTE_MSG_STR
24302430
#define LIBLTE_MME_EPS_NETWORK_FEATURE_SUPPORT_IEI 0x64
24312431
#define LIBLTE_MME_ADDITIONAL_UPDATE_RESULT_IEI 0xF
24322432
#define LIBLTE_MME_T3412_EXTENDED_VALUE_IEI 0x5E
2433+
#define LIBLTE_MME_ADDITIONAL_INFORMATION_IEI 0x65
24332434
// Enums
24342435
// Structs
24352436
typedef struct {

lib/src/asn1/liblte_mme.cc

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7600,7 +7600,11 @@ LIBLTE_ERROR_ENUM liblte_mme_pack_downlink_generic_nas_transport_msg(
76007600
liblte_mme_pack_generic_message_container_ie(&dl_generic_nas_transport->generic_msg_cont, &msg_ptr);
76017601

76027602
// Additional Information
7603-
liblte_mme_pack_additional_information_ie(&dl_generic_nas_transport->add_info, &msg_ptr);
7603+
if (dl_generic_nas_transport->add_info_present) {
7604+
*msg_ptr = LIBLTE_MME_ADDITIONAL_INFORMATION_IEI;
7605+
msg_ptr++;
7606+
liblte_mme_pack_additional_information_ie(&dl_generic_nas_transport->add_info, &msg_ptr);
7607+
}
76047608

76057609
// Fill in the number of bytes used
76067610
msg->N_bytes = msg_ptr - msg->msg;
@@ -7637,8 +7641,13 @@ LIBLTE_ERROR_ENUM liblte_mme_unpack_downlink_generic_nas_transport_msg(
76377641
liblte_mme_unpack_generic_message_container_ie(&msg_ptr, &dl_generic_nas_transport->generic_msg_cont);
76387642

76397643
// Additional Information
7640-
liblte_mme_unpack_additional_information_ie(&msg_ptr, &dl_generic_nas_transport->add_info);
7641-
7644+
if (LIBLTE_MME_ADDITIONAL_INFORMATION_IEI == *msg_ptr) {
7645+
msg_ptr++;
7646+
liblte_mme_unpack_additional_information_ie(&msg_ptr, &dl_generic_nas_transport->add_info);
7647+
dl_generic_nas_transport->add_info_present = true;
7648+
} else {
7649+
dl_generic_nas_transport->add_info_present = false;
7650+
}
76427651
err = LIBLTE_SUCCESS;
76437652
}
76447653

@@ -9053,7 +9062,7 @@ LIBLTE_ERROR_ENUM liblte_mme_pack_deactivate_eps_bearer_context_request_msg(
90539062
*msg_ptr = count & 0xFF;
90549063
msg_ptr++;
90559064
}
9056-
9065+
90579066
// Protocol Discriminator and EPS Bearer ID
90589067
*msg_ptr = (deact_eps_bearer_context_req->eps_bearer_id << 4) | (LIBLTE_MME_PD_EPS_SESSION_MANAGEMENT);
90599068
msg_ptr++;

lib/test/asn1/srsran_asn1_nas_test.cc

Lines changed: 97 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,12 @@
2020
*/
2121

2222
#include "srsran/asn1/liblte_mme.h"
23+
#include "srsran/common/test_common.h"
2324
#include "srsran/srslog/srslog.h"
2425
#include <iostream>
2526
#include <srsran/common/buffer_pool.h>
2627
#include <srsran/common/int_helpers.h>
2728

28-
#define TESTASSERT(cond) \
29-
{ \
30-
if (!(cond)) { \
31-
std::cout << "[" << __FUNCTION__ << "][Line " << __LINE__ << "]: FAIL at " << (#cond) << std::endl; \
32-
return -1; \
33-
} \
34-
}
35-
3629
int nas_dedicated_eps_bearer_context_setup_request_test()
3730
{
3831
auto& nas_logger = srslog::fetch_basic_logger("NAS", false);
@@ -112,7 +105,95 @@ int nas_dedicated_eps_bearer_context_setup_request_test()
112105

113106
srslog::flush();
114107
printf("Test NAS Activate Dedicated EPS Bearer Context Request successfull\n");
115-
return 0;
108+
return SRSRAN_SUCCESS;
109+
}
110+
111+
int downlink_generic_nas_transport_unpacking_test()
112+
{
113+
uint8_t nas_message[] = {
114+
0x27, 0xae, 0x80, 0xc8, 0xf9, 0x06, 0x07, 0x68, 0x01, 0x00, 0x06, 0xf0, 0x00, 0x00, 0x00, 0x08, 0x70};
115+
srsran::unique_byte_buffer_t buf;
116+
LIBLTE_MME_DOWNLINK_GENERIC_NAS_TRANSPORT_MSG_STRUCT dl_generic_nas_transport;
117+
LIBLTE_ERROR_ENUM err;
118+
119+
copy_msg_to_buffer(buf, nas_message);
120+
err = liblte_mme_unpack_downlink_generic_nas_transport_msg((LIBLTE_BYTE_MSG_STRUCT*)buf.get(),
121+
&dl_generic_nas_transport);
122+
TESTASSERT(err == LIBLTE_SUCCESS);
123+
TESTASSERT(dl_generic_nas_transport.generic_msg_cont_type == 1);
124+
TESTASSERT(dl_generic_nas_transport.generic_msg_cont.N_bytes == 6);
125+
TESTASSERT(dl_generic_nas_transport.add_info_present == false);
126+
127+
return SRSRAN_SUCCESS;
128+
}
129+
130+
int downlink_generic_nas_transport_packing_test()
131+
{
132+
uint8_t nas_message[] = {
133+
0x27, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x68, 0x01, 0x00, 0x06, 0xf0, 0x00, 0x00, 0x00, 0x08, 0x70};
134+
uint8_t generic_msg_cont[] = {0xf0, 0x00, 0x00, 0x00, 0x08, 0x70};
135+
LIBLTE_BYTE_MSG_STRUCT buf;
136+
LIBLTE_MME_DOWNLINK_GENERIC_NAS_TRANSPORT_MSG_STRUCT dl_generic_nas_transport;
137+
LIBLTE_ERROR_ENUM err;
138+
139+
dl_generic_nas_transport.generic_msg_cont_type = 1;
140+
dl_generic_nas_transport.generic_msg_cont.N_bytes = sizeof(generic_msg_cont);
141+
memcpy(dl_generic_nas_transport.generic_msg_cont.msg, generic_msg_cont, sizeof(generic_msg_cont));
142+
dl_generic_nas_transport.add_info_present = false;
143+
144+
err = liblte_mme_pack_downlink_generic_nas_transport_msg(
145+
&dl_generic_nas_transport, LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY_AND_CIPHERED, 0xffffffff, &buf);
146+
147+
TESTASSERT(err == LIBLTE_SUCCESS);
148+
TESTASSERT(buf.N_bytes == sizeof(nas_message));
149+
TESTASSERT(memcmp(buf.msg, nas_message, buf.N_bytes) == 0);
150+
return SRSRAN_SUCCESS;
151+
}
152+
153+
int downlink_generic_nas_transport_with_add_info_unpacking_test()
154+
{
155+
uint8_t nas_message[] = {0x27, 0xae, 0x80, 0xc8, 0xf9, 0x06, 0x07, 0x68, 0x01, 0x00, 0x06,
156+
0xf0, 0x00, 0x00, 0x00, 0x08, 0x70, 0x65, 0x02, 0x11, 0x11};
157+
srsran::unique_byte_buffer_t buf;
158+
LIBLTE_MME_DOWNLINK_GENERIC_NAS_TRANSPORT_MSG_STRUCT dl_generic_nas_transport;
159+
LIBLTE_ERROR_ENUM err;
160+
161+
copy_msg_to_buffer(buf, nas_message);
162+
err = liblte_mme_unpack_downlink_generic_nas_transport_msg((LIBLTE_BYTE_MSG_STRUCT*)buf.get(),
163+
&dl_generic_nas_transport);
164+
TESTASSERT(err == LIBLTE_SUCCESS);
165+
TESTASSERT(dl_generic_nas_transport.generic_msg_cont_type == 1);
166+
TESTASSERT(dl_generic_nas_transport.generic_msg_cont.N_bytes == 6);
167+
TESTASSERT(dl_generic_nas_transport.add_info_present == true);
168+
TESTASSERT(dl_generic_nas_transport.add_info.N_octets == 2);
169+
170+
return SRSRAN_SUCCESS;
171+
}
172+
173+
int downlink_generic_nas_transport_with_add_info_packing_test()
174+
{
175+
uint8_t nas_message[] = {0x27, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x68, 0x01, 0x00, 0x06,
176+
0xf0, 0x00, 0x00, 0x00, 0x08, 0x70, 0x65, 0x02, 0x11, 0x11};
177+
uint8_t generic_msg_cont[] = {0xf0, 0x00, 0x00, 0x00, 0x08, 0x70};
178+
uint8_t add_info[] = {0x11, 0x11};
179+
LIBLTE_BYTE_MSG_STRUCT buf;
180+
LIBLTE_MME_DOWNLINK_GENERIC_NAS_TRANSPORT_MSG_STRUCT dl_generic_nas_transport;
181+
LIBLTE_ERROR_ENUM err;
182+
183+
dl_generic_nas_transport.generic_msg_cont_type = 1;
184+
dl_generic_nas_transport.generic_msg_cont.N_bytes = sizeof(generic_msg_cont);
185+
memcpy(dl_generic_nas_transport.generic_msg_cont.msg, generic_msg_cont, sizeof(generic_msg_cont));
186+
dl_generic_nas_transport.add_info_present = true;
187+
dl_generic_nas_transport.add_info.N_octets = sizeof(add_info);
188+
memcpy(dl_generic_nas_transport.add_info.info, add_info, sizeof(add_info));
189+
190+
err = liblte_mme_pack_downlink_generic_nas_transport_msg(
191+
&dl_generic_nas_transport, LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY_AND_CIPHERED, 0xffffffff, &buf);
192+
193+
TESTASSERT(err == LIBLTE_SUCCESS);
194+
TESTASSERT(buf.N_bytes == sizeof(nas_message));
195+
TESTASSERT(memcmp(buf.msg, nas_message, buf.N_bytes) == 0);
196+
return SRSRAN_SUCCESS;
116197
}
117198

118199
int main(int argc, char** argv)
@@ -121,9 +202,13 @@ int main(int argc, char** argv)
121202
asn1_logger.set_level(srslog::basic_levels::debug);
122203
asn1_logger.set_hex_dump_max_size(-1);
123204

124-
srslog::init();
205+
srsran::test_init(argc, argv);
125206

126-
int result = nas_dedicated_eps_bearer_context_setup_request_test();
207+
TESTASSERT(nas_dedicated_eps_bearer_context_setup_request_test() == SRSRAN_SUCCESS);
208+
TESTASSERT(downlink_generic_nas_transport_unpacking_test() == SRSRAN_SUCCESS);
209+
TESTASSERT(downlink_generic_nas_transport_packing_test() == SRSRAN_SUCCESS);
210+
TESTASSERT(downlink_generic_nas_transport_with_add_info_unpacking_test() == SRSRAN_SUCCESS);
211+
TESTASSERT(downlink_generic_nas_transport_with_add_info_packing_test() == SRSRAN_SUCCESS);
127212

128-
return result;
213+
return SRSRAN_SUCCESS;
129214
}

srsenb/hdr/phy/phy_common.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,21 @@ class phy_common : public srsran::phy_common_interface
151151

152152
return ret;
153153
}
154+
double get_ssb_freq_hz(uint32_t cc_idx)
155+
{
156+
double ret = 0.0;
157+
158+
if (cc_idx < cell_list_lte.size()) {
159+
ret = cell_list_lte[cc_idx].dl_freq_hz;
160+
}
161+
162+
cc_idx -= cell_list_lte.size();
163+
if (cc_idx < cell_list_nr.size()) {
164+
ret = cell_list_nr[cc_idx].carrier.ssb_center_freq_hz;
165+
}
166+
167+
return ret;
168+
}
154169
uint32_t get_rf_port(uint32_t cc_idx)
155170
{
156171
uint32_t ret = 0;

srsenb/hdr/stack/rrc/rrc_paging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class paging_manager
4141
T(default_paging_cycle_),
4242
Nb(static_cast<uint32_t>((float)T * nb_)),
4343
N(std::min(T, Nb)),
44-
Ns(std::max(1U, Nb)),
44+
Ns(std::max(1U, static_cast<uint32_t>(nb_))),
4545
logger(srslog::fetch_basic_logger("RRC"))
4646
{
4747
for (subframe_info& sf_obj : sf_pending_pcch) {

srsenb/sib.conf.example

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,71 @@ sib3 =
137137
}
138138
};
139139

140+
#####################################################################
141+
# sib5 configuration options (See TS 36.331)
142+
# Contains information relevant for inter-frequency cell re-selection.
143+
# Must be added to sib1::sched_info::si_mapping_info array parameter to be transmitted
144+
#
145+
# inter_freq_carrier_freq_list: A list of neighbouring inter-frequencies.
146+
# dl_carrier_freq: The EARFCN for the EUTRA carrier frequency.
147+
# q_rx_lev_min: Minimum received RSRP level in the E-UTRA cell, ([field_val] * 2) = [level in dBm].
148+
# p_max: Optional maximum allowed transmission power for the neighbouring E-UTRA cells on this carrier frequency.
149+
# t_resel_eutra: Cell reselection timer (seconds).
150+
# t_resel_eutra_sf: Optional speed dependent ScalingFactor for t_resel_eutra.
151+
# sf_medium: Scaling factor if the UE is in Medium Mobility state, one of "0.25", "0.5", "0.75" or "1.0".
152+
# sf_high: Scaling factor if the UE is in High Mobility state, one of "0.25", "0.5", "0.75" or "1.0".
153+
# thresh_x_high: Srclev threshold (dB) to select to a higher-priority RAT/Frequency.
154+
# thresh_x_low: Srclev threshold (dB) to select to a lower-priority RAT/Frequency.
155+
# allowed_meas_bw: Maximum allowed measurement bandwidth on a carrier frequency .
156+
# presence_ant_port_1: whether all the neighbouring cells use Antenna Port 1.
157+
# cell_resel_prio: Optional absolute priority of the carrier frequency group.
158+
# neigh_cell_cfg: Information related to MBSFN and TDD UL/DL configuration of neighbour cells.
159+
# q_offset_freq: Frequency specific offset for equal priority E-UTRAN frequencies.
160+
# inter_freq_neigh_cell_list: A List of inter-frequency neighbouring cells with specific cell re-selection parameters.
161+
# phys_cell_id: Physical layer identity of the cell.
162+
# q_offset_cell: Cell spcific offset.
163+
# inter_freq_black_cell_list: A List of blacklisted inter-frequency neighbouring cells.
164+
# start: The lowest physical cell identity in the range.
165+
# range: The number of physical cell identities in the range.
166+
#
167+
#####################################################################
168+
sib5 =
169+
{
170+
inter_freq_carrier_freq_list =
171+
(
172+
{
173+
dl_carrier_freq = 1450;
174+
q_rx_lev_min = -70;
175+
t_resel_eutra = 2;
176+
t_resel_eutra_sf = {
177+
sf_medium = "0.25";
178+
sf_high = "1.0";
179+
};
180+
thresh_x_high = 3;
181+
thresh_x_low = 2;
182+
allowed_meas_bw = 75;
183+
presence_ant_port_1 = True;
184+
cell_resel_prio = 4;
185+
neigh_cell_cfg = 2;
186+
q_offset_freq = -6;
187+
inter_freq_neigh_cell_list =
188+
(
189+
{
190+
phys_cell_id = 500;
191+
q_offset_cell = 2;
192+
}
193+
);
194+
inter_freq_black_cell_list =
195+
(
196+
{
197+
start = 123;
198+
range = 4;
199+
}
200+
);
201+
}
202+
);
203+
};
204+
140205
#####################################################################
141206
# sib6 configuration options (See TS 36.331)
142207
# Contains UTRA neighbor information for inter-rat handover.

0 commit comments

Comments
 (0)