FreeCalypso > hg > fc-rfcal-tools
changeset 54:21f6dba5c4df
fc-rfcal-txcheck ready to test
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 27 May 2017 16:03:40 +0000 |
parents | bc2397f62bdb |
children | b313884c79fd |
files | autocal/Makefile autocal/txchkmain.c autocal/txpwrmeas.c |
diffstat | 3 files changed, 41 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/autocal/Makefile Sat May 27 15:41:54 2017 +0000 +++ b/autocal/Makefile Sat May 27 16:03:40 2017 +0000 @@ -6,7 +6,8 @@ GMAGIC_OBJS= gmagicmain.o l1meas.o l1tmops.o rvinterf.o rxcommon.o \ sockopts.o tsidsock.o -TXCHECK_OBJS= l1tmops.o rvinterf.o sockopts.o tsidsock.o txchkmain.o +TXCHECK_OBJS= l1tmops.o rvinterf.o sockopts.o tsidsock.o txchkmain.o \ + txpwrmeas.o VCXO_OBJS= l1tmops.o rvinterf.o sockopts.o tsidsock.o vcxomain.o vcxomeas.o
--- a/autocal/txchkmain.c Sat May 27 15:41:54 2017 +0000 +++ b/autocal/txchkmain.c Sat May 27 16:03:40 2017 +0000 @@ -6,10 +6,13 @@ #include <stdlib.h> #include <string.h> #include <strings.h> +#include <unistd.h> #include <rvinterf/l1tm.h> #include <rvinterf/exitcodes.h> #include "stdband.h" +extern double tx_power_meas(); + static struct band { char *name; unsigned rfpw_std_band; @@ -66,6 +69,9 @@ main(argc, argv) char **argv; { + unsigned plnum; + double meas; + socket_pathname_options(argc, argv); finish_cmdline(argc, argv); connect_rvinterf_socket(); @@ -76,6 +82,20 @@ printf("Putting the DUT into Test Mode\n"); do_tms(1); do_rfpw(STD_BAND_FLAG, selected_band->rfpw_std_band); - + do_rfpw(TCH_ARFCN, arfcn); + do_rfpw(AFC_ENA_FLAG, 0); + printf("Starting RF Tx on the DUT\n"); + do_rfe(RX_TX_TCH); + for (plnum = selected_band->start_plnum; + plnum <= selected_band->end_plnum; plnum++) { + do_txpw(TX_PWR_LEVEL, plnum); + usleep(20000); + meas = tx_power_meas(); + printf("Tx power level #%u: %.2f dBm\n", plnum, meas); + } + + printf("Stopping RF Tx on the DUT\n"); + do_rfe(STOP_ALL); + exit(0); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autocal/txpwrmeas.c Sat May 27 16:03:40 2017 +0000 @@ -0,0 +1,18 @@ +/* + * This module contains the Tx power measurement function. + */ + +#include <stdio.h> +#include <stdlib.h> + +extern char tsid_response[]; + +double +tx_power_meas() +{ + double meas; + + tsid_command("power-meas\n"); + meas = atof(tsid_response + 1); + return(meas); +}