FreeCalypso > hg > fc-rfcal-tools
changeset 112:fbfbd813c9b4
fc-cmu200d: implemented channel switching in Tx power calibration
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 13 Feb 2018 04:29:38 +0000 |
parents | 7bcbbba94c41 |
children | 01bae2629ffd |
files | cmu200/dispatch.c cmu200/rfanalyzer.c |
diffstat | 2 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/cmu200/dispatch.c Tue Feb 13 03:18:38 2018 +0000 +++ b/cmu200/dispatch.c Tue Feb 13 04:29:38 2018 +0000 @@ -13,6 +13,7 @@ extern int cmd_freq_meas(); extern int cmd_power_meas(); extern int cmd_rfan_setup(); +extern int cmd_rfan_channel(); extern int cmd_signal_gen_off(); extern int cmd_signal_gen_sine(); extern int cmd_signal_gen_setup(); @@ -31,10 +32,12 @@ {"ping", cmd_ping}, {"power-meas", cmd_power_meas}, {"rfan-setup", cmd_rfan_setup}, + {"rfan-channel", cmd_rfan_channel}, {"signal-gen-off", cmd_signal_gen_off}, {"signal-gen-sine", cmd_signal_gen_sine}, {"signal-gen-setup", cmd_signal_gen_setup}, {"txpwr-cal-setup", cmd_rfan_setup}, + {"txpwr-cal-channel", cmd_rfan_channel}, {"vcxo-cal-setup", cmd_rfan_setup}, {0, 0} };
--- a/cmu200/rfanalyzer.c Tue Feb 13 03:18:38 2018 +0000 +++ b/cmu200/rfanalyzer.c Tue Feb 13 04:29:38 2018 +0000 @@ -58,6 +58,30 @@ return(0); } +cmd_rfan_channel() +{ + unsigned arfcn; + char cmdstr[80]; + + if (current_mode != OP_MODE_GSM_RFAN) { + send_socket_response("-Wrong mode\n"); + return(0); + } + if (client_cmd_nfields != 2) { + send_socket_response("-Wrong number of arguments\n"); + return(0); + } + arfcn = atoi(client_cmd_fields[1]); + if (verify_arfcn(arfcn, 0, 0) < 0) { + send_socket_response("-Invalid ARFCN\n"); + return(0); + } + sprintf(cmdstr, "RFAN:CHAN %uCH\n", arfcn); + send_scpi_cmd(cmdstr); + send_socket_response("+OK\n"); + return(0); +} + cmd_freq_meas() { char *resp_fields[11];