Hi,
This patch series adds layer23 support for receiving SMSCB messages.
Patches 1/3 and 2/3 add common layer2 code for reassembling blocks and sending them up to L3. Patch 3/3 is an addition to cell_log for logging cell-info-display-type SMSCB messages, if available.
This series requires patches[1][2][3] to libosmocore protocol headers.
Cheers, Alex
[1] http://lists.osmocom.org/pipermail/baseband-devel/2010-November/000827.html [2] http://lists.osmocom.org/pipermail/baseband-devel/2010-November/000830.html [3] http://lists.osmocom.org/pipermail/baseband-devel/2010-November/000831.html
Alex Badea (3): layer23: introduce SMSCB framework layer23 smscb: reassemble blocks and pass them up to L3 layer23 cell_log: log CBCH cell info
src/host/layer23/include/osmocom/bb/common/lapdm.h | 2 + src/host/layer23/include/osmocom/bb/common/smscb.h | 28 +++ src/host/layer23/src/common/Makefile.am | 2 +- src/host/layer23/src/common/lapdm.c | 7 + src/host/layer23/src/common/smscb.c | 211 ++++++++++++++++++++ src/host/layer23/src/misc/cell_log.c | 107 ++++++++++- 6 files changed, 354 insertions(+), 3 deletions(-) create mode 100644 src/host/layer23/include/osmocom/bb/common/smscb.h create mode 100644 src/host/layer23/src/common/smscb.c
Define a smscb_entity struct. Add it to lapdm_entity. Pass LAPDm frames with LPD=01 to SMSCB, and skip any further LAPDm processing.
Signed-off-by: Alex Badea vamposdecampos@gmail.com --- src/host/layer23/include/osmocom/bb/common/lapdm.h | 2 + src/host/layer23/include/osmocom/bb/common/smscb.h | 23 ++++++++++ src/host/layer23/src/common/Makefile.am | 2 +- src/host/layer23/src/common/lapdm.c | 7 +++ src/host/layer23/src/common/smscb.c | 46 ++++++++++++++++++++ 5 files changed, 79 insertions(+), 1 deletions(-) create mode 100644 src/host/layer23/include/osmocom/bb/common/smscb.h create mode 100644 src/host/layer23/src/common/smscb.c
diff --git a/src/host/layer23/include/osmocom/bb/common/lapdm.h b/src/host/layer23/include/osmocom/bb/common/lapdm.h index de954fb..364d165 100644 --- a/src/host/layer23/include/osmocom/bb/common/lapdm.h +++ b/src/host/layer23/include/osmocom/bb/common/lapdm.h @@ -7,6 +7,7 @@ #include <osmocore/msgb.h>
#include <l1ctl_proto.h> +#include <osmocom/bb/common/smscb.h>
enum lapdm_state { LAPDm_STATE_NULL = 0, @@ -66,6 +67,7 @@ struct lapdm_entity { struct lapdm_datalink datalink[_NR_DL_SAPI]; int last_tx_dequeue; /* last entity that was dequeued */ int tx_pending; /* currently a pending frame not confirmed by L1 */ + struct smscb_entity smscb; struct osmocom_ms *ms; };
diff --git a/src/host/layer23/include/osmocom/bb/common/smscb.h b/src/host/layer23/include/osmocom/bb/common/smscb.h new file mode 100644 index 0000000..d689cd7 --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/common/smscb.h @@ -0,0 +1,23 @@ +#ifndef _OSMOCOM_SMSCB_H +#define _OSMOCOM_SMSCB_H + +#include <stdint.h> + +struct osmocom_ms; +struct msgb; +struct l1ctl_info_dl; + +struct smscb_entity { + struct osmocom_ms *ms; +}; + +/* initialize a SMSCB entity */ +void smscb_init(struct smscb_entity *se, struct osmocom_ms *ms); + +/* deinitialize a SMSCB entity */ +void smscb_exit(struct smscb_entity *se); + +/* input into SMSCB layer (from layer 1) */ +int smscb_ph_data_ind(struct smscb_entity *se, struct msgb *msg, struct l1ctl_info_dl *l1i); + +#endif /* _OSMOCOM_SMSCB_H */ diff --git a/src/host/layer23/src/common/Makefile.am b/src/host/layer23/src/common/Makefile.am index 4e2686c..6f5f4f1 100644 --- a/src/host/layer23/src/common/Makefile.am +++ b/src/host/layer23/src/common/Makefile.am @@ -3,4 +3,4 @@ AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS)
noinst_LIBRARIES = liblayer23.a liblayer23_a_SOURCES = l1ctl.c l1l2_interface.c sap_interface.c lapdm.c \ - logging.c networks.c sim.c sysinfo.c gps.c + logging.c networks.c sim.c sysinfo.c gps.c smscb.c diff --git a/src/host/layer23/src/common/lapdm.c b/src/host/layer23/src/common/lapdm.c index dc9c916..9233dbb 100644 --- a/src/host/layer23/src/common/lapdm.c +++ b/src/host/layer23/src/common/lapdm.c @@ -79,6 +79,7 @@ #define LAPDm_SAPI_SMS 3 #define LAPDm_ADDR(lpd, sapi, cr) ((((lpd) & 0x3) << 5) | (((sapi) & 0x7) << 2) | (((cr) & 0x1) << 1) | 0x1)
+#define LAPDm_ADDR_LPD(addr) (((addr) >> 5) & 0x03) #define LAPDm_ADDR_SAPI(addr) (((addr) >> 2) & 0x7) #define LAPDm_ADDR_CR(addr) (((addr) >> 1) & 0x1) #define LAPDm_ADDR_EA(addr) ((addr) & 0x1) @@ -193,6 +194,8 @@ void lapdm_init(struct lapdm_entity *le, struct osmocom_ms *ms) for (i = 0; i < ARRAY_SIZE(le->datalink); i++) lapdm_dl_init(&le->datalink[i], le);
+ smscb_init(&le->smscb, ms); + le->ms = ms; }
@@ -227,6 +230,8 @@ void lapdm_exit(struct lapdm_entity *le) unsigned int i; struct lapdm_datalink *dl;
+ smscb_exit(&le->smscb); + for (i = 0; i < ARRAY_SIZE(le->datalink); i++) { dl = &le->datalink[i]; lapdm_dl_flush_tx(dl); @@ -1551,6 +1556,8 @@ int l2_ph_data_ind(struct msgb *msg, struct lapdm_entity *le, struct l1ctl_info_ case LAPDm_FMT_B: case LAPDm_FMT_B4: mctx.addr = msg->l2h[0]; + if (LAPDm_ADDR_LPD(mctx.addr) == LAPDm_LPD_SMSCB) + return smscb_ph_data_ind(&le->smscb, msg, l1i); if (!(mctx.addr & 0x01)) { LOGP(DLAPDM, LOGL_ERROR, "we don't support " "multibyte addresses (discarding)\n"); diff --git a/src/host/layer23/src/common/smscb.c b/src/host/layer23/src/common/smscb.c new file mode 100644 index 0000000..31a5752 --- /dev/null +++ b/src/host/layer23/src/common/smscb.c @@ -0,0 +1,46 @@ +/* GSM SMSCB (TS 04.12) implementation */ + +/* (C) 2010 by Alex Badea vamposdecampos@gmail.com + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include <osmocom/bb/common/smscb.h> +#include <osmocom/bb/common/logging.h> +#include <osmocore/msgb.h> + +void smscb_init(struct smscb_entity *se, struct osmocom_ms *ms) +{ + se->ms = ms; +} + +void smscb_exit(struct smscb_entity *se) +{ +} + +int smscb_ph_data_ind(struct smscb_entity *se, struct msgb *msg, struct l1ctl_info_dl *l1i) +{ + uint8_t addr = msg->l2h[0]; + uint8_t seq = addr & 0x0f; + + LOGP(DLAPDM, LOGL_NOTICE, "SMSCB: received message: seq=%d len=%d\n", + seq, msg->len); + + msgb_free(msg); + return 0; +}
We (re)construct an equivalent RSL_MT_SMS_BC_CMD from received frames.
Signed-off-by: Alex Badea vamposdecampos@gmail.com --- src/host/layer23/include/osmocom/bb/common/smscb.h | 5 + src/host/layer23/src/common/smscb.c | 177 +++++++++++++++++++- 2 files changed, 176 insertions(+), 6 deletions(-)
diff --git a/src/host/layer23/include/osmocom/bb/common/smscb.h b/src/host/layer23/include/osmocom/bb/common/smscb.h index d689cd7..a475a78 100644 --- a/src/host/layer23/include/osmocom/bb/common/smscb.h +++ b/src/host/layer23/include/osmocom/bb/common/smscb.h @@ -7,7 +7,12 @@ struct osmocom_ms; struct msgb; struct l1ctl_info_dl;
+#define SMSCB_MAX_BLOCKS 4 + struct smscb_entity { + uint8_t seq_next; + uint8_t sched:1; + struct msgb *blocks[SMSCB_MAX_BLOCKS]; struct osmocom_ms *ms; };
diff --git a/src/host/layer23/src/common/smscb.c b/src/host/layer23/src/common/smscb.c index 31a5752..f520f25 100644 --- a/src/host/layer23/src/common/smscb.c +++ b/src/host/layer23/src/common/smscb.c @@ -21,26 +21,191 @@ */
#include <osmocom/bb/common/smscb.h> +#include <osmocom/bb/common/lapdm.h> #include <osmocom/bb/common/logging.h> #include <osmocore/msgb.h> +#include <osmocore/rsl.h> +#include <osmocore/tlv.h> +#include <osmocore/gsm_utils.h> +#include <osmocore/protocol/gsm_04_12.h> +#include <osmocore/protocol/gsm_08_58.h> + +#include <errno.h> +#include <string.h> +#include <netinet/in.h> + +#define SMSCB_LPD 1 + +#define SMSCB_ALLOC_SIZE 256 +#define SMSCB_ALLOC_HEADROOM 64 + +static void smscb_reset(struct smscb_entity *se) +{ + int k; + + for (k = 0; k < SMSCB_MAX_BLOCKS; k++) { + msgb_free(se->blocks[k]); + se->blocks[k] = NULL; + } + se->sched = 0; + se->seq_next = 0; +}
void smscb_init(struct smscb_entity *se, struct osmocom_ms *ms) { + memset(se, 0, sizeof(*se)); se->ms = ms; }
void smscb_exit(struct smscb_entity *se) { + smscb_reset(se); +} + +static int smscb_rx_msg(struct smscb_entity *se, const struct l1ctl_info_dl *l1i) +{ + struct msgb *msg; + struct abis_rsl_cchan_hdr *ch; + int k; + uint8_t msglen, *tlv; + struct gsm_time tm; + struct rsl_ie_cb_cmd_type cmd_type = {}; + + msg = msgb_alloc_headroom( + SMSCB_ALLOC_HEADROOM + SMSCB_ALLOC_SIZE, + SMSCB_ALLOC_HEADROOM, "smscb_data"); + if (!msg) + return -ENOMEM; + + msg->l2h = msgb_put(msg, sizeof(*ch)); + ch = (struct abis_rsl_cchan_hdr *) msg->l2h; + rsl_init_cchan_hdr(ch, RSL_MT_SMS_BC_CMD); + ch->c.msg_discr |= ABIS_RSL_MDISC_TRANSP; + ch->chan_nr = l1i->chan_nr; + + cmd_type.command = + se->sched ? RSL_CB_CMD_TYPE_SCHEDULE : + RSL_CB_CMD_TYPE_NORMAL; + cmd_type.last_block = + se->blocks[3] ? RSL_CB_CMD_LASTBLOCK_4 : + se->blocks[2] ? RSL_CB_CMD_LASTBLOCK_3 : + se->blocks[1] ? RSL_CB_CMD_LASTBLOCK_2 : + RSL_CB_CMD_LASTBLOCK_1; + msgb_tv_put(msg, RSL_IE_CB_CMD_TYPE, *((uint8_t *) &cmd_type)); + + for (k = 0, msglen = 0; se->blocks[k] && k < SMSCB_MAX_BLOCKS; k++) + msglen += se->blocks[k]->len; + tlv = msgb_put(msg, TLV_GROSS_LEN(msglen)); + *tlv++ = RSL_IE_SMSCB_MSG; + *tlv++ = msglen; + for (k = 0; se->blocks[k] && k < SMSCB_MAX_BLOCKS; k++) { + memcpy(tlv, se->blocks[k]->data, se->blocks[k]->len); + tlv += se->blocks[k]->len; + } + + /* + * TS 05.02 chapter 6.5.4: basic vs. extended CBCH + * is indicated by multiframe number + */ + gsm_fn2gsmtime(&tm, ntohl(l1i->frame_nr)); + msgb_tv_put(msg, RSL_IE_SMSCB_CHAN_INDICATOR, !(tm.tc < 4)); + + return rslms_sendmsg(msg, se->ms); +} + +static int smscb_rx_null_msg(struct smscb_entity *se, const struct l1ctl_info_dl *l1i) +{ + struct msgb *msg; + struct abis_rsl_cchan_hdr *ch; + struct gsm_time tm; + struct rsl_ie_cb_cmd_type cmd_type = {}; + + msg = msgb_alloc_headroom( + SMSCB_ALLOC_HEADROOM + SMSCB_ALLOC_SIZE, + SMSCB_ALLOC_HEADROOM, "smscb_data"); + if (!msg) + return -ENOMEM; + + msg->l2h = msgb_put(msg, sizeof(*ch)); + ch = (struct abis_rsl_cchan_hdr *) msg->l2h; + rsl_init_cchan_hdr(ch, RSL_MT_SMS_BC_CMD); + ch->c.msg_discr |= ABIS_RSL_MDISC_TRANSP; + ch->chan_nr = l1i->chan_nr; + + cmd_type.command = RSL_CB_CMD_TYPE_NULL; + msgb_tv_put(msg, RSL_IE_CB_CMD_TYPE, *((uint8_t *) &cmd_type)); + msgb_tlv_put(msg, RSL_IE_SMSCB_MSG, 0, NULL); + + gsm_fn2gsmtime(&tm, ntohl(l1i->frame_nr)); + msgb_tv_put(msg, RSL_IE_SMSCB_CHAN_INDICATOR, !(tm.tc < 4)); + + return rslms_sendmsg(msg, se->ms); }
int smscb_ph_data_ind(struct smscb_entity *se, struct msgb *msg, struct l1ctl_info_dl *l1i) { - uint8_t addr = msg->l2h[0]; - uint8_t seq = addr & 0x0f; + struct gsm412_block_type *bt = (struct gsm412_block_type *) msg->l2h; + uint8_t seq; + uint8_t last; + + LOGP(DLAPDM, LOGL_NOTICE, "SMSCB: received message: len=%d" + " seq=%d lb=%d lpd=%d spare=%d\n", + msg->len, bt->seq_nr, bt->lb, bt->lpd, bt->spare); + + if (bt->lpd != SMSCB_LPD) { + msgb_free(msg); + return -EINVAL; + } + + msgb_pull(msg, sizeof(*bt)); + + seq = bt->seq_nr & 3; + last = bt->lb; + + if (bt->seq_nr == GSM412_SEQ_NULL_MSG) { + smscb_rx_null_msg(se, l1i); + smscb_reset(se); + msgb_free(msg); + return 0; + } + + if (seq != se->seq_next) { + LOGP(DLAPDM, LOGL_ERROR, "SMSCB: got sequence %d (expected %d)\n", + bt->seq_nr, se->seq_next); + smscb_reset(se); + if (seq) { + msgb_free(msg); + return -EINVAL; + } + }
- LOGP(DLAPDM, LOGL_NOTICE, "SMSCB: received message: seq=%d len=%d\n", - seq, msg->len); + switch (bt->seq_nr) { + case GSM412_SEQ_FST_SCHED_BLOCK: + se->sched = 1; + break; + case GSM412_SEQ_FTH_BLOCK: + last = 1; + break; + }
- msgb_free(msg); - return 0; + switch (bt->seq_nr) { + case GSM412_SEQ_FST_SCHED_BLOCK: + case GSM412_SEQ_FST_BLOCK: + case GSM412_SEQ_SND_BLOCK: + case GSM412_SEQ_TRD_BLOCK: + case GSM412_SEQ_FTH_BLOCK: + msgb_free(se->blocks[seq]); + se->blocks[seq] = msg; + se->seq_next = seq + 1; + if (!last) + return 0; + smscb_rx_msg(se, l1i); + smscb_reset(se); + return 0; + default: + LOGP(DLAPDM, LOGL_ERROR, "SMSCB: unhandled sequence number %d\n", + bt->seq_nr); + msgb_free(msg); + return -EINVAL; + } }
If System Information contained CBCH channel description, tune to it and log SMSCB messages with a Geographical Scope of Cell Wide (Immediate) -- these are typically used for "Cell Info Display".
The CBCH timeout is set to a generous 8 seconds; this is because we need 4 frames for reassembly, we usually miss the first, and we might hit a burst of Null SMSCB messages.
Signed-off-by: Alex Badea vamposdecampos@gmail.com --- src/host/layer23/src/misc/cell_log.c | 107 +++++++++++++++++++++++++++++++++- 1 files changed, 105 insertions(+), 2 deletions(-)
diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c index e6c5771..37aa271 100644 --- a/src/host/layer23/src/misc/cell_log.c +++ b/src/host/layer23/src/misc/cell_log.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <time.h> #include <errno.h> +#include <netinet/in.h>
#include <l1ctl_proto.h>
@@ -34,7 +35,9 @@ #include <osmocore/signal.h> #include <osmocore/msgb.h> #include <osmocore/gsm_utils.h> +#include <osmocore/protocol/gsm_03_41.h> #include <osmocore/protocol/gsm_04_08.h> +#include <osmocore/protocol/gsm_08_58.h> #include <osmocore/rsl.h>
#include <osmocom/bb/common/l1ctl.h> @@ -49,6 +52,7 @@ #define READ_WAIT 2, 0 #define RACH_MAX 2 #define RACH_WAIT 0, 900000 +#define CBCH_WAIT 8, 0 #define MIN_RXLEV -106 #define MAX_DIST 2000
@@ -57,6 +61,7 @@ enum { SCAN_STATE_SYNC, SCAN_STATE_READ, SCAN_STATE_RACH, + SCAN_STATE_CBCH, };
/* ranges of bands */ @@ -114,6 +119,7 @@ struct rach_ref {
static void start_sync(void); static void start_rach(void); +static void start_cbch(void); static void start_pm(void);
static void log_gps(void) @@ -227,6 +233,11 @@ static void timeout_cb(void *arg) rach_count++; start_rach(); break; + case SCAN_STATE_CBCH: + LOGP(DRR, LOGL_INFO, "Timeout reading CBCH\n"); + l1ctl_tx_dm_rel_req(ms); + start_sync(); + break; } }
@@ -244,6 +255,33 @@ static void start_timer(int sec, int micro) bsc_schedule_timer(&timer, sec, micro); }
+static void start_cbch(void) +{ + struct gsm48_sysinfo *s = &sysinfo; + int res; + + if (!s->chan_nr) { + LOGP(DRR, LOGL_DEBUG, "No CBCH description in sysinfo\n"); + res = -1; + } else if (s->h) { + res = l1ctl_tx_dm_est_req_h1(ms, + s->maio, s->hsn, s->hopping, s->hopp_len, + s->chan_nr, s->tsc, + GSM48_CMODE_SIGN); + } else { + res = l1ctl_tx_dm_est_req_h0(ms, s->arfcn, + s->chan_nr, s->tsc, GSM48_CMODE_SIGN); + } + + if (res < 0) { + start_sync(); + return; + } + + state = SCAN_STATE_CBCH; + start_timer(CBCH_WAIT); +} + static void start_rach(void) { struct gsm48_sysinfo *s = &sysinfo; @@ -253,7 +291,7 @@ static void start_rach(void)
if (rach_count == RACH_MAX) { log_sysinfo(); - start_sync(); + start_cbch(); return; }
@@ -426,7 +464,7 @@ static int ta_result(uint8_t ta) }
log_sysinfo(); - start_sync(); + start_cbch();
return 0; } @@ -730,6 +768,66 @@ int chan_conf(struct osmocom_ms *ms, struct msgb *msg) return 0; }
+static int sms_cb_cmd(struct osmocom_ms *ms, struct msgb *msg) +{ + struct abis_rsl_cchan_hdr *ch = msgb_l2(msg); + struct tlv_parsed tv; + struct rsl_ie_cb_cmd_type *cmd_type; + struct gsm341_ms_message *cbmsg; + unsigned int cbmsglen; + char buf[256], *p; + + rsl_tlv_parse(&tv, ch->data, msgb_l2len(msg) - sizeof(*ch)); + if (!TLVP_PRESENT(&tv, RSL_IE_SMSCB_MSG) || + !TLVP_PRESENT(&tv, RSL_IE_CB_CMD_TYPE)) { + LOGP(DRR, LOGL_ERROR, "SMS_BC_CMD missing mandatory IEs\n"); + return -EINVAL; + } + + cmd_type = (struct rsl_ie_cb_cmd_type *) TLVP_VAL(&tv, RSL_IE_CB_CMD_TYPE); + cbmsg = (struct gsm341_ms_message *) TLVP_VAL(&tv, RSL_IE_SMSCB_MSG); + cbmsglen = TLVP_LEN(&tv, RSL_IE_SMSCB_MSG); + if (cbmsglen < sizeof(*cbmsg)) { + LOGP(DRR, LOGL_ERROR, "RSL_IE_SMSCB_MSG too short\n"); + return -EINVAL; + } + + if (cmd_type->command != RSL_CB_CMD_TYPE_NORMAL) + return 0; + if (cbmsg->serial.gs != GSM341_GS_CELL_WIDE_IMMED) + return 0; + + gsm_7bit_decode(buf, cbmsg->data, cbmsglen - sizeof(*cbmsg)); + if ((p = strchr(buf, '\r'))) + *p = 0; + + LOGP(DSUM, LOGL_INFO, "Cell info: code=%d update=%d id=%d text="%s"\n", + cbmsg->serial.code_lo | (cbmsg->serial.code_hi << 6), + cbmsg->serial.update, + ntohs(cbmsg->msg_id), + buf); + + LOGFILE("[cbch]\n"); + LOGFILE("arfcn %d\n", sysinfo.arfcn); + LOGFILE("gs %d code %d update %d msg_id %d page %d numpages %d\n", + cbmsg->serial.gs, + cbmsg->serial.code_lo | (cbmsg->serial.code_hi << 6), + cbmsg->serial.update, + ntohs(cbmsg->msg_id), + cbmsg->page.current, cbmsg->page.total); + LOGFILE("text "%s"\n", buf); + LOGFILE("\n"); + LOGFLUSH(); + + l1ctl_tx_dm_rel_req(ms); + stop_timer(); + + start_sync(); + + return 0; + +} + static int rcv_cch(struct osmocom_ms *ms, struct msgb *msg) { struct abis_rsl_cchan_hdr *ch = msgb_l2(msg); @@ -744,6 +842,11 @@ static int rcv_cch(struct osmocom_ms *ms, struct msgb *msg) msgb_free(msg); return rc; } + if (state == SCAN_STATE_CBCH && msg_type == RSL_MT_SMS_BC_CMD) { + rc = sms_cb_cmd(ms, msg); + msgb_free(msg); + return rc; + }
LOGP(DRSL, LOGL_NOTICE, "RSLms message unhandled\n"); msgb_free(msg);
On Sun, Nov 28, 2010 at 4:07 PM, Alex Badea vamposdecampos@gmail.com wrote:
If System Information contained CBCH channel description, tune to it and log SMSCB messages with a Geographical Scope of Cell Wide (Immediate) -- these are typically used for "Cell Info Display".
Please don't apply this patch until we teach L1 that CBCH is downlink-only. Thanks to Sylvain for pointing this out.
Cheers, Alex
Hi,
This patch series adds layer23 support for receiving SMSCB messages.
Patches 1/3 and 2/3 add common layer2 code for reassembling blocks and sending them up to L3. Patch 3/3 is an addition to cell_log for logging cell-info-display-type SMSCB messages, if available.
Small warning to everyone
Don't use those (or the cbch_sniff app) with a firmware that has TX enabled ...
Cheers,
Sylvain
On Sun, Nov 28, 2010 at 10:53 PM, Sylvain Munaut 246tnt@gmail.com wrote:
Hi,
This patch series adds layer23 support for receiving SMSCB messages.
Patches 1/3 and 2/3 add common layer2 code for reassembling blocks and sending them up to L3. Patch 3/3 is an addition to cell_log for logging cell-info-display-type SMSCB messages, if available.
Small warning to everyone
Don't use those (or the cbch_sniff app) with a firmware that has TX enabled ...
I have Tx disabled anyway, but it didn't hit me until you said it out loud. Dedicated-mode SDCCH also has uplink slots, doesn't it?
To make this work I guess we need to implement some separate CBCH mode in L1. In which case, I suppose it should be possible to continue receiving CCCH at the same time?
Thanks, Alex
Hi,
I have Tx disabled anyway, but it didn't hit me until you said it out loud. Dedicated-mode SDCCH also has uplink slots, doesn't it?
Yes. And it also has SACCH slots that the CBCH doesn't have.
To make this work I guess we need to implement some separate CBCH mode in L1.
Yup.
It seems that CBCH never have subslots ? (Looking at GSM 05.02 Clause 7 Table 3 of 9).
If it says SDCCH4 it's always B32..B35 (like a SDCCH4 subslot 2) If it says SDCCH8 it's always B8..B11 (like a SDCCH8 subslot 2)
I'll look into adding a command to support going to that channel along with the appropriate scheduling.
In which case, I suppose it should be possible to continue receiving CCCH at the same time?
No, we can only get data from 1 timeslot in each frame, so if it's in a SDCCH8 there can be conflicts. (If it's in SDCCH/4 then that should be OK)
We'll probably be able to do that only when we get to DRX (where we only listen to specific slots).
Cheers,
Sylvain
On Mon, Nov 29, 2010 at 10:09 AM, Sylvain Munaut 246tnt@gmail.com wrote:
It seems that CBCH never have subslots ? (Looking at GSM 05.02 Clause 7 Table 3 of 9).
If it says SDCCH4 it's always B32..B35 (like a SDCCH4 subslot 2) If it says SDCCH8 it's always B8..B11 (like a SDCCH8 subslot 2)
Looks like it. In subclause 6.4.1 it says:
Where the SMSCB is supported, the CBCH replaces SDCCH number 2 in cases v) and vii) above.
... where v) and vii) are:
v) FCCH + SCH + BCCH + CCCH + SDCCH/4(0..3) + SACCH/C4(0..3) vii) SDCCH/8(0 .7) + SACCH/C8(0 . 7)
I've only seen SDCCH8-type CBCH live in my area, though.
I'll look into adding a command to support going to that channel along with the appropriate scheduling.
Thanks! Alex
baseband-devel@lists.osmocom.org