aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/sysmobts_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-04-19 19:22:53 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-19 19:22:53 +0200
commitf19ee660963ba34a2ecad5f6fb5c44e89c9fb820 (patch)
treea4470d6cdf58caa907a38040d663abd23941ea47 /src/osmo-bts-sysmo/sysmobts_vty.c
parent4301b09137925dc4f903c98608697491a7a0a600 (diff)
add a VTY command for activating PDCH channels (in EGPRS mode)
This allows us to do RF measurements (EDGE EVM and the like) even without having any PCU/RLC/MAC code as of now. To use it, configure PDCH type timeslots (e.g. TS 7) in the BSC and then use "trx 0 7 activate 0" to manually activate the PDTCH lchan on top of that timeslot. The BTS will now happily transmit EDGE/8PSK data.
Diffstat (limited to 'src/osmo-bts-sysmo/sysmobts_vty.c')
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index d80cd16e..85381939 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -304,6 +304,29 @@ DEFUN(show_sys_info, show_sys_info_cmd,
return CMD_SUCCESS;
}
+DEFUN(activate_lchan, activate_lchan_cmd,
+ "trx <0-0> <0-7> (activate|deactivate) <0-7>",
+ "Transceiver related commands\n"
+ "TRX number\n"
+ "Timeslot number\n"
+ "Activate or Deactivate\n"
+ "Logical Channel Number\n" )
+{
+ int trx_nr = atoi(argv[0]);
+ int ts_nr = atoi(argv[1]);
+ int lchan_nr = atoi(argv[3]);
+ struct gsm_bts_trx *trx = gsm_bts_trx_num(vty_bts, trx_nr);
+ struct gsm_bts_trx_ts *ts = &trx->ts[ts_nr];
+ struct gsm_lchan *lchan = &ts->lchan[lchan_nr];
+
+ if (!strcmp(argv[2], "activate"))
+ lchan_activate(lchan);
+ else
+ lchan_deactivate(lchan);
+
+ return CMD_SUCCESS;
+}
+
void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
{
}
@@ -338,6 +361,8 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element_ve(&dsp_trace_f_cmd);
install_element_ve(&no_dsp_trace_f_cmd);
+ install_element(ENABLE_NODE, &activate_lchan_cmd);
+
install_element(TRX_NODE, &cfg_trx_clkcal_cmd);
install_element(TRX_NODE, &cfg_trx_clkcal_def_cmd);
install_element(TRX_NODE, &cfg_trx_clksrc_cmd);