# HG changeset patch # User Mychaela Falconia # Date 1495901020 0 # Node ID 21f6dba5c4df1a370eca2b54c51c11031f6be652 # Parent bc2397f62bdb3c2055ab2b310a06cb66c297fea2 fc-rfcal-txcheck ready to test diff -r bc2397f62bdb -r 21f6dba5c4df autocal/Makefile --- 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 diff -r bc2397f62bdb -r 21f6dba5c4df autocal/txchkmain.c --- 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 #include #include +#include #include #include #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); } diff -r bc2397f62bdb -r 21f6dba5c4df autocal/txpwrmeas.c --- /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 +#include + +extern char tsid_response[]; + +double +tx_power_meas() +{ + double meas; + + tsid_command("power-meas\n"); + meas = atof(tsid_response + 1); + return(meas); +}