This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15444 Change subject: SMSCB: Send ETWS Primary Notifiation via RSL to BTS ...................................................................... SMSCB: Send ETWS Primary Notifiation via RSL to BTS In addition to transmission of the ETWS Primary Notification via all dedicated channels, we also need to send it to the BTS for transmission via PCH (P1 Rest Octets) and for fordwarding to PCU for PACCH transmission. Change-Id: I7e45b0373458a4348b12b92dd92861062532548b --- M include/osmocom/bsc/abis_rsl.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/smscb.c 3 files changed, 29 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/15444/1 diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index ec63090..4ccfd14 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -91,6 +91,7 @@ int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, struct rsl_ie_cb_cmd_type cb_command, bool use_extended_cbch, const uint8_t *data, int len); +int rsl_etws_pn_command(struct gsm_bts *bts, uint8_t chan_nr, const uint8_t *data, int len); /* some Nokia specific stuff */ int rsl_nokia_si_begin(struct gsm_bts_trx *trx); diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 06d19a5..4a7d104 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2203,6 +2203,25 @@ return rc; } +/* Send an Osmocom-specific Abis RSL message for ETWS Primary Notification */ +int rsl_etws_pn_command(struct gsm_bts *bts, uint8_t chan_nr, const uint8_t *data, int len) +{ + struct abis_rsl_dchan_hdr *dh; + struct msgb *msg = rsl_msgb_alloc(); + if (!msg) + return -1; + dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); + init_dchan_hdr(dh, RSL_MT_OSMO_ETWS_CMD); + dh->c.msg_discr = ABIS_RSL_MDISC_COM_CHAN; + dh->chan_nr = chan_nr; + + msgb_tlv_put(msg, RSL_IE_SMSCB_MSG, len, data); + + msg->dst = bts->c0->rsl_link; + + return abis_rsl_sendmsg(msg); +} + int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, struct rsl_ie_cb_cmd_type cb_command, bool use_extended_cbch, const uint8_t *data, int len) diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index 319ef21..1b065a8 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -40,6 +40,7 @@ #include <osmocom/bsc/vty.h> #include <osmocom/bsc/gsm_04_08_rr.h> #include <osmocom/bsc/lchan_fsm.h> +#include <osmocom/bsc/abis_rsl.h> /********************************************************************************* * Helper Functions @@ -461,8 +462,7 @@ * Per-BTS Processing of CBSP from CBC, called via cbsp_per_bts() *********************************************************************************/ -static void etws_primary_to_dedicated(struct gsm_bts *bts, - const struct osmo_cbsp_write_replace *wrepl) +static void etws_primary_to_bts(struct gsm_bts *bts, const struct osmo_cbsp_write_replace *wrepl) { uint8_t etws_primary[ETWS_PRIM_NOTIF_SIZE]; struct gsm_bts_trx *trx; @@ -491,7 +491,12 @@ LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via %u dedicated channels\n", count); - /* FIXME: Notify BTS of primary ETWS notification via vendor-specific Abis message */ + /* Notify BTS of primary ETWS notification via vendor-specific Abis message */ + if (osmo_bts_has_feature(&bts->features, BTS_FEAT_ETWS_PN)) { + rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, etws_primary, sizeof(etws_primary)); + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via common channel\n"); + } else + LOG_BTS(bts, DCBS, LOGL_ERROR, "BTS doesn't support RSL command for ETWS PN\n"); } /*! Try to execute a write-replace operation; roll-back if it fails. @@ -563,9 +568,7 @@ int rc; if (!wrepl->is_cbs) { - /* send through any active dedicated channels of this BTS */ - etws_primary_to_dedicated(bts, wrepl); - /* TODO: send via RSL to BTS for transmission on PCH */ + etws_primary_to_bts(bts, wrepl); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15444 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I7e45b0373458a4348b12b92dd92861062532548b Gerrit-Change-Number: 15444 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at gnumonks.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190907/8587ee14/attachment.htm>