Review at https://gerrit.osmocom.org/8057
send a State Changed Event Report when rf is locked/unlocked Make osmo-bts send a State Changed Event Report when RF is locked or unlocked. This behaviour isn't mentioned in the spec as far as we know, but an ipaccess nanobts also produces these messages. Change-Id: I37e44ef4881c41f8835428b610e7863f37397c9f Related: OS#3161 --- M src/common/oml.c 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/57/8057/1 diff --git a/src/common/oml.c b/src/common/oml.c index a1e7fda..89db9cf 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -322,6 +322,9 @@ /* 9.4.7 Availability Status */ msgb_tl16v_put(nmsg, NM_ATT_AVAIL_STATUS, 1, &mo->nm_state.availability); + /* 9.4.4 Administrative Status -- not in spec but also sent by nanobts */ + msgb_tv_put(nmsg, NM_ATT_ADM_STATE, mo->nm_state.administrative); + return oml_mo_send_msg(mo, nmsg, NM_MT_STATECHG_EVENT_REP); } @@ -383,6 +386,7 @@ int oml_mo_statechg_ack(struct gsm_abis_mo *mo) { struct msgb *msg; + int rc = 0; msg = oml_msgb_alloc(); if (!msg) @@ -390,7 +394,12 @@ msgb_tv_put(msg, NM_ATT_ADM_STATE, mo->nm_state.administrative); - return oml_mo_send_msg(mo, msg, NM_MT_CHG_ADM_STATE_ACK); + rc = oml_mo_send_msg(mo, msg, NM_MT_CHG_ADM_STATE_ACK); + if (rc != 0) + return rc; + + /* Emulate behaviour of ipaccess nanobts: Send a 'State Changed Event Report' as well. */ + return oml_tx_state_changed(mo); } int oml_mo_statechg_nack(struct gsm_abis_mo *mo, uint8_t nack_cause) -- To view, visit https://gerrit.osmocom.org/8057 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I37e44ef4881c41f8835428b610e7863f37397c9f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Stefan Sperling <ssperl...@sysmocom.de>