* fill the e1_link member of every bts_trx_ts structure
* introduce new timer as part of every paging request
diff --git a/src/bsc_hack.c b/src/bsc_hack.c
index 80b0f3b..a7ed585 100644
--- a/src/bsc_hack.c
+++ b/src/bsc_hack.c
@@ -289,12 +289,14 @@
/* Connect signalling of bts0/trx0 to e1_0/ts1/64kbps */
abis_nm_conn_terr_sign(trx, 0, 1, 0xff);
+ set_ts_e1link(&trx->ts[0], 0, 1, 0xff);
abis_nm_raw_msg(bts, sizeof(msg_6), msg_6); /* SET TRX ATTRIBUTES */
/* Use TEI 1 for signalling */
abis_nm_establish_tei(bts, 0, 0, 1, 0xff, 0x01);
abis_nm_set_channel_attr(&trx->ts[0], NM_CHANC_SDCCH_CBCH);
-#if 0
+
+#ifdef HAVE_TRX1
/* TRX 1 */
abis_nm_conn_terr_sign(&bts->trx[1], 0, 1, 0xff);
/* FIXME: TRX ATTRIBUTE */
@@ -304,36 +306,43 @@
/* SET CHANNEL ATTRIBUTE TS1 */
abis_nm_set_channel_attr(&trx->ts[1], 0x09);
/* Connect traffic of bts0/trx0/ts1 to e1_0/ts2/b */
+ set_ts_e1link(&trx->ts[1], 0, 2, 1);
abis_nm_conn_terr_traf(&trx->ts[1], 0, 2, 1);
/* SET CHANNEL ATTRIBUTE TS2 */
abis_nm_set_channel_attr(&trx->ts[2], 0x09);
/* Connect traffic of bts0/trx0/ts2 to e1_0/ts2/c */
+ set_ts_e1link(&trx->ts[2], 0, 2, 2);
abis_nm_conn_terr_traf(&trx->ts[2], 0, 2, 2);
/* SET CHANNEL ATTRIBUTE TS3 */
abis_nm_set_channel_attr(&trx->ts[3], 0x09);
/* Connect traffic of bts0/trx0/ts3 to e1_0/ts2/d */
+ set_ts_e1link(&trx->ts[3], 0, 2, 3);
abis_nm_conn_terr_traf(&trx->ts[3], 0, 2, 3);
/* SET CHANNEL ATTRIBUTE TS4 */
abis_nm_set_channel_attr(&trx->ts[4], 0x09);
/* Connect traffic of bts0/trx0/ts4 to e1_0/ts3/a */
+ set_ts_e1link(&trx->ts[4], 0, 3, 0);
abis_nm_conn_terr_traf(&trx->ts[4], 0, 3, 0);
/* SET CHANNEL ATTRIBUTE TS5 */
abis_nm_set_channel_attr(&trx->ts[5], 0x09);
/* Connect traffic of bts0/trx0/ts5 to e1_0/ts3/b */
+ set_ts_e1link(&trx->ts[5], 0, 3, 1);
abis_nm_conn_terr_traf(&trx->ts[5], 0, 3, 1);
/* SET CHANNEL ATTRIBUTE TS6 */
abis_nm_set_channel_attr(&trx->ts[6], 0x09);
/* Connect traffic of bts0/trx0/ts6 to e1_0/ts3/c */
+ set_ts_e1link(&trx->ts[6], 0, 3, 2);
abis_nm_conn_terr_traf(&trx->ts[6], 0, 3, 2);
/* SET CHANNEL ATTRIBUTE TS7 */
abis_nm_set_channel_attr(&trx->ts[7], 0x09);
/* Connect traffic of bts0/trx0/ts7 to e1_0/ts3/d */
+ set_ts_e1link(&trx->ts[7], 0, 3, 3);
abis_nm_conn_terr_traf(&trx->ts[7], 0, 3, 3);
/* end DB transmission */
diff --git a/src/gsm_data.c b/src/gsm_data.c
index 834f213..6763fc5 100644
--- a/src/gsm_data.c
+++ b/src/gsm_data.c
@@ -24,6 +24,14 @@
#include <openbsc/gsm_data.h>
+void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
+ u_int8_t e1_ts, u_int8_t e1_ts_ss)
+{
+ ts->e1_link.e1_nr = e1_nr;
+ ts->e1_link.e1_ts = e1_ts;
+ ts->e1_link.e1_ts_ss = e1_ts_ss;
+}
+
static const char *pchan_names[] = {
[GSM_PCHAN_NONE] = "NONE",
[GSM_PCHAN_CCCH] = "CCCH",
@@ -127,6 +135,9 @@
}
bts->num_trx = 1; /* FIXME */
+#ifdef HAVE_TRX1
+ bts->num_trx++;
+#endif
bts->c0 = &bts->trx[0];
bts->c0->ts[0].pchan = GSM_PCHAN_CCCH_SDCCH4;
}