Commit 3506f66a authored by knopp's avatar knopp

some cleanup for UE on USRP, OPENAIR2=0 flag works again and on USRP, UE TX on...

some cleanup for UE on USRP, OPENAIR2=0 flag works again and on USRP, UE TX on USRP still to be added

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6538 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 9ba19119
......@@ -1725,7 +1725,7 @@ static void get_options (int argc, char **argv) {
int c;
// char line[1000];
// int l;
int k;//i,j,k;
int k,i;//,j,k;
#ifdef USRP
int clock_src;
#endif
......@@ -1748,7 +1748,8 @@ static void get_options (int argc, char **argv) {
LONG_OPTION_CALIB_UE_RX_MED,
LONG_OPTION_CALIB_UE_RX_BYP,
LONG_OPTION_DEBUG_UE_PRACH,
LONG_OPTION_NO_L2_CONNECT
LONG_OPTION_NO_L2_CONNECT,
LONG_OPTION_RXGAIN
};
static const struct option long_options[] = {
......@@ -1758,6 +1759,7 @@ static void get_options (int argc, char **argv) {
{"calib-ue-rx-byp", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_BYP},
{"debug-ue-prach", no_argument, NULL, LONG_OPTION_DEBUG_UE_PRACH},
{"no-L2-connect", no_argument, NULL, LONG_OPTION_NO_L2_CONNECT},
{"ue_rxgain", required_argument, NULL, LONG_OPTION_RXGAIN},
{NULL, 0, NULL, 0}};
while ((c = getopt_long (argc, argv, "C:dK:g:F:G:qO:m:SUVRM:r:P:s:t:x:",long_options,NULL)) != -1) {
......@@ -1792,6 +1794,10 @@ static void get_options (int argc, char **argv) {
case LONG_OPTION_NO_L2_CONNECT:
mode = no_L2_connect;
break;
case LONG_OPTION_RXGAIN:
for (i=0;i<4;i++)
rx_gain[0][i] = atof(optarg);
break;
case 'M':
#ifdef ETHERNET
strcpy(rrh_eNB_ip,optarg);
......
......@@ -305,7 +305,8 @@ static void *UE_thread_synch(void *arg) {
break;
case pbch:
printf("Running initial sync\n");
// This is a hack to fix a bug when using USRP
memset(PHY_vars_UE_g[0][0]->lte_ue_common_vars.rxdata[0],0,1024);
if (initial_sync(UE,UE->mode)==0) {
/*
lte_adjust_synch(&PHY_vars_UE_g[0]->lte_frame_parms,
......@@ -760,6 +761,7 @@ void *UE_thread(void *arg) {
T0 = rt_get_time_ns();
first_rx = 1;
rxpos=0;
while (!oai_exit) {
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME, hw_subframe);
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME, frame);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment