hi,

we managed to run a nokia flexi bts with openbsc. the bts type is "nokia-site".

on channel request, the bts nacks the channel activation with cause 0x65 (protocol error, optional information element). by removing the Channel Identification IE from the channel activation message, everything worked, so we assume that this IE causes this error. we tried to modify it:

- no zero-length Mobile Allocation included in Channel Identification IE
- TLV instead of TV for Channel Description in Channel Identification IE
- Channel Description in Channel Identification IE with type 0x62 instead of 0x64

all of these modifications result in the same error. so we came to the conclusion to remove the Channel Identification IE, since it is not really required. attached is the preview patch.

does anyone have ABIS traces of a real network, to check how the IE is encoded there? is there any way to get more information from nokia bts why it rejects the channel when using this IE?

regards,

andreas

diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index cd79fae..b46e384 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -646,6 +646,7 @@ struct gsm_bts {
 			unsigned int configured:1,
 				skip_reset:1,
 				no_loc_rel_cnf:1,
+				no_chan_ident:1,
 				did_reset:1,
 				wait_reset:1;
 			struct osmo_timer_list reset_timer;
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 8210ec3..7c0b006 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -496,26 +496,32 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, uint8_t act_type,
 	msgb_tlv_put(msg, RSL_IE_CHAN_MODE, sizeof(cm),
 		     (uint8_t *) &cm);
 
-	/*
-	 * The Channel Identification is needed for Phase1 phones
-	 * and it contains the GSM48 Channel Description and the
-	 * Mobile Allocation. The GSM 08.58 asks for the Mobile
-	 * Allocation to have a length of zero. We are using the
-	 * msgb_l3len to calculate the length of both messages.
-	 */
-	msgb_v_put(msg, RSL_IE_CHAN_IDENT);
-	len = msgb_put(msg, 1);
-	msgb_tv_fixed_put(msg, GSM48_IE_CHANDESC_2, sizeof(cd), (const uint8_t *) &cd);
-
-	if (lchan->ts->hopping.enabled)
-		msgb_tlv_put(msg, GSM48_IE_MA_AFTER, lchan->ts->hopping.ma_len,
-			     lchan->ts->hopping.ma_data);
-	else
-		msgb_tlv_put(msg, GSM48_IE_MA_AFTER, 0, NULL);
+	/* Flexi BTS may not support CHAN IDENT IE */
+	if (!(is_nokia_bts(lchan->ts->trx->bts)
+	   && lchan->ts->trx->bts->nokia.no_chan_ident)) {
+		/*
+		 * The Channel Identification is needed for Phase1 phones
+		 * and it contains the GSM48 Channel Description and the
+		 * Mobile Allocation. The GSM 08.58 asks for the Mobile
+		 * Allocation to have a length of zero. We are using the
+		 * msgb_l3len to calculate the length of both messages.
+		 */
+		msgb_v_put(msg, RSL_IE_CHAN_IDENT);
+		len = msgb_put(msg, 1);
+		msgb_tv_fixed_put(msg, GSM48_IE_CHANDESC_2, sizeof(cd),
+				  (const uint8_t *) &cd);
+
+		if (lchan->ts->hopping.enabled)
+			msgb_tlv_put(msg, GSM48_IE_MA_AFTER,
+				     lchan->ts->hopping.ma_len,
+				     lchan->ts->hopping.ma_data);
+		else
+			msgb_tlv_put(msg, GSM48_IE_MA_AFTER, 0, NULL);
 
-	/* update the calculated size */
-	msg->l3h = len + 1;
-	*len = msgb_l3len(msg);
+		/* update the calculated size */
+		msg->l3h = len + 1;
+		*len = msgb_l3len(msg);
+	}
 
 	if (lchan->encr.alg_id > RSL_ENC_ALG_A5(0)) {
 		uint8_t encr_info[MAX_A5_KEY_LEN+2];
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index fb3012f..e72de00 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -608,6 +608,8 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
 		vty_out(vty, "  nokia_site skip-reset %d%s", bts->nokia.skip_reset, VTY_NEWLINE);
 		vty_out(vty, "  nokia_site no-local-rel-conf %d%s",
 			bts->nokia.no_loc_rel_cnf, VTY_NEWLINE);
+		vty_out(vty, "  nokia_site no-chan-ident %d%s",
+			bts->nokia.no_loc_rel_cnf, VTY_NEWLINE);
 		/* fall through: Nokia requires "oml e1" parameters also */
 	default:
 		config_write_e1_link(vty, &bts->oml_e1_link, "  oml ");
@@ -1908,6 +1910,27 @@ DEFUN(cfg_bts_nokia_site_no_loc_rel_cnf,
 	return CMD_SUCCESS;
 }
 
+DEFUN(cfg_bts_nokia_site_no_chan_ident,
+      cfg_bts_nokia_site_no_chan_ident_cmd,
+      "nokia_site no-chan-ident (0|1)",
+      NOKIA_STR
+      "Do not include Channel Identification IE in CHANnel ACTIVate message\n"
+      "Include Channel Identification IE\n"
+      "Do not include Channel Identification IE\n")
+{
+	struct gsm_bts *bts = vty->index;
+
+	if (!is_nokia_bts(bts)) {
+		vty_out(vty, "%% BTS is not of Nokia *Site type%s",
+			VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	bts->nokia.no_chan_ident = atoi(argv[0]);
+
+	return CMD_SUCCESS;
+}
+
 #define OML_STR	"Organization & Maintenance Link\n"
 #define IPA_STR "A-bis/IP Specific Options\n"
 
@@ -3884,6 +3907,7 @@ int bsc_vty_init(const struct log_info *cat)
 	install_element(BTS_NODE, &cfg_bts_no_timezone_cmd);
 	install_element(BTS_NODE, &cfg_bts_nokia_site_skip_reset_cmd);
 	install_element(BTS_NODE, &cfg_bts_nokia_site_no_loc_rel_cnf_cmd);
+	install_element(BTS_NODE, &cfg_bts_nokia_site_no_chan_ident_cmd);
 	install_element(BTS_NODE, &cfg_bts_stream_id_cmd);
 	install_element(BTS_NODE, &cfg_bts_oml_e1_cmd);
 	install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd);
diff --git a/openbsc/src/libbsc/bts_nokia_site.c b/openbsc/src/libbsc/bts_nokia_site.c
index 36e3fac..9c61e81 100644
--- a/openbsc/src/libbsc/bts_nokia_site.c
+++ b/openbsc/src/libbsc/bts_nokia_site.c
@@ -470,6 +470,7 @@ static const struct value_string nokia_bts_types[] = {
 	{ 0x16,		"UltraSite GSM/US-TDMA 850" },
 	{ 0x18,		"MetroSite GSM/US-TDMA 850" },
 	{ 0x19,		"UltraSite GSM 800/1900" },
+	{ 0x1b,		"Flexi Edge GSM 800/1900" },
 	{ 0, 		NULL }
 };
 

Reply via email to