lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

February 2025

  • 1 participants
  • 1182 discussions
[M] Change in osmo-bsc[master]: nokia_site: Add object_identity, object_state and object_identity_sta...
by laforge 27 Feb '25

27 Feb '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39416?usp=email ) Change subject: nokia_site: Add object_identity, object_state and object_identity_state attributes ...................................................................... nokia_site: Add object_identity, object_state and object_identity_state attributes Note: these are cosmetic changes so far, the plan is to use them in the future to finetune the Nokia OML and RSL bootstrap logic. Thanks Domi for helping with the code! Change-Id: Id9f819b0649ba3c247db72d7d738e49c72388dc3 --- M src/osmo-bsc/bts_nokia_site.c 1 file changed, 124 insertions(+), 36 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c index e68cf35..ca9ea8f 100644 --- a/src/osmo-bsc/bts_nokia_site.c +++ b/src/osmo-bsc/bts_nokia_site.c @@ -613,6 +613,42 @@ return get_value_string(nokia_reset_type, reset_type); } +static const struct value_string nokia_object_identity[] = { + { 0x01, "BCF" }, /* Base Control Function */ + { 0x02, "OMU" }, /* Operation and Maintenance Unit */ + { 0x04, "TRX" }, /* Transceiver (FU + CU) */ + { 0x05, "BTS" }, /* Base Transceiver Station (1..248) */ + { 0x07, "FU" }, /* Frame Unit */ + { 0x08, "CU" }, /* Carrier Unit */ + { 0x10, "TRE" }, /* Transmission Equipment (0..15) */ + { 0x11, "TRU" }, /* Transmission Unit */ + { 0x13, "RTSL" }, /* Radio Timeslot of a FU (0..7) */ + { 0x14, "DMR" }, /* Digital Microwave Radio Link */ + { 0x15, "CF" }, /* Conversion Function */ + { 0x64, "RTC" }, /* Remote Tune Combiner */ + { 0, NULL } +}; + +static const char *get_object_identity_string(uint16_t object_identity) +{ + return get_value_string(nokia_object_identity, object_identity); +} + +static const struct value_string nokia_object_state[] = { + { 0x0, "Enabled" }, + { 0x1, "Disabled" }, + { 0x2, "Locked" }, + { 0x3, "Unlocked" }, + { 0x4, "Shutdown" }, /* reserved for BTS MMI use */ + { 0x5, "Powersave" }, /* reserved for BTS MMI use */ + { 0, NULL } +}; + +static const char *get_object_state_string(uint8_t object_state) +{ + return get_value_string(nokia_object_state, object_state); +} + /* TODO: put in a separate file ? */ /* some message IDs */ @@ -637,6 +673,9 @@ #define NOKIA_EI_SEVERITY 0x4B #define NOKIA_EI_ALARM_DETAIL 0x94 #define NOKIA_EI_RESET_TYPE 0x18 +#define NOKIA_EI_OBJ_ID 0x40 +#define NOKIA_EI_OBJ_STATE 0x44 +#define NOKIA_EI_OBJ_ID_STATE 0x65 #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 @@ -1674,6 +1713,7 @@ has not been tested yet. */ +#define FIND_ELEM(data, data_len, ei, var, len) (find_element(data, data_len, ei, var, len) == len) static int abis_nm_rcvmsg_fom(struct msgb *mb) { struct e1inp_sign_link *sign_link = (struct e1inp_sign_link *)mb->dst; @@ -1687,9 +1727,15 @@ uint8_t ack = 0xFF; uint8_t severity = 0xFF; uint8_t reset_type = 0xFF; - int str_len; + uint8_t object_identity[4] = {0}; + uint8_t object_state = 0xFF; + uint8_t object_id_state[11] = {0}; + int severity_len = 0; + int ei_add_info_len = 0; + int ei_alarm_detail_len = 0; int len_data; + if (bts->nokia.wait_reset) { LOG_BTS(bts, DNM, LOGL_INFO, "Ignoring message while waiting for reset: %s\n", msgb_hexdump(mb)); return ret; @@ -1708,16 +1754,14 @@ switch (mt) { case NOKIA_MSG_OMU_STARTED: - if (find_element(noh->data, len_data, - NOKIA_EI_BTS_TYPE, &bts->nokia.bts_type, - sizeof(uint8_t)) == sizeof(uint8_t)) { - LOG_BTS(bts, DNM, LOGL_INFO, "Rx BTS type = %d (%s)\n", bts->nokia.bts_type, + if (FIND_ELEM(noh->data, len_data, NOKIA_EI_BTS_TYPE, &bts->nokia.bts_type, sizeof(bts->nokia.bts_type))) { + LOG_BTS(bts, DNM, LOGL_INFO, "Rx BTS type = %d (%s)\n", + bts->nokia.bts_type, get_bts_type_string(bts->nokia.bts_type)); } else { LOG_BTS(bts, DNM, LOGL_ERROR, "BTS type not found in NOKIA_MSG_OMU_STARTED\n"); } - if (find_element(noh->data, len_data, NOKIA_EI_RESET_TYPE, &reset_type, - sizeof(reset_type))) { + if (FIND_ELEM(noh->data, len_data, NOKIA_EI_RESET_TYPE, &reset_type, sizeof(reset_type))) { LOG_BTS(bts, DNM, LOGL_INFO, "Rx BTS reset type = '%s'\n", get_reset_type_string(reset_type)); } else { @@ -1737,9 +1781,7 @@ bts->nokia.configured = 1; break; case NOKIA_MSG_ACK: - if (find_element - (noh->data, len_data, NOKIA_EI_ACK, &ack, - sizeof(uint8_t)) == sizeof(uint8_t)) { + if (FIND_ELEM(noh->data, len_data, NOKIA_EI_ACK, &ack, sizeof(ack))) { LOG_BTS(bts, DNM, LOGL_INFO, "Rx ACK = %u\n", ack); if (ack != 1) { LOG_BTS(bts, DNM, LOGL_ERROR, "Rx No ACK (%u): don't know how to proceed\n", ack); @@ -1778,6 +1820,14 @@ case NOKIA_MSG_STATE_CHANGED: /* send ACK */ abis_nm_ack(bts, ref); + if (!FIND_ELEM(noh->data, len_data, NOKIA_EI_OBJ_ID_STATE, object_id_state, sizeof(object_id_state))) { + LOG_BTS(bts, DNM, LOGL_NOTICE, "Missing NOKIA_EI_OBJ_ID_STATE\n"); + return -EINVAL; + } + LOG_BTS(bts, DNM, LOGL_NOTICE, "State changed: %s=%d, %s\n", + get_object_identity_string(object_id_state[4]), + object_id_state[5], + get_object_state_string(object_id_state[10])); break; case NOKIA_MSG_CONF_COMPLETE: /* send ACK */ @@ -1790,9 +1840,9 @@ /* RSL Link */ line = e1inp_line_find(e1_link->e1_nr); if (!line) { - LOG_BTS(bts, DLINP, LOGL_ERROR, "RSL link referring to " - "non-existing E1 line %u\n", e1_link->e1_nr); - return -ENOMEM; + LOG_BTS(bts, DLINP, LOGL_ERROR, "RSL link referring to " + "non-existing E1 line %u\n", e1_link->e1_nr); + return -ENOMEM; } /* start TRX */ start_sabm_in_line(line, 1, SAPI_RSL); /* start only RSL */ @@ -1800,39 +1850,77 @@ /* fake 12.21 OM */ nokia_abis_nm_fake_1221_ok(bts); break; - case NOKIA_MSG_BLOCK_CTRL_REQ: /* seems to be send when something goes wrong !? */ - /* send ACK (do we have to send an ACK ?) */ + case NOKIA_MSG_BLOCK_CTRL_REQ: /* BTS uses this scenario to block an object in BSC */ + /* TODO: implement block function */ + /* send ACK */ abis_nm_ack(bts, ref); break; case NOKIA_MSG_ALARM: - find_element(noh->data, len_data, NOKIA_EI_SEVERITY, &severity, - sizeof(severity)); - /* TODO: there might be alarms with both elements set */ - str_len = - find_element(noh->data, len_data, NOKIA_EI_ADD_INFO, info, - sizeof(info)); - if (str_len > 0) { - info[str_len] = 0; - LOG_BTS(bts, DNM, LOGL_NOTICE, "Rx ALARM Severity %s (%d) : %s\n", - get_severity_string(severity), severity, info); - } else { /* nothing found, try details */ - str_len = - find_element(noh->data, len_data, NOKIA_EI_ALARM_DETAIL, info, sizeof(info)); - if (str_len > 0) { - uint16_t code; - info[str_len] = 0; - code = (info[0] << 8) + info[1]; - LOG_BTS(bts, DNM, LOGL_NOTICE, "Rx ALARM Severity %s (%d), code 0x%X : %s\n", - get_severity_string(severity), severity, code, info + 2); + if (!FIND_ELEM(noh->data, len_data, NOKIA_EI_OBJ_ID, object_identity, sizeof(object_identity)) || + !FIND_ELEM(noh->data, len_data, NOKIA_EI_OBJ_STATE, &object_state, sizeof(object_state))) { + if (!FIND_ELEM(noh->data, len_data, NOKIA_EI_OBJ_ID_STATE, object_id_state, sizeof(object_id_state))) { + LOG_BTS(bts, DNM, LOGL_NOTICE, "Missing NOKIA_EI_OBJ_ID & NOKIA_EI_OBJ_STATE or NOKIA_EI_OBJ_ID_STATE\n"); + return -EINVAL; } + object_identity[1] = object_id_state[4]; + object_identity[2] = object_id_state[5]; + object_state = object_id_state[10]; + } + severity_len = find_element(noh->data, len_data, NOKIA_EI_SEVERITY, &severity, sizeof(severity)); + /* Either Additional info or Alarm detail may be included at a time */ + ei_add_info_len = find_element(noh->data, len_data, NOKIA_EI_ADD_INFO, info, sizeof(info)); + if (ei_add_info_len > 0) { + info[ei_add_info_len] = 0; + if (severity_len > 0) { + LOG_BTS(bts, DNM, LOGL_NOTICE, "Rx ALARM (%s=%d(%s)) Severity %s (%d) : %s\n", + get_object_identity_string(object_identity[1]), + object_identity[2], + get_object_state_string(object_state), + get_severity_string(severity), + severity, + info); + } else { + LOG_BTS(bts, DNM, LOGL_NOTICE, "Rx ALARM (%s=%d(%s)) : %s\n", + get_object_identity_string(object_identity[1]), + object_identity[2], + get_object_state_string(object_state), + info); + } + } + /* nothing found, try details */ + ei_alarm_detail_len = find_element(noh->data, len_data, NOKIA_EI_ALARM_DETAIL, info, sizeof(info)); + if (ei_alarm_detail_len > 0) { + uint16_t code; + info[ei_alarm_detail_len] = 0; + code = (info[0] << 8) + info[1]; + if (severity_len > 0) { + LOG_BTS(bts, DNM, LOGL_NOTICE, "Rx ALARM (%s=%d(%s)) Severity %s (%d), code 0x%X : %s\n", + get_object_identity_string(object_identity[1]), + object_identity[2], + get_object_state_string(object_state), + get_severity_string(severity), + severity, + code, + info + 2); + } else { + LOG_BTS(bts, DNM, LOGL_NOTICE, "Rx ALARM (%s=%d(%s)) : %s\n", + get_object_identity_string(object_identity[1]), + object_identity[2], + get_object_state_string(object_state), + info + 2); + } + } + if (ei_add_info_len == 0 && ei_alarm_detail_len == 0) { + LOG_BTS(bts, DNM, LOGL_NOTICE, "Rx ALARM (%s=%d(%s))\n", + get_object_identity_string(object_identity[1]), + object_identity[2], + get_object_state_string(object_state)); } /* send ACK */ abis_nm_ack(bts, ref); break; } - nokia_abis_nm_queue_send_next(bts); - return ret; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39416?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id9f819b0649ba3c247db72d7d738e49c72388dc3 Gerrit-Change-Number: 39416 Gerrit-PatchSet: 23 Gerrit-Owner: csaba.sipos <metro4(a)freemail.hu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: domi <domi(a)tomcsanyi.net>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: stp: Fix expectancies of TC_clnt_quirk_snm_inactive
by laforge 27 Feb '25

27 Feb '25
Attention is currently required from: daniel, pespin. laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39619?usp=email ) Change subject: stp: Fix expectancies of TC_clnt_quirk_snm_inactive ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39619?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I907981c1487b299df852c405bae1fefff4bf5191 Gerrit-Change-Number: 39619 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Thu, 27 Feb 2025 14:00:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-abis[master]: rtp2trau HR to DL: validate ToC octet of RFC 5993
by laforge 27 Feb '25

27 Feb '25
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39626?usp=email ) Change subject: rtp2trau HR to DL: validate ToC octet of RFC 5993 ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ibbaa1e1e12254eaf75a999dd1b58e2145eff158c Gerrit-Change-Number: 39626 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Thu, 27 Feb 2025 13:59:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-abis[master]: rtp2trau FR & EFR: disallow BFI in DL
by laforge 27 Feb '25

27 Feb '25
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39625?usp=email ) Change subject: rtp2trau FR & EFR: disallow BFI in DL ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39625?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ic63943d4bde9902b27e4d8fe9a5fb6ccecbf36c6 Gerrit-Change-Number: 39625 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Thu, 27 Feb 2025 13:58:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: rtp2trau: remove broken acceptance of 0-length payloads
by laforge 27 Feb '25

27 Feb '25
Attention is currently required from: dexter, falconia, fixeria. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39624?usp=email ) Change subject: rtp2trau: remove broken acceptance of 0-length payloads ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39624?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ia41ea2eab1ded094cadcd91dbd33de8800af11ee Gerrit-Change-Number: 39624 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 27 Feb 2025 13:58:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmocore[master]: codec: add some constant frames for HR and EFR
by falconia 27 Feb '25

27 Feb '25
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email ) Change subject: codec: add some constant frames for HR and EFR ...................................................................... codec: add some constant frames for HR and EFR With all 3 classic GSM codecs (FR, HR and EFR) sometimes a need arises for a constant fill frame, to be inserted when no good speech frame is available. For GSM-FR codec the substitution/muting spec (GSM 06.11) explicitly defines a silence frame for this purpose, but no such officially defined fill frames exist for HR or EFR. Those newer codecs do, however, have homing frames that all decoders are required to implement, and there is an unofficial silence frame for GSM-HR, observed as the output from the official encoder fed with all-zeros input. Add these 3 constant frames (HR silence, HR homing, EFR homing) to libosmocodec in order to make them easily usable in any application that may need them, including applications that cannot have ThemWi codec libraries as dependencies. Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f --- M include/osmocom/codec/codec.h M src/codec/gsm620.c M src/codec/gsm660.c 3 files changed, 49 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 7a23e7f..008eab1 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -34,6 +34,9 @@ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ extern const uint8_t osmo_gsm611_silence_frame[GSM_FR_BYTES]; +extern const uint8_t osmo_gsm620_silence_frame[GSM_HR_BYTES]; +extern const uint8_t osmo_gsm620_homing_frame[GSM_HR_BYTES]; +extern const uint8_t osmo_gsm660_homing_frame[GSM_EFR_BYTES]; extern const struct value_string osmo_amr_type_names[]; diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index 49ee724..a24d762 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -263,6 +263,37 @@ 81, /* Code 3:7 */ }; +/* + * There is no officially defined silence frame for GSM-HR codec like there is + * for GSM-FR. However, if one feeds all-zeros (complete silence) linear PCM + * input to the official GSM-HR encoder, the result will be an endless stream + * of these frames: + * + * R0=00 LPC=164,171,cb Int=0 Mode=0 + * s1=00,00,00 s2=00,00,00 s3=00,00,00 s4=00,00,00 + * + * The following const datum is the above unofficial GSM-HR silence frame in + * the packed RTP format of TS 101 318. + */ +const uint8_t osmo_gsm620_silence_frame[GSM_HR_BYTES] = { + 0x01, 0x64, 0xB8, 0xE5, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +/* + * GSM 06.20 defines, by reference to GSM 06.06 C code and GSM 06.07 test + * sequences, a special frame of codec parameters called the decoder homing + * frame (DHF). When a spec-compliant speech decoder processes this frame, + * it resets itself to the spec-defined home state. + * + * The following const datum is GSM-HR DHF in the packed RTP format of + * TS 101 318. + */ +const uint8_t osmo_gsm620_homing_frame[GSM_HR_BYTES] = { + 0x03, 0x71, 0xAF, 0x61, 0xC8, 0xF2, 0x80, + 0x25, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00 +}; + /*! Check whether RTP frame contains HR SID code word according to * TS 101 318 §5.2.2 * \param[in] rtp_payload Buffer with RTP payload diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c index b15bdf3..fbb69c4 100644 --- a/src/codec/gsm660.c +++ b/src/codec/gsm660.c @@ -258,6 +258,21 @@ 246, /* 259 -> PULSE 4_10: b0 */ }; +/* + * GSM 06.60 defines (in Table 7) a special frame of codec parameters called + * the decoder homing frame (DHF). When a spec-compliant speech decoder + * processes this frame, it resets itself to the spec-defined home state. + * + * The following const datum is GSM-EFR DHF in the packed RTP format of + * TS 101 318 or RFC 3551. + */ +const uint8_t osmo_gsm660_homing_frame[GSM_EFR_BYTES] = { + 0xC0, 0x85, 0xEB, 0x49, 0x0F, 0xAA, 0xD6, 0x03, + 0xE3, 0xA1, 0x86, 0x07, 0xB0, 0xC4, 0x2C, 0x08, + 0x04, 0x80, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + static const uint8_t sid_code_word_bits[95] = { /* bit numbers are relative to "pure" EFR frame beginning, * not counting the signature bits. */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f Gerrit-Change-Number: 39636 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: Use default_layer_manager for all ASPs in SCTP-mode=client & m3ua-mod...
by pespin 27 Feb '25

27 Feb '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39637?usp=email ) Change subject: Use default_layer_manager for all ASPs in SCTP-mode=client & m3ua-mode=ASP ...................................................................... Use default_layer_manager for all ASPs in SCTP-mode=client & m3ua-mode=ASP With previous behavior, only first ASP configured as SCTPmode=client and m3ua-mode=ASP in osmo_sccp_simple_client_on_ss7_id() would be applied the default_layer_manager. AS a result, if a client app (eg. osmo-bsc) would manually configure 1 ASP with 2 ASPs (and leave it to dynamic RKM to setup everything at osmo-stp), it would fail, since the default LM FSM (in charge of waiting for NTFY and then sending REQ_REG) would only be applied to the first ASP. So one would see 1st ASP doing ASPUP+REG_REQ+ASPAC correctly, but the second one would do ASPUP+ASPAC directly, which would be refused by osmo-stp since it had no routing context configured for that ASP/AS. Change-Id: I50f9a088c55ad103cc23758192773fc855747e12 --- M src/osmo_ss7_asp.c M src/osmo_ss7_vty.c M src/sccp_user.c M src/ss7_asp.h M src/xua_default_lm_fsm.c 5 files changed, 37 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/37/39637/1 diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index faf4a0a..e3a6843 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -1291,3 +1291,22 @@ } return -1; } + +/* Apply sane configs for unconfigured options and restart the ASP. */ +void ss7_asp_restart_after_reconfigure(struct osmo_ss7_asp *asp) +{ + /* Make sure proper defaults values are applied if user didn't provide + * specific default values */ + ss7_asp_set_default_peer_hosts(asp); + + /* Apply default LM FSM for client ASP */ + if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA && + asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP && + !asp->cfg.is_server) { + osmo_ss7_asp_use_default_lm(asp, LOGL_DEBUG); + } else { + osmo_ss7_asp_remove_default_lm(asp); + } + + osmo_ss7_asp_restart(asp); +} diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 576ad7c..8365db2 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -3001,9 +3001,7 @@ switch (vty->node) { case L_CS7_ASP_NODE: asp = vty->index; - /* Make sure proper defaults values are set */ - ss7_asp_set_default_peer_hosts(asp); - osmo_ss7_asp_restart(asp); + ss7_asp_restart_after_reconfigure(asp); vty->node = L_CS7_NODE; vty->index = asp->inst; break; diff --git a/src/sccp_user.c b/src/sccp_user.c index d27d4bb..b5b6b4b 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -628,6 +628,7 @@ asp = asp_i; LOGP(DLSCCP, LOGL_NOTICE, "%s: ASP %s for %s is not associated with any AS, using it\n", name, asp->cfg.name, osmo_ss7_asp_protocol_name(prot)); + osmo_ss7_as_add_asp(as, asp->cfg.name); break; } if (!asp) { @@ -642,6 +643,7 @@ if (!asp) goto out_rt; asp_created = true; + asp->simple_client_allocated = true; /* Ensure that the ASP we use is set to operate as a client. */ asp->cfg.is_server = false; /* Ensure that the ASP we use is set to role ASP. */ @@ -650,12 +652,10 @@ ss7_asp_peer_set_hosts(&asp->cfg.local, asp, &default_local_ip, 1); if (default_remote_ip) ss7_asp_peer_set_hosts(&asp->cfg.remote, asp, &default_remote_ip, 1); - /* Make sure proper defaults are applied if app didn't provide specific default values */ - ss7_asp_set_default_peer_hosts(asp); - asp->simple_client_allocated = true; + /* Make sure proper defaults are applied if app didn't + provide specific default values, then restart the ASP: */ + ss7_asp_restart_after_reconfigure(asp); } - - osmo_ss7_as_add_asp(as, asp->cfg.name); } /* Extra sanity checks if the ASP asp-clnt-* was pre-configured over VTY: */ @@ -696,12 +696,9 @@ goto out_asp; } } + /* ASP was already started here previously by VTY go_parent. */ } - /* Restart ASP */ - if (prot != OSMO_SS7_ASP_PROT_IPA) - osmo_ss7_asp_use_default_lm(asp, LOGL_DEBUG); - osmo_ss7_asp_restart(asp); LOGP(DLSCCP, LOGL_NOTICE, "%s: Using ASP instance %s\n", name, asp->cfg.name); diff --git a/src/ss7_asp.h b/src/ss7_asp.h index 377274a..a05d870 100644 --- a/src/ss7_asp.h +++ b/src/ss7_asp.h @@ -110,5 +110,8 @@ int ss7_asp_apply_new_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx); int ss7_asp_apply_drop_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx); +void ss7_asp_restart_after_reconfigure(struct osmo_ss7_asp *asp); +void osmo_ss7_asp_remove_default_lm(struct osmo_ss7_asp *asp); + #define LOGPASP(asp, subsys, level, fmt, args ...) \ _LOGSS7((asp)->inst, subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args) diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index fc01605..0952c9e 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -413,6 +413,14 @@ .prim_cb = default_lm_prim_cb, }; +void osmo_ss7_asp_remove_default_lm(struct osmo_ss7_asp *asp) +{ + if (!asp->lm_priv) + return; + osmo_fsm_inst_term(asp->lm_priv, OSMO_FSM_TERM_ERROR, NULL); + asp->lm_priv = NULL; +} + int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level) { struct lm_fsm_priv *lmp; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39637?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I50f9a088c55ad103cc23758192773fc855747e12 Gerrit-Change-Number: 39637 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: codec: add some constant frames for HR and EFR
by pespin 27 Feb '25

27 Feb '25
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email ) Change subject: codec: add some constant frames for HR and EFR ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f Gerrit-Change-Number: 39636 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Thu, 27 Feb 2025 13:13:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: rtp2trau HR: remove broken TRAU-16k-UL support
by falconia 27 Feb '25

27 Feb '25
Attention is currently required from: laforge. falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39623?usp=email ) Change subject: rtp2trau HR: remove broken TRAU-16k-UL support ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > I'm not really a big fan of removing code rather than fixing it. […] Since you originally wrote this TRAU<->RTP code in 2020 and since you chose back then to implement HR support in TRAU-16k format instead of TRAU-8k, let me ask you: do you know of any historical E1 BTS model(s) that implement HR speech (or data) in TRAU-16k format? My admittedly naive understanding is that E1 BTS traditionally allocate one 16 kbit/s subslot for each GSM timeslot, thus when a GSM ts is configured for TCH/H, only 8 kbit/s is available for each lchan. Or does it work differently in some vendor implementations? I am open to idea of fixing TRAU-16k-UL output code instead of removing it *if* I can see captures of Abis UL output from some historical BTS that implements this format. In that case I would first extend my ThemWi TRAU frame parsing tools to decode that format, verify that the test tool matches what the historical BTS put out, then fix the code in libosmotrau and unit-test it against the ThemWi decoding tool that was in turn verified against historical hw. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39623?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: If50036c4de9a11db524abffcd87d053878104982 Gerrit-Change-Number: 39623 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Thu, 27 Feb 2025 13:07:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in libosmo-abis[master]: trau_rtp_conv: document API functions
by falconia 27 Feb '25

27 Feb '25
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39620?usp=email ) Change subject: trau_rtp_conv: document API functions ...................................................................... trau_rtp_conv: document API functions The two API functions that constitute TRAU<->RTP conversion layer of libosmotrau, osmo_trau2rtp() and osmo_rtp2trau(), date back to the reintroduction of E1 BTS support in Osmocom in 2020, and their functionality has been greatly extended in previous Themyscira patches. However, they have not been properly documented until now - fix this defect. Change-Id: Ib7ee2466aaab47e47f78ff94c5179b90cf393d0e --- M src/trau/trau_rtp_conv.c 1 file changed, 99 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 9bee640..328221e 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -1456,6 +1456,38 @@ return false; } +/*! convert received TRAU-UL frame to RTP payload + * \param[out] out Buffer for the output RTP payload + * \param[in] out_len Size of buffer pointed to by \ref out + * \param[in] tf Osmo-decoded TRAU frame + * \param[in] st State/config structure + * \returns length of converted RTP payload if successful; negative on error + * + * This function is intended to operate on TRAU-UL or TFO frames, either + * received from an E1 BTS or extracted from lsbs of PCM samples in TFO. + * Supported TRAU frame types are FR & EFR speech, HRv1 speech in both + * 16k and 8k formats, and all defined CSD frame types up to 14.4 kbit/s + * extended data frames. + * + * In the case of FR/EFR speech, the output format is either RFC 3551 or + * TW-TS-001; in the case of HRv1 speech, the output format is either RFC 5993 + * or TW-TS-002. st->rtp_extensions field selects the use or non-use of + * Themyscira RTP extensions; the structure passed in \ref st currently + * has no other uses in the TRAU->RTP direction. + * + * The following TRAU frame types are _not_ supported: + * + * - TRAU-DL frames: the direction field of the parsed frame structure is + * ignored and all frames are processed as if they were TRAU-UL. In the + * case of FR, EFR, HR-16k and extended data (E-TRAU) frames some control + * bits are different between TRAU-UL and TRAU-DL, such that this + * misinterpretation will produce invalid results. + * + * - D144 sync frames: these special frames are not convertible to RTP; + * their synchronization function needs to be handled by the application. + * + * - AMR speech frames: not currently implemented. + */ int osmo_trau2rtp(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, struct osmo_trau2rtp_state *st) { @@ -1481,6 +1513,73 @@ } } +/*! convert RTP payload to TRAU-UL or TRAU-DL frame + * \param[out] tf Osmocom-defined structure for TRAU frame bits + * \param[in] rtp Payload to be converted + * \param[in] rtp_len Length of payload in \ref rtp + * \param[in] st State/config structure + * \returns 0 in case of success; negative on error + * + * This function can be used to generate both TRAU-UL and TRAU-DL frames. + * TRAU-DL output is needed when feeding traffic to an E1 BTS; TRAU-UL output + * is needed in more specialized applications that emulate an E1 BTS or + * implement in-band TFO. + * + * The set of supported codecs and frame types is the same as osmo_trau2rtp(); + * st->type selects the TRAU frame type to be emitted. Additionally, if the + * TRAU frame type to be generated is OSMO_TRAU16_FT_DATA, st->interm_rate_16k + * needs to be set to true for 16 kbit/s IR or false for 8 kbit/s IR. + * + * In the output structure pointed to by \ref tf, the caller MUST set dir + * member prior to calling the present function; additionally, dl_ta_usec + * member MUST be set (usually to 0) prior to calling osmo_trau_frame_encode(). + * All other required bits are filled correctly by the present function. + * + * With FR/HR/EFR speech codecs, semantically appropriate RTP payloads are + * different between UL and DL output applications. Considerations for + * TRAU-DL output: + * + * - RTP payload formats of RFC 5993, TW-TS-001 and TW-TS-002 are accepted + * by the function - however, all metadata flags carried by the header octet + * of these extended formats are ignored/dropped in the DL direction. + * + * - The most native RTP input formats for conversion to TRAU-DL are those + * defined in ETSI TS 101 318 for FR, HR and EFR; the ones for FR and EFR + * are also duplicated in RFC 3551. In the case of HR codec, RFC 5993 input + * is also appropriate as specified in 3GPP TS 48.103 - as long as the user + * remembers that the extra header octet is ignored. + * + * - The only correct way to implement TrFO for GSM, accepting FR/HR/EFR from + * call leg A uplink in TW-TS-001 or TW-TS-002 format and generating TRAU-DL + * frames for call leg B, is to apply the TFO transform of TS 28.062 section + * C.3.2.1.1, then feed the output of that transform to the present function. + * + * - The provision whereby a zero-length RTP payload is not treated as an error + * like other invalid RTP inputs, but is converted to an idle speech frame + * in TRAU-DL output should be considered a bogon. This condition never + * occurs when the just-mentioned TFO transform is applied immediately prior + * to TRAU-DL output, nor does it ever occur in the original GSM architecture + * where the TRAU either free-runs a speech encoder or applies the same TFO + * transform - hence it is unlikely to be handled well by real E1 BTSes. + * Furthermore, this code path in libosmotrau is currently broken (the + * intended idle speech frame gets turned into a "regular" but invalid FR/EFR + * speech frame) and should be considered for removal. + * + * Considerations for TRAU-UL output: + * + * - For FR and EFR codecs, the only correct RTP format for conversion to + * TRAU-UL (TFO) is TW-TS-001 - the basic RTP format of TS 101 318 or + * RFC 3551 lacks the necessary metadata flags. + * + * - TRAU-UL output for HR codec is not currently implemented; when we do + * implement it in the future, TW-TS-002 will be required in this path + * for the same reason as above. + * + * - TRAU-UL output for CSD 14.4 kbit/s mode is not currently implemented + * (C-bits are always set according to the rules for TRAU-DL) - but the + * primary application for TRAU-UL frame output via libosmotrau is TFO, + * which does not include CSD. + */ int osmo_rtp2trau(struct osmo_trau_frame *tf, const uint8_t *rtp, size_t rtp_len, struct osmo_trau2rtp_state *st) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39620?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ib7ee2466aaab47e47f78ff94c5179b90cf393d0e Gerrit-Change-Number: 39620 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • ...
  • 119
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.