diff options
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-30 17:40:20 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-07-03 03:53:10 +0700
commitb8425680391c96b3bb3635cbfdfca4931e85d70b (patch)
parent6c7149be3cffdf2a79b300be35b4129c6fea0dfa (diff)
gsm_04_08_rr: fix hopping parameters in RR Assignment Command
According to 3GPP TS 44.018, section, if at least one of the Channel Description IEs indicates frequency hopping, one and only one of the following IEs shall be present: - Mobile Allocation, after time (see; - Frequency List, after time (see For some reason, osmo-bsc includes the GSM48_IE_MA_BEFORE instead of GSM48_IE_MA_AFTER - fix this. According to section of the same document, if any of the Mobile Allocation IEs (before/after time) is present, then the network must ensure that either the MS has already received the the proper reference cell frequency list (CA), or that the Cell Channel Description IE (see is present. Without this IE, the phone I was using in my testing setup sends RR Status message with cause #100 "conditional IE error". Fortunately, we already have generate_cell_chan_list(), since we also need to include the Cell Channel Description in SI Type 1. Change-Id: I43ef66c109b107ebcaa1cb6197637701b13b3787 Related: SYS#4868, OS#4545, OS#4546
1 files changed, 9 insertions, 3 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 8a74aabac..f47c31f41 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -43,6 +43,7 @@
#include <osmocom/bsc/handover_fsm.h>
#include <osmocom/bsc/gsm_08_08.h>
#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/system_information.h>
int gsm48_sendmsg(struct msgb *msg)
@@ -576,13 +577,18 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan,
gsm48_lchan2chan_desc(&ass->chan_desc, lchan);
ass->power_command = power_command;
- /* optional: cell channel description */
+ /* Cell Channel Description (freq. hopping), TV (see 3GPP TS 44.018, */
+ if (lchan->ts->hopping.enabled) {
+ uint8_t *chan_desc = msgb_put(msg, 1 + 16); /* tag + fixed length */
+ generate_cell_chan_list(chan_desc + 1, dest_lchan->ts->trx->bts);
+ chan_desc[0] = GSM48_IE_CELL_CH_DESC;
+ }
msgb_tv_put(msg, GSM48_IE_CHANMODE_1, lchan->tch_mode);
- /* mobile allocation in case of hopping */
+ /* Mobile Allocation (freq. hopping), TLV (see 3GPP TS 44.018, */
if (lchan->ts->hopping.enabled) {
- msgb_tlv_put(msg, GSM48_IE_MA_BEFORE, lchan->ts->hopping.ma_len,
+ msgb_tlv_put(msg, GSM48_IE_MA_AFTER, lchan->ts->hopping.ma_len,