Hardcoded Samsung caps can be activated with if 1 in rrc_nr.cc

This commit is contained in:
David Rupprecht 2021-01-11 16:14:27 +01:00 committed by Andre Puschmann
parent bc2e230461
commit a89477a805
1 changed files with 25 additions and 0 deletions

View File

@ -233,6 +233,17 @@ void rrc_nr::get_eutra_nr_capabilities(srslte::byte_buffer_t* eutra_nr_caps_pdu)
asn1::bit_ref bref(eutra_nr_caps_pdu->msg, eutra_nr_caps_pdu->get_tailroom());
mrdc_cap.pack(bref);
eutra_nr_caps_pdu->N_bytes = bref.distance_bytes();
#if 0
uint8_t eutra_nr_cap_raw[] = {0x01, 0x1c, 0x04, 0x81, 0x60, 0x00, 0x1c, 0x4d, 0x00, 0x00, 0x00, 0x04,
0x00, 0x40, 0x04, 0x04, 0xd0, 0x10, 0x74, 0x06, 0x14, 0xe8, 0x1b, 0x10,
0x78, 0x00, 0x00, 0x20, 0x00, 0x10, 0x08, 0x08, 0x01, 0x00, 0x20};
if (sizeof(eutra_nr_cap_raw) <= 2048) {
memcpy(eutra_nr_caps_pdu->msg, eutra_nr_cap_raw, sizeof(eutra_nr_cap_raw));
eutra_nr_caps_pdu->N_bytes = sizeof(eutra_nr_cap_raw);
}
#endif
log_h->debug_hex(
eutra_nr_caps_pdu->msg, eutra_nr_caps_pdu->N_bytes, "EUTRA-NR capabilities (%u B)\n", eutra_nr_caps_pdu->N_bytes);
@ -262,6 +273,20 @@ void rrc_nr::get_nr_capabilities(srslte::byte_buffer_t* nr_caps_pdu)
asn1::bit_ref bref(nr_caps_pdu->msg, nr_caps_pdu->get_tailroom());
nr_cap.pack(bref);
nr_caps_pdu->N_bytes = bref.distance_bytes();
#if 0
uint8_t nr_cap_raw[] = {
0xe1, 0x00, 0x00, 0x00, 0x01, 0x47, 0x7a, 0x03, 0x02, 0x00, 0x00, 0x01, 0x40, 0x48, 0x07, 0x06, 0x0e, 0x02, 0x0c,
0x00, 0x02, 0x13, 0x60, 0x10, 0x73, 0xe4, 0x20, 0xf0, 0x00, 0x80, 0xc1, 0x30, 0x08, 0x0c, 0x00, 0x00, 0x0a, 0x05,
0x89, 0xba, 0xc2, 0x19, 0x43, 0x40, 0x88, 0x10, 0x74, 0x18, 0x60, 0x4c, 0x04, 0x41, 0x6c, 0x90, 0x14, 0x06, 0x0c,
0x78, 0xc7, 0x3e, 0x42, 0x0f, 0x00, 0x58, 0x0c, 0x0e, 0x0e, 0x02, 0x21, 0x3c, 0x84, 0xfc, 0x4d, 0xe0, 0x00, 0x12,
0x00, 0x00, 0x00, 0x00, 0xe5, 0x4d, 0x00, 0x01, 0x00, 0x00, 0x04, 0x18, 0x60, 0x00, 0x34, 0xaa, 0x60};
if (sizeof(nr_cap_raw) <= 2048) {
memcpy(nr_caps_pdu->msg, nr_cap_raw, sizeof(nr_cap_raw));
nr_caps_pdu->N_bytes = sizeof(nr_cap_raw);
}
#endif
log_h->debug_hex(nr_caps_pdu->msg, nr_caps_pdu->N_bytes, "NR capabilities (%u B)\n", nr_caps_pdu->N_bytes);
return;
};