From 8da4824ecb2df6a563b4843e8f2a7d3cf2b7e954 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 27 Feb 2018 20:41:32 +0100 Subject: bts: Add TELNET/VTY module so we can interact with BTS VTY Change-Id: Ia1d6ba2c3534d2daaa5ea1fe60b32a99fa4ddad9 --- bts/BTS_Tests.ttcn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bts/BTS_Tests.ttcn') diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 45fcb064..261d9691 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -27,6 +27,9 @@ import from MobileL3_RRM_Types all; import from MobileL3_Types all; import from L3_Templates all; +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + /* The tests assume a BTS with the following timeslot configuration: * TS0 : Combined CCCH + SDCCH/4 * TS1 .. TS 4: TCH/F @@ -57,6 +60,8 @@ type component test_CT extends CTRL_Adapter_CT { port TRXC_CODEC_PT BB_TRXC; var integer g_bb_trxc_conn_id; + port TELNETasp_PT BTSVTY; + /* SI configuration */ var SystemInformationConfig si_cfg := { bcch_extended := false, @@ -201,11 +206,18 @@ runs on test_CT { f_rsl_bcch_fill_raw(rsl_si_type, si_enc); } +private function f_init_vty(charstring id) runs on test_CT { + map(self:BTSVTY, system:BTSVTY); + f_vty_set_prompts(BTSVTY); + f_vty_transceive(BTSVTY, "enable"); +} + /* global init function */ function f_init(charstring id := "BTS-Test") runs on test_CT { f_init_rsl(id); RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}); f_sleep(0.5); /* workaround for OS#3000 */ + f_init_vty(id); /* Send SI3 to the BTS, it is needed for various computations */ f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default); -- cgit v1.2.3