diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn index 498f48436..3dd6f023b 100644 --- a/bsc/BSC_Tests_CBSP.ttcn +++ b/bsc/BSC_Tests_CBSP.ttcn @@ -37,6 +37,9 @@ import from CBSP_Templates all; import from CBSP_Adapter all; import from CBSP_CodecPort all; +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + modulepar { charstring mp_cbc_ip := "0.0.0.0"; integer mp_cbc_port := 48049; @@ -102,6 +105,14 @@ var ASP_RSL_Unitdata rx; } } +private function f_vty_set_cbsp_mode(TELNETasp_PT pt, charstring mode) { + f_vty_enter_config(pt); + f_vty_transceive(pt, "cbc"); + f_vty_transceive(pt, "mode " & mode); + f_vty_transceive(pt, "exit"); + f_vty_transceive(pt, "exit"); +} + private function f_init(float guard_timeout := 30.0) runs on cbsp_test_CT { BSC_Tests.f_init(guard_timeout := guard_timeout); activate(as_IgnRSL((tr_RSL_BCCH_INFO, tr_RSL_SACCH_FILL, @@ -111,9 +122,9 @@ private function f_init(float guard_timeout := 30.0) runs on cbsp_test_CT { } private function f_cbsp_init_client() runs on cbsp_test_CT { f_init(); + f_vty_set_cbsp_mode(BSCVTY, "server"); CBSP_Adapter.f_connect(mp_bsc_ip, mp_bsc_cbsp_port, "", -1); - /* FIXME: osmo-bsc should probably still send a CBSP RESTART, but to get the current tests running, let's first - * ignore this aspect */ + CBSP[0].receive(tr_CBSP_Recv(?, tr_CBSP_RESTART(?, CBSP_BC_MSGT_CBS, ?))); setverdict(pass); } @@ -122,6 +133,9 @@ private function f_cbsp_init_server(uint16_t cbsp_msg_id, uint16_t cbsp_ser_no, timer T := 10.0; f_init(guard_timeout := guard_timeout); + + f_vty_set_cbsp_mode(BSCVTY, "client"); + CBSP_Adapter.f_bind(mp_cbc_ip, mp_cbc_port); T.start; diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg index f8be2cd8d..8dd665501 100644 --- a/bsc/osmo-bsc.cfg +++ b/bsc/osmo-bsc.cfg @@ -424,6 +424,10 @@ bsc ctrl bind 127.0.0.1 cbc - remote-ip 127.0.0.1 - remote-port 48049 - listen-port 48050 + mode disabled + client + remote-ip 127.0.0.1 + remote-port 48049 + server + local-ip 127.0.0.1 + local-port 48050