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-bts/+/15420 Change subject: pcu_interface: Forward ETWS Primary Notification to PCU ...................................................................... pcu_interface: Forward ETWS Primary Notification to PCU All MS/UE must be notified of ETWS Primary Notifiations. Depending on their state, the notification goes different paths: * CS dedicated mode: BSC sends it as L3 message over LAPDm / DCCH * CS/PS idle mode: BTS sends paging messages on PCH * PS TBF active: PCU send Packet Application Info This enables the last of the three methods by passing any ETWS Primary Notifications received over RSL via the PCU socket into the PCU. Change-Id: Ic0b3f38b400a0ca7e4089061ceb6548b0695faa6 Related: OS#4047, OS#4048 --- M include/osmo-bts/pcu_if.h M include/osmo-bts/pcuif_proto.h M src/common/paging.c M src/common/pcu_sock.c M src/common/rsl.c 5 files changed, 38 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/20/15420/1 diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h index 6253c84..114f87d 100644 --- a/include/osmo-bts/pcu_if.h +++ b/include/osmo-bts/pcu_if.h @@ -5,6 +5,7 @@ int pcu_tx_info_ind(void); int pcu_tx_si13(const struct gsm_bts *bts, bool enable); +int pcu_tx_app_info_req(struct gsm_bts *bts, uint8_t app_type, uint8_t len, const uint8_t *app_data); int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr); int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 144fba6..2d24c43 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -13,6 +13,7 @@ #define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */ #define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */ #define PCU_IF_MSG_SUSP_REQ 0x03 /* BTS forwards GPRS SUSP REQ to PCU */ +#define PCU_IF_MSG_APP_INFO_REQ 0x04 /* BTS asks PCU to tranmit APP INFO via PACCH */ #define PCU_IF_MSG_RTS_REQ 0x10 /* ready to send request */ #define PCU_IF_MSG_DATA_CNF_DT 0x11 /* confirm (with direct tlli) */ #define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */ @@ -172,6 +173,13 @@ uint8_t identity_lv[9]; } __attribute__ ((packed)); +/* BTS tells PCU to [once] send given application data via PACCH to all UE with active TBF */ +struct gsm_pcu_if_app_info_req { + uint8_t application_type; /* 4bit field, see TS 44.060 11.2.47 */ + uint8_t len; /* length of data */ + uint8_t data[162]; /* random size choice; ETWS needs 56 bytes */ +} __attribute__ ((packed)); + /* BTS tells PCU about a GPRS SUSPENSION REQUEST received on DCCH */ struct gsm_pcu_if_susp_req { uint32_t tlli; @@ -198,6 +206,7 @@ struct gsm_pcu_if_act_req act_req; struct gsm_pcu_if_time_ind time_ind; struct gsm_pcu_if_pag_req pag_req; + struct gsm_pcu_if_app_info_req app_info_req; } u; } __attribute__ ((packed)); diff --git a/src/common/paging.c b/src/common/paging.c index fca58b5..4b4f9ec 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -545,6 +545,7 @@ struct p1_rest_octets p1ro; build_p1_rest_octets(&p1ro, bts); len = fill_paging_type_1(out_buf, empty_id_lv, 0, NULL, 0, &p1ro); + printf("P1: %s\n", osmo_hexdump_nospc(out_buf, len)); } else if (llist_empty(group_q)) { /* There is nobody to be paged, send Type1 with two empty ID */ //DEBUGP(DPAG, "Tx PAGING TYPE 1 (empty)\n"); diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 84a98f5..82b2bf5 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -290,6 +290,28 @@ return 0; } +int pcu_tx_app_info_req(struct gsm_bts *bts, uint8_t app_type, uint8_t len, const uint8_t *app_data) +{ + struct msgb *msg = pcu_msgb_alloc(PCU_IF_MSG_APP_INFO_REQ, bts->nr); + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_app_info_req *ai_req; + + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + ai_req = &pcu_prim->u.app_info_req; + + if (app_type & 0xF0 || len > sizeof(ai_req->data)) { + msgb_free(msg); + return -EINVAL; + } + + ai_req->application_type = app_type; + ai_req->len = len; + memcpy(ai_req->data, app_data, ai_req->len); + + return pcu_sock_send(&bts_gsmnet, msg); +} int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr) diff --git a/src/common/rsl.c b/src/common/rsl.c index 0bcad4c..056c16d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -558,6 +558,11 @@ /* toggle the PNI to allow phones to distinguish new from old primary notification */ bts->etws.pni = !bts->etws.pni; + + /* forward the request to the PCU, so the PCU can send it over any active TBF + * to phones which currently don't listen to the paging channel */ + pcu_tx_app_info_req(bts, 0, TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), + TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); } return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15420 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic0b3f38b400a0ca7e4089061ceb6548b0695faa6 Gerrit-Change-Number: 15420 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/20190905/14daf1fb/attachment.htm>