diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..8efa62d23cbad15fb8e1de1c469a5945e1740079
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,30 @@
+job1:
+  script:
+   - echo $PWD
+   - echo $USER
+   - echo $OAI_USER
+   - echo $OAI_EXTRA_ARGS
+   - echo $NFS_SHARE_DIR
+   - echo $EXTERNAL_SHARE_DIR
+   - echo $SHELL
+   - git rev-parse --abbrev-ref HEAD
+   - git_head=`git rev-parse HEAD`
+   - echo $git_head
+   - tmp=`git show-ref --head | grep $git_head`
+   - tmp=(${tmp///// })
+   - git_branch=${tmp[@]:(-1)}
+   - echo $git_branch
+   - source oaienv
+   - echo $OPENAIR_DIR
+   - NFS_TEST_RESULTS_DIR=$NFS_SHARE_DIR/$git_branch/$git_head
+   - EXTERNAL_SHARE_RESULTS_DIR=$EXTERNAL_SHARE_DIR/$git_branch/$git_head
+   - echo $NFS_TEST_RESULTS_DIR
+   - echo $EXTERNAL_SHARE_RESULTS_DIR
+   - mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
+   - python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
+   - python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g $OAI_TEST_CASE_GROUP >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
+   - mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log
+   - mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log
+   - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no "  --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
+   - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no "  --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR
+   - cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index 7569566faae5bff7d654ad0693e90b25efeb96db..f52a3c465f6b7c75e2237e40c188425abcde4a33 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -421,7 +421,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_USRP")
     ${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp)
   LINK_DIRECTORIES("/opt/lib")
   set(option_HW_lib "uhd")
-  set(LOWLATENCY False)
+  #set(LOWLATENCY False)
 
 elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
   include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
@@ -432,14 +432,14 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
     )
   LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
   set(option_HW_lib "bladeRF")
-set(LOWLATENCY False)
+ #set(LOWLATENCY False)
 
 elseif (${RF_BOARD} STREQUAL "ETHERNET")
   include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB")
   set(HW_SOURCE ${HW_SOURCE}
     ${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
     )
-  set(LOWLATENCY True)
+  #set(LOWLATENCY True)
   
 elseif (${RF_BOARD} STREQUAL "CPRIGW")
   set(HW_SOURCE ${HW_SOURCE}
@@ -451,6 +451,7 @@ endif (${RF_BOARD} STREQUAL "EXMIMO")
 
 include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
 
+Message("LOWLATENCY flag  is ${LOWLATENCY}")
 
 ##############################################################
 #    ???!!! TO BE DOCUMENTED OPTIONS !!!???
@@ -843,6 +844,7 @@ set(PHY_SRC
   ${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c
   ${OPENAIR1_DIR}/PHY/INIT/lte_init.c
   ${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
+  ${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
   ${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
   ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
   ${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
diff --git a/cmake_targets/autotests/core.py b/cmake_targets/autotests/core.py
index 8881781144ddf2acd61bac0fd5942c53a33b4093..18f89ecfce9f8041bff0065b9bda868cb685ba7f 100644
--- a/cmake_targets/autotests/core.py
+++ b/cmake_targets/autotests/core.py
@@ -118,8 +118,7 @@ class core:
         rsp1 = self.prompt1
         rsp2 = self.prompt2
         if sudo == True:
-          command = 'echo \'' + self.password + '\' | sudo -S -E ' + command
-
+           command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
         self.wait_quiet()
         if self.send_cr:
             log.stats['cmd'] += 1
@@ -140,7 +139,7 @@ class core:
             rsp2 = self.prompt2
         self.wait_quiet()
         if sudo == True:
-          command = 'echo \'' + self.password + '\' | sudo -S -E ' + command
+            command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
         if self.send_cr:
             log.stats['cmd'] += 1
             self.oai.sendline(command)
@@ -240,8 +239,9 @@ class core:
     #    print rsp
         if  (rsp.find(expect) == -1):
             return 'OK'
-
-        raise log.err(self.failed(command, expect,debug))
+        else:
+            print "command = " + cmd + "expect  = " + expect + "rsp = " + rsp
+            raise log.err(self.failed(command, expect,debug))
 
     
     # **************************send_wait*************************    
diff --git a/cmake_targets/autotests/openair.py b/cmake_targets/autotests/openair.py
index e8d07ba1e1f1c36ce623a515da32366a2afc766b..1079c466a822b5cfdfe4d76bfad383175972d5a3 100644
--- a/cmake_targets/autotests/openair.py
+++ b/cmake_targets/autotests/openair.py
@@ -83,10 +83,13 @@ class openair(core):
         return (stdout, stderr)
 
     def connect(self, username, password, prompt='PEXPECT_OAI'):
-     while True:  
+     max_retries=100
+     i=0
+     while i <= max_retries:  
         self.prompt1 = prompt
         self.prompt2 = prompt
         self.password = '' 
+        i=i+1
         # WE do not store the password when sending commands for secuirity reasons. The password might be accidentally logged in such cases.
         #The password is used only to make ssh connections. In case user wants to run programs with sudo, then he/she needs to add following line in /etc/sudoers
         # your_user_name  ALL=(ALL:ALL) NOPASSWD: ALL
@@ -109,11 +112,14 @@ class openair(core):
         except Exception, e:
             error=''
             error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: '  + str(e.__class__) + " : " + str( e)
+            error = error + 'address = "'+ self.address +' username = ' + username
             error = error + traceback.format_exc()
             print error
-            print "Retrying again in 60 seconds"
-            time.sleep(60)
-            #sys.exit(1)
+            print "Retrying again in 1  seconds"
+            time.sleep(1)
+            if i==max_retries:
+              print "Fatal Error: Terminating the program now..."
+              sys.exit(1)
                 
     def connect2(self, username, password, prompt='$'):
         self.prompt1 = prompt
diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
old mode 100644
new mode 100755
index b76b5f9698fbb9c14f4fa0b7cf358b4573579dbe..cd0441ef7bbce8e3d4a3e6e8c441d4a4b28fd893
--- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
@@ -64,17 +64,22 @@ sys.path.append('/opt/ssh')
 import ssh
 from ssh import SSHSession
 
+# \brief write a string to a file
+# \param filename name of file
+# \param string string to write
+# \mode file opening mode (default=write)
 def write_file(filename, string, mode="w"):
    text_file = open(filename, mode)
    text_file.write(string)
    text_file.close()
-   
-#$1 name of file (assuming created with iperf -s -u ....
-#$2 minimum throughput
-#$3 maximum throughput
-#$4 average throughput
-#$5 minimum duration of throughput
-#The throughput values found in file must be higher than values from from 2,3,4,5
+ 
+# \brief function to check if test case passed throughput test
+# \param filename name of file which has throughput results (usually from iperf -s ...
+# \param min_tput minimum throughput
+# \param max_tuput maximum throughput
+# \param average average throughput
+# \param min_duration minimum duration of throughput
+#The throughput values found in file must be higher than values from from arguments 2,3,4,5
 #The function returns True if throughput conditions are saisfied else it returns fails
 def tput_test(filename, min_tput, max_tput, average, min_duration):
    
@@ -101,13 +106,16 @@ def tput_test(filename, min_tput, max_tput, average, min_duration):
    else: 
       return False , tput_string
 
-    
+# \brief Convert string to float or return None if there is exception    
 def try_convert_to_float(string, fail=None):
     try:
         return float(string)
     except Exception:
         return fail;
 
+# \brief get throughput statistics from log file
+# \param search_expr search expression found in test_case_list.xml file
+# \param logfile_traffic logfile which has traffic statistics
 def tput_test_search_expr (search_expr, logfile_traffic):
    result=0
    tput_string=''
@@ -153,7 +161,13 @@ def tput_test_search_expr (search_expr, logfile_traffic):
 
    return result, tput_string
       
-
+# \brief function to copy files to/from remote machine
+# \param username user with which to make sftp connection
+# \param password password of user
+# \param hostname host to connect
+# \ports port of remote machine on which server is listening
+# \paramList This is list of operations as a set {operation: "get/put", localfile: "filename", remotefile: "filename"
+# \param logfile Ignored currently and set once at the beginning of program
 def sftp_module (username, password, hostname, ports, paramList,logfile): 
    #localD = localfile
    #remoteD = remotefile
@@ -162,14 +176,9 @@ def sftp_module (username, password, hostname, ports, paramList,logfile):
    #paramiko logfile path should not be changed with multiple calls. The logs seem to in first file regardless
    error = ""
    #The lines below are outside exception loop to be sure to terminate the test case if the network connectivity goes down or there is authentication failure
- 
-
-
    transport = paramiko.Transport(hostname, ports)
    transport.connect(username = username, password = password)
    sftp = paramiko.SFTPClient.from_transport(transport)
-   
-
    #  index =0 
    for param in paramList:
       try:
@@ -201,6 +210,9 @@ def sftp_module (username, password, hostname, ports, paramList,logfile):
    write_file(logfile, error, "a")
    res = os.system('\n echo \'SFTP Module Log for Machine: <' + hostname + '> ends...\' >> ' + logfile + ' 2>&1 \n')
 
+# \brief bash script stub put at the end of scripts to terminate it 
+# \param timeout_cmd terminate script after timeout_cmd seconds
+# \param terminate_missing_procs if True terminate all the processes launched by script if one of them terminates prematurely (due to error)
 def finalize_deploy_script (timeout_cmd, terminate_missing_procs='True'):
   cmd = 'declare -i timeout_cmd='+str(timeout_cmd) + '\n'
   if terminate_missing_procs == 'True':
@@ -239,6 +251,11 @@ def finalize_deploy_script (timeout_cmd, terminate_missing_procs='True'):
   
   return cmd
 
+# \brief run python script and update config file params of test case
+# \param oai module with already open connection
+# \param config_string config string taken from xml file
+# \param logdirRepo directory of remote repository
+# \param python_script python script location
 def update_config_file(oai, config_string, logdirRepo, python_script):
   if config_string :
     stringArray = config_string.splitlines()
@@ -252,27 +269,49 @@ def update_config_file(oai, config_string, logdirRepo, python_script):
     return cmd
     #result = oai.send_recv(cmd)
 
-def SSHSessionWrapper(machine, username, key_file, password, logdir_remote_testcase, logdir_local_base):
-  while True:
+# \brief thread safe sshsession wrapper due to occasional connection issues with ssh
+# \param machine name of machine
+# \param username user login for remote machine
+# \param key_file file name which has keys to enable passwordless login
+# \param password password for remote machine
+# \param logdir_remote remote directory
+# \param logdir_local_base local directory
+# \param operation operation to perform (get_all, put_all) transfers recursively for directories
+def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logdir_local_base, operation):
+  max_tries = 100
+  i=0
+  while i <= max_tries:
+    i = i +1
     try:
        ssh = SSHSession(machine , username, key_file, password)
-       ssh.get_all(logdir_remote_testcase , logdir_local_base)
+       if operation == "get_all":
+          ssh.get_all(logdir_remote , logdir_local_base)
+       elif operation == "put_all":
+          ssh.put_all(logdir_local_base, logdir_remote )
+       else:
+          print "Error: Uknown operation in SSHSessionWrapper. Exiting now..."
+          sys.exit(1)
        break 
     except Exception, e:
        error=''
        error = error + ' In Class = function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: '  + str(e.__class__) + " : " + str( e)
-       error = error + '\n username = ' + username + '\n machine = ' + machine + '\n logdir_remote = ' + logdir_remote_testcase + '\n logdir_local_base = ' + logdir_local_base 
+       error = error + '\n username = ' + username + '\n machine = ' + machine + '\n logdir_remote = ' + logdir_remote + '\n logdir_local_base = ' + logdir_local_base 
        error = error + traceback.format_exc()
        print error
-       print " Trying again in 60 seconds"
-       time.sleep(60)
+       print " Retrying again in 1 seconds"
+       time.sleep(1)
        print "Continuing ..."
+       if i ==max_tries:
+          print "Fatal Error: Max no of retries reached. Exiting now..."
+          sys.exit(1)
 
 
  
-#Function to clean old programs that might be running from earlier execution
-#oai - parameter for making connection to machine
-#programList - list of programs that must be terminated before execution of any test case 
+# \briefFunction to clean old programs that might be running from earlier execution
+# \param oai - parameter for making connection to machine
+# \parm programList list of programs that must be terminated before execution of any test case 
+# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
+# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
 def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
   cmd = 'killall -q -r ' + programList
   result = oai.send(cmd, True)
@@ -285,18 +324,17 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
   result = oai.send_expect_false(cmd, 'Match found', False)
   print result
   res=oai.send_recv(CleanUpAluLteBox, True)
-  res = oai.send_recv(ExmimoRfStop, True)
-
-class myThread (threading.Thread):
-    def __init__(self, threadID, name, counter):
-        threading.Thread.__init__(self)
-        self.threadID = threadID
-        self.name = name
-        self.counter = counter
-    def run(self):
-        print "Starting " + self.name
-
-
+  res = oai.send_recv(ExmimoRfStop, False)
+
+# \brief Class thread to launch a generic command on remote machine
+# \param threadID number of thread (for book keeping)
+# \param threadname string of threadname (for book keeping)
+# \param machine machine name on which to run the command
+# \param username username with which to login
+# \param password password with which to login
+# \param cmd command as a string to run on remote machine
+# \parma sudo if True sudo is set
+# \param timeout timeout of command in seconds 
 class oaiThread (threading.Thread):
     def __init__(self, threadID, threadname, machine, username, password, cmd, sudo, timeout):
         threading.Thread.__init__(self)
@@ -311,7 +349,7 @@ class oaiThread (threading.Thread):
     def run(self):
         try:
           oai = openair('localdomain',self.machine)
-          oai.connect(user, self.password)
+          oai.connect(self.username, self.password)
           print "Starting " + self.threadname + " on machine " + self.machine
           result = oai.send_recv(self.cmd, self.sudo, self.timeout)
           print "result = " + result
@@ -320,14 +358,24 @@ class oaiThread (threading.Thread):
         except Exception, e:
            error=''
            error = error + ' In class oaiThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: '  + str(e.__class__) + " : " + str( e)
-           error = error + '\n threadID = ' + str(self.threadID) + '\n threadname = ' + self.threadname + '\n timeout = ' + self.timeout + '\n machine = ' + self.machine + '\n cmd = ' + self.cmd + '\n timeout = ' + str(self.timeout) +  '\n'  
+           error = error + '\n threadID = ' + str(self.threadID) + '\n threadname = ' + self.threadname + '\n timeout = ' + self.timeout + '\n machine = ' + self.machine + '\n cmd = ' + self.cmd + '\n timeout = ' + str(self.timeout) +  '\n username = ' + self.username + '\n'  
            error = error + traceback.format_exc()
            print error
 
 
-#This class runs test cases with class execution, compilatation
+# \brief This class runs test cases with class {execution, compilatation}
+# \param threadID number of thread (for book keeping)
+# \param name string of threadname (for book keeping)
+# \param machine machine name on which to run the command
+# \param logdirOAI5GRepo directory on remote machine which as openairinterface5g repo installed
+# \param testcasename name of test case to run on remote machine
+# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml)
+# \param user username with which to login
+# \param password password with which to login
+# \param timeout timeout of command in seconds
+# \param ExmimoRfStop command to stop EXMIMO Card
 class testCaseThread_generic (threading.Thread):
-   def __init__(self, threadID, name, machine, logdirOAI5GRepo, testcasename,oldprogramList, CleanupAluLteBox, password, timeout, ExmimoRfStop):
+   def __init__(self, threadID, name, machine, logdirOAI5GRepo, testcasename,oldprogramList, CleanupAluLteBox, user, password, timeout, ExmimoRfStop):
        threading.Thread.__init__(self)
        self.threadID = threadID
        self.name = name
@@ -339,16 +387,17 @@ class testCaseThread_generic (threading.Thread):
        self.CleanupAluLteBox = CleanupAluLteBox
        self.password=password
        self.ExmimoRfStop = ExmimoRfStop
+       self.user = user
    def run(self):
      try:
        mypassword=''
        #addsudo = 'echo \'' + mypassword + '\' | sudo -S -E '
        addpass = 'echo \'' + mypassword + '\' | '
-       user = getpass.getuser()
+       #user = getpass.getuser()
        print "Starting test case : " + self.testcasename + " On machine " + self.machine + " timeout = " + str(self.timeout) 
        oai = openair('localdomain',self.machine)
-       oai.connect(user, self.password)
-       cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop)
+       oai.connect(self.user, self.password)
+       #cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop)
        logdir_local = os.environ.get('OPENAIR_DIR')
        logdir_local_testcase = logdir_local +'/cmake_targets/autotests/log/'+ self.testcasename
        logdir_local_base = logdir_local +'/cmake_targets/autotests/log/'
@@ -380,15 +429,15 @@ class testCaseThread_generic (threading.Thread):
        #Now we copy all the remote files
        #ssh = SSHSession(self.machine , username=user, key_file=None, password=self.password)
        #ssh.get_all(logdir_remote_testcase , logdir_local_base)
-       SSHSessionWrapper(self.machine, user, None, self.password, logdir_remote_testcase, logdir_local_base)
+       SSHSessionWrapper(self.machine, self.user, None, self.password, logdir_remote_testcase, logdir_local_base, "get_all")
        print "Finishing test case : " + self.testcasename + " On machine " + self.machine
-       cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop)
+       #cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop)
        #oai.kill(user,mypassword)
        oai.disconnect()
      except Exception, e:
          error=''
          error = error + ' In Class = testCaseThread_generic,  function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: '  + str(e.__class__) + " : " + str( e)
-         error = error + '\n threadID = ' + str(self.threadID) + '\n threadName = ' + self.name + '\n testcasename = ' + self.testcasename + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo +  '\n' + '\n timeout = ' + str(self.timeout)  
+         error = error + '\n threadID = ' + str(self.threadID) + '\n threadName = ' + self.name + '\n testcasename = ' + self.testcasename + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo +  '\n' + '\n timeout = ' + str(self.timeout)  + '\n user = ' + self.user
          error = error + traceback.format_exc()
          print error
          print "Continuing with next test case..."
@@ -396,12 +445,25 @@ class testCaseThread_generic (threading.Thread):
 
 
        
-   
+# \bried function to run a command as a sudo
+# \param cmd command as a string
+# \param password password to be supplied   
 def addsudo (cmd, password=""):
   cmd = 'echo \'' + password + '\' | sudo -S -E bash -c \' ' + cmd + '\' '
   return cmd
 
-def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, password, CleanupAluLteBox,timeout, ExmimoRfStop):
+# \brief handler for executing test cases (compilation, execution)
+# \param name of testcase
+# \param threadListGeneric list of threads which are already running on remote machines
+# \param oldprogramList list of programs which must be terminated before running a test case
+# \param logdirOAI5GRepo directory on remote machine which as openairinterface5g repo installed
+# \param MachineList list of all machines on which generic test cases can be run
+# \param user username with which to login
+# \param password password with which to login
+# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml)
+# \param timeout timeout of command in seconds
+# \param ExmimoRfStop command to stop EXMIMO Card
+def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, user, password, CleanupAluLteBox,timeout, ExmimoRfStop):
   try:
     mypassword=password
     MachineListFree=[]
@@ -439,7 +501,7 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis
        print "MachineListBusy = " + ','.join(MachineListBusy)
        print "MachineList = " + ','.join(MachineList)
     machine = MachineListFree[0]
-    thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+ "machine_", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, password, timeout, ExmimoRfStop)
+    thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+ "machine_", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, user, password, timeout, ExmimoRfStop)
     param={"thread_id":thread, "Machine":machine, "testcasename":testcasename}
     thread.start()
     threadListNew.append(param)
@@ -447,13 +509,15 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis
   except Exception, e:
      error=''
      error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: '  + str(e.__class__) + " : " + str( e)
-     error = error + '\n testcasename = ' + testcasename + '\n logdirOAI5GRepo = ' + logdirOAI5GRepo + '\n MachineList = ' + ','.join(MachineList) + '\n timeout = ' + str(timeout) +  '\n'  
+     error = error + '\n testcasename = ' + testcasename + '\n logdirOAI5GRepo = ' + logdirOAI5GRepo + '\n MachineList = ' + ','.join(MachineList) + '\n timeout = ' + str(timeout) +  '\n' + 'user = ' + user
      error = error + traceback.format_exc()
      print error
      print "Continuing..."
      #sys.exit(1)
 
-#Blocking wait for all threads related to generic testcase execution, class (compilation and execution)
+# \brief Blocking wait for all threads related to generic testcase execution, class (compilation and execution)
+# \param threadListGeneric list of threads which are running on remote machines
+# \param timeout time to wait on threads in seconds
 def wait_testcaseclass_generic_threads(threadListGeneric, timeout = 1):
    threadListGenericNew=[]
    for param in threadListGeneric:
@@ -471,22 +535,36 @@ def wait_testcaseclass_generic_threads(threadListGeneric, timeout = 1):
          #threadListGeneric.remove(param)
    return threadListGenericNew
 
-#Function to handle test case class : lte-softmodem
-def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, password, CleanUpAluLteBox, ExmimoRfStop):
+
+# \brief handler for executing test cases (lte-softmodem)
+# \param testcase name of testcase
+# \param oldprogramList list of programs which must be terminated before running a test case
+# \param logdirOAI5GRepo directory on remote machine which has openairinterface5g repo installed
+# \param logdirOpenaircnRepo directory on remote machine which has openair-cn repo installed
+# \param MachineList list of all machines on which test cases can be run
+# \param user username with which to login
+# \param password password with which to login
+# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml)
+# \param ExmimoRfStop command to stop EXMIMO Card
+# \param nruns_lte-softmodem global parameter to override number of runs (nruns) within the test case
+def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, user, password, CleanUpAluLteBox, ExmimoRfStop, nruns_lte_softmodem):
   #We ignore the password sent to this function for secuirity reasons for password present in log files
   #It is recommended to add a line in /etc/sudoers that looks something like below. The line below will run sudo without password prompt
   # your_user_name ALL=(ALL:ALL) NOPASSWD: ALL
   mypassword=''
   #addsudo = 'echo \'' + mypassword + '\' | sudo -S -E '
   addpass = 'echo \'' + mypassword + '\' | '
-  user = getpass.getuser()
+  #user = getpass.getuser()
   testcasename = testcase.get('id')
   testcaseclass = testcase.findtext('class',default='')
   timeout_cmd = testcase.findtext('TimeOut_cmd',default='')
   timeout_cmd = int(float(timeout_cmd))
   #Timeout_thread is more than that of cmd to have room for compilation time, etc
   timeout_thread = timeout_cmd + 300 
-  nruns = testcase.findtext('nruns',default='')
+  if nruns_lte_softmodem == '':
+    nruns = testcase.findtext('nruns',default='')
+  else:
+    nruns = nruns_lte_softmodem
   nruns = int(float(nruns))
   tags = testcase.findtext('tags',default='')
   eNBMachine = testcase.findtext('eNB',default='')
@@ -548,9 +626,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
   oai_EPC.connect(user, password)
   res = oai_eNB.send_recv(cmd)
 
-  cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
-  cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
-  cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
+  #cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
+  #cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
+  #cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
   logdir_eNB = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename
   logdir_UE =  logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename
   logdir_EPC = logdirOpenaircnRepo+'/TEST/autotests/log/'+ testcasename
@@ -616,13 +694,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
     task_eNB = task_eNB + 'env |grep OPENAIR  \n' + 'array_exec_pid=() \n'
 
     if eNB_pre_exec != "":
-       task_eNB  = task_eNB +  ' ( ' + eNB_pre_exec + ' '+ eNB_pre_exec_args + ' ) > ' + logfile_pre_exec_eNB + ' 2>&1 \n'
+       task_eNB  = task_eNB +  ' ( date; ' + eNB_pre_exec + ' '+ eNB_pre_exec_args + ' ) > ' + logfile_pre_exec_eNB + ' 2>&1 \n'
     if eNB_main_exec != "":
-       task_eNB = task_eNB + ' ( ' + addsudo(eNB_main_exec + ' ' + eNB_main_exec_args, mypassword) + ' ) > ' + logfile_exec_eNB + ' 2>&1 & \n'
+       task_eNB = task_eNB + ' ( date; ' + addsudo(eNB_main_exec + ' ' + eNB_main_exec_args, mypassword) + ' ) > ' + logfile_exec_eNB + ' 2>&1 & \n'
        task_eNB = task_eNB + 'array_exec_pid+=($!) \n'
        task_eNB = task_eNB + 'echo eNB_main_exec PID = $! \n'
     if eNB_traffic_exec != "":
-       task_eNB = task_eNB + ' ( ' + eNB_traffic_exec + ' ' + eNB_traffic_exec_args + ' ) > ' + logfile_traffic_eNB + ' 2>&1 & \n '
+       task_eNB = task_eNB + ' (date;  ' + eNB_traffic_exec + ' ' + eNB_traffic_exec_args + ' ) > ' + logfile_traffic_eNB + ' 2>&1 & \n '
        task_eNB = task_eNB + 'array_exec_pid+=($!) \n'
        task_eNB = task_eNB + 'echo eNB_traffic_exec PID = $! \n'
     #terminate the eNB test case after timeout_cmd seconds
@@ -662,13 +740,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
     task_UE = task_UE + 'source cmake_targets/tools/build_helper \n'
     task_UE = task_UE + 'env |grep OPENAIR  \n'
     if UE_pre_exec != "":
-       task_UE  = task_UE +  ' ( ' + UE_pre_exec + ' '+ UE_pre_exec_args + ' ) > ' + logfile_pre_exec_UE + ' 2>&1 \n'
+       task_UE  = task_UE +  ' ( date; ' + UE_pre_exec + ' '+ UE_pre_exec_args + ' ) > ' + logfile_pre_exec_UE + ' 2>&1 \n'
     if UE_main_exec != "":
-       task_UE = task_UE + ' ( ' + addsudo(UE_main_exec + ' ' + UE_main_exec_args, mypassword)  + ' ) > ' + logfile_exec_UE + ' 2>&1 & \n'
+       task_UE = task_UE + ' ( date;  ' + addsudo(UE_main_exec + ' ' + UE_main_exec_args, mypassword)  + ' ) > ' + logfile_exec_UE + ' 2>&1 & \n'
        task_UE = task_UE + 'array_exec_pid+=($!) \n'
        task_UE = task_UE + 'echo UE_main_exec PID = $! \n'
     if UE_traffic_exec != "":
-       task_UE = task_UE + ' ( ' + UE_traffic_exec + ' ' + UE_traffic_exec_args + ' ) >' + logfile_traffic_UE + ' 2>&1 & \n'
+       task_UE = task_UE + ' ( date;  ' + UE_traffic_exec + ' ' + UE_traffic_exec_args + ' ) >' + logfile_traffic_UE + ' 2>&1 & \n'
        task_UE = task_UE + 'array_exec_pid+=($!) \n'
        task_UE = task_UE + 'echo UE_traffic_exec PID = $! \n'
     #terminate the UE test case after timeout_cmd seconds
@@ -693,7 +771,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
 
     task_EPC_compile = ' ( uname -a ; date \n'
     task_EPC_compile = task_EPC_compile + 'array_exec_pid=()' + '\n'
-    task_EPC_compile = task_EPC_compile + 'cd ' + logdirOpenaircnRepo + '\n'
+    task_EPC_compile = task_EPC_compile + 'cd ' + logdirOpenaircnRepo + ' ; source oaienv \n'
     task_EPC_compile = task_EPC_compile + update_config_file(oai_EPC, EPC_config_file, logdirOpenaircnRepo, logdirOpenaircnRepo+'/TEST/autotests/tools/search_repl.py') + '\n'
     task_EPC_compile = task_EPC_compile +  'source BUILD/TOOLS/build_helper \n'
     if EPC_compile_prog != "":
@@ -705,20 +783,20 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
     
     task_EPC = ' ( uname -a ; date \n'
     task_EPC = task_EPC + 'array_exec_pid=()' + '\n'
-    task_EPC = task_EPC + 'cd ' + logdirOpenaircnRepo + '\n'
+    task_EPC = task_EPC + 'cd ' + logdirOpenaircnRepo + '; source oaienv\n'
     task_EPC = task_EPC +  'source BUILD/TOOLS/build_helper \n'
     if EPC_pre_exec != "":
-       task_EPC  = task_EPC +  ' ( ' + EPC_pre_exec + ' '+ EPC_pre_exec_args + ' ) > ' + logfile_pre_exec_EPC + ' 2>&1 \n'
+       task_EPC  = task_EPC +  ' ( date; ' + EPC_pre_exec + ' '+ EPC_pre_exec_args + ' ) > ' + logfile_pre_exec_EPC + ' 2>&1 \n'
     if HSS_main_exec !=  "":
-       task_EPC  = task_EPC + '(' + addsudo (HSS_main_exec + ' ' + HSS_main_exec_args, mypassword) + ' ) > ' + logfile_exec_HSS  +  ' 2>&1   & \n'
+       task_EPC  = task_EPC + '( date; ' + addsudo (HSS_main_exec + ' ' + HSS_main_exec_args, mypassword) + ' ) > ' + logfile_exec_HSS  +  ' 2>&1   & \n'
        task_EPC = task_EPC + 'array_exec_pid+=($!) \n'
        task_EPC = task_EPC + 'echo HSS_main_exec PID = $! \n'
     if EPC_main_exec !=  "":
-       task_EPC  = task_EPC + '(' + addsudo (EPC_main_exec + ' ' + EPC_main_exec_args, mypassword) + ' ) > ' + logfile_exec_EPC  +  ' 2>&1   & \n'
+       task_EPC  = task_EPC + '( date; ' + addsudo (EPC_main_exec + ' ' + EPC_main_exec_args, mypassword) + ' ) > ' + logfile_exec_EPC  +  ' 2>&1   & \n'
        task_EPC = task_EPC + 'array_exec_pid+=($!) \n'
        task_EPC = task_EPC + 'echo EPC_main_exec PID = $! \n'
     if EPC_traffic_exec !=  "":
-       task_EPC  = task_EPC + '(' + EPC_traffic_exec + ' ' + EPC_traffic_exec_args + ' ) > ' + logfile_traffic_EPC  +  ' 2>&1   & \n' 
+       task_EPC  = task_EPC + '( date; ' + EPC_traffic_exec + ' ' + EPC_traffic_exec_args + ' ) > ' + logfile_traffic_EPC  +  ' 2>&1   & \n' 
        task_EPC = task_EPC + 'array_exec_pid+=($!) \n'  
        task_EPC = task_EPC + 'echo EPC_traffic_exec PID = $! \n'
     #terminate the EPC test case after timeout_cmd seconds   
@@ -763,10 +841,11 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
     for t in threads:
        t.join()
     #Now we get the log files from remote machines on the local machine
+    cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
 
-    cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
-    cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
-    cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
+    #cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
+    #cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
+    #cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
     logfile_UE_stop_script_out = logdir_UE + '/UE_stop_script_out' + '_' + str(run) + '_.log'
     logfile_UE_stop_script = logdir_local_testcase + '/UE_stop_script' + '_' + str(run) + '_.log'
 
@@ -785,17 +864,17 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
     print "Copying files from EPCMachine : " + EPCMachine + "logdir_EPC = " + logdir_EPC
     #ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password)
     #ssh.get_all(logdir_EPC , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
-    SSHSessionWrapper(EPCMachine, user, None, password, logdir_EPC, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
+    SSHSessionWrapper(EPCMachine, user, None, password, logdir_EPC, logdir_local + '/cmake_targets/autotests/log/'+ testcasename, "get_all")
 
     print "Copying files from eNBMachine " + eNBMachine + "logdir_eNB = " + logdir_eNB
     #ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password)
     #ssh.get_all(logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
-    SSHSessionWrapper(eNBMachine, user, None, password, logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
+    SSHSessionWrapper(eNBMachine, user, None, password, logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename, "get_all")
 
     print "Copying files from UEMachine : " + UEMachine + "logdir_UE = " + logdir_UE
     #ssh = SSHSession(UEMachine , username=user, key_file=None, password=password)
     #ssh.get_all(logdir_UE , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
-    SSHSessionWrapper(UEMachine, user, None, password, logdir_UE, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
+    SSHSessionWrapper(UEMachine, user, None, password, logdir_UE, logdir_local + '/cmake_targets/autotests/log/'+ testcasename, "get_all")
 
 
     
@@ -839,7 +918,10 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
   write_file(xmlFile, xml, mode="w")
 
 
-#This function searches if test case is present in list of test cases that need to be executed by user
+# \brief This function searches if test case is present in list of test cases that need to be executed by user
+# \param testcasename the test case to search for
+# \param testcasegroup list that is passed from the arguments
+# \param test_case_exclude list of test cases excluded from execution (specified in test_case_list.xml)
 def search_test_case_group(testcasename, testcasegroup, test_case_exclude):
     
     if test_case_exclude != "":
@@ -869,70 +951,129 @@ def search_test_case_group(testcasename, testcasegroup, test_case_exclude):
            if match >=0:
              return True
     return False
-   
-       
 
-#thread1 = myThread(1, "Thread-1", 1)
+# \brief thread that cleans up remote machines from pre-existing test case executions
+# \param threadID number of thread (for book keeping)
+# \param threadname name of thread (for book keeping)
+# \param oai handler that can be used to execute programs on remote machines
+# \param CleanUpOldProgs list of programs which must be terminated before running a test case (specified in test_case_list.xml)
+# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml)
+# \param ExmimoRfStop command to stop EXMIMO Card
+class oaiCleanOldProgramThread (threading.Thread):
+    def __init__(self, threadID, threadname, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop):
+        threading.Thread.__init__(self)
+        self.threadID = threadID
+        self.threadname = threadname
+        self.oai = oai
+        self.CleanUpOldProgs = CleanUpOldProgs
+        self.CleanUpAluLteBox = CleanUpAluLteBox
+        self.ExmimoRfStop = ExmimoRfStop
+    def run(self):
+        try:
+          cleanOldPrograms(self.oai, self.CleanUpOldProgs, self.CleanUpAluLteBox, self.ExmimoRfStop)
+        except Exception, e:
+           error=''
+           error = error + ' In class oaiCleanOldProgramThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: '  + str(e.__class__) + " : " + str( e)
+           error = error + '\n threadID = ' + str(self.threadID) + '\n threadname = ' + self.threadname + '\n CleanUpOldProgs = ' + self.CleanUpOldProgs + '\n CleanUpAluLteBox = ' + self.CleanUpAluLteBox + '\n ExmimoRfStop = ' + self.ExmimoRfStop + '\n'  
+           error = error + traceback.format_exc()
+           print error
+
+# \brief Run parallel threads in all machines for clean up old execution of test cases
+# \param oai_list list of handlers that can be used to execute programs on remote machines
+# \param CleanUpOldProgs list of programs which must be terminated before running a test case (specified in test_case_list.xml)
+# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml)
+# \param ExmimoRfStop command to stop EXMIMO Card
+def cleanOldProgramsAllMachines(oai_list, CleanOldProgs, CleanUpAluLteBox, ExmimoRfStop):
+   threadId=0
+   threadList=[]
+   for oai in oai_list:
+      threadName="cleanup_thread_"+str(threadId)
+      thread=oaiCleanOldProgramThread(threadId, threadName, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop)
+      threadList.append(thread)
+      thread.start()
+      threadId = threadId + 1
+   for t in threadList:
+      t.join()
+
+
 debug = 0
 pw =''
 i = 0
 dlsim=0
 localshell=0
-is_compiled = 0
-timeout=2000
-xmlInputFile="./test_case_list.xml"
-NFSResultsDir = '/mnt/sradio'
-cleanupOldProgramsScript = '$OPENAIR_DIR/cmake_targets/autotests/tools/remove_old_programs.bash'
+GitOAI5GRepoBranch=''
+GitOAI5GHeadVersion=''
+user=''
+pw=''
 testcasegroup=''
-
-logdir = '/tmp/' + 'OAITestFrameWork-' + getpass.getuser() + '/'
-logdirOAI5GRepo = logdir + 'openairinterface5g/'
-logdirOpenaircnRepo = logdir + 'openair-cn/'
-
+NFSResultsShare=''
+cleanUpRemoteMachines=False
 openairdir_local = os.environ.get('OPENAIR_DIR')
 if openairdir_local is None:
    print "Environment variable OPENAIR_DIR not set correctly"
    sys.exit()
-locallogdir = openairdir_local + '/cmake_targets/autotests/log/'
-#Remove  the contents of local log directory
-#os.system(' rm -fr ' + locallogdir + '; mkdir -p ' +  locallogdir  )
+locallogdir = openairdir_local + '/cmake_targets/autotests/log'
+MachineList = ''
+MachineListGeneric=''
 flag_remove_logdir=False
 i=1
+
+print "Number of arguments argc = " + str(len(sys.argv))
+
 while i < len (sys.argv):
     arg=sys.argv[i]
-    if arg == '-d':
-        debug = 1
-    elif arg == '-dd':
-        debug = 2
-    elif arg == '-p' :
-        prompt2 = sys.argv[i+1]
-        i = i +1
-    elif arg == '-r':
+    if arg == '-r':
         flag_remove_logdir=True 
-    elif arg == '-w' :
-        pw = sys.argv[i+1]
-        i = i +1  
-    elif arg == '-P' :
-        dlsim = 1
-    elif arg == '-l' :
-        localshell = 1
-    elif arg == '-c' :
-        is_compiled = 1
-    elif arg == '-t' :
-        timeout = sys.argv[i+1]
-        i = i +1  
     elif arg == '-g' :
         testcasegroup = sys.argv[i+1].replace("\"","")
         i = i +1   
+    elif arg == '-c':
+        cleanUpRemoteMachines=True
+    elif arg == '-5GRepoBranch':
+        GitOAI5GRepoBranch = sys.argv[i+1]
+        i = i +1
+    elif arg == '-5GRepoHeadVersion':
+        GitOAI5GHeadVersion = sys.argv[i+1]
+        #We now find the branch that corresponds to this Git Head Commit
+        cmd = "git show-ref --head " + " | grep " + GitOAI5GHeadVersion
+        cmd_out = subprocess.check_output ([cmd], shell=True)
+        cmd_out=cmd_out.replace("\n","")
+        cmd_out = cmd_out.split('/')
+        GitOAI5GRepoBranch = cmd_out[-1]
+        if GitOAI5GRepoBranch == '':
+           print "Error extracting GitBranch from head commit. Exiting now..."
+           sys.exit(1)
+        i = i +1
+    elif arg == '-u':
+        user = sys.argv[i+1]
+        i = i +1
+    elif arg == '-p': 
+        pw = sys.argv[i+1]
+        i = i +1
+    elif arg == '-n': 
+        NFSResultsShare = sys.argv[i+1]
+        i = i +1
+    elif arg == '-MachineList':
+        MachineList =  sys.argv[i+1]
+        MachineList = MachineList.replace("\"","")
+        MachineList = MachineList.replace("\'","")
+        i = i +1
+    elif arg == '-MachineListGeneric':
+        MachineListGeneric =  sys.argv[i+1]
+        MachineListGeneric = MachineListGeneric.replace("\"","")
+        MachineListGeneric = MachineListGeneric.replace("\'","")
+        i = i +1
     elif arg == '-h' :
-        print "-d:  low debug level"
-        print "-dd: high debug level"
-        print "-p:  set the prompt"
         print "-r:  Remove the log directory in autotests"
         print "-g:  Run test cases in a group"
-        print "-w:  set the password for ssh to localhost"
-        print "-l:  use local shell instead of ssh connection"
-        print "-t:  set the time out in second for commands"
+        print "-c:  Run cleanup scripts on remote machines and exit"
+        print "-5GRepoBranch:  Branch for OAI 5G Repository to run tests (overrides the branch in test_case_list.xml)"
+        print "-5GRepoHeadVersion:  Head commit on which to run tests (overrides the branch in test_case_list.xml)"
+        print "-u:  use the user name passed as argument"
+        print "-p:  use the password passed as an argument"
+        print "-n:  Set the NFS share passed as an argument"
+        print "-MachineList : overrides the MachineList parameter in test_case_list.xml"
+        print "-MachineListGeneric : overrides the MachineListGeneric  parameter in test_case_list.xml"
         sys.exit()
     else :
         print "Unrecongnized Option: <" + arg + ">. Use -h to see valid options"
@@ -957,27 +1098,46 @@ except KeyError:
    print "Please set the environment variable OPENAIR_TARGETS in the .bashrc"
    sys.exit(1)
 
-if flag_remove_logdir == True:
-   print "Removing directory: " + locallogdir
-   os.system(' rm -fr ' + locallogdir + '; mkdir -p ' +  locallogdir  )
+print "Killing zombie ssh sessions from earlier sessions..."
+cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 '
+os.system(cmd)
 
 
 
-paramiko_logfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/log/paramiko.log')
-res=os.system(' echo > ' + paramiko_logfile)
-paramiko.util.log_to_file(paramiko_logfile)
-
 # get the oai object
 host = os.uname()[1]
 #oai = openair('localdomain','calisson')
-oai_list = {}
-
+oai_list = []
 
 #start_time = time.time()  # datetime.datetime.now()
-user = getpass.getuser()
+if user=='':
+  user = getpass.getuser()
+if pw=='':
+  pw = getpass.getpass()
+
+print "Killing zombie ssh sessions from earlier sessions..."
+cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 '
+cmd = cmd + '; ps aux |grep \"/usr/bin/ssh -q -l ' + user + '\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 '
+os.system(cmd)
+
 print "host = " + host 
 print "user = " + user
-pw=getpass.getpass()
+xmlInputFile=os.environ.get('OPENAIR_DIR')+"/cmake_targets/autotests/test_case_list.xml"
+NFSResultsDir = '/mnt/sradio'
+cleanupOldProgramsScript = '$OPENAIR_DIR/cmake_targets/autotests/tools/remove_old_programs.bash'
+logdir = '/tmp/' + 'OAITestFrameWork-' + user + '/'
+logdirOAI5GRepo = logdir + 'openairinterface5g/'
+logdirOpenaircnRepo = logdir + 'openair-cn/'
+
+if flag_remove_logdir == True:
+   print "Removing directory: " + locallogdir
+   os.system(' rm -fr ' + locallogdir + '; mkdir -p ' +  locallogdir  )
+
+paramiko_logfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/log/paramiko.log')
+res=os.system(' echo > ' + paramiko_logfile)
+paramiko.util.log_to_file(paramiko_logfile)
+
+#pw=getpass.getpass()
 
 #Now we parse the xml file for basic configuration
 xmlTree = ET.parse(xmlInputFile)
@@ -985,52 +1145,57 @@ xmlRoot = xmlTree.getroot()
 
 
 
-
-MachineList = xmlRoot.findtext('MachineList',default='')
+if MachineList =='':
+   MachineList = xmlRoot.findtext('MachineList',default='')
 NFSResultsShare = xmlRoot.findtext('NFSResultsShare',default='')
 GitOpenaircnRepo = xmlRoot.findtext('GitOpenair-cnRepo',default='')
 GitOAI5GRepo = xmlRoot.findtext('GitOAI5GRepo',default='')
-GitOAI5GRepoBranch = xmlRoot.findtext('GitOAI5GRepoBranch',default='')
+
+if GitOAI5GRepoBranch == '':
+   GitOAI5GRepoBranch = xmlRoot.findtext('GitOAI5GRepoBranch',default='')
+
 GitOpenaircnRepoBranch = xmlRoot.findtext('GitOpenair-cnRepoBranch',default='')
 CleanUpOldProgs = xmlRoot.findtext('CleanUpOldProgs',default='')
 CleanUpAluLteBox = xmlRoot.findtext('CleanUpAluLteBox',default='')
 Timeout_execution = int (xmlRoot.findtext('Timeout_execution'))
-MachineListGeneric = xmlRoot.findtext('MachineListGeneric',default='')
+if MachineListGeneric == '':
+   MachineListGeneric = xmlRoot.findtext('MachineListGeneric',default='')
 TestCaseExclusionList = xmlRoot.findtext('TestCaseExclusionList',default='')
 ExmimoRfStop = xmlRoot.findtext('ExmimoRfStop',default='')
+nruns_lte_softmodem = xmlRoot.findtext('nruns_lte-softmodem',default='')
+
 print "MachineList = " + MachineList
 print "GitOpenair-cnRepo = " + GitOpenaircnRepo
 print "GitOAI5GRepo = " + GitOAI5GRepo
 print "GitOAI5GBranch = " + GitOAI5GRepoBranch
 print "GitOpenaircnRepoBranch = " + GitOpenaircnRepoBranch
 print "NFSResultsShare = " + NFSResultsShare
-cmd = "git show-ref --heads -s "+ GitOAI5GRepoBranch
-GitOAI5GHeadVersion = subprocess.check_output ([cmd], shell=True)
+print "nruns_lte_softmodem = " + nruns_lte_softmodem
+
+if GitOAI5GHeadVersion == '':
+  cmd = "git show-ref --heads -s "+ GitOAI5GRepoBranch
+  GitOAI5GHeadVersion = subprocess.check_output ([cmd], shell=True)
+  GitOAI5GHeadVersion=GitOAI5GHeadVersion.replace("\n","")
+
 print "GitOAI5GHeadVersion = " + GitOAI5GHeadVersion
 print "CleanUpOldProgs = " + CleanUpOldProgs
 print "Timeout_execution = " + str(Timeout_execution)
 
-MachineList = MachineList.split()
-MachineListGeneric = MachineListGeneric.split()
-
-index=0
-for machine in MachineList: 
-  oai_list[index] = openair('localdomain',machine)
-  index = index + 1
-
-
-#myThread (1,"sddsf", 1)
-
-
-#thread1 = oaiThread1(1, "Thread-1", 1)
-#def __init__(self, threadID, name, counter, oai, cmd, sudo, timeout):
-
-#sys.exit()
-
+if GitOAI5GHeadVersion == '':
+  print "Error getting the OAI5GBranch Head version...Exiting"
+  sys.exit()
 
+NFSTestsResultsDir = NFSResultsShare + '/'+ GitOAI5GRepoBranch + '/' + GitOAI5GHeadVersion
 
+print "NFSTestsResultsDir = " + NFSTestsResultsDir
 
+MachineList = MachineList.split()
+MachineListGeneric = MachineListGeneric.split()
 
+#index=0
+for machine in MachineList: 
+  oai_list.append( openair('localdomain',machine))
+  #index = index + 1
 
 
 print "\nTesting the sanity of machines used for testing..."
@@ -1049,14 +1214,6 @@ if localshell == 0:
               #print "password: " + pw 
            # issues in ubuntu 12.04
            oai_list[index].connect(user,pw)
-           #print "result = " + result
-           
-
-           #print '\nCleaning Older running programs : ' + CleanUpOldProgs
-           #cleanOldPrograms(oai_list[index], CleanUpOldProgs)
-
-
-
            print '\nChecking for sudo permissions on machine <'+machine+'>...'
            result = oai_list[index].send_expect_false('sudo -S -v','may not run sudo',True)
            print "Sudo permissions..." + result
@@ -1087,39 +1244,18 @@ else:
     pw = ''
     oai_list[0].connect_localshell()
 
-
-
-
-
-cpu_freq = int(oai_list[0].cpu_freq())
-if timeout == 2000 : 
-    if cpu_freq <= 2000 : 
-        timeout = 3000
-    elif cpu_freq < 2700 :
-        timeout = 2000 
-    elif cpu_freq < 3300 :
-        timeout = 1500
-print "cpu freq(MHz): " + str(cpu_freq) + "timeout(s): " + str(timeout)
-
-# The log files are stored in branch/version/
-
-
-
-#result = oai_list[0].send('uname -a ' )
-#print result
-
 #We now prepare the machines for testing
-#index=0
+index=0
 threads_init_setup=[]
-for index in oai_list:
+for oai in oai_list:
   try:
       print "setting up machine: " + MachineList[index]
       #print oai_list[oai].send_recv('echo \''+pw+'\' |sudo -S -v')
       #print oai_list[oai].send_recv('sudo su')
       #print oai_list[oai].send_recv('who am i') 
       #cleanUpPrograms(oai_list[oai]
-      cmd =  'mkdir -p ' + logdir + ' ; rm -fr ' + logdir + '/*'
-      result = oai_list[index].send_recv(cmd)
+      cmd = 'sudo -S -E rm -fr ' + logdir + ' ; mkdir -p ' + logdir 
+      result = oai.send_recv(cmd)
      
       setuplogfile  = logdir  + '/setup_log_' + MachineList[index] + '_.txt'
       setup_script  = locallogdir  + '/setup_script_' + MachineList[index] +  '_.txt'
@@ -1128,54 +1264,30 @@ for index in oai_list:
       #cmd = cmd + 'mkdir -p ' + logdir + '\n'
       cmd = cmd + 'cd '+ logdir   + '\n'
       cmd = cmd + 'git config --global http.sslVerify false \n' 
-      cmd = cmd + 'git clone '+ GitOAI5GRepo  + '\n'
-      cmd = cmd + 'git clone '+ GitOpenaircnRepo   + '\n'
+      cmd = cmd + 'git clone --depth 1 '+ GitOAI5GRepo  + ' -b ' + GitOAI5GRepoBranch +' \n'
+      cmd = cmd + 'git clone '+ GitOpenaircnRepo + ' -b ' +GitOpenaircnRepoBranch +  ' \n'
       cmd = cmd +  'cd ' + logdirOAI5GRepo  + '\n'
-      cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion   + '\n'
+      cmd = cmd + 'git checkout ' + GitOAI5GRepoBranch   + '\n'                      
+      #cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion   + '\n'
+      cmd = cmd + 'git_head=`git ls-remote |grep \'' + GitOAI5GRepoBranch + '\'` \n'
+      cmd = cmd + 'git_head=($git_head) \n'
+      cmd = cmd + 'git_head=${git_head[0]} \n'
+      cmd = cmd + 'echo \"GitOAI5GHeadVersion_remote = $git_head\"'
+      cmd = cmd + 'echo \"GitOAI5GHeadVersion_local = ' + GitOAI5GHeadVersion + '\" \n'
+      cmd = cmd + 'if [ \"$git_head\" != \"'+ GitOAI5GHeadVersion + '\" ]; then echo \"error: Git openairinterface5g head version does not match\" ; fi \n'
       cmd = cmd + 'source oaienv'   + '\n'
       cmd = cmd +  'cd ' + logdirOpenaircnRepo  + '\n'
       cmd = cmd +  'git checkout ' + GitOpenaircnRepoBranch  + '\n'
       cmd = cmd +  'env |grep OPENAIR'  + '\n'
       cmd = cmd + ' cd ' + logdir   + '\n'
-      cmd = cmd + ' ) > ' +  setuplogfile + ' 2>&1   '
+      cmd = cmd + ' ) > ' +  setuplogfile + ' 2>&1 \n'
       #cmd = cmd + 'echo \' ' + cmd  + '\' > ' + setup_script + ' 2>&1 \n '
       #result = oai_list[index].send_recv(cmd, False, 300 )
       write_file(setup_script, cmd, mode="w")
       tempThread = oaiThread(index, 'thread_setup_'+str(index)+'_' + MachineList[index] , MachineList[index] , user, pw, cmd, False, 300)
       threads_init_setup.append(tempThread )
       tempThread.start()
-
-      #localfile = locallogdir + '/setup_log_' + MachineList[index] + '_.txt'
-      #remotefile = logdir  + '/setup_log_' + MachineList[index] + '_.txt'
-
-      #sftp_log = os.path.expandvars(locallogdir + '/sftp_module.log')
-      #sftp_module (user, pw, MachineList[index], 22, localfile, remotefile, sftp_log, "get")
-
-
-      #Now we copy test_case_list.xml on the remote machines
-      #localfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/test_case_list.xml')
-      #remotefile = logdirOAI5GRepo + '/cmake_targets/autotests/test_case_list.xml'
-
-      #sftp_log = os.path.expandvars(locallogdir + '/sftp_module.log')
-      #sftp_module (user, pw, MachineList[index], 22, localfile, remotefile, sftp_log, "put")
-
-
-      #print oai_list[index].send('rm -fR ' +  logdir)
-      #print oai_list[index].send('mkdir -p ' + logdir)
-      #print oai_list[index].send('cd '+ logdir)
-      #print oai_list[index].send('git clone '+ GitOAI5GRepo )
-      #print oai_list[index].send('git clone '+ GitOpenaircnRepo)
-      #print oai_list[index].send('cd ' + logdirOAI5GRepo)
-      #print oai_list[index].send('git checkout ' + GitOAI5GHeadVersion)
-      #print oai_list[index].send('source oaienv')
-      #print oai_list[index].send('cd ' + logdirOpenaircnRepo)
-      #print oai_list[index].send('git checkout ' + GitOpenaircnRepoBranch)
-      #print oai_list[index].send_recv('cd ' + logdirOAI5GRepo)
-      #print oai_list[index].send_recv('source oaienv')
-      #print oai_list[index].send_recv('env |grep OPENAIR')
-
-      #print '\nCleaning Older running programs : ' + CleanUpOldProgs
-      #cleanOldPrograms(oai_list[index], CleanUpOldProgs)
+      index = index + 1
   except Exception, e:
          print 'There is error in one of the commands to setup the machine '+ MachineList[index] 
          error=''
@@ -1205,8 +1317,10 @@ for t in threads_init_setup:
    paramList.append ( {"operation":'put', "localfile":localfile, "remotefile":remotefile} )
    sftp_log = os.path.expandvars(locallogdir + '/sftp_module.log')
    sftp_module (user, pw, MachineList[index], port, paramList, sftp_log)
-   index = index+1
-   
+
+   cmd =  '  cd ' + logdirOAI5GRepo + ' ; source oaienv ; env|grep OPENAIR \n'
+   res = oai_list[index].send_recv(cmd)
+   index  = index +1
    if os.path.exists(localfile) == 0:
       print "Setup log file <" + localfile + "> missing for machine <" + MachineList[index] + ">.  Please check the setup log files. Exiting now"
       sys.exit(1)
@@ -1214,12 +1328,15 @@ for t in threads_init_setup:
 #Now we process all the test cases
 #Now we check if there was error in setup files
 
-status, out = commands.getstatusoutput('grep ' +  ' -il \'error\' ' + locallogdir + '/setup*')
+status, out = commands.getstatusoutput('grep ' +  ' -il \'error\' ' + locallogdir + '/setup_log*')
 if (out != '') :
   print "There is error in setup of machines"
   print "status  = " + str(status) + "\n Check files for error = " + out
   print sys.exit(1)
 
+cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop)
+if cleanUpRemoteMachines == True:
+  sys.exit(0)
 
 threadListGlobal=[]
 testcaseList=xmlRoot.findall('testCase')
@@ -1243,11 +1360,12 @@ for testcase in testcaseList:
            print "eNBMachine : " + eNBMachine + "UEMachine : " + UEMachine + "EPCMachine : " + EPCMachine + "MachineList : " + ','.join(MachineList)
         print "testcasename = " + testcasename + " class = " + testcaseclass
         threadListGlobal = wait_testcaseclass_generic_threads(threadListGlobal, Timeout_execution)
-        handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, pw, CleanUpAluLteBox, ExmimoRfStop )
+        cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop)
+        handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, user, pw, CleanUpAluLteBox, ExmimoRfStop, nruns_lte_softmodem )
       elif (testcaseclass == 'compilation'): 
-        threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop)
+        threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop)
       elif (testcaseclass == 'execution'): 
-        threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, pw, CleanUpAluLteBox,ExmimoRfStop)
+        threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox, Timeout_execution, ExmimoRfStop)
       else :
         print "Unknown test case class: " + testcaseclass
         sys.exit()
@@ -1262,66 +1380,24 @@ for testcase in testcaseList:
      #sys.exit(1)
 
 
-print "Exiting the test cases execution now..."
+print "Exiting the test cases execution now. Waiting for existing threads to complete..."
 
-for t in threadListGlobal:
-   t.join
-
-sys.exit()
+for param in threadListGlobal:
+   thread_id = param["thread_id"]
+   thread_id.join()
 
-   #+ "class = "+ classx
+print "Creating xml file for overall results..."
+cmd = "cat $OPENAIR_DIR/cmake_targets/autotests/log/*/*.xml > $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml "
+res=os.system(cmd)
 
+print "Now copying files to NFS Share"
+oai_localhost = openair('localdomain','localhost')
+oai_localhost.connect(user,pw)
+cmd = ' rm -fr ' + NFSTestsResultsDir + ' ; mkdir -p ' + NFSTestsResultsDir
+res = oai_localhost.send_recv(cmd)
+print "Deleting NFSTestResults Dir..." + res
 
+print "Copying files from GilabCI Runner Machine : " + host + "locallogdir = " + locallogdir + ", NFSTestsResultsDir = " + NFSTestsResultsDir
+SSHSessionWrapper('localhost', user, None, pw , NFSTestsResultsDir , locallogdir, "put_all")
 
-      #index = index +1
-
-test = 'test01'
-ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d.%Hh%M")
-logfile = user+'.'+test+'.'+ctime+'.txt'  
-logdir = os.getcwd() + '/pre-ci-logs-'+host;
-oai.create_dir(logdir,debug)    
-print 'log dir: ' + logdir
-print 'log file: ' + logfile
-pwd = oai.send_recv('pwd') 
-print "pwd = " + pwd
-result = oai.send('echo linux | sudo -S ls -al;sleep 5')
-print "result =" + result
 sys.exit()
-
-#oai.send_nowait('mkdir -p -m 755' + logdir + ';')
-
-#print '=================start the ' + test + ' at ' + ctime + '=================\n'
-#print 'Results will be reported in log file : ' + logfile
-log.writefile(logfile,'====================start'+test+' at ' + ctime + '=======================\n')
-log.set_debug_level(debug)
-
-oai.kill(user, pw)   
-oai.rm_driver(oai,user,pw)
-
-# start te test cases 
-if is_compiled == 0 :
-    is_compiled=case01.execute(oai, user, pw, host,logfile,logdir,debug,timeout)
-    
-if is_compiled != 0 :
-    case02.execute(oai, user, pw, host, logfile,logdir,debug)
-    case03.execute(oai, user, pw, host, logfile,logdir,debug)
-    case04.execute(oai, user, pw, host, logfile,logdir,debug)
-    case05.execute(oai, user, pw, host, logfile,logdir,debug)
-else :
-    print 'Compilation error: skip test case 02,03,04,05'
-
-oai.kill(user, pw) 
-oai.rm_driver(oai,user,pw)
-
-# perform the stats
-log.statistics(logfile)
-
-
-oai.disconnect()
-
-ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d_%Hh%M")
-log.writefile(logfile,'====================end the '+ test + ' at ' + ctime +'====================')
-print 'Test results can be found in : ' + logfile 
-#print '\nThis test took %f minutes\n' % math.ceil((time.time() - start_time)/60) 
-
-#print '\n=====================end the '+ test + ' at ' + ctime + '====================='
diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml
index ba34085d90ef7b50cf11226852ed65e37b2cda58..2a247bf5e2d6ecef7170c7b015670f2f25de16d5 100644
--- a/cmake_targets/autotests/test_case_list.xml
+++ b/cmake_targets/autotests/test_case_list.xml
@@ -1,17 +1,18 @@
  <testCaseList>
 
-<MachineList>stevens calisson mozart nano amerique</MachineList>
- <NFSResultsShare>/mnt/sradio/TEST_RESULTS</NFSResultsShare>
+<MachineList>mozart calisson stevens nano amerique</MachineList>
+ <NFSResultsShare>/mnt/sradio/TEST_RESULTS/</NFSResultsShare>
  <GitOAI5GRepo>https://gitlab.eurecom.fr/oai/openairinterface5g.git</GitOAI5GRepo>
  <GitOpenair-cnRepo>https://gitlab.eurecom.fr/oai/openair-cn.git</GitOpenair-cnRepo>
- <GitOAI5GRepoBranch>enhancement-57-UHD-interfacing</GitOAI5GRepoBranch>
+ <GitOAI5GRepoBranch>develop</GitOAI5GRepoBranch>
  <GitOpenair-cnRepoBranch>feature-17-test_framework</GitOpenair-cnRepoBranch>
- <CleanUpOldProgs>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* hss hss_sim configure_cots_bandrich_ue* wvdial* run_exec_autotests* iperf</CleanUpOldProgs>	
- <CleanUpAluLteBox>/opt/ltebox/tools/stop_ltebox</CleanUpAluLteBox>
-<ExmimoRfStop>cd $OPENAIR_DIR/cmake_targets/autotests/tools/exmimo; sudo -E -S octave ./exmimo_stop.m</ExmimoRfStop>
+ <CleanUpOldProgs>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* hss hss_sim configure_cots_bandrich_ue* wvdial*  iperf iperf_script ping</CleanUpOldProgs>	
+ <CleanUpAluLteBox>sudo -S -E /opt/ltebox/tools/stop_ltebox</CleanUpAluLteBox>
+<ExmimoRfStop>$OPENAIR_DIR/cmake_targets/build_oai -w EXMIMO -c; sudo -S -E $OPENAIR_DIR/cmake_targets/tools/stop_exmimo2; dmesg|tail</ExmimoRfStop>
  <Timeout_execution>36000</Timeout_execution>
  <TestCaseExclusionList>0104+ 015502 015505  015506 015507 015508 015508 015509 015510 015511 015600 015700 016102 016105</TestCaseExclusionList>
- <MachineListGeneric>calisson stevens mozart nano amerique</MachineListGeneric>
+ <nruns_lte-softmodem>3</nruns_lte-softmodem>
+ <MachineListGeneric>mozart calisson stevens nano amerique</MachineListGeneric>
      <testCase id="010101" >
      <class>compilation</class>
      <desc>Build oaisim.Rel8</desc>
@@ -128,7 +129,7 @@
      <main_exec_args></main_exec_args>
      <search_expr_true></search_expr_true>
      <search_expr_false></search_expr_false>
-     <tags>lte-softmodem_noS1.EXMIMO.Rel10</tags>
+     <tags>lte-softmodem_noS1.BLADERF.Rel10</tags>
      <nruns>1</nruns>
      </testCase> 
 
@@ -858,7 +859,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -871,7 +872,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  1
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 1
@@ -900,9 +901,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -926,7 +927,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
@@ -942,7 +943,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -955,7 +956,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  1
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 1
@@ -984,9 +985,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1010,9 +1011,9 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
-    <EPC_search_expr_true>throughput_test min=2.0Mbits/sec max=2.0Mbits/sec average=2.0Mbits/sec duration=300.0s </EPC_search_expr_true>
+    <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
     <tags>USRPb210.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX</tags>
@@ -1025,7 +1026,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1038,7 +1039,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  1
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 1
@@ -1067,9 +1068,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1093,9 +1094,9 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
-    <EPC_search_expr_true>throughput_test min=4.0Mbits/sec max=4.0Mbits/sec average=4.0Mbits/sec duration=300.0s </EPC_search_expr_true>
+    <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
     <tags>USRPb210.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX</tags>
@@ -1108,7 +1109,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1121,7 +1122,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  1
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 1
@@ -1150,9 +1151,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_terminate_missing_procs>True</UE_terminate_missing_procs>
     <UE_stop_script>sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue </UE_stop_script>
@@ -1176,7 +1177,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo  -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -1190,7 +1191,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1203,7 +1204,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  1
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 1
@@ -1232,9 +1233,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true>throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec duration=300.0s </UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1259,7 +1260,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -1273,7 +1274,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1286,7 +1287,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  1
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 1
@@ -1315,9 +1316,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true>throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec duration=300.0s </UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1342,7 +1343,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -1357,7 +1358,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1370,7 +1371,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  2
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 2
@@ -1399,9 +1400,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue;$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1425,7 +1426,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
@@ -1441,7 +1442,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1454,7 +1455,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  2
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 2
@@ -1483,9 +1484,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue;$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1509,7 +1510,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_true>throughput_test min=2.0Mbits/sec max=2.0Mbits/sec average=2.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
@@ -1524,7 +1525,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1537,7 +1538,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  2
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 2
@@ -1566,9 +1567,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1592,7 +1593,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script  5 lo  -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_true>throughput_test min=4.0Mbits/sec max=4.0Mbits/sec average=4.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
@@ -1607,7 +1608,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1620,7 +1621,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  2
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 2
@@ -1649,9 +1650,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true>throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec duration=300.0s </UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1676,7 +1677,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -1690,7 +1691,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1703,7 +1704,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  2
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 2
@@ -1732,9 +1733,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0  -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true>throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec duration=300.0s </UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1759,7 +1760,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script  60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -1773,7 +1774,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf  mobile_country_code \"208\"
@@ -1786,7 +1787,7 @@
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  downlink_frequency 2660000000L
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  uplink_frequency_offset -120000000
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  tx_gain 90
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 130
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  rx_gain 125
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  frame_type \"FDD\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_rx  2
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf  nb_antennas_tx 2
@@ -1815,9 +1816,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0  -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true>throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec duration=300.0s </UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1842,7 +1843,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -1857,7 +1858,7 @@
     <eNB>mozart</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf  mobile_country_code \"208\"
@@ -1894,9 +1895,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1920,7 +1921,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
@@ -1936,9 +1937,9 @@
     <eNB>mozart</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
-    <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310..conf  tracking_area_code \"1\"
+    <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf  mobile_country_code \"208\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf  mobile_network_code \"92\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf  N_RB_DL 50
@@ -1973,9 +1974,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0  -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -1999,9 +2000,9 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
-    <EPC_search_expr_true>throughput_test min=2.0Mbits/sec max=2.0Mbits/sec average=2.0Mbits/sec duration=300.0s </EPC_search_expr_true>
+    <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
     <tags>USRPx310.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX</tags>
@@ -2014,7 +2015,7 @@
     <eNB>mozart</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  mobile_country_code \"208\"
@@ -2051,9 +2052,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0  -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -2077,9 +2078,9 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script  5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
-    <EPC_search_expr_true>throughput_test min=4.0Mbits/sec max=4.0Mbits/sec average=4.0Mbits/sec duration=300.0s </EPC_search_expr_true>
+    <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
     <tags>USRPx310.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX</tags>
@@ -2092,7 +2093,7 @@
     <eNB>mozart</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf  mobile_country_code \"208\"
@@ -2129,9 +2130,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_terminate_missing_procs>True</UE_terminate_missing_procs>
     <UE_stop_script>sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue </UE_stop_script>
@@ -2155,7 +2156,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -2169,7 +2170,7 @@
     <eNB>mozart</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf  mobile_country_code \"208\"
@@ -2206,9 +2207,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_terminate_missing_procs>True</UE_terminate_missing_procs>
     <UE_stop_script>sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue </UE_stop_script>
@@ -2232,7 +2233,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -2246,18 +2247,18 @@
     <eNB>mozart</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
-    <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  tracking_area_code \"1\"
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  mobile_country_code \"208\"
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  mobile_network_code \"92\"
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  N_RB_DL 100
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";"
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf downlink_frequency 2660000000L
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  uplink_frequency_offset -120000000
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  frame_type \"FDD\"
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  nb_antennas_rx  1
-                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  nb_antennas_tx 1
+    <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  tracking_area_code \"1\"
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  mobile_country_code \"208\"
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  mobile_network_code \"92\"
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  N_RB_DL 100
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";"
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf downlink_frequency 2660000000L
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  uplink_frequency_offset -120000000
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  frame_type \"FDD\"
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  nb_antennas_rx  1
+                     targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  nb_antennas_tx 1
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  ENB_INTERFACE_NAME_FOR_S1_MME       \"eth0\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME          \"192.168.12.111/24\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  ENB_INTERFACE_NAME_FOR_S1U          \"eth0\"
@@ -2268,7 +2269,7 @@
     <eNB_pre_exec>sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail</eNB_pre_exec>
     <eNB_pre_exec_args></eNB_pre_exec_args>
     <eNB_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
-    <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.epc.conf  </eNB_main_exec_args>
+    <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf  </eNB_main_exec_args>
     <eNB_traffic_exec></eNB_traffic_exec>
     <eNB_traffic_exec_args></eNB_traffic_exec_args>
     <eNB_search_expr_true></eNB_search_expr_true>
@@ -2283,9 +2284,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_terminate_missing_procs>True</UE_terminate_missing_procs>
     <UE_stop_script>sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue </UE_stop_script>
@@ -2309,7 +2310,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -2326,7 +2327,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  mobile_country_code \"208\"
@@ -2363,9 +2364,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -2389,7 +2390,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
@@ -2405,7 +2406,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  mobile_country_code \"208\"
@@ -2442,9 +2443,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -2468,9 +2469,9 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
-    <EPC_search_expr_true>throughput_test min=2.0Mbits/sec max=2.0Mbits/sec average=2.0Mbits/sec duration=300.0s </EPC_search_expr_true>
+    <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
     <tags>EXMIMO.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX</tags>
@@ -2483,7 +2484,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  mobile_country_code \"208\"
@@ -2520,9 +2521,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;  iperf -u -c  192.172.0.1 -b 10Mbits/s -t 300 -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c  192.172.0.1 -b 10Mbits/s -t 330 -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_search_expr_true></UE_search_expr_true>
     <UE_search_expr_false></UE_search_expr_false>
@@ -2546,9 +2547,9 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 5; iperf -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
-    <EPC_search_expr_true>throughput_test min=4.0Mbits/sec max=4.0Mbits/sec average=4.0Mbits/sec duration=300.0s </EPC_search_expr_true>
+    <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec duration=300.0s </EPC_search_expr_true>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
     <tags>EXMIMO.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX</tags>
@@ -2561,7 +2562,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  mobile_country_code \"208\"
@@ -2598,9 +2599,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_terminate_missing_procs>True</UE_terminate_missing_procs>
     <UE_stop_script>sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue </UE_stop_script>
@@ -2624,7 +2625,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -2638,7 +2639,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  mobile_country_code \"208\"
@@ -2675,9 +2676,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_terminate_missing_procs>True</UE_terminate_missing_procs>
     <UE_stop_script>sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue </UE_stop_script>
@@ -2701,7 +2702,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -2715,7 +2716,7 @@
     <eNB>calisson</eNB>
     <UE>stevens</UE>
     <EPC>amerique</EPC>
-    <TimeOut_cmd>360</TimeOut_cmd>
+    <TimeOut_cmd>390</TimeOut_cmd>
     <eNB_working_dir>/tmp</eNB_working_dir>
     <eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  tracking_area_code \"1\"
                      targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf  mobile_country_code \"208\"
@@ -2752,9 +2753,9 @@
     <UE_compile_prog_args>--eNB -w USRP -x -c </UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
-    <UE_traffic_exec>while true; do var=`ifconfig ppp0` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5;   iperf -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
+    <UE_traffic_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
     <UE_terminate_missing_procs>True</UE_terminate_missing_procs>
     <UE_stop_script>sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue </UE_stop_script>
@@ -2778,7 +2779,7 @@
     <EPC_main_exec_args></EPC_main_exec_args>
     <HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
     <HSS_main_exec_args></HSS_main_exec_args>
-    <EPC_traffic_exec>sleep 60; iperf -u -c  192.172.0.2 -b 10Mbits/s -t 300 -B 192.172.0.1</EPC_traffic_exec>
+    <EPC_traffic_exec>$OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c  192.172.0.2 -b 10Mbits/s -t 330 -B 192.172.0.1</EPC_traffic_exec>
     <EPC_traffic_exec_args></EPC_traffic_exec_args>
     <EPC_search_expr_false></EPC_search_expr_false>
     <EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
@@ -2824,7 +2825,7 @@
     <UE_compile_prog_args>--eNB -w USRP -c</UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
     <UE_traffic_exec>ping 192.172.0.1</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
@@ -2903,7 +2904,7 @@
     <UE_compile_prog_args>--eNB -w USRP -c</UE_compile_prog_args>
     <UE_pre_exec></UE_pre_exec>
     <UE_pre_exec_args></UE_pre_exec_args>
-    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
+    <UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
     <UE_main_exec_args></UE_main_exec_args>
     <UE_traffic_exec>ping 192.172.0.1</UE_traffic_exec>
     <UE_traffic_exec_args></UE_traffic_exec_args>
diff --git a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
index ae25013f52cda113300db1223a663580fba1119c..e22f86e67cbd0daf3619b47728b146fcddb62d60 100755
--- a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
+++ b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py
@@ -10,6 +10,7 @@ import threading
 import signal
 import traceback
 import os
+import commands
 
 # configure the serial connections (the parameters differs on the device you are connecting to)
 #First we find an open port to work with
@@ -34,8 +35,7 @@ def find_open_port():
    ser = serial.Serial(port=serial_port)
    return
 
-find_open_port()
-print 'Using Serial port : ' + serial_port  
+
     
 #serial_port = '/dev/ttyUSB2'
 bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf'
@@ -127,7 +127,7 @@ def start_ue () :
         ip = IPRoute()
         idx = ip.link_lookup(ifname=iface)[0]
         os.system ('route add 192.172.0.1 ppp0')
-        os.system ('ping -c 5 192.172.0.1')
+        os.system ('ping 192.172.0.1')
         break
      except Exception, e:
         error = ' Interface ' + iface + 'does not exist...'
@@ -144,11 +144,63 @@ def stop_ue():
    send_command('AT+CGATT=0' , 'OK|ERROR' , timeout)
    send_command('AT+CFUN=4' , 'OK' , timeout)
 
+
+#reset the USB BUS of Bandrich UE
+def reset_ue():
+  stringIdBandrich='BandRich, Inc. 4G LTE adapter'
+  status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
+  if (out == '') :
+     print "Bandrich 4G LTE Adapter not found. Exiting now..."
+     sys.exit()
+  p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)')
+  res=p.findall(out)
+  BusId=res[0][0]
+  DeviceId=res[0][1]
+  VendorId=res[0][2]
+  ProductId=res[0][3]
+  usb_dir= find_usb_path(VendorId, ProductId)
+  print usb_dir
+  cmd = "sudo sh -c \"echo 0 > " + usb_dir + "/authorized\""
+  os.system(cmd + " ; sleep 5" )
+  cmd = "sudo sh -c \"echo 1 > " + usb_dir + "/authorized\""
+  os.system(cmd + " ; sleep 5" )
+
+def read_file(filename):
+  try:
+    file = open(filename, 'r')
+    return file.read()
+  except Exception, e:
+    #error = ' Filename ' + filename 
+    #error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: '  + str(e.__class__) + " : " + str( e)
+    #error = error + traceback.format_exc()
+    #print error
+    return ''
+
+
+def find_usb_path(idVendor, idProduct):
+  for root, dirs, files in os.walk("/sys/bus/usb/devices", topdown=False):
+    for name in dirs:
+        tmpdir= os.path.join(root, name)
+        tmpidVendor = read_file(tmpdir+'/idVendor').replace("\n","")
+        tmpidProduct = read_file(tmpdir+'/idProduct').replace("\n","")
+        #print "tmpdir = " + tmpdir + " tmpidVendor = " + tmpidVendor + " tmpidProduct = " + tmpidProduct
+        if tmpidVendor == idVendor and tmpidProduct == idProduct:
+            return tmpdir
+  return ''
+
 for arg in sys.argv[1:]:
     if arg == '--start-ue' :
+        find_open_port()
+        print 'Using Serial port : ' + serial_port  
         start_ue()
     elif arg == '--stop-ue' :
+        find_open_port()
+        print 'Using Serial port : ' + serial_port  
         stop_ue()
+    elif arg == '--reset-ue' :
+        reset_ue()
     else :
         print " Script called with wrong arguments, arg = " + arg
         sys.exit()
+
+
diff --git a/cmake_targets/autotests/tools/exmimo/init_exmimo2 b/cmake_targets/autotests/tools/exmimo/init_exmimo2
deleted file mode 100755
index 66eedf93dd4d407deaabee6a61091c8f04fd0a61..0000000000000000000000000000000000000000
--- a/cmake_targets/autotests/tools/exmimo/init_exmimo2
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-
-################################################################################
-#   OpenAirInterface
-#   Copyright(c) 1999 - 2015 Eurecom
-#
-#    OpenAirInterface is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
-#
-#
-#    OpenAirInterface is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License
-#    along with OpenAirInterface.The full GNU General Public License is
-#    included in this distribution in the file called "COPYING". If not,
-#    see <http://www.gnu.org/licenses/>.
-#
-#  Contact Information
-#  OpenAirInterface Admin: openair_admin@eurecom.fr
-#  OpenAirInterface Tech : openair_tech@eurecom.fr
-#  OpenAirInterface Dev  : openair4g-devel@lists.eurecom.fr
-#
-#  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
-#
-################################################################################
-# file init_nas_nos1
-# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
-# author Florian Kaltenberger
-#
-#######################################
-
-load_module() 
-{
-  mod_name=${1##*/}
-  mod_name=${mod_name%.*}
-  if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
-    then
-      echo "module $mod_name already loaded: I remove it first"
-      sudo rmmod $mod_name
-  fi
-  echo loading $mod_name
-  sudo insmod $1
-}
-
-
-function main() 
-{
-PCI=`lspci -m | grep Xilinx`
-if [ -z "$PCI" ]; then
- echo "No card found. Stopping!"
- return
-fi
-
-## This part corrects the wrong configuration of the endpoint done by the bios in some machines
-echo "$PCI" | while read config_reg; do
-SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'`
-sudo setpci -s $SLOT_NUMBER 60.b=10
-done
-
-
-load_module $OPENAIR_DIR/targets/bin/openair_rf.ko
-sleep 1
-
-if [ ! -e /dev/openair0 ]; then 
- sudo mknod /dev/openair0 c 127 0
- sudo chmod a+rw /dev/openair0
-fi
-
-DEVICE=`echo $PCI | awk -F\" '{print $(NF-1)}' | awk '{print $2}'`
-DEVICE_SWID=${DEVICE:2:2}
-if [ $DEVICE_SWID == '0a' ]; then
-   echo "Using firware version 10"
-   $OPENAIR_DIR/targets/bin/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10
-else
-   echo 'No corresponding firmware found'
-   return
-fi
-}
-
-main "$@"
diff --git a/cmake_targets/autotests/tools/exmimo/oarf_config_exmimo.oct b/cmake_targets/autotests/tools/exmimo/oarf_config_exmimo.oct
deleted file mode 100755
index f8c24153f648cb6f0211defd9f958dab8dae92b2..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/oarf_config_exmimo.oct and /dev/null differ
diff --git a/cmake_targets/autotests/tools/exmimo/oarf_get_frame.oct b/cmake_targets/autotests/tools/exmimo/oarf_get_frame.oct
deleted file mode 100755
index 8dd108b798d3958df6e296fe1e7101744e041f2e..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/oarf_get_frame.oct and /dev/null differ
diff --git a/cmake_targets/autotests/tools/exmimo/oarf_get_num_detected_cards.oct b/cmake_targets/autotests/tools/exmimo/oarf_get_num_detected_cards.oct
deleted file mode 100755
index 3d84d86ebad99e6997ec6f86e4f09e8cf83be245..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/oarf_get_num_detected_cards.oct and /dev/null differ
diff --git a/cmake_targets/autotests/tools/exmimo/oarf_send_frame.oct b/cmake_targets/autotests/tools/exmimo/oarf_send_frame.oct
deleted file mode 100755
index 4da12f517237f8125b673ffa8c8d56c36a85f6a5..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/oarf_send_frame.oct and /dev/null differ
diff --git a/cmake_targets/autotests/tools/exmimo/oarf_stop.oct b/cmake_targets/autotests/tools/exmimo/oarf_stop.oct
deleted file mode 100755
index b234829cc085c05b638981d5e03919ebc4300859..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/oarf_stop.oct and /dev/null differ
diff --git a/cmake_targets/autotests/tools/exmimo/oarf_stop_without_reset.oct b/cmake_targets/autotests/tools/exmimo/oarf_stop_without_reset.oct
deleted file mode 100755
index 74ca17e3e0d1ed96a16c879a057623cfb20a5f47..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/oarf_stop_without_reset.oct and /dev/null differ
diff --git a/cmake_targets/autotests/tools/exmimo/openair_rf.ko b/cmake_targets/autotests/tools/exmimo/openair_rf.ko
deleted file mode 100644
index 2f948c087147032d9bd0b4259cdeaa337a853d3c..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/openair_rf.ko and /dev/null differ
diff --git a/cmake_targets/autotests/tools/exmimo/updatefw b/cmake_targets/autotests/tools/exmimo/updatefw
deleted file mode 100755
index d404a74cbbe032cb3efda14a80ab613c6c92f07b..0000000000000000000000000000000000000000
Binary files a/cmake_targets/autotests/tools/exmimo/updatefw and /dev/null differ
diff --git a/cmake_targets/autotests/tools/find_usb_path.bash b/cmake_targets/autotests/tools/find_usb_path.bash
new file mode 100755
index 0000000000000000000000000000000000000000..c8ec950292361aa59c282531dad39aa183bd2e9c
--- /dev/null
+++ b/cmake_targets/autotests/tools/find_usb_path.bash
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#arg1 idVendor
+#arg2 idProduct
+argIdVendor=$1
+argIdProduct=$2
+
+echo $1
+echo $2
+
+for X in /sys/bus/usb/devices/*; do 
+    #echo "$X"
+    idVendor=`cat "$X/idVendor" 2>/dev/null` 
+    idProduct=`cat "$X/idProduct" 2>/dev/null`
+    if [ "$argIdVendor" == "$idVendor" ] && [ "$argIdProduct" == "$idProduct" ]
+    then
+      echo "$X"
+    fi
+done
+
diff --git a/cmake_targets/autotests/tools/iperf_script b/cmake_targets/autotests/tools/iperf_script
new file mode 100755
index 0000000000000000000000000000000000000000..ecd2f7a996911586e6986aca96e73848065ea591
--- /dev/null
+++ b/cmake_targets/autotests/tools/iperf_script
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+#arg1 timeout to wait before running the script
+#arg2 interface
+#arg3 iperf arguments
+
+args=($*)
+timeout=${args[0]}
+iface=${args[1]}
+iperf_args=(${args[@]:2})
+
+#array=${1:-1}
+echo "args =  ${args[@]}"
+echo "timeout = $timeout"
+echo "iface = $iface"
+echo "iperf_args = ${iperf_args[@]}"
+
+sleep $timeout
+
+while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5
+
+iperf ${iperf_args[@]}
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index 25bec96b98cd28571ef6b9f65457cb256bffb3e8..c723d8d6dc95e9acd0a24537d4b0d783e050fc9c 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -45,6 +45,8 @@ MSC_GEN="False"
 XFORMS="False"
 PRINT_STATS="False"
 VCD_TIMING="False"
+LOWLATENCY_FLAG_USER="False"
+FORCE_LOWLATENCY_FLAG_USER=""
 REL="Rel10"
 HW="EXMIMO"
 NOS1=0
@@ -113,7 +115,10 @@ Options
    Shows detailed compilation instructions in makefile
 --cflags_processor
    Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2
-
+--disable-deadline
+   Disables deadline scheduler of Linux kernel (>=3.14.x).
+--enable-deadline
+   Disables deadline scheduler of Linux kernel (>=3.14.x). 
 Usage (first build):
  oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
  Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files
@@ -225,6 +230,15 @@ function main() {
             CFLAGS_PROCESSOR_USER=$2
             echo_info "setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER"
             shift 2;;
+       --disable-deadline)
+            FORCE_LOWLATENCY_FLAG_USER="False"
+            echo_info "Disabling the usage of deadline scheduler"
+            shift 1;;
+       --enable-deadline)
+            FORCE_LOWLATENCY_FLAG_USER="True"
+            echo_info "Enabling the usage of deadline scheduler"
+            shift 1;;
+
         -h | --help)
             print_help
             exit 1;;
@@ -235,6 +249,31 @@ function main() {
    esac
   done
 
+  #Now we set flags to enable deadline scheduler settings
+  #By default: USRP: disable, 
+  #By default: BLADERF: enable,
+  #By default: EXMIMO: enable
+  if [ "$FORCE_LOWLATENCY_FLAG_USER" = "" ]; then
+     if [ "$HW" = "EXMIMO" ] ; then 
+        LOWLATENCY_FLAG_USER="True"
+     elif [ "$HW" = "ETHERNET" ] ; then 
+        LOWLATENCY_FLAG_USER="True"
+     elif [ "$HW" = "OAI_USRP" ] ; then 
+        LOWLATENCY_FLAG_USER="False"
+     elif [ "$HW" = "OAI_BLADERF" ] ; then 
+        LOWLATENCY_FLAG_USER="False"
+     elif [ "$HW" = "None" ] ; then 
+        LOWLATENCY_FLAG_USER="False"
+     else 
+        echo_error "Unknown HW type $HW. Exiting now..."
+        exit 
+     fi
+  else
+     LOWLATENCY_FLAG_USER=$FORCE_LOWLATENCY_FLAG_USER
+  fi
+
+  echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER"
+
   ############################################
   # setting and printing OAI envs, we should check here
   ############################################
@@ -321,6 +360,7 @@ function main() {
     echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )"     >>  $cmake_file
     echo "set ( RF_BOARD \"${HW}\")"               >>  $cmake_file
     echo "set(PACKAGE_NAME \"${lte_exec}\")"     >>  $cmake_file
+    echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )"    >>$cmake_file
     echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
     cd  $DIR/$lte_build_dir/build
     cmake ..
@@ -539,6 +579,7 @@ function main() {
     echo "set(ENABLE_ITTI False )"     					 >>  $cmake_file
     echo "set(RF_BOARD \"${HW}\")"               >>  $cmake_file
     echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >>  $cmake_file
+    echo "set(LOWLATENCY \"${LOWLATENCY_FLAG_USER}\")"    >>$cmake_file
     echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
 
     [ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build
diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index a1fefec3ce57275189ba37aee399b2b21db31eee..496096e9727218981330afbf5c89953996111325 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -163,33 +163,27 @@ install_gnutls_from_source(){
 
 
 check_install_usrp_uhd_driver(){
-        log_file=$OPENAIR_DIR/cmake_targets/log/check_install_usrp_uhd_driver_log.txt
-        echo_info "\nIn function: check_install_usrp_uhd_driver(). Installing USRP Drivers : The logfile for the installation is located here: $log_file "
-        (
+        #first we remove old installation
+        $SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y
         v=$(lsb_release -cs)
-        $SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
+        $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
+        #The new USRP repository
+        $SUDO add-apt-repository ppa:ettusresearch/uhd -y
         $SUDO apt-get update
         $SUDO apt-get -y install  python python-tk libboost-all-dev libusb-1.0-0-dev
-        $SUDO apt-get -y install -t `lsb_release -cs` uhd --force-yes
-        ) >& $log_file
+        $SUDO apt-get -y install libuhd-dev libuhd003 uhd-host
+        $SUDO uhd_images_downloader 
 }
 check_install_bladerf_driver(){
-        log_file=$OPENAIR_DIR/cmake_targets/log/check_install_bladerf_driver_log.txt
-        echo_info "\nIn function: check_install_bladerf_driver(). Install BLADERF drivers : The logfile for the installation is located here: $log_file "
-        (
 	$SUDO add-apt-repository -y ppa:bladerf/bladerf
 	$SUDO apt-get update
 	$SUDO apt-get install -y bladerf libbladerf-dev
 	$SUDO apt-get install -y bladerf-firmware-fx3
 	$SUDO apt-get install -y bladerf-fpga-hostedx40	
 	bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img	
-        ) >& $log_file
 }
 
 check_install_additional_tools (){
-    log_file=$OPENAIR_DIR/cmake_targets/log/check_install_additional_tools_log.txt
-    echo_info "\nIn function: check_install_oai_software(). Installing optional OAI packages : The logfile for the installation is located here: $log_file "
-    (
     $SUDO apt-get update
     $SUDO apt-get install -y \
 	check \
@@ -199,7 +193,6 @@ check_install_additional_tools (){
 	libboost-all-dev \
 	libpthread-stubs0-dev \
 	openvpn \
-	phpmyadmin \
 	pkg-config \
 	python-dev  \
 	python-pexpect \
@@ -212,14 +205,9 @@ check_install_additional_tools (){
 	vlan	  \
 	ctags \
         ntpdate
-      ) >& $log_file
 }
 
 check_install_oai_software() {
-    
-    log_file=$OPENAIR_DIR/cmake_targets/log/check_install_oai_software_log.txt
-    echo_info "\nIn function: check_install_oai_software(). Installing mandatory OAI packages : The logfile for the installation is located here: $log_file "
-    (
     $SUDO apt-get update
     $SUDO apt-get install -y \
 	autoconf  \
@@ -280,7 +268,8 @@ check_install_oai_software() {
 	python-pip \
 	pydb \
 	wvdial \
-        python-numpy
+        python-numpy \
+        sshpass
     $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
     if [ `lsb_release -rs` = '12.04' ] ; then
         install_nettle_from_source
@@ -290,7 +279,6 @@ check_install_oai_software() {
     fi
     $SUDO pip install paramiko
     $SUDO pip install pyroute2
-    ) > $log_file 2>&1
     install_asn1c_from_source
     $SUDO rm -fr /opt/ssh
     $SUDO git clone https://gist.github.com/2190472.git /opt/ssh
@@ -309,8 +297,8 @@ install_asn1c_from_source(){
     patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 
     ./configure
     make -j`nproc`
-    $SUDO make install 
-    ) > $asn1_install_dir 2>&1 
+    $SUDO make install
+    ) > $asn1_install_dir 2>&1
 }
 
 #################################################
diff --git a/cmake_targets/autotests/tools/exmimo/exmimo_stop.m b/cmake_targets/tools/exmimo_stop_octave.m
similarity index 100%
rename from cmake_targets/autotests/tools/exmimo/exmimo_stop.m
rename to cmake_targets/tools/exmimo_stop_octave.m
diff --git a/cmake_targets/tools/stop_exmimo2 b/cmake_targets/tools/stop_exmimo2
new file mode 100755
index 0000000000000000000000000000000000000000..63810e0bf8a015f6f83aeaa679b8418db3dd33de
--- /dev/null
+++ b/cmake_targets/tools/stop_exmimo2
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo "This script stops exmimo2 as it might be transmitting signal by itself if lte-softmodem terminates incorrectly"
+
+if [ "$OPENAIR_DIR" == "" ]; then
+  echo "Is the OPENAIR_DIR path set correctly? Exiting now"
+  exit
+fi
+sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches'
+
+#load the module
+sudo -E $OPENAIR_DIR/cmake_targets/tools/init_exmimo2
+
+#now we stop the card from transmitting anything
+cd $OPENAIR_DIR/targets/bin
+sudo -E octave $OPENAIR_DIR/cmake_targets/tools/exmimo_stop_octave.m
+
diff --git a/openair1/PHY/INIT/lte_param_init.c b/openair1/PHY/INIT/lte_param_init.c
new file mode 100644
index 0000000000000000000000000000000000000000..2b827dcb0e0c8a8a760c94d66854de8e03b4182a
--- /dev/null
+++ b/openair1/PHY/INIT/lte_param_init.c
@@ -0,0 +1,106 @@
+#include <string.h>
+#include <math.h>
+#include <unistd.h>
+#include <execinfo.h>
+#include <signal.h>
+
+#include "SIMULATION/TOOLS/defs.h"
+#include "PHY/types.h"
+#include "PHY/defs.h"
+#include "PHY/extern.h"
+
+extern PHY_VARS_eNB *PHY_vars_eNB;
+extern PHY_VARS_UE *PHY_vars_UE;
+
+void lte_param_init(unsigned char N_tx, 
+		    unsigned char N_rx,
+		    unsigned char transmission_mode,
+		    uint8_t extended_prefix_flag,
+		    frame_t frame_type, 
+		    uint16_t Nid_cell,
+		    uint8_t tdd_config,
+		    uint8_t N_RB_DL,
+		    uint8_t threequarter_fs,
+                    uint8_t osf,
+		    uint32_t perfect_ce)
+{
+
+  LTE_DL_FRAME_PARMS *lte_frame_parms;
+  int i;
+
+
+  printf("Start lte_param_init\n");
+  PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
+  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
+  //PHY_config = malloc(sizeof(PHY_CONFIG));
+  mac_xface = malloc(sizeof(MAC_xface));
+
+  srand(0);
+  randominit(0);
+  set_taus_seed(0);
+
+  lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
+
+  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
+  lte_frame_parms->N_RB_UL            = N_RB_DL;
+  lte_frame_parms->threequarter_fs    = threequarter_fs;
+  lte_frame_parms->Ncp                = extended_prefix_flag;
+  lte_frame_parms->Nid_cell           = Nid_cell;
+  lte_frame_parms->nushift            = Nid_cell%6;
+  lte_frame_parms->nb_antennas_tx     = N_tx;
+  lte_frame_parms->nb_antennas_rx     = N_rx;
+  lte_frame_parms->nb_antennas_tx_eNB = N_tx;
+  lte_frame_parms->phich_config_common.phich_resource         = one;
+  lte_frame_parms->tdd_config         = tdd_config;
+  lte_frame_parms->frame_type         = frame_type;
+  //  lte_frame_parms->Csrs = 2;
+  //  lte_frame_parms->Bsrs = 0;
+  //  lte_frame_parms->kTC = 0;44
+  //  lte_frame_parms->n_RRC = 0;
+  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
+
+  init_frame_parms(lte_frame_parms,osf);
+
+  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
+
+  //  phy_init_top(lte_frame_parms); //allocation
+
+  PHY_vars_UE->is_secondary_ue = 0;
+  PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
+  PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
+
+  phy_init_lte_top(lte_frame_parms);
+  dump_frame_parms(lte_frame_parms);
+
+  PHY_vars_UE->PHY_measurements.n_adj_cells=0;
+  PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
+  PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
+
+  for (i=0; i<3; i++)
+    lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
+
+  phy_init_lte_ue(PHY_vars_UE,1,0);
+  phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
+
+  generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
+  generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
+
+  // DL power control init
+  if (transmission_mode == 1) {
+    PHY_vars_eNB->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
+    ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 0;
+    PHY_vars_UE->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
+    ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 0;
+  } else { // rho_a = rhob
+    PHY_vars_eNB->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
+    ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 1;
+    PHY_vars_UE->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
+    ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1;
+  }
+
+  PHY_vars_UE->perfect_ce = perfect_ce;
+
+  printf("Done lte_param_init\n");
+
+
+}
diff --git a/openair1/PHY/INIT/lte_parms.c b/openair1/PHY/INIT/lte_parms.c
index 55bd964aa7e302b1e7853a4e41dc5c5c84b3a215..fa0e731af97830ad22bad3c85f89584cd8246e07 100644
--- a/openair1/PHY/INIT/lte_parms.c
+++ b/openair1/PHY/INIT/lte_parms.c
@@ -68,33 +68,57 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
     break;
 
   default:
-    msg("Illegal oversampling %d\n",osf);
+    printf("Illegal oversampling %d\n",osf);
     return(-1);
   }
 
   switch (frame_parms->N_RB_DL) {
+
   case 100:
     if (osf>1) {
-      msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
+      printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
       return(-1);
     }
 
-    frame_parms->ofdm_symbol_size = 2048;
-    frame_parms->log2_symbol_size = 11;
-    frame_parms->samples_per_tti = 30720;
-    frame_parms->first_carrier_offset = 2048-600;
+    if (frame_parms->threequarter_fs) {
+      frame_parms->ofdm_symbol_size = 1536;
+      frame_parms->samples_per_tti = 23040;
+      frame_parms->first_carrier_offset = 1536-600;
+      frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2;
+      frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2;
+    }
+    else {
+      frame_parms->ofdm_symbol_size = 2048;
+      frame_parms->samples_per_tti = 30720;
+      frame_parms->first_carrier_offset = 2048-600;
+    }
+    frame_parms->N_RBGS = 4;
+    frame_parms->N_RBG = 25;
+    break;
+
+  case 75:
+    if (osf>1) {
+      printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
+      return(-1);
+    }
+
+
+    frame_parms->ofdm_symbol_size = 1536;
+    frame_parms->samples_per_tti = 23040;
+    frame_parms->first_carrier_offset = 1536-450;
+    frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2;
+    frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2;
     frame_parms->N_RBGS = 4;
     frame_parms->N_RBG = 25;
     break;
 
   case 50:
     if (osf>1) {
-      msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
+      printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
       return(-1);
     }
 
     frame_parms->ofdm_symbol_size = 1024*osf;
-    frame_parms->log2_symbol_size = 10+log2_osf;
     frame_parms->samples_per_tti = 15360*osf;
     frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 300;
     frame_parms->nb_prefix_samples>>=(1-log2_osf);
@@ -105,13 +129,13 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
 
   case 25:
     if (osf>2) {
-      msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
+      printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
       return(-1);
     }
 
     frame_parms->ofdm_symbol_size = 512*osf;
 
-    frame_parms->log2_symbol_size = 9+log2_osf;
+
     frame_parms->samples_per_tti = 7680*osf;
     frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 150;
     frame_parms->nb_prefix_samples>>=(2-log2_osf);
@@ -124,7 +148,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
 
   case 15:
     frame_parms->ofdm_symbol_size = 256*osf;
-    frame_parms->log2_symbol_size = 8+log2_osf;
     frame_parms->samples_per_tti = 3840*osf;
     frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 90;
     frame_parms->nb_prefix_samples>>=(3-log2_osf);
@@ -135,7 +158,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
 
   case 6:
     frame_parms->ofdm_symbol_size = 128*osf;
-    frame_parms->log2_symbol_size = 7+log2_osf;
     frame_parms->samples_per_tti = 1920*osf;
     frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 36;
     frame_parms->nb_prefix_samples>>=(4-log2_osf);
@@ -145,7 +167,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
     break;
 
   default:
-    msg("init_frame_parms: Error: Number of resource blocks (N_RB_DL %d) undefined, frame_parms = %p \n",frame_parms->N_RB_DL, frame_parms);
+    printf("init_frame_parms: Error: Number of resource blocks (N_RB_DL %d) undefined, frame_parms = %p \n",frame_parms->N_RB_DL, frame_parms);
     return(-1);
     break;
   }
@@ -159,23 +181,22 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
 
 void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
 {
-  msg("frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL);
-  msg("frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL);
-  msg("frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell);
-  msg("frame_parms->Ncp=%d\n",frame_parms->Ncp);
-  msg("frame_parms->Ncp_UL=%d\n",frame_parms->Ncp_UL);
-  msg("frame_parms->nushift=%d\n",frame_parms->nushift);
-  msg("frame_parms->frame_type=%d\n",frame_parms->frame_type);
-  msg("frame_parms->tdd_config=%d\n",frame_parms->tdd_config);
-  msg("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S);
-  msg("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag);
-  msg("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx);
-  msg("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx);
-  msg("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size);
-  msg("frame_parms->log2_symbol_size=%d\n",frame_parms->log2_symbol_size);
-  msg("frame_parms->nb_prefix_samples=%d\n",frame_parms->nb_prefix_samples);
-  msg("frame_parms->nb_prefix_samples0=%d\n",frame_parms->nb_prefix_samples0);
-  msg("frame_parms->first_carrier_offset=%d\n",frame_parms->first_carrier_offset);
-  msg("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti);
-  msg("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti);
+  printf("frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL);
+  printf("frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL);
+  printf("frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell);
+  printf("frame_parms->Ncp=%d\n",frame_parms->Ncp);
+  printf("frame_parms->Ncp_UL=%d\n",frame_parms->Ncp_UL);
+  printf("frame_parms->nushift=%d\n",frame_parms->nushift);
+  printf("frame_parms->frame_type=%d\n",frame_parms->frame_type);
+  printf("frame_parms->tdd_config=%d\n",frame_parms->tdd_config);
+  printf("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S);
+  printf("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag);
+  printf("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx);
+  printf("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx);
+  printf("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size);
+  printf("frame_parms->nb_prefix_samples=%d\n",frame_parms->nb_prefix_samples);
+  printf("frame_parms->nb_prefix_samples0=%d\n",frame_parms->nb_prefix_samples0);
+  printf("frame_parms->first_carrier_offset=%d\n",frame_parms->first_carrier_offset);
+  printf("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti);
+  printf("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti);
 }
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
index 10c0cef42ad4858ec57ee0ac243ae8a262c2d35d..cfc2d929f1cb75b1edf53cbf92ad2b24e4e363a5 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
@@ -703,24 +703,28 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
 
   void (*idft)(int16_t *,int16_t *, int);
 
-  switch (phy_vars_ue->lte_frame_parms.log2_symbol_size) {
-  case 7:
+  switch (phy_vars_ue->lte_frame_parms.ofdm_symbol_size) {
+  case 128:
     idft = idft128;
     break;
 
-  case 8:
+  case 256:
     idft = idft256;
     break;
 
-  case 9:
+  case 512:
     idft = idft512;
     break;
 
-  case 10:
+  case 1024:
     idft = idft1024;
     break;
 
-  case 11:
+  case 1536:
+    idft = idft1536;
+    break;
+
+  case 2048:
     idft = idft2048;
     break;
 
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
index 9864a50ee29e6dc6d5a343862e1f3f677d38d85f..6e2311789eabe56d5adf61140a8dca98df309f54 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
@@ -61,7 +61,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms )   // LTE_UE_COMMON *com
 {
 
   int i,k;
-  //unsigned short ds = frame_parms->log2_symbol_size - 7;
 
   sync_corr_ue0 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti);
   sync_corr_ue1 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti);
@@ -184,13 +183,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms )   // LTE_UE_COMMON *com
     LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL);
     break;
   }
-  /*
-      frame_parms->twiddle_ifft,    /// complex twiddle factors
-      frame_parms->rev,             /// bit reversed permutation vector
-      frame_parms->log2_symbol_size,/// log2(FFT_SIZE)
-      (frame_parms->log2_symbol_size/2),
-      0);                            /// 0 - input is in complex Q1.15 format, 1 - input is in complex redundant Q1.15 format)
-  */
 
   for (i=0; i<frame_parms->ofdm_symbol_size; i++)
     ((int32_t*)primary_synch0_time)[i] = sync_tmp[i];
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
index 1d23bdca38d7b4121485d3777fdfdd268fbce9e1..1eb663ec89e844a2adc171ecdc818e912a97d81c 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
@@ -432,7 +432,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
         in_fft_ptr_0 = &temp_in_fft_0[0];
         in_fft_ptr_1 = &temp_in_fft_1[0];
 
-        for(j=0; j<(1<<(frame_parms->log2_symbol_size))/12; j++) {
+        for(j=0; j<(frame_parms->ofdm_symbol_size)/12; j++) {
           if (j>19) {
             ((int16_t*)in_fft_ptr_0)[-40+(2*j)] = ((int16_t*)temp_out_ifft_0)[-80+(2*j)]*rx_power_correction;
             ((int16_t*)in_fft_ptr_0)[-40+(2*j)+1] = ((int16_t*)temp_out_ifft_0)[-80+(2*j+1)]*rx_power_correction;
diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c
index 6faf2e1ed0ee47816182be2473859fe1ac82bcac..8e64275b41f22ffeeeeaa9f0368c3b8ed895a6e6 100644
--- a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c
+++ b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c
@@ -72,7 +72,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
   else if ((p==1) && (l>0))
     nu = 0;
   else {
-    msg("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
+    printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
     return(-1);
   }
 
@@ -94,9 +94,9 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
     output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
     //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
 #ifdef DEBUG_DL_CELL_SPEC
-    msg("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
+    printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
               Ns,l,m,mprime_dword,mprime_qpsk_symb);
-    msg("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
+    printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
 #endif
 
     mprime++;
@@ -151,7 +151,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
   else if ((p==1) && (l>0))
     nu = 0;
   else {
-    msg("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
+    printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
     return(-1);
   }
 
@@ -177,9 +177,9 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
     output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
     //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
 #ifdef DEBUG_DL_CELL_SPEC
-    msg("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
+    printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
         Ns,l,m,mprime_dword,mprime_qpsk_symb);
-    msg("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
+    printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
 #endif
 
     mprime++;
diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c
index 606d1941a24541903e3e3f4263cf43b46541f5a9..345982505850f2885a4ba27f51776b7cd58fb0e8 100644
--- a/openair1/PHY/LTE_TRANSPORT/print_stats.c
+++ b/openair1/PHY/LTE_TRANSPORT/print_stats.c
@@ -67,11 +67,12 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
 
   if ((mode == normal_txrx) || (mode == no_L2_connect)) {
     len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",phy_vars_ue->Mod_id, phy_vars_ue->lte_ue_pdcch_vars[0]->crnti);
-     len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE\n",
+     len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE (NF %.1f dB)\n",
 		    10*log10(phy_vars_ue->PHY_measurements.rsrp[0])-phy_vars_ue->rx_total_gain_dB,
 		    10*log10(phy_vars_ue->PHY_measurements.rssi)-phy_vars_ue->rx_total_gain_dB, 
 		    10*log10(phy_vars_ue->PHY_measurements.rsrq[0]),
-		    phy_vars_ue->PHY_measurements.n0_power_tot_dBm);
+		    phy_vars_ue->PHY_measurements.n0_power_tot_dBm,
+		    (double)phy_vars_ue->PHY_measurements.n0_power_tot_dBm+132.24);
 
     /*
     len += sprintf(&buffer[len],
diff --git a/openair1/PHY/MODULATION/defs.h b/openair1/PHY/MODULATION/defs.h
index 8d45c15e0031ddca60c3be49667f1c1c32d40d6a..6005d6d49accf71413e67ee33e470db42b6db29d 100644
--- a/openair1/PHY/MODULATION/defs.h
+++ b/openair1/PHY/MODULATION/defs.h
@@ -34,12 +34,12 @@
 */
 
 /**
-\fn void PHY_ofdm_mod(int *input,int *output,unsigned char log2fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype)
+\fn void PHY_ofdm_mod(int *input,int *output,int fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype)
 This function performs OFDM modulation with cyclic extension or zero-padding.
 
 @param input The sequence input samples in the frequency-domain.  This is a concatenation of the input symbols in SIMD redundant format
 @param output The time-domain output signal
-@param log2fftsize Base-2 logarithm of the OFDM symbol size (\f$N_d\f$)
+@param fftsize size of OFDM symbol size (\f$N_d\f$)
 @param nb_symbols The number of OFDM symbols in the block
 @param nb_prefix_samples The number of prefix/suffix/zero samples
 @param etype Type of extension (CYCLIC_PREFIX,CYCLIC_SUFFIX,ZEROS)
@@ -47,7 +47,7 @@ This function performs OFDM modulation with cyclic extension or zero-padding.
 */
 void PHY_ofdm_mod(int *input,
                   int *output,
-                  unsigned char log2fftsize,
+                  int fftsize,
                   unsigned char nb_symbols,
                   unsigned short nb_prefix_samples,
                   Extension_t etype
diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c
index 61e5f9fb5bc20c7bbd436419d7a8e9584351ceeb..3dd76c0fbbec394b6a62d71623e417be685d9a2c 100755
--- a/openair1/PHY/MODULATION/ofdm_mod.c
+++ b/openair1/PHY/MODULATION/ofdm_mod.c
@@ -61,9 +61,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
            txdata+(i*(frame_parms->samples_per_tti>>1)));
 #endif
 
-    PHY_ofdm_mod(txdataF+(i*NUMBER_OF_OFDM_CARRIERS*frame_parms->symbols_per_tti>>1),        // input
+    PHY_ofdm_mod(txdataF+(i*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti>>1),        // input
                  txdata+(i*frame_parms->samples_per_tti>>1),         // output
-                 frame_parms->log2_symbol_size,                // log2_fft_size
+                 frame_parms->ofdm_symbol_size,                
                  1,                 // number of symbols
                  frame_parms->nb_prefix_samples0,               // number of prefix samples
                  CYCLIC_PREFIX);
@@ -71,9 +71,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
     printf("slot i %d (txdata offset %d)\n",i,OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*frame_parms->samples_per_tti>>1));
 #endif
 
-    PHY_ofdm_mod(txdataF+NUMBER_OF_OFDM_CARRIERS+(i*NUMBER_OF_OFDM_CARRIERS*(frame_parms->symbols_per_tti>>1)),        // input
+    PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size+(i*frame_parms->ofdm_symbol_size*(frame_parms->symbols_per_tti>>1)),        // input
                  txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*(frame_parms->samples_per_tti>>1)),         // output
-                 frame_parms->log2_symbol_size,                // log2_fft_size
+                 frame_parms->ofdm_symbol_size,                
                  (short_offset==1) ? 1 :(frame_parms->symbols_per_tti>>1)-1,//6,                 // number of symbols
                  frame_parms->nb_prefix_samples,               // number of prefix samples
                  CYCLIC_PREFIX);
@@ -84,7 +84,7 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
 
 void PHY_ofdm_mod(int *input,                       /// pointer to complex input
                   int *output,                      /// pointer to complex output
-                  unsigned char log2fftsize,        /// log2(FFT_SIZE)
+                  int fftsize,            /// FFT_SIZE
                   unsigned char nb_symbols,         /// number of OFDM symbols
                   unsigned short nb_prefix_samples,  /// cyclic prefix length
                   Extension_t etype                /// type of extension
@@ -100,24 +100,28 @@ void PHY_ofdm_mod(int *input,                       /// pointer to complex input
   int *temp_ptr=(int*)0;
   void (*idft)(int16_t *,int16_t *, int);
 
-  switch (log2fftsize) {
-  case 7:
+  switch (fftsize) {
+  case 128:
     idft = idft128;
     break;
 
-  case 8:
+  case 256:
     idft = idft256;
     break;
 
-  case 9:
+  case 512:
     idft = idft512;
     break;
 
-  case 10:
+  case 1024:
     idft = idft1024;
     break;
 
-  case 11:
+  case 1536:
+    idft = idft1536;
+    break;
+
+  case 2048:
     idft = idft2048;
     break;
 
@@ -127,8 +131,8 @@ void PHY_ofdm_mod(int *input,                       /// pointer to complex input
   }
 
 #ifdef DEBUG_OFDM_MOD
-  msg("[PHY] OFDM mod (size %d,prefix %d) Symbols %d, input %p, output %p\n",
-      1<<log2fftsize,nb_prefix_samples,nb_symbols,input,output);
+  printf("[PHY] OFDM mod (size %d,prefix %d) Symbols %d, input %p, output %p\n",
+      fftsize,nb_prefix_samples,nb_symbols,input,output);
 #endif
 
 
@@ -136,35 +140,31 @@ void PHY_ofdm_mod(int *input,                       /// pointer to complex input
   for (i=0; i<nb_symbols; i++) {
 
 #ifdef DEBUG_OFDM_MOD
-    msg("[PHY] symbol %d/%d (%p,%p -> %p)\n",i,nb_symbols,input,&input[i<<log2fftsize],&output[(i<<log2fftsize) + ((i)*nb_prefix_samples)]);
+    printf("[PHY] symbol %d/%d offset %d (%p,%p -> %p)\n",i,nb_symbols,i*fftsize+(i*nb_prefix_samples),input,&input[i*fftsize],&output[(i*fftsize) + ((i)*nb_prefix_samples)]);
 #endif
 
-    idft((int16_t *)&input[i<<log2fftsize],
-         (log2fftsize==7) ? (int16_t *)temp : (int16_t *)&output[(i<<log2fftsize) + ((1+i)*nb_prefix_samples)],
+    idft((int16_t *)&input[i*fftsize],
+         (fftsize==128) ? (int16_t *)temp : (int16_t *)&output[(i*fftsize) + ((1+i)*nb_prefix_samples)],
          1);
-    //    write_output("fft_out.m","fftout",temp,(1<<log2fftsize)*2,1,1);
-
-    //memset(temp,0,1<<log2fftsize);
-
 
     // Copy to frame buffer with Cyclic Extension
     // Note:  will have to adjust for synchronization offset!
 
     switch (etype) {
     case CYCLIC_PREFIX:
-      output_ptr = &output[(i<<log2fftsize) + ((1+i)*nb_prefix_samples)];
+      output_ptr = &output[(i*fftsize) + ((1+i)*nb_prefix_samples)];
       temp_ptr = (int *)temp;
 
 
       //      msg("Doing cyclic prefix method\n");
 
-      if (log2fftsize==7) {
-        for (j=0; j<((1<<log2fftsize)) ; j++) {
+      if (fftsize==128) {
+        for (j=0; j<fftsize ; j++) {
           output_ptr[j] = temp_ptr[j];
         }
       }
 
-      j=(1<<log2fftsize);
+      j=fftsize;
 
       for (k=-1; k>=-nb_prefix_samples; k--) {
         output_ptr[k] = output_ptr[--j];
@@ -175,19 +175,19 @@ void PHY_ofdm_mod(int *input,                       /// pointer to complex input
     case CYCLIC_SUFFIX:
 
 
-      output_ptr = &output[(i<<log2fftsize)+ (i*nb_prefix_samples)];
+      output_ptr = &output[(i*fftsize)+ (i*nb_prefix_samples)];
 
       temp_ptr = (int *)temp;
 
       //      msg("Doing cyclic suffix method\n");
 
-      for (j=0; j<(1<<log2fftsize) ; j++) {
+      for (j=0; j<fftsize ; j++) {
         output_ptr[j] = temp_ptr[2*j];
       }
 
 
       for (j=0; j<nb_prefix_samples; j++)
-        output_ptr[(1<<log2fftsize)+j] = output_ptr[j];
+        output_ptr[fftsize+j] = output_ptr[j];
 
       break;
 
@@ -198,11 +198,11 @@ void PHY_ofdm_mod(int *input,                       /// pointer to complex input
     case NONE:
 
       //      msg("NO EXTENSION!\n");
-      output_ptr = &output[(i<<log2fftsize)];
+      output_ptr = &output[fftsize];
 
       temp_ptr = (int *)temp;
 
-      for (j=0; j<(1<<log2fftsize) ; j++) {
+      for (j=0; j<fftsize ; j++) {
         output_ptr[j] = temp_ptr[2*j];
 
 
@@ -219,14 +219,7 @@ void PHY_ofdm_mod(int *input,                       /// pointer to complex input
 
   }
 
-  /*
-  printf("input %p, output %p, log2fftsize %d, nsymb %d\n",input,output,log2fftsize,nb_symbols);
-  for (i=0;i<16;i++)
-    printf("%d %d\n",((short *)input)[i<<1],((short *)input)[1+(i<<1)]);
-  printf("------\n");
-  for (i=0;i<16;i++)
-    printf("%d %d\n",((short *)output)[i<<1],((short *)output)[1+(i<<1)]);
-  */
+
 }
 
 
@@ -244,7 +237,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t
         LOG_D(PHY,"Frame %d, subframe %d: Doing MBSFN modulation (slot_offset %d)\n",frame,next_slot>>1,slot_offset);
         PHY_ofdm_mod(&txdataF[aa][slot_offset_F],        // input
                      &txdata[aa][slot_offset],         // output
-                     frame_parms->log2_symbol_size,                // log2_fft_size
+                     frame_parms->ofdm_symbol_size,                
                      12,                 // number of symbols
                      frame_parms->ofdm_symbol_size>>2,               // number of prefix samples
                      CYCLIC_PREFIX);
@@ -252,7 +245,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t
         if (frame_parms->Ncp == EXTENDED)
           PHY_ofdm_mod(&txdataF[aa][slot_offset_F],        // input
                        &txdata[aa][slot_offset],         // output
-                       frame_parms->log2_symbol_size,                // log2_fft_size
+                       frame_parms->ofdm_symbol_size,                
                        2,                 // number of symbols
                        frame_parms->nb_prefix_samples,               // number of prefix samples
                        CYCLIC_PREFIX);
@@ -268,7 +261,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t
       if (frame_parms->Ncp == EXTENDED)
         PHY_ofdm_mod(&txdataF[aa][slot_offset_F],        // input
                      &txdata[aa][slot_offset],         // output
-                     frame_parms->log2_symbol_size,                // log2_fft_size
+                     frame_parms->ofdm_symbol_size,                
                      6,                 // number of symbols
                      frame_parms->nb_prefix_samples,               // number of prefix samples
                      CYCLIC_PREFIX);
diff --git a/openair1/PHY/MODULATION/slot_fep.c b/openair1/PHY/MODULATION/slot_fep.c
index feb2d885b2c1279c5a649dd0b12f82c10a0c3bc7..0d2389c2aecd6f8df13794da5e1f6ec2d8e6b4a6 100644
--- a/openair1/PHY/MODULATION/slot_fep.c
+++ b/openair1/PHY/MODULATION/slot_fep.c
@@ -58,24 +58,28 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
   void (*dft)(int16_t *,int16_t *, int);
   int tmp_dft_in[256];  // This is for misalignment issues for 6 and 15 PRBs
 
-  switch (frame_parms->log2_symbol_size) {
-  case 7:
+  switch (frame_parms->ofdm_symbol_size) {
+  case 128:
     dft = dft128;
     break;
 
-  case 8:
+  case 256:
     dft = dft256;
     break;
 
-  case 9:
+  case 512:
     dft = dft512;
     break;
 
-  case 10:
+  case 1024:
     dft = dft1024;
     break;
 
-  case 11:
+  case 1536:
+    dft = dft1536;
+    break;
+
+  case 2048:
     dft = dft2048;
     break;
 
@@ -96,12 +100,12 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
 
 
   if (l<0 || l>=7-frame_parms->Ncp) {
-    msg("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp);
+    printf("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp);
     return(-1);
   }
 
   if (Ns<0 || Ns>=20) {
-    msg("slot_fep: Ns must be between 0 and 19\n");
+    printf("slot_fep: Ns must be between 0 and 19\n");
     return(-1);
   }
 
@@ -116,7 +120,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
 
 #ifdef DEBUG_FEP
     //  if (phy_vars_ue->frame <100)
-    msg("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol,
+    printf("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol,
         nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset);
 #endif
 
@@ -147,7 +151,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
 
 #ifdef DEBUG_FEP
       //  if (phy_vars_ue->frame <100)
-      msg("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol,
+      printf("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol,
           nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset);
 #endif
 
@@ -182,7 +186,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
       for (aa=0; aa<frame_parms->nb_antennas_tx_eNB; aa++) {
 
 #ifdef DEBUG_FEP
-        msg("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l);
+        printf("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l);
 #endif
         start_meas(&phy_vars_ue->dlsch_channel_estimation_stats);
         lte_dl_channel_estimation(phy_vars_ue,eNB_id,0,
@@ -205,7 +209,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
       // do frequency offset estimation here!
       // use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
 #ifdef DEBUG_FEP
-      msg("Frequency offset estimation\n");
+      printf("Frequency offset estimation\n");
 #endif
 
       if (l==(4-frame_parms->Ncp)) {
@@ -222,7 +226,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
   }
 
 #ifdef DEBUG_FEP
-  msg("slot_fep: done\n");
+  printf("slot_fep: done\n");
 #endif
   return(0);
 }
diff --git a/openair1/PHY/MODULATION/slot_fep_mbsfn.c b/openair1/PHY/MODULATION/slot_fep_mbsfn.c
index 94dc4b3ef162cc3b8d3e421de3e89d9745bf81e5..d71a9d04778a5dd60b7b5acac86669512d1e1254 100644
--- a/openair1/PHY/MODULATION/slot_fep_mbsfn.c
+++ b/openair1/PHY/MODULATION/slot_fep_mbsfn.c
@@ -54,25 +54,29 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
   unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
   void (*dft)(int16_t *,int16_t *, int);
 
-  switch (frame_parms->log2_symbol_size) {
+  switch (frame_parms->ofdm_symbol_size) {
 
-  case 7:
+  case 128:
     dft = dft128;
     break;
 
-  case 8:
+  case 256:
     dft = dft256;
     break;
 
-  case 9:
+  case 512:
     dft = dft512;
     break;
 
-  case 10:
+  case 1024:
     dft = dft1024;
     break;
 
-  case 11:
+  case 1536:
+    dft = dft1536;
+    break;
+
+  case 2048:
     dft = dft2048;
     break;
 
diff --git a/openair1/PHY/MODULATION/slot_fep_ul.c b/openair1/PHY/MODULATION/slot_fep_ul.c
index 32bae2c0360a5c1316c47ccda5cd66f86d012676..57f4a6f7ab983b27464a9592ad877fbbe423194d 100644
--- a/openair1/PHY/MODULATION/slot_fep_ul.c
+++ b/openair1/PHY/MODULATION/slot_fep_ul.c
@@ -50,24 +50,28 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
 
   void (*dft)(int16_t *,int16_t *, int);
 
-  switch (frame_parms->log2_symbol_size) {
-  case 7:
+  switch (frame_parms->ofdm_symbol_size) {
+  case 128:
     dft = dft128;
     break;
 
-  case 8:
+  case 256:
     dft = dft256;
     break;
 
-  case 9:
+  case 512:
     dft = dft512;
     break;
 
-  case 10:
+  case 1024:
     dft = dft1024;
     break;
 
-  case 11:
+  case 1536:
+    dft = dft1536;
+    break;
+
+  case 2048:
     dft = dft2048;
     break;
 
diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c
index ec4577a67a170f5d453b6d3e8fe02318e4bbf16a..b010f93aabeebb614535686ee1ca350a89d0eb4b 100644
--- a/openair1/PHY/TOOLS/lte_dfts.c
+++ b/openair1/PHY/TOOLS/lte_dfts.c
@@ -45,8 +45,10 @@
 #define debug_msg
 #define ONE_OVER_SQRT2_Q15 23170
 
+
 #endif
 
+#define ONE_OVER_SQRT3_Q15 18919
 
 #include "PHY/sse_intrin.h"
 
@@ -3180,6 +3182,8 @@ void idft1536(int16_t *input, int16_t *output)
   int i,i2,j;
   uint32_t tmp[3][512 ]__attribute__((aligned(16)));
   uint32_t tmpo[3][512] __attribute__((aligned(16)));
+  simd_q15_t *y128p=(simd_q15_t*)output;
+  simd_q15_t ONE_OVER_SQRT3_Q15_128 = set1_int16(ONE_OVER_SQRT3_Q15);
 
   for (i=0,j=0; i<512; i++) {
     tmp[0][i] = ((uint32_t *)input)[j++];
@@ -3190,17 +3194,6 @@ void idft1536(int16_t *input, int16_t *output)
   idft512((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1);
   idft512((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
   idft512((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
-  /*
-  for (i=1; i<512; i++) {
-    tmpo[0][i] = tmpo[0][i<<1];
-    tmpo[1][i] = tmpo[1][i<<1];
-    tmpo[2][i] = tmpo[2][i<<1];
-    }*/
-
-  //  write_output("in.m","in",input,6144,1,1);
-  //  write_output("out0.m","o0",tmpo[0],2048,1,1);
-  //  write_output("out1.m","o1",tmpo[1],2048,1,1);
-  //  write_output("out2.m","o2",tmpo[2],2048,1,1);
 
   for (i=0,i2=0; i<1024; i+=8,i2+=4)  {
     ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]),
@@ -3209,6 +3202,26 @@ void idft1536(int16_t *input, int16_t *output)
   }
 
 
+  for (i=0; i<24; i++) {
+    y128p[0]  = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
+    y128p[1]  = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
+    y128p[2]  = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
+    y128p[3]  = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
+    y128p[4]  = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
+    y128p[5]  = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
+    y128p[6]  = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
+    y128p[7]  = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
+    y128p[8]  = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
+    y128p[9]  = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
+    y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
+    y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
+    y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
+    y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
+    y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
+    y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
+    y128p+=16;
+  }
+
   _mm_empty();
   _m_empty();
 
diff --git a/openair1/PHY/impl_defs_lte.h b/openair1/PHY/impl_defs_lte.h
index a0ef6c005a622d71121a26f47f904876f6c3eaa6..cd6ee4eccecf2a61d9c3d316676143c2f4764e6a 100644
--- a/openair1/PHY/impl_defs_lte.h
+++ b/openair1/PHY/impl_defs_lte.h
@@ -516,10 +516,10 @@ typedef struct {
   uint8_t dual_tx;
   /// flag to indicate SISO transmission
   uint8_t mode1_flag;
+  /// Indicator that 20 MHz channel uses 3/4 sampling frequency
+  uint8_t threequarter_fs;
   /// Size of FFT
   uint16_t ofdm_symbol_size;
-  /// log2(Size of FFT)
-  uint8_t log2_symbol_size;
   /// Number of prefix samples in all but first symbol of slot
   uint16_t nb_prefix_samples;
   /// Number of prefix samples in first symbol of slot
diff --git a/openair1/PHY/impl_defs_top.h b/openair1/PHY/impl_defs_top.h
index c84b7d3ece8544bb34e0c5b8b3134ea0e025bb66..67d2fb5b8649fabb3a349d5436295c0060af6385 100755
--- a/openair1/PHY/impl_defs_top.h
+++ b/openair1/PHY/impl_defs_top.h
@@ -117,7 +117,6 @@
 */
 #define NUMBER_OF_OFDM_CARRIERS (frame_parms->ofdm_symbol_size)
 #define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
-#define LOG2_NUMBER_OF_OFDM_CARRIERS (frame_parms->log2_symbol_size)
 #define NUMBER_OF_USEFUL_CARRIERS (12*frame_parms->N_RB_DL)
 #define NUMBER_OF_ZERO_CARRIERS (NUMBER_OF_OFDM_CARRIERS-NUMBER_OF_USEFUL_CARRIERS)
 #define NUMBER_OF_USEFUL_CARRIERS_BYTES (NUMBER_OF_USEFUL_CARRIERS>>2)
diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c
index d65b94506828c5fc722cff91324711655d58cfd5..42a42e16b32ce4d6cc843e5c3b94be1ebddee18b 100755
--- a/openair1/SCHED/phy_procedures_lte_ue.c
+++ b/openair1/SCHED/phy_procedures_lte_ue.c
@@ -1262,7 +1262,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
 #else
                            &phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start],
 #endif
-                           frame_parms->log2_symbol_size,
+                           frame_parms->ofdm_symbol_size,
                            nsymb,
                            frame_parms->nb_prefix_samples,
                            CYCLIC_PREFIX);
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index 6474e83dd91438e04a4b021d83637ff8ac2eda33..b8dfac96a2e36da97cbc98ebb59ba065d34ffabb 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -107,88 +107,6 @@ void handler(int sig)
   exit(1);
 }
 
-void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,uint8_t fdd_flag, uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,
-                    uint8_t osf,uint32_t perfect_ce)
-{
-
-  LTE_DL_FRAME_PARMS *lte_frame_parms;
-  int i;
-
-
-  printf("Start lte_param_init\n");
-  PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
-  //PHY_config = malloc(sizeof(PHY_CONFIG));
-  mac_xface = malloc(sizeof(MAC_xface));
-
-  srand(0);
-  randominit(0);
-  set_taus_seed(0);
-
-  lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
-
-  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
-  lte_frame_parms->N_RB_UL            = N_RB_DL;
-  lte_frame_parms->Ncp                = extended_prefix_flag;
-  lte_frame_parms->Nid_cell           = Nid_cell;
-  lte_frame_parms->nushift            = Nid_cell%6;
-  lte_frame_parms->nb_antennas_tx     = N_tx;
-  lte_frame_parms->nb_antennas_rx     = N_rx;
-  lte_frame_parms->nb_antennas_tx_eNB = N_tx;
-  lte_frame_parms->phich_config_common.phich_resource         = one;
-  lte_frame_parms->tdd_config         = tdd_config;
-  lte_frame_parms->frame_type         = (fdd_flag==1)?0 : 1;
-  //  lte_frame_parms->Csrs = 2;
-  //  lte_frame_parms->Bsrs = 0;
-  //  lte_frame_parms->kTC = 0;44
-  //  lte_frame_parms->n_RRC = 0;
-  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
-
-  init_frame_parms(lte_frame_parms,osf);
-
-  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
-
-  //  phy_init_top(lte_frame_parms); //allocation
-
-  PHY_vars_UE->is_secondary_ue = 0;
-  PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
-  PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
-
-  phy_init_lte_top(lte_frame_parms);
-  dump_frame_parms(lte_frame_parms);
-
-  PHY_vars_UE->PHY_measurements.n_adj_cells=0;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
-
-  for (i=0; i<3; i++)
-    lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
-
-  phy_init_lte_ue(PHY_vars_UE,1,0);
-  phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
-
-  generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
-  generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
-
-  // DL power control init
-  if (transmission_mode == 1) {
-    PHY_vars_eNB->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
-    ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 0;
-    PHY_vars_UE->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
-    ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 0;
-  } else { // rho_a = rhob
-    PHY_vars_eNB->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
-    ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 1;
-    PHY_vars_UE->pdsch_config_dedicated->p_a  = dB0; // 4 = 0dB
-    ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1;
-  }
-
-  PHY_vars_UE->perfect_ce = perfect_ce;
-
-  printf("Done lte_param_init\n");
-
-
-}
 
 
 //DCI2_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2_2A[2];
@@ -214,7 +132,7 @@ void do_OFDM_mod_l(mod_sym_t **txdataF, int32_t **txdata, uint16_t next_slot, LT
     if (frame_parms->Ncp == 1)
       PHY_ofdm_mod(&txdataF[aa][slot_offset_F],        // input
                    &txdata[aa][slot_offset],         // output
-                   frame_parms->log2_symbol_size,                // log2_fft_size
+                   frame_parms->ofdm_symbol_size,
                    6,                 // number of symbols
                    frame_parms->nb_prefix_samples,               // number of prefix samples
                    CYCLIC_PREFIX);
@@ -318,7 +236,7 @@ int main(int argc, char **argv)
   double blerr[4],uncoded_ber,avg_ber;
   short *uncoded_ber_bit=NULL;
   uint8_t N_RB_DL=25,osf=1;
-  uint8_t fdd_flag = 0;
+  frame_t frame_type = FDD;
 #ifdef XFORMS
   FD_lte_phy_scope_ue *form_ue;
   char title[255];
@@ -350,6 +268,8 @@ int main(int argc, char **argv)
   FILE    *proc_fd = NULL;
   char buf[64];
 
+  int threequarter_fs=0;
+
   opp_enabled=1; // to enable the time meas
 
 #if defined(__arm__)
@@ -378,13 +298,17 @@ int main(int argc, char **argv)
   num_layers = 1;
   perfect_ce = 0;
 
-  while ((c = getopt (argc, argv, "ahdpZDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y")) != -1) {
+  while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y")) != -1) {
     switch (c) {
     case 'a':
       awgn_flag = 1;
       channel_model = AWGN;
       break;
 
+    case 'A':
+      abstx = 1;
+      break;
+
     case 'b':
       tdd_config=atoi(optarg);
       break;
@@ -393,10 +317,59 @@ int main(int argc, char **argv)
       N_RB_DL=atoi(optarg);
       break;
 
+    case 'c':
+      num_pdcch_symbols=atoi(optarg);
+      break;
+
+    case 'C':
+      Nid_cell = atoi(optarg);
+      break;
+
     case 'd':
       dci_flag = 1;
       break;
 
+    case 'D':
+      frame_type=TDD;
+      break;
+
+    case 'e':
+      num_rounds=1;
+      common_flag = 1;
+      TPC = atoi(optarg);
+      break;
+      
+    case 'E':
+      threequarter_fs=1;
+      break;
+
+    case 'f':
+      input_snr_step= atof(optarg);
+      break;
+
+    case 'F':
+      forgetting_factor = atof(optarg);
+      break;
+
+    case 'i':
+      input_fd = fopen(optarg,"r");
+      input_file=1;
+      dci_flag = 1;
+      break;
+
+    case 'I':
+      input_trch_fd = fopen(optarg,"r");
+      input_trch_file=1;
+      break;
+
+    case 'L':
+      llr8_flag=1;
+      break;
+
+    case 'l':
+      offset_mumimo_llr_drange_fix=atoi(optarg);
+      break;
+
     case 'm':
       mcs1 = atoi(optarg);
       break;
@@ -405,6 +378,11 @@ int main(int argc, char **argv)
       mcs2 = atoi(optarg);
       break;
 
+    case 'O':
+      test_perf=atoi(optarg);
+      //print_perf =1;
+      break;
+
     case 't':
       mcs_i = atoi(optarg);
       i_mod = get_Qm(mcs_i);
@@ -414,27 +392,16 @@ int main(int argc, char **argv)
       n_frames = atoi(optarg);
       break;
 
-    case 'C':
-      Nid_cell = atoi(optarg);
-      break;
 
     case 'o':
       rx_sample_offset = atoi(optarg);
       break;
 
-    case 'D':
-      fdd_flag = 1;
-      break;
-
     case 'r':
       DLSCH_RB_ALLOC = atoi(optarg);
       rballocset = 1;
       break;
 
-    case 'F':
-      forgetting_factor = atof(optarg);
-      break;
-
     case 's':
       snr0 = atof(optarg);
       break;
@@ -443,13 +410,6 @@ int main(int argc, char **argv)
       snr_int = atof(optarg);
       break;
 
-    case 'f':
-      input_snr_step= atof(optarg);
-      break;
-
-    case 'A':
-      abstx = 1;
-      break;
 
     case 'N':
       n_ch_rlz= atof(optarg);
@@ -459,10 +419,6 @@ int main(int argc, char **argv)
       extended_prefix_flag=1;
       break;
 
-    case 'c':
-      num_pdcch_symbols=atoi(optarg);
-      break;
-
     case 'g':
       memcpy(channel_model_input,optarg,10);
 
@@ -530,62 +486,6 @@ int main(int argc, char **argv)
 
       break;
 
-    case 'x':
-      transmission_mode=atoi(optarg);
-
-      if ((transmission_mode!=1) &&
-          (transmission_mode!=2) &&
-          (transmission_mode!=3) &&
-          (transmission_mode!=4) &&
-          (transmission_mode!=5) &&
-          (transmission_mode!=6)) {
-        msg("Unsupported transmission mode %d\n",transmission_mode);
-        exit(-1);
-      }
-
-      if (transmission_mode>1) {
-        n_tx = 2;
-      }
-
-      break;
-
-    case 'y':
-      n_tx=atoi(optarg);
-
-      if ((n_tx==0) || (n_tx>2)) {
-        msg("Unsupported number of tx antennas %d\n",n_tx);
-        exit(-1);
-      }
-
-      break;
-
-    case 'z':
-      n_rx=atoi(optarg);
-
-      if ((n_rx==0) || (n_rx>2)) {
-        msg("Unsupported number of rx antennas %d\n",n_rx);
-        exit(-1);
-      }
-
-      break;
-
-    case 'I':
-      input_trch_fd = fopen(optarg,"r");
-      input_trch_file=1;
-      break;
-
-    case 'i':
-      input_fd = fopen(optarg,"r");
-      input_file=1;
-      dci_flag = 1;
-      break;
-
-    case 'e':
-      num_rounds=1;
-      common_flag = 1;
-      TPC = atoi(optarg);
-      break;
-
     case 'R':
       num_rounds=atoi(optarg);
       break;
@@ -623,26 +523,54 @@ int main(int argc, char **argv)
       print_perf=1;
       break;
 
-    case 'L':
-      llr8_flag=1;
+    case 'x':
+      transmission_mode=atoi(optarg);
+
+      if ((transmission_mode!=1) &&
+          (transmission_mode!=2) &&
+          (transmission_mode!=3) &&
+          (transmission_mode!=4) &&
+          (transmission_mode!=5) &&
+          (transmission_mode!=6)) {
+        msg("Unsupported transmission mode %d\n",transmission_mode);
+        exit(-1);
+      }
+
+      if (transmission_mode>1) {
+        n_tx = 2;
+      }
+
       break;
 
-    case 'l':
-      offset_mumimo_llr_drange_fix=atoi(optarg);
+    case 'y':
+      n_tx=atoi(optarg);
+
+      if ((n_tx==0) || (n_tx>2)) {
+        msg("Unsupported number of tx antennas %d\n",n_tx);
+        exit(-1);
+      }
+
       break;
 
-    case 'O':
-      test_perf=atoi(optarg);
-      //print_perf =1;
+    case 'Y':
+      perfect_ce=1;
+      break;
+
+    case 'z':
+      n_rx=atoi(optarg);
+
+      if ((n_rx==0) || (n_rx>2)) {
+        msg("Unsupported number of rx antennas %d\n",n_rx);
+        exit(-1);
+      }
+
       break;
 
     case 'Z':
       dump_table=1;
       break;
 
-    case 'Y':
-      perfect_ce=1;
-      break;
+
 
     case 'h':
     default:
@@ -723,8 +651,10 @@ int main(int argc, char **argv)
     printf("dual_stream_UE=%d\n", dual_stream_UE);
   }
 
-  lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,fdd_flag,Nid_cell,tdd_config,N_RB_DL,osf,perfect_ce);
+  lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,threequarter_fs,osf,perfect_ce);
+
 
+    
   eNB_id_i = PHY_vars_UE->n_connected_eNB;
 
   printf("Setting mcs1 = %d\n",mcs1);
@@ -2553,7 +2483,7 @@ PMI_FEEDBACK:
                 }
               }
             }
-
+	    
             num_pdcch_symbols_2 = generate_dci_top(num_ue_spec_dci,
                                                    num_common_dci,
                                                    dci_alloc,
@@ -2562,7 +2492,7 @@ PMI_FEEDBACK:
                                                    &PHY_vars_eNB->lte_frame_parms,
                                                    PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNB_id],
                                                    subframe);
-
+	    
             if (num_pdcch_symbols_2 > num_pdcch_symbols) {
               msg("Error: given num_pdcch_symbols not big enough (%d > %d)\n",num_pdcch_symbols_2,num_pdcch_symbols);
               exit(-1);
@@ -2667,6 +2597,7 @@ PMI_FEEDBACK:
               }
 
               start_meas(&PHY_vars_eNB->dlsch_modulation_stats);
+	      
               re_allocated = dlsch_modulation(PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNB_id],
                                               AMP,
                                               subframe,
@@ -2674,6 +2605,7 @@ PMI_FEEDBACK:
                                               num_pdcch_symbols,
                                               PHY_vars_eNB->dlsch_eNB[k][0],
                                               PHY_vars_eNB->dlsch_eNB[k][1]);
+	      
               stop_meas(&PHY_vars_eNB->dlsch_modulation_stats);
               /*
               if (trials==0 && round==0)
@@ -2791,8 +2723,16 @@ PMI_FEEDBACK:
                 random_channel(eNB2UE[2],0);
                 random_channel(eNB2UE[3],0);
               }
-          }
-
+	    
+	    if (PHY_vars_UE->perfect_ce==1) {
+                  // fill in perfect channel estimates
+                  freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
+		  /*
+		  write_output("channel.m","ch",eNB2UE[round]->ch[0],eNB2UE[round]->channel_length,1,8);
+                  write_output("channelF.m","chF",eNB2UE[round]->chF[0],12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1,1,8);
+		  */
+	    }
+	  }
 
           if(abstx) {
             if (trials==0 && round==0) {
@@ -2938,11 +2878,6 @@ PMI_FEEDBACK:
 
               if (PHY_vars_UE->perfect_ce==1) {
                 if (awgn_flag==0) {
-                  // fill in perfect channel estimates
-                  freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
-
-                  //write_output("channel.m","ch",desc1->ch[0],desc1->channel_length,1,8);
-                  //write_output("channelF.m","chF",desc1->chF[0],nb_samples,1,8);
                   for(k=0; k<NUMBER_OF_eNB_MAX; k++) {
                     for(aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
                       for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c
index b9be0b27e8163404ff3310894927385fe0d05121..98d1b68a1509c4b6f230f6221e9dd6de3cc55f0d 100644
--- a/openair1/SIMULATION/LTE_PHY/mbmssim.c
+++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c
@@ -47,8 +47,7 @@
 #include "LAYER2/MAC/vars.h"
 
 #ifdef XFORMS
-#include <forms.h>
-#include "../../USERSPACE_TOOLS/SCOPE/lte_scope.h"
+#include "PHY/TOOLS/lte_phy_scope.h"
 #endif //XFORMS
 
 
@@ -176,13 +175,13 @@ int main(int argc, char **argv)
 
 
 #ifdef XFORMS
-  FD_lte_scope *form_dl;
+  FD_lte_phy_scope_ue *form_ue;
   char title[255];
 
   fl_initialize (&argc, argv, NULL, 0, 0);
-  form_dl = create_form_lte_scope();
+  form_ue = create_lte_phy_scope_ue();
   sprintf (title, "LTE DL SCOPE UE");
-  fl_show_form (form_dl->lte_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
+  fl_show_form (form_ue->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
 #endif
 
   logInit();
@@ -457,7 +456,7 @@ int main(int argc, char **argv)
 
       PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0],        // input,
                    txdata[0],         // output
-                   frame_parms->log2_symbol_size,                // log2_fft_size
+                   frame_parms->ofdm_symbol_size,
                    LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,                 // number of symbols
                    frame_parms->nb_prefix_samples,               // number of prefix samples
                    CYCLIC_PREFIX);
diff --git a/openair1/SIMULATION/LTE_PHY/pbchsim.c b/openair1/SIMULATION/LTE_PHY/pbchsim.c
index b7f9f57b6bb1539b5b150dfb9dd5f51d3275f597..319c2ed008511124f84423aba9dac231cbc867b4 100644
--- a/openair1/SIMULATION/LTE_PHY/pbchsim.c
+++ b/openair1/SIMULATION/LTE_PHY/pbchsim.c
@@ -53,87 +53,11 @@
 
 #include "OCG_vars.h"
 
-PHY_VARS_eNB *PHY_vars_eNb,*PHY_vars_eNb1,*PHY_vars_eNb2;
+PHY_VARS_eNB *PHY_vars_eNB,*PHY_vars_eNB1,*PHY_vars_eNB2;
 PHY_VARS_UE *PHY_vars_UE;
 
 #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
 
-void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,unsigned char frame_type, uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf)
-{
-
-  //  unsigned int ind;
-  LTE_DL_FRAME_PARMS *lte_frame_parms;
-  int i;
-
-  printf("Start lte_param_init\n");
-  PHY_vars_eNb = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_eNb1 = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_eNb2 = malloc(sizeof(PHY_VARS_eNB));
-
-  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
-  //PHY_config = malloc(sizeof(PHY_CONFIG));
-  mac_xface = malloc(sizeof(MAC_xface));
-
-  randominit(0);
-  set_taus_seed(0);
-
-  lte_frame_parms = &(PHY_vars_eNb->lte_frame_parms);
-
-  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
-  lte_frame_parms->N_RB_UL            = N_RB_DL;
-  lte_frame_parms->Ncp                = extended_prefix_flag;
-  lte_frame_parms->Nid_cell           = Nid_cell;
-  lte_frame_parms->nushift            = Nid_cell%6;
-  lte_frame_parms->nb_antennas_tx     = N_tx;
-  lte_frame_parms->nb_antennas_tx_eNB = N_tx;
-  lte_frame_parms->nb_antennas_rx     = N_rx;
-  //  lte_frame_parms->Csrs = 2;
-  //  lte_frame_parms->Bsrs = 0;
-  //  lte_frame_parms->kTC = 0;
-  //  lte_frame_parms->n_RRC = 0;
-  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
-  lte_frame_parms->tdd_config = 3;
-  lte_frame_parms->frame_type = frame_type;
-  init_frame_parms(lte_frame_parms,osf);
-
-  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
-
-  PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
-
-  phy_init_lte_top(lte_frame_parms);
-
-  PHY_vars_UE->PHY_measurements.n_adj_cells=2;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
-
-  for (i=0; i<3; i++)
-    lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
-
-  phy_init_lte_ue(PHY_vars_UE,1,0);
-
-  phy_init_lte_eNB(PHY_vars_eNb,0,0,0);
-
-  memcpy((void*)&PHY_vars_eNb1->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
-  PHY_vars_eNb1->lte_frame_parms.Nid_cell=Nid_cell+1;
-  PHY_vars_eNb1->lte_frame_parms.nushift=(Nid_cell+1)%6;
-  PHY_vars_eNb1->Mod_id=1;
-
-  memcpy((void*)&PHY_vars_eNb2->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
-  PHY_vars_eNb2->lte_frame_parms.Nid_cell=Nid_cell+2;
-  PHY_vars_eNb2->lte_frame_parms.nushift=(Nid_cell+2)%6;
-  PHY_vars_eNb2->Mod_id=2;
-
-  phy_init_lte_eNB(PHY_vars_eNb1,0,0,0);
-
-  phy_init_lte_eNB(PHY_vars_eNb2,0,0,0);
-
-  phy_init_lte_top(lte_frame_parms);
-
-  printf("Done lte_param_init\n");
-
-
-}
-
 mod_sym_t *dummybuf[4];
 mod_sym_t dummy0[2048*14];
 mod_sym_t dummy1[2048*14];
@@ -420,6 +344,28 @@ int main(int argc, char **argv)
 
   lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,N_RB_DL,osf);
 
+  PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB));
+  PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB));
+  PHY_vars_UE->PHY_measurements.n_adj_cells=2;
+  PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
+  PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
+
+  for (i=0; i<3; i++)
+    lte_gold(&PHY_vars_eNB->lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
+
+  memcpy((void*)&PHY_vars_eNB1->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
+  PHY_vars_eNB1->lte_frame_parms.Nid_cell=Nid_cell+1;
+  PHY_vars_eNB1->lte_frame_parms.nushift=(Nid_cell+1)%6;
+  PHY_vars_eNB1->Mod_id=1;
+
+  memcpy((void*)&PHY_vars_eNB2->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
+  PHY_vars_eNB2->lte_frame_parms.Nid_cell=Nid_cell+2;
+  PHY_vars_eNB2->lte_frame_parms.nushift=(Nid_cell+2)%6;
+  PHY_vars_eNB2->Mod_id=2;
+
+  phy_init_lte_eNB(PHY_vars_eNB1,0,0,0);
+  phy_init_lte_eNB(PHY_vars_eNB2,0,0,0);
+
 #ifdef XFORMS
   fl_initialize (&argc, argv, NULL, 0, 0);
   form_ue = create_lte_phy_scope_ue();
@@ -436,13 +382,13 @@ int main(int argc, char **argv)
 
   printf("SNR0 %f, SNR1 %f\n",snr0,snr1);
 
-  frame_parms = &PHY_vars_eNb->lte_frame_parms;
+  frame_parms = &PHY_vars_eNB->lte_frame_parms;
 
 
 
-  txdata = PHY_vars_eNb->lte_eNB_common_vars.txdata[0];
-  txdata1 = PHY_vars_eNb1->lte_eNB_common_vars.txdata[0];
-  txdata2 = PHY_vars_eNb2->lte_eNB_common_vars.txdata[0];
+  txdata = PHY_vars_eNB->lte_eNB_common_vars.txdata[0];
+  txdata1 = PHY_vars_eNB1->lte_eNB_common_vars.txdata[0];
+  txdata2 = PHY_vars_eNB2->lte_eNB_common_vars.txdata[0];
 
 
   s_re = malloc(2*sizeof(double*));
@@ -463,8 +409,8 @@ int main(int argc, char **argv)
   printf("FFT Size %d, Extended Prefix %d, Samples per subframe %d, Symbols per subframe %d, interf (%d,%d)\n",NUMBER_OF_OFDM_CARRIERS,
          frame_parms->Ncp,frame_parms->samples_per_tti,nsymb,interf1,interf2);
 
-  printf("PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0] = %p\n",
-         PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0]);
+  printf("PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0] = %p\n",
+         PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0]);
 
 
   DLSCH_alloc_pdu2.rah              = 0;
@@ -479,31 +425,31 @@ int main(int argc, char **argv)
   // Forget second codeword
   DLSCH_alloc_pdu2.tpmi             = (transmission_mode==6 ? 5 : 0) ;  // precoding
 
-  eNB2UE = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx,
+  eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
                                 PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
                                 channel_model,
- 				N_RB2sampling_rate(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
-				N_RB2channel_bandwidth(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
+ 				N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
+				N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
                                 0,
                                 0,
                                 0);
 
   if (interf1>-20)
-    eNB2UE1 = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx,
+    eNB2UE1 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
                                    PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
                                    channel_model,
-				   N_RB2sampling_rate(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
-				   N_RB2channel_bandwidth(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
+				   N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
+				   N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
                                    0,
                                    4,
                                    0);
 
   if (interf2>-20)
-    eNB2UE2 = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx,
+    eNB2UE2 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
                                    PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
                                    channel_model,
-				   N_RB2sampling_rate(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
-				   N_RB2channel_bandwidth(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
+				   N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
+				   N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
                                    0,
                                    8,
                                    0);
@@ -567,47 +513,47 @@ int main(int argc, char **argv)
     pbch_pdu[1]=1;
     pbch_pdu[2]=0;
 
-    if (PHY_vars_eNb->lte_frame_parms.frame_type == 0) {
-      generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    if (PHY_vars_eNB->lte_frame_parms.frame_type == 0) {
+      generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
-                   (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5,
+                   &PHY_vars_eNB->lte_frame_parms,
+                   (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
                    0);
-      generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+      generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
-                   (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4,
+                   &PHY_vars_eNB->lte_frame_parms,
+                   (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4,
                    0);
-      generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+      generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
-                   (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5,
+                   &PHY_vars_eNB->lte_frame_parms,
+                   (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
                    10);
-      generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+      generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
-                   (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4,
+                   &PHY_vars_eNB->lte_frame_parms,
+                   (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4,
                    10);
 
     } else {
-      generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+      generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
-                   (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5,
+                   &PHY_vars_eNB->lte_frame_parms,
+                   (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
                    1);
-      generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+      generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
+                   &PHY_vars_eNB->lte_frame_parms,
                    2,
                    2);
-      generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+      generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
-                   (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5,
+                   &PHY_vars_eNB->lte_frame_parms,
+                   (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
                    11);
-      generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+      generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                    AMP,
-                   &PHY_vars_eNb->lte_frame_parms,
+                   &PHY_vars_eNB->lte_frame_parms,
                    2,
                    12);
 
@@ -626,11 +572,11 @@ int main(int argc, char **argv)
     dci_alloc[1].rnti       = 0x1234;
     */
 
-    printf("Generating PBCH for mode1_flag = %d\n", PHY_vars_eNb->lte_frame_parms.mode1_flag);
+    printf("Generating PBCH for mode1_flag = %d\n", PHY_vars_eNB->lte_frame_parms.mode1_flag);
 
 
-    generate_pilots(PHY_vars_eNb,
-                    PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_pilots(PHY_vars_eNB,
+                    PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                     AMP,
                     LTE_NUMBER_OF_SUBFRAMES_PER_FRAME);
 
@@ -641,8 +587,8 @@ int main(int argc, char **argv)
            dci_alloc,
            0,
            1024,
-           &PHY_vars_eNb->lte_frame_parms,
-           PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+           &PHY_vars_eNB->lte_frame_parms,
+           PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
            0);
     */
 
@@ -657,47 +603,47 @@ int main(int argc, char **argv)
       dummybuf[1] = dummy1;
       dummybuf[2] = dummy2;
       dummybuf[3] = dummy3;
-      generate_pbch(&PHY_vars_eNb->lte_eNB_pbch,
+      generate_pbch(&PHY_vars_eNB->lte_eNB_pbch,
                     (mod_sym_t**)dummybuf,
                     AMP,
-                    &PHY_vars_eNb->lte_frame_parms,
+                    &PHY_vars_eNB->lte_frame_parms,
                     pbch_pdu,
                     0);
     }
 
-    generate_pbch(&PHY_vars_eNb->lte_eNB_pbch,
-                  PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_pbch(&PHY_vars_eNB->lte_eNB_pbch,
+                  PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                   AMP,
-                  &PHY_vars_eNb->lte_frame_parms,
+                  &PHY_vars_eNB->lte_frame_parms,
                   pbch_pdu,
                   pbch_phase);
     /*
-    generate_pbch(&PHY_vars_eNb->lte_eNB_pbch,
-      PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_pbch(&PHY_vars_eNB->lte_eNB_pbch,
+      PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
       AMP,
-      &PHY_vars_eNb->lte_frame_parms,
+      &PHY_vars_eNB->lte_frame_parms,
       pbch_pdu,
       1);
     */
 
     if (interf1>-20) {
       /*
-      generate_pss(PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0],
+      generate_pss(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0],
        AMP,
-       &PHY_vars_eNb1->lte_frame_parms,
-       (PHY_vars_eNb1->lte_frame_parms.Ncp==0)?6:5,
+       &PHY_vars_eNB1->lte_frame_parms,
+       (PHY_vars_eNB1->lte_frame_parms.Ncp==0)?6:5,
        0);
       */
-      generate_pilots(PHY_vars_eNb1,
-                      PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0],
+      generate_pilots(PHY_vars_eNB1,
+                      PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0],
                       AMP,
                       LTE_NUMBER_OF_SUBFRAMES_PER_FRAME);
 
 
-      generate_pbch(&PHY_vars_eNb1->lte_eNB_pbch,
-                    PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0],
+      generate_pbch(&PHY_vars_eNB1->lte_eNB_pbch,
+                    PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0],
                     AMP,
-                    &PHY_vars_eNb1->lte_frame_parms,
+                    &PHY_vars_eNB1->lte_frame_parms,
                     pbch_pdu,
                     0);
 
@@ -705,26 +651,26 @@ int main(int argc, char **argv)
 
     if (interf2>-20) {
       /*
-      generate_pss(PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0],
+      generate_pss(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0],
        AMP,
-       &PHY_vars_eNb2->lte_frame_parms,
-       (PHY_vars_eNb2->lte_frame_parms.Ncp==0)?6:5,
+       &PHY_vars_eNB2->lte_frame_parms,
+       (PHY_vars_eNB2->lte_frame_parms.Ncp==0)?6:5,
        0);
 
       */
 
 
 
-      generate_pilots(PHY_vars_eNb2,
-                      PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0],
+      generate_pilots(PHY_vars_eNB2,
+                      PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0],
                       AMP,
                       LTE_NUMBER_OF_SUBFRAMES_PER_FRAME);
 
 
-      generate_pbch(&PHY_vars_eNb2->lte_eNB_pbch,
-                    PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0],
+      generate_pbch(&PHY_vars_eNB2->lte_eNB_pbch,
+                    PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0],
                     AMP,
-                    &PHY_vars_eNb2->lte_frame_parms,
+                    &PHY_vars_eNB2->lte_frame_parms,
                     pbch_pdu,
                     0);
 
@@ -733,10 +679,10 @@ int main(int argc, char **argv)
 
     //  write_output("pilotsF.m","rsF",txdataF[0],lte_frame_parms->ofdm_symbol_size,1,1);
 
-    write_output("txsigF0.m","txsF0", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+    write_output("txsigF0.m","txsF0", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
 
-    if (PHY_vars_eNb->lte_frame_parms.nb_antennas_tx>1)
-      write_output("txsigF1.m","txsF1", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+    if (PHY_vars_eNB->lte_frame_parms.nb_antennas_tx>1)
+      write_output("txsigF1.m","txsF1", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
 
     tx_lev = 0;
     tx_lev1 = 0;
@@ -745,16 +691,16 @@ int main(int argc, char **argv)
 
 
 
-    for (aa=0; aa<PHY_vars_eNb->lte_frame_parms.nb_antennas_tx; aa++) {
+    for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_tx; aa++) {
       if (frame_parms->Ncp == 1)
-        PHY_ofdm_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa],        // input,
+        PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa],        // input,
                      txdata[aa],         // output
-                     frame_parms->log2_symbol_size,                // log2_fft_size
+                     frame_parms->ofdm_symbol_size,
                      LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,                 // number of symbols
                      frame_parms->nb_prefix_samples,               // number of prefix samples
                      CYCLIC_PREFIX);
       else {
-        normal_prefix_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa],
+        normal_prefix_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa],
                           txdata[aa],
                           LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,
                           frame_parms);
@@ -765,17 +711,17 @@ int main(int argc, char **argv)
     }
 
     if (interf1>-20) {
-      for (aa=0; aa<PHY_vars_eNb1->lte_frame_parms.nb_antennas_tx; aa++) {
+      for (aa=0; aa<PHY_vars_eNB1->lte_frame_parms.nb_antennas_tx; aa++) {
         if (frame_parms->Ncp == 1)
-          PHY_ofdm_mod(PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][aa],        // input,
-                       PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][aa],         // output
-                       frame_parms->log2_symbol_size,                // log2_fft_size
+          PHY_ofdm_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][aa],        // input,
+                       PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][aa],         // output
+                       frame_parms->ofdm_symbol_size,
                        2*nsymb,                 // number of symbols
                        frame_parms->nb_prefix_samples,               // number of prefix samples
                        CYCLIC_PREFIX);
         else {
-          normal_prefix_mod(PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][aa],
-                            PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][aa],
+          normal_prefix_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][aa],
+                            PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][aa],
                             2*nsymb,
                             frame_parms);
         }
@@ -784,24 +730,24 @@ int main(int argc, char **argv)
                                  OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES);
       }
 
-      write_output("txsigF0_1.m","txsF0_1", PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+      write_output("txsigF0_1.m","txsF0_1", PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
 
-      if (PHY_vars_eNb1->lte_frame_parms.nb_antennas_tx>1)
-        write_output("txsigF1_1.m","txsF1_1", PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+      if (PHY_vars_eNB1->lte_frame_parms.nb_antennas_tx>1)
+        write_output("txsigF1_1.m","txsF1_1", PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
     }
 
     if (interf2>-20) {
-      for (aa=0; aa<PHY_vars_eNb2->lte_frame_parms.nb_antennas_tx; aa++) {
+      for (aa=0; aa<PHY_vars_eNB2->lte_frame_parms.nb_antennas_tx; aa++) {
         if (frame_parms->Ncp == 1)
-          PHY_ofdm_mod(PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][aa],        // input,
-                       PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][aa],         // output
-                       frame_parms->log2_symbol_size,                // log2_fft_size
+          PHY_ofdm_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][aa],        // input,
+                       PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][aa],         // output
+                       frame_parms->ofdm_symbol_size,
                        2*nsymb,                 // number of symbols
                        frame_parms->nb_prefix_samples,               // number of prefix samples
                        CYCLIC_PREFIX);
         else {
-          normal_prefix_mod(PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][aa],
-                            PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][aa],
+          normal_prefix_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][aa],
+                            PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][aa],
                             2*nsymb,
                             frame_parms);
         }
@@ -810,10 +756,10 @@ int main(int argc, char **argv)
                                  OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES);
       }
 
-      write_output("txsigF0_2.m","txsF0_2", PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+      write_output("txsigF0_2.m","txsF0_2", PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
 
-      if (PHY_vars_eNb2->lte_frame_parms.nb_antennas_tx>1)
-        write_output("txsigF1_2.m","txsF1_2", PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+      if (PHY_vars_eNB2->lte_frame_parms.nb_antennas_tx>1)
+        write_output("txsigF1_2.m","txsF1_2", PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
     }
 
     //    tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
@@ -823,15 +769,15 @@ int main(int argc, char **argv)
     if (frame_parms->nb_antennas_tx>1)
       write_output("txsig1.m","txs1", txdata[1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
 
-    write_output("txsig0_1.m","txs0_1", PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
+    write_output("txsig0_1.m","txs0_1", PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
 
     if (frame_parms->nb_antennas_tx>1)
-      write_output("txsig1_1.m","txs1_1", PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
+      write_output("txsig1_1.m","txs1_1", PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
 
-    write_output("txsig0_2.m","txs0_2", PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
+    write_output("txsig0_2.m","txs0_2", PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
 
     if (frame_parms->nb_antennas_tx>1)
-      write_output("txsig1_2.m","txs1_2", PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
+      write_output("txsig1_2.m","txs1_2", PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
   } else { //read in from file
     i=0;
 
@@ -864,7 +810,7 @@ int main(int argc, char **argv)
   // multipath channel
 
   for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) {
-    for (aa=0; aa<PHY_vars_eNb->lte_frame_parms.nb_antennas_tx; aa++) {
+    for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_tx; aa++) {
       s_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
       s_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
 
@@ -925,7 +871,7 @@ int main(int argc, char **argv)
         }
       }
 
-      sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR;
+      sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR;
 
       if (n_frames==1)
         printf("sigma2_dB %f (SNR %f dB) tx_lev_dB %f,%f,%f\n",sigma2_dB,SNR,
@@ -947,7 +893,7 @@ int main(int argc, char **argv)
       for (n_trials=0; n_trials<ntrials; n_trials++) {
         //printf("n_trial %d\n",n_trials);
         for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) {
-          for (aa=0; aa<PHY_vars_eNb->lte_frame_parms.nb_antennas_rx; aa++) {
+          for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_rx; aa++) {
             if (n_trials==0) {
               r_re[aa][i] += (pow(10.0,.05*interf1)*r_re1[aa][i] + pow(10.0,.05*interf2)*r_re2[aa][i]);
               r_im[aa][i] += (pow(10.0,.05*interf1)*r_im1[aa][i] + pow(10.0,.05*interf2)*r_im2[aa][i]);
@@ -983,14 +929,14 @@ int main(int argc, char **argv)
         */
 
 
-        for (l=0; l<PHY_vars_eNb->lte_frame_parms.symbols_per_tti; l++) {
+        for (l=0; l<PHY_vars_eNB->lte_frame_parms.symbols_per_tti; l++) {
 
-          //    subframe_offset = (l/PHY_vars_eNb->lte_frame_parms.symbols_per_tti)*PHY_vars_eNb->lte_frame_parms.samples_per_tti;
+          //    subframe_offset = (l/PHY_vars_eNB->lte_frame_parms.symbols_per_tti)*PHY_vars_eNB->lte_frame_parms.samples_per_tti;
           //      printf("subframe_offset = %d\n",subframe_offset);
 
           slot_fep(PHY_vars_UE,
-                   l%(PHY_vars_eNb->lte_frame_parms.symbols_per_tti/2),
-                   l/(PHY_vars_eNb->lte_frame_parms.symbols_per_tti/2),
+                   l%(PHY_vars_eNB->lte_frame_parms.symbols_per_tti/2),
+                   l/(PHY_vars_eNB->lte_frame_parms.symbols_per_tti/2),
                    0,
                    0,
 		   0);
@@ -1026,7 +972,7 @@ int main(int argc, char **argv)
             */
           }
 
-          if (l==((PHY_vars_eNb->lte_frame_parms.Ncp==0)?4:3)) {
+          if (l==((PHY_vars_eNB->lte_frame_parms.Ncp==0)?4:3)) {
             //sprintf(fname,"dl_ch00_%d.m",l);
             //sprintf(vname,"dl_ch00_%d",l);
             //write_output(fname,vname,&(lte_ue_common_vars->dl_ch_estimates[0][lte_frame_parms->ofdm_symbol_size*(l%6)]),lte_frame_parms->ofdm_symbol_size,1,1);
@@ -1038,7 +984,7 @@ int main(int argc, char **argv)
 				1);
           }
 
-          if (l==((PHY_vars_eNb->lte_frame_parms.Ncp==0)?10:9)) {
+          if (l==((PHY_vars_eNB->lte_frame_parms.Ncp==0)?10:9)) {
 
             for (frame_mod4=0; frame_mod4<4; frame_mod4++) {
               pbch_tx_ant = rx_pbch(&PHY_vars_UE->lte_ue_common_vars,
@@ -1059,7 +1005,7 @@ int main(int argc, char **argv)
 
               pbch_tx_ant = rx_pbch(&PHY_vars_UE->lte_ue_common_vars,
                                     PHY_vars_UE->lte_ue_pbch_vars[0],
-                                    &PHY_vars_eNb->lte_frame_parms,
+                                    &PHY_vars_eNB->lte_frame_parms,
                                     0,
                                     ALAMOUTI,
                                     PHY_vars_UE->high_speed_flag,
@@ -1119,10 +1065,10 @@ int main(int argc, char **argv)
 
   if (n_frames==1) {
 
-    write_output("H00.m","h00",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][0][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size),1,1);
+    write_output("H00.m","h00",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][0][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size),1,1);
 
     if (n_tx==2)
-      write_output("H10.m","h10",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][2][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size),1,1);
+      write_output("H10.m","h10",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][2][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size),1,1);
 
     write_output("rxsig0.m","rxs0", PHY_vars_UE->lte_ue_common_vars.rxdata[0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1);
     write_output("rxsigF0.m","rxsF0", PHY_vars_UE->lte_ue_common_vars.rxdataF[0],NUMBER_OF_OFDM_CARRIERS*2*((frame_parms->Ncp==0)?14:12),2,1);
diff --git a/openair1/SIMULATION/LTE_PHY/pdcchsim.c b/openair1/SIMULATION/LTE_PHY/pdcchsim.c
index 7a361329806eb8347805d6a04637b8b823f41248..a6556c4f243ddee8d4ee59def34ae80b65f0fab4 100644
--- a/openair1/SIMULATION/LTE_PHY/pdcchsim.c
+++ b/openair1/SIMULATION/LTE_PHY/pdcchsim.c
@@ -58,98 +58,6 @@ PHY_VARS_UE *PHY_vars_UE;
 #define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
 #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
 
-void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,
-                    lte_frame_type_t frame_type,uint8_t osf,uint32_t perfect_ce)
-{
-
-  unsigned int i;
-  LTE_DL_FRAME_PARMS *lte_frame_parms;
-
-  printf("Start lte_param_init (Nid_cell %d, extended_prefix %d, transmission_mode %d, N_tx %d, N_rx %d)\n",
-         Nid_cell, extended_prefix_flag,transmission_mode,N_tx,N_rx);
-  PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB));
-
-  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
-  //PHY_config = malloc(sizeof(PHY_CONFIG));
-  mac_xface = malloc(sizeof(MAC_xface));
-
-  randominit(0);
-  set_taus_seed(0);
-
-  lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
-
-  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
-  lte_frame_parms->N_RB_UL            = N_RB_DL;
-  lte_frame_parms->Ncp                = extended_prefix_flag;
-  lte_frame_parms->Nid_cell           = Nid_cell;
-  lte_frame_parms->nushift            = Nid_cell%6;
-  lte_frame_parms->nb_antennas_tx_eNB     = N_tx;
-  lte_frame_parms->nb_antennas_tx     = N_tx;
-  lte_frame_parms->nb_antennas_rx     = N_rx;
-  lte_frame_parms->phich_config_common.phich_resource = one; //half
-  lte_frame_parms->tdd_config         = tdd_config;
-  lte_frame_parms->frame_type         = frame_type;
-
-  //  lte_frame_parms->Csrs = 2;
-  //  lte_frame_parms->Bsrs = 0;
-  //  lte_frame_parms->kTC = 0;
-  //  lte_frame_parms->n_RRC = 0;
-  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
-
-  init_frame_parms(lte_frame_parms,osf);
-
-  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
-
-
-  memcpy(&PHY_vars_UE->lte_frame_parms,lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
-
-
-  phy_init_lte_top(lte_frame_parms);
-
-  phy_init_lte_ue(PHY_vars_UE,1,0);
-
-  phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
-
-  memcpy((void*)&PHY_vars_eNB1->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
-  PHY_vars_eNB1->lte_frame_parms.nushift=(Nid_cell+1)%6;
-  PHY_vars_eNB1->lte_frame_parms.Nid_cell=Nid_cell+1;
-
-  memcpy((void*)&PHY_vars_eNB2->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
-  PHY_vars_eNB2->lte_frame_parms.nushift=(Nid_cell+2)%6;
-  PHY_vars_eNB2->lte_frame_parms.Nid_cell=Nid_cell+2;
-
-  phy_init_lte_eNB(PHY_vars_eNB1,0,0,0);
-
-  phy_init_lte_eNB(PHY_vars_eNB2,0,0,0);
-
-  phy_init_lte_top(lte_frame_parms);
-
-  PHY_vars_UE->PHY_measurements.n_adj_cells=2;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
-  PHY_vars_UE->perfect_ce = perfect_ce;
-
-  for (i=0; i<3; i++)
-    lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
-
-  generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
-  generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
-
-  printf("Done lte_param_init\n");
-
-  CCCH_alloc_pdu.type               = 1;
-  CCCH_alloc_pdu.vrb_type           = 0;
-  CCCH_alloc_pdu.rballoc            = CCCH_RB_ALLOC;
-  CCCH_alloc_pdu.ndi      = 1;
-  CCCH_alloc_pdu.mcs      = 1;
-  CCCH_alloc_pdu.harq_pid = 0;
-
-}
-
-
-
 DCI_PDU DCI_pdu;
 
 DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2Lcommon, uint8_t format_selector, uint32_t rnti)
@@ -798,9 +706,10 @@ int main(int argc, char **argv)
                  n_rx,
                  transmission_mode,
                  extended_prefix_flag,
+		 frame_type,
                  Nid_cell,
                  tdd_config,
-                 N_RB_DL,frame_type,
+                 N_RB_DL,
                  osf,
                  perfect_ce);
 
@@ -1084,7 +993,7 @@ int main(int argc, char **argv)
           if (PHY_vars_eNB->lte_frame_parms.Ncp == 1)
             PHY_ofdm_mod(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][subframe*nsymb*PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size],        // input,
                          &txdata[aa][subframe*PHY_vars_eNB->lte_frame_parms.samples_per_tti],         // output
-                         PHY_vars_eNB->lte_frame_parms.log2_symbol_size,                // log2_fft_size
+                         PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size,
                          2*nsymb,                 // number of symbols
                          PHY_vars_eNB->lte_frame_parms.nb_prefix_samples,               // number of prefix samples
                          CYCLIC_PREFIX);
diff --git a/openair1/SIMULATION/LTE_PHY/prachsim.c b/openair1/SIMULATION/LTE_PHY/prachsim.c
index 4df53b053f9b377569c7de648cd323bd12e51176..187a521e07307e0f871bbd1f77be27eeaa88c991 100644
--- a/openair1/SIMULATION/LTE_PHY/prachsim.c
+++ b/openair1/SIMULATION/LTE_PHY/prachsim.c
@@ -56,58 +56,6 @@ PHY_VARS_UE *PHY_vars_UE;
 
 
 
-void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf)
-{
-
-  LTE_DL_FRAME_PARMS *lte_frame_parms;
-
-  printf("Start lte_param_init\n");
-  PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
-
-  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
-  //PHY_config = malloc(sizeof(PHY_CONFIG));
-  mac_xface = malloc(sizeof(MAC_xface));
-
-  randominit(0);
-  set_taus_seed(0);
-
-  lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
-
-  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
-  lte_frame_parms->N_RB_UL            = N_RB_DL;
-  lte_frame_parms->Ncp                = extended_prefix_flag;
-  lte_frame_parms->Nid_cell           = Nid_cell;
-  lte_frame_parms->nushift            = 0;
-  lte_frame_parms->nb_antennas_tx     = N_tx;
-  lte_frame_parms->nb_antennas_rx     = N_rx;
-  //  lte_frame_parms->Csrs = 2;
-  //  lte_frame_parms->Bsrs = 0;
-  //  lte_frame_parms->kTC = 0;
-  //  lte_frame_parms->n_RRC = 0;
-  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
-  lte_frame_parms->tdd_config = 1;
-  lte_frame_parms->frame_type = 1;
-  init_frame_parms(lte_frame_parms,osf);
-
-  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
-
-
-  PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
-
-  phy_init_lte_top(lte_frame_parms);
-
-  phy_init_lte_ue(PHY_vars_UE,1,0);
-
-  phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
-
-
-
-
-
-  printf("Done lte_param_init\n");
-
-}
-
 extern uint16_t prach_root_sequence_map0_3[838];
 
 int main(int argc, char **argv)
@@ -370,7 +318,16 @@ int main(int argc, char **argv)
   if (transmission_mode==2)
     n_tx=2;
 
-  lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,Nid_cell,N_RB_DL,osf);
+  lte_param_init(n_tx,
+		 n_rx,
+		 transmission_mode,
+		 extended_prefix_flag,
+		 FDD,
+		 Nid_cell,
+		 3,
+		 N_RB_DL,
+		 osf,
+		 0);
 
 
   if (snr1set==0) {
diff --git a/openair1/SIMULATION/LTE_PHY/pucchsim.c b/openair1/SIMULATION/LTE_PHY/pucchsim.c
index d9a3367b902c74b039fa524026a7a9078c2a94f2..aa886fa50bc1d8a51943a4e0b82ff4f639ec0a35 100644
--- a/openair1/SIMULATION/LTE_PHY/pucchsim.c
+++ b/openair1/SIMULATION/LTE_PHY/pucchsim.c
@@ -58,60 +58,6 @@ PHY_VARS_UE *PHY_vars_UE;
 
 
 
-void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf)
-{
-
-  LTE_DL_FRAME_PARMS *lte_frame_parms;
-
-  printf("Start lte_param_init\n");
-  PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
-
-  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
-  //PHY_config = malloc(sizeof(PHY_CONFIG));
-  mac_xface = malloc(sizeof(MAC_xface));
-
-  randominit(0);
-  set_taus_seed(0);
-
-  lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
-
-  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
-  lte_frame_parms->N_RB_UL            = N_RB_DL;
-  lte_frame_parms->Ncp                = extended_prefix_flag;
-  lte_frame_parms->Nid_cell           = Nid_cell;
-  lte_frame_parms->nushift            = 0;
-  lte_frame_parms->nb_antennas_tx     = N_tx;
-  lte_frame_parms->nb_antennas_rx     = N_rx;
-  //  lte_frame_parms->Csrs = 2;
-  //  lte_frame_parms->Bsrs = 0;
-  //  lte_frame_parms->kTC = 0;
-  //  lte_frame_parms->n_RRC = 0;
-  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
-  lte_frame_parms->tdd_config = 3;
-  lte_frame_parms->frame_type = 0;
-  init_frame_parms(lte_frame_parms,osf);
-
-  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
-
-//  phy_init_top(lte_frame_parms); //allocation
-
-  PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
-
-
-  phy_init_lte_ue(PHY_vars_UE,1,0);
-
-  phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
-
-  phy_init_lte_top(lte_frame_parms);
-
-
-
-
-  printf("Done lte_param_init\n");
-
-}
-
-
 int main(int argc, char **argv)
 {
 
@@ -368,7 +314,16 @@ int main(int argc, char **argv)
   if (transmission_mode==2)
     n_tx=2;
 
-  lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,Nid_cell,N_RB_DL,osf);
+  lte_param_init(n_tx,
+		 n_rx,
+		 transmission_mode,
+		 extended_prefix_flag,
+		 Nid_cell,
+		 FDD,
+		 3,
+		 N_RB_DL,
+		 osf,
+		 0);
 
 
   if (snr1set==0) {
@@ -473,7 +428,7 @@ int main(int argc, char **argv)
     if (frame_parms->Ncp == 1)
       PHY_ofdm_mod(txdataF2[aa],        // input
                    txdata[aa],         // output
-                   frame_parms->log2_symbol_size,                // log2_fft_size
+                   frame_parms->ofdm_symbol_size,
                    2*nsymb,                 // number of symbols
                    frame_parms->nb_prefix_samples,               // number of prefix samples
                    CYCLIC_PREFIX);
@@ -496,7 +451,7 @@ int main(int argc, char **argv)
     if (frame_parms->Ncp == 1)
       PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][2*subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX],        // input,
                    &txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe],         // output
-                   frame_parms->log2_symbol_size,                // log2_fft_size
+                   frame_parms->ofdm_symbol_size,
                    nsymb,                 // number of symbols
                    frame_parms->nb_prefix_samples,               // number of prefix samples
                    CYCLIC_PREFIX);
diff --git a/openair1/SIMULATION/LTE_PHY/scansim.c b/openair1/SIMULATION/LTE_PHY/scansim.c
index c2ceb1c58d53813dd243e1d85a19323321e1627e..2cbb7b3e322522ef9ddcccfd4a78f29ca915d262 100644
--- a/openair1/SIMULATION/LTE_PHY/scansim.c
+++ b/openair1/SIMULATION/LTE_PHY/scansim.c
@@ -56,94 +56,11 @@
 #define BW 20.0
 
 
-PHY_VARS_eNB *PHY_vars_eNb,*PHY_vars_eNb1,*PHY_vars_eNb2;
+PHY_VARS_eNB *PHY_vars_eNB,*PHY_vars_eNB1,*PHY_vars_eNB2;
 PHY_VARS_UE *PHY_vars_UE;
 
 #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
 
-void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,unsigned char frame_type, uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf)
-{
-
-  //  unsigned int ind;
-  LTE_DL_FRAME_PARMS *lte_frame_parms;
-  int i;
-
-  printf("Start lte_param_init\n");
-  PHY_vars_eNb = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_eNb1 = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_eNb2 = malloc(sizeof(PHY_VARS_eNB));
-
-  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
-  //PHY_config = malloc(sizeof(PHY_CONFIG));
-  mac_xface = malloc(sizeof(MAC_xface));
-
-  randominit(0);
-  set_taus_seed(0);
-
-  lte_frame_parms = &(PHY_vars_eNb->lte_frame_parms);
-
-  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
-  lte_frame_parms->N_RB_UL            = N_RB_DL;
-  lte_frame_parms->Ncp                = extended_prefix_flag;
-  lte_frame_parms->Nid_cell           = Nid_cell;
-  lte_frame_parms->nushift            = Nid_cell%6;
-  lte_frame_parms->nb_antennas_tx     = N_tx;
-  lte_frame_parms->nb_antennas_tx_eNB = N_tx;
-  lte_frame_parms->nb_antennas_rx     = N_rx;
-  //  lte_frame_parms->Csrs = 2;
-  //  lte_frame_parms->Bsrs = 0;
-  //  lte_frame_parms->kTC = 0;
-  //  lte_frame_parms->n_RRC = 0;
-  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
-  lte_frame_parms->tdd_config = 3;
-  lte_frame_parms->frame_type = frame_type;
-  init_frame_parms(lte_frame_parms,osf);
-
-  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
-
-
-  PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
-
-  phy_init_lte_top(lte_frame_parms);
-
-  PHY_vars_UE->PHY_measurements.n_adj_cells=2;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
-  PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
-
-  for (i=0; i<3; i++)
-    lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
-
-  phy_init_lte_ue(PHY_vars_UE,1,0);
-
-  phy_init_lte_eNB(PHY_vars_eNb,0,0,0);
-
-  for (i=0; i<10; i++) {
-    PHY_vars_UE->scan_info[0].amp[0][i] = 0;
-    PHY_vars_UE->scan_info[0].amp[1][i] = 0;
-    PHY_vars_UE->scan_info[0].amp[2][i] = 0;
-  }
-
-  memcpy((void*)&PHY_vars_eNb1->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
-  PHY_vars_eNb1->lte_frame_parms.Nid_cell=Nid_cell+1;
-  PHY_vars_eNb1->lte_frame_parms.nushift=(Nid_cell+1)%6;
-  PHY_vars_eNb1->Mod_id=1;
-
-  memcpy((void*)&PHY_vars_eNb2->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
-  PHY_vars_eNb2->lte_frame_parms.Nid_cell=Nid_cell+2;
-  PHY_vars_eNb2->lte_frame_parms.nushift=(Nid_cell+2)%6;
-  PHY_vars_eNb2->Mod_id=2;
-
-  phy_init_lte_eNB(PHY_vars_eNb1,0,0,0);
-
-  phy_init_lte_eNB(PHY_vars_eNb2,0,0,0);
-
-  phy_init_lte_top(lte_frame_parms);
-
-  printf("Done lte_param_init\n");
-
-
-}
-
 mod_sym_t *dummybuf[4];
 mod_sym_t dummy0[2048*14];
 mod_sym_t dummy1[2048*14];
@@ -404,7 +321,16 @@ int main(int argc, char **argv)
   if (transmission_mode>=2)
     n_tx=2;
 
-  lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,N_RB_DL,osf);
+  lte_param_init(n_tx,
+		 n_rx,
+		 transmission_mode,
+		 extended_prefix_flag,
+		 frame_type,
+		 Nid_cell,
+		 3,
+		 N_RB_DL,
+		 osf,
+		 0);
 
 #ifdef XFORMS
   fl_initialize (&argc, argv, NULL, 0, 0);
@@ -422,13 +348,13 @@ int main(int argc, char **argv)
 
   printf("SNR0 %f, SNR1 %f\n",snr0,snr1);
 
-  frame_parms = &PHY_vars_eNb->lte_frame_parms;
+  frame_parms = &PHY_vars_eNB->lte_frame_parms;
 
 
 
-  txdata = PHY_vars_eNb->lte_eNB_common_vars.txdata[0];
-  txdata1 = PHY_vars_eNb1->lte_eNB_common_vars.txdata[0];
-  txdata2 = PHY_vars_eNb2->lte_eNB_common_vars.txdata[0];
+  txdata = PHY_vars_eNB->lte_eNB_common_vars.txdata[0];
+  txdata1 = PHY_vars_eNB1->lte_eNB_common_vars.txdata[0];
+  txdata2 = PHY_vars_eNB2->lte_eNB_common_vars.txdata[0];
 
 
   s_re = malloc(2*sizeof(double*));
@@ -449,8 +375,8 @@ int main(int argc, char **argv)
   printf("FFT Size %d, Extended Prefix %d, Samples per subframe %d, Symbols per subframe %d\n",NUMBER_OF_OFDM_CARRIERS,
          frame_parms->Ncp,frame_parms->samples_per_tti,nsymb);
 
-  printf("PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0] = %p\n",
-         PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0]);
+  printf("PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0] = %p\n",
+         PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0]);
 
 
   DLSCH_alloc_pdu2.rah              = 0;
@@ -465,13 +391,14 @@ int main(int argc, char **argv)
   // Forget second codeword
   DLSCH_alloc_pdu2.tpmi             = (transmission_mode==6 ? 5 : 0) ;  // precoding
 
-  eNB2UE = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx,
-                                PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
-                                channel_model,
-                                BW,
-                                0,
-                                0,
-                                0);
+  eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
+				PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
+				channel_model,
+				N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
+				N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
+				0,
+				0,
+				0);
 
 
   if (eNB2UE==NULL) {
@@ -512,51 +439,51 @@ int main(int argc, char **argv)
   pbch_pdu[1]=1;
   pbch_pdu[2]=0;
 
-  if (PHY_vars_eNb->lte_frame_parms.frame_type == FDD) {
-    generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+  if (PHY_vars_eNB->lte_frame_parms.frame_type == FDD) {
+    generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
-                 (PHY_vars_eNb->lte_frame_parms.Ncp==NORMAL) ? 6 : 5,
+                 &PHY_vars_eNB->lte_frame_parms,
+                 (PHY_vars_eNB->lte_frame_parms.Ncp==NORMAL) ? 6 : 5,
                  0);
     /*
-    generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
-                 (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4,
+                 &PHY_vars_eNB->lte_frame_parms,
+                 (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4,
                  0);*/
-    generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
-                 (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5,
+                 &PHY_vars_eNB->lte_frame_parms,
+                 (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
                  10);
     /*
-    generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
-                 (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4,
+                 &PHY_vars_eNB->lte_frame_parms,
+                 (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4,
                  10);
     */
 
   } else {
 
-    generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
-                 (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5,
+                 &PHY_vars_eNB->lte_frame_parms,
+                 (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
                  1);
-    generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
+                 &PHY_vars_eNB->lte_frame_parms,
                  2,
                  2);
-    generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
-                 (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5,
+                 &PHY_vars_eNB->lte_frame_parms,
+                 (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
                  11);
-    generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+    generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
                  AMP,
-                 &PHY_vars_eNb->lte_frame_parms,
+                 &PHY_vars_eNB->lte_frame_parms,
                  2,
                  12);
 
@@ -565,8 +492,8 @@ int main(int argc, char **argv)
 
 
   /*
-  generate_pilots(PHY_vars_eNb,
-      PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+  generate_pilots(PHY_vars_eNB,
+      PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
       AMP,
       LTE_NUMBER_OF_SUBFRAMES_PER_FRAME);
 
@@ -577,8 +504,8 @@ int main(int argc, char **argv)
      dci_alloc,
      0,
      1024,
-     &PHY_vars_eNb->lte_frame_parms,
-     PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+     &PHY_vars_eNB->lte_frame_parms,
+     PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
      0);
   */
 
@@ -593,25 +520,25 @@ int main(int argc, char **argv)
     dummybuf[1] = dummy1;
     dummybuf[2] = dummy2;
     dummybuf[3] = dummy3;
-    generate_pbch(&PHY_vars_eNb->lte_eNB_pbch,
+    generate_pbch(&PHY_vars_eNB->lte_eNB_pbch,
       (mod_sym_t**)dummybuf,
       AMP,
-      &PHY_vars_eNb->lte_frame_parms,
+      &PHY_vars_eNB->lte_frame_parms,
       pbch_pdu,
       0);
   }
 
-  generate_pbch(&PHY_vars_eNb->lte_eNB_pbch,
-    PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
+  generate_pbch(&PHY_vars_eNB->lte_eNB_pbch,
+    PHY_vars_eNB->lte_eNB_common_vars.txdataF[0],
     AMP,
-    &PHY_vars_eNb->lte_frame_parms,
+    &PHY_vars_eNB->lte_frame_parms,
     pbch_pdu,
     pbch_phase);
   */
-  write_output("txsigF0.m","txsF0", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+  write_output("txsigF0.m","txsF0", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
 
-  if (PHY_vars_eNb->lte_frame_parms.nb_antennas_tx>1)
-    write_output("txsigF1.m","txsF1", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
+  if (PHY_vars_eNB->lte_frame_parms.nb_antennas_tx>1)
+    write_output("txsigF1.m","txsF1", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
 
   tx_lev = 0;
   tx_lev1 = 0;
@@ -620,16 +547,16 @@ int main(int argc, char **argv)
 
 
 
-  for (aa=0; aa<PHY_vars_eNb->lte_frame_parms.nb_antennas_tx; aa++) {
+  for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_tx; aa++) {
     if (frame_parms->Ncp == 1)
-      PHY_ofdm_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa],        // input,
+      PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa],        // input,
                    txdata[aa],         // output
-                   frame_parms->log2_symbol_size,                // log2_fft_size
+                   frame_parms->ofdm_symbol_size,
                    LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,                 // number of symbols
                    frame_parms->nb_prefix_samples,               // number of prefix samples
                    CYCLIC_PREFIX);
     else {
-      normal_prefix_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa],
+      normal_prefix_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa],
                         txdata[aa],
                         LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,
                         frame_parms);
@@ -648,7 +575,7 @@ int main(int argc, char **argv)
   // multipath channel
 
   for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) {
-    for (aa=0; aa<PHY_vars_eNb->lte_frame_parms.nb_antennas_tx; aa++) {
+    for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_tx; aa++) {
       s_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
       s_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
     }
@@ -667,7 +594,7 @@ int main(int argc, char **argv)
       multipath_channel(eNB2UE,s_re,s_im,r_re,r_im,
                         2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES,0);
 
-      sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR;
+      sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR;
 
       if (n_frames==1)
         printf("sigma2_dB %f (SNR %f dB) tx_lev_dB %f,%f,%f\n",sigma2_dB,SNR,
@@ -689,7 +616,7 @@ int main(int argc, char **argv)
       for (n_trials=0; n_trials<ntrials; n_trials++) {
         //printf("n_trial %d\n",n_trials);
         for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) {
-          for (aa=0; aa<PHY_vars_eNb->lte_frame_parms.nb_antennas_rx; aa++) {
+          for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_rx; aa++) {
             ((short*) PHY_vars_UE->lte_ue_common_vars.rxdata[aa])[2*i] = (short) ((r_re[aa][i] +sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
             ((short*) PHY_vars_UE->lte_ue_common_vars.rxdata[aa])[2*i+1] = (short) ((r_im[aa][i] + (iqim*r_re[aa][i]) + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
           }
diff --git a/openair1/SIMULATION/LTE_PHY/syncsim.c b/openair1/SIMULATION/LTE_PHY/syncsim.c
index a5f046da9352a4105acaafe8e291e24ab13271f4..45b69adcc544c0e1b6f89d25ad8be4ecf6e3314a 100644
--- a/openair1/SIMULATION/LTE_PHY/syncsim.c
+++ b/openair1/SIMULATION/LTE_PHY/syncsim.c
@@ -1189,7 +1189,7 @@ int main(int argc, char **argv)
       if (frame_parms->Ncp == 1)
         PHY_ofdm_mod(txdataF2[aa],        // input
                      txdata[aa],         // output
-                     PHY_vars_eNB->lte_frame_parms.log2_symbol_size,                // log2_fft_size
+                     PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size,                // log2_fft_size
                      LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,                 // number of symbols
                      PHY_vars_eNB->lte_frame_parms.nb_prefix_samples,               // number of prefix samples
                      PHY_vars_eNB->lte_frame_parms.twiddle_ifft,  // IFFT twiddle factors
@@ -1218,7 +1218,7 @@ int main(int argc, char **argv)
       if (frame_parms->Ncp == 1)
         PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa],        // input,
                      txdata[aa],         // output
-                     frame_parms->log2_symbol_size,                // log2_fft_size
+                     frame_parms->ofdm_symbol_size,                // log2_fft_size
                      LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,                 // number of symbols
                      frame_parms->nb_prefix_samples,               // number of prefix samples
                      frame_parms->twiddle_ifft,  // IFFT twiddle factors
@@ -1240,7 +1240,7 @@ int main(int argc, char **argv)
         if (frame_parms->Ncp == 1)
           PHY_ofdm_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[eNb_id][aa],        // input,
                        PHY_vars_eNB1->lte_eNB_common_vars.txdata[eNb_id][aa],         // output
-                       frame_parms->log2_symbol_size,                // log2_fft_size
+                       frame_parms->ofdm_symbol_size,                // log2_fft_size
                        LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,                 // number of symbols
                        frame_parms->nb_prefix_samples,               // number of prefix samples
                        frame_parms->twiddle_ifft,  // IFFT twiddle factors
@@ -1260,7 +1260,7 @@ int main(int argc, char **argv)
         if (frame_parms->Ncp == 1)
           PHY_ofdm_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[eNb_id][aa],        // input,
                        PHY_vars_eNB2->lte_eNB_common_vars.txdata[eNb_id][aa],         // output
-                       frame_parms->log2_symbol_size,                // log2_fft_size
+                       frame_parms->ofdm_symbol_size,                // log2_fft_size
                        LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb,                 // number of symbols
                        frame_parms->nb_prefix_samples,               // number of prefix samples
                        frame_parms->twiddle_ifft,  // IFFT twiddle factors
diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index de2789acef4e6745e8ac92720d4a722c4ca78a1e..4a78667535fdcf9cb6c116c464736827f2d2939f 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -89,60 +89,6 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */
 int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
 int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
 
-void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,uint8_t N_RB_DL,uint8_t frame_type,uint8_t tdd_config,uint8_t osf)
-{
-
-  LTE_DL_FRAME_PARMS *lte_frame_parms;
-
-  printf("Start lte_param_init\n");
-  PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
-  PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
-  //PHY_config = malloc(sizeof(PHY_CONFIG));
-  mac_xface = malloc(sizeof(MAC_xface));
-
-  randominit(0);
-  set_taus_seed(0);
-
-  lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
-
-  lte_frame_parms->frame_type         = frame_type;
-  lte_frame_parms->tdd_config         = tdd_config;
-  lte_frame_parms->N_RB_DL            = N_RB_DL;   //50 for 10MHz and 25 for 5 MHz
-  lte_frame_parms->N_RB_UL            = N_RB_DL;
-  lte_frame_parms->Ncp                = extended_prefix_flag;
-  lte_frame_parms->Ncp_UL             = extended_prefix_flag;
-  lte_frame_parms->Nid_cell           = 10;
-  lte_frame_parms->nushift            = 0;
-  lte_frame_parms->nb_antennas_tx     = N_tx;
-  lte_frame_parms->nb_antennas_rx     = N_rx;
-  //  lte_frame_parms->Csrs = 2;
-  //  lte_frame_parms->Bsrs = 0;
-  //  lte_frame_parms->kTC = 0;
-  //  lte_frame_parms->n_RRC = 0;
-  lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
-  lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 0;//n_DMRS1 set to 0
-
-  init_frame_parms(lte_frame_parms,osf);
-
-  //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
-
-
-  PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
-
-  phy_init_lte_top(lte_frame_parms);
-
-  phy_init_lte_ue(PHY_vars_UE,1,0);
-
-  phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
-
-  printf("Done lte_param_init\n");
-
-
-}
-
-
-
-
 int main(int argc, char **argv)
 {
 
@@ -520,7 +466,16 @@ int main(int argc, char **argv)
     }
   }
 
-  lte_param_init(1,n_rx,1,extended_prefix_flag,N_RB_DL,frame_type,tdd_config,osf);
+  lte_param_init(1,
+		 n_rx,
+		 1,
+		 extended_prefix_flag,
+		 frame_type,
+		 0,
+		 tdd_config,
+		 N_RB_DL,
+		 osf,
+		 0);
 
   if (nb_rb_set == 0)
     nb_rb = PHY_vars_eNB->lte_frame_parms.N_RB_UL;
@@ -1109,7 +1064,7 @@ int main(int argc, char **argv)
               if (frame_parms->Ncp == 1)
                 PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX],        // input
                              &txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe],         // output
-                             PHY_vars_UE->lte_frame_parms.log2_symbol_size,                // log2_fft_size
+                             PHY_vars_UE->lte_frame_parms.ofdm_symbol_size,
                              nsymb,                 // number of symbols
                              PHY_vars_UE->lte_frame_parms.nb_prefix_samples,               // number of prefix samples
                              CYCLIC_PREFIX);
diff --git a/openair1/SIMULATION/TOOLS/abstraction.c b/openair1/SIMULATION/TOOLS/abstraction.c
index 3720d9f99895becb2388bac4830cbb56ead1809a..591b238acfafdd32d00cddeccd2a66d42cbb308c 100644
--- a/openair1/SIMULATION/TOOLS/abstraction.c
+++ b/openair1/SIMULATION/TOOLS/abstraction.c
@@ -45,7 +45,7 @@ double **cos_lut=NULL,**sin_lut=NULL;
 
 
 
-void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
+int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
 {
 
 
@@ -54,15 +54,17 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
   int16_t f;
   uint8_t l;
 
+  if ((n_samples&1)==0) {
+    fprintf(stderr, "freq_channel_init: n_samples has to be odd\n");
+    return(-1); 
+  }
 
   cos_lut = (double **)malloc(n_samples*sizeof(double*));
   sin_lut = (double **)malloc(n_samples*sizeof(double*));
 
-
-
   delta_f = nb_rb*180000/(n_samples-1);
 
-  for (f=-(n_samples>>1); f<(n_samples>>1); f++) {
+  for (f=-(n_samples>>1); f<=(n_samples>>1); f++) {
     freq=delta_f*(double)f*1e-6;// due to the fact that delays is in mus
 
     cos_lut[f+(n_samples>>1)] = (double *)malloc((int)desc->nb_taps*sizeof(double));
@@ -81,9 +83,11 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
 
     }
   }
+
+  return(0);
 }
 
-void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
+int freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
 {
 
 
@@ -93,22 +97,32 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
   static int freq_channel_init=0;
   static int n_samples_max=0;
 
-  // printf("no of samples:%d,",n_samples);
+  // do some error checking
+  // n_samples has to be a odd number because we assume the spectrum is symmetric around the DC and includes the DC
+  if ((n_samples&1)==0) {
+    fprintf(stderr, "freq_channel: n_samples has to be odd\n");
+    return(-1); 
+  }
+
   // printf("no of taps:%d,",(int)desc->nb_taps);
 
   if (freq_channel_init == 0) {
     // we are initializing the lut for the largets possible n_samples=12*nb_rb+1
     // if called with n_samples<12*nb_rb+1, we decimate the lut
     n_samples_max=12*nb_rb+1;
-    init_freq_channel(desc,nb_rb,n_samples_max);
-    freq_channel_init=1;
+    if (init_freq_channel(desc,nb_rb,n_samples_max)==0)
+      freq_channel_init=1;
+    else
+      return(-1);
   }
 
-  d=n_samples_max/n_samples;
+  d=(n_samples_max-1)/(n_samples-1);
+
+  //printf("no_samples=%d, n_samples_max=%d, d=%d\n",n_samples,n_samples_max,d);
 
   start_meas(&desc->interp_freq);
 
-  for (f=-n_samples_max/2,f2=-n_samples/2; f<n_samples_max/2; f+=d,f2++) {
+  for (f=-n_samples_max/2,f2=-n_samples/2; f<=n_samples_max/2; f+=d,f2++) {
     clut = cos_lut[n_samples_max/2+f];
     slut = sin_lut[n_samples_max/2+f];
 
@@ -129,6 +143,8 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
   }
 
   stop_meas(&desc->interp_freq);
+
+  return(0);
 }
 
 double compute_pbch_sinr(channel_desc_t *desc,
diff --git a/openair1/SIMULATION/TOOLS/defs.h b/openair1/SIMULATION/TOOLS/defs.h
index 0dfea70b890febf0a422674fb05dc33d2c13f95d..c72ea743b1e7a7cfadf39a525c8fd35a9862a090 100644
--- a/openair1/SIMULATION/TOOLS/defs.h
+++ b/openair1/SIMULATION/TOOLS/defs.h
@@ -354,8 +354,8 @@ int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
 double gaussdouble(double,double);
 void randominit(unsigned int seed_init);
 double uniformrandom(void);
-void freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples);
-void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples);
+int freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples);
+int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples);
 uint8_t multipath_channel_nosigconv(channel_desc_t *desc);
 void multipath_tv_channel(channel_desc_t *desc,
                           double **tx_sig_re,
diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
index b12f7397f01160dafd9b3fbff8c43410b381f2e4..290f83ad5c171c5cf47beeca61b3c86a555e7f72 100644
--- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <uhd/utils/thread_priority.hpp>
 #include <uhd/usrp/multi_usrp.hpp>
+#include <uhd/version.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/algorithm/string.hpp>
 #include <iostream>
@@ -304,27 +305,59 @@ int trx_usrp_stop(int card) {
 
 
 rx_gain_calib_table_t calib_table_b210[] = {
-  {3500000000.0,46.0},
-  {2660000000.0,53.0},
-  {2300000000.0,54.0},
-  {1880000000.0,55.0},
-  {816000000.0,62.0},
+  {3500000000.0,44.0},
+  {2660000000.0,49.0},
+  {2300000000.0,50.0},
+  {1880000000.0,53.0},
+  {816000000.0,58.0},
+  {-1,0}};
+
+rx_gain_calib_table_t calib_table_b210_38[] = {
+  {3500000000.0,44.0},
+  {2660000000.0,49.8},
+  {2300000000.0,51.0},
+  {1880000000.0,53.0},
+  {816000000.0,57.0},
   {-1,0}};
 
 rx_gain_calib_table_t calib_table_x310[] = {
   {3500000000.0,77.0},
-  {2660000000.0,80.0},
+  {2660000000.0,81.0},
   {2300000000.0,81.0},
   {1880000000.0,82.0},
   {816000000.0,85.0},
   {-1,0}};
 
-void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) {
+void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_gain_adjust) {
 
   int i=0;
   // loop through calibration table to find best adjustment factor for RX frequency
-  double min_diff = 6e9,diff;
-  
+  double min_diff = 6e9,diff,gain_adj=0.0;
+  if (bw_gain_adjust==1) {
+    switch ((int)openair0_cfg[0].sample_rate) {
+    case 30720000:      
+      break;
+    case 23040000:
+      gain_adj=1.25;
+      break;
+    case 15360000:
+      gain_adj=3.0;
+      break;
+    case 7680000:
+      gain_adj=6.0;
+      break;
+    case 3840000:
+      gain_adj=9.0;
+      break;
+    case 1920000:
+      gain_adj=12.0;
+      break;
+    default:
+      printf("unknown sampling rate %d\n",(int)openair0_cfg[0].sample_rate);
+      exit(-1);
+      break;
+    }
+  }
   while (openair0_cfg->rx_gain_calib_table[i].freq>0) {
     diff = fabs(openair0_cfg->rx_freq[chain_index] - openair0_cfg->rx_gain_calib_table[i].freq);
     printf("cal %d: freq %f, offset %f, diff %f\n",
@@ -333,7 +366,7 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) {
 	   openair0_cfg->rx_gain_calib_table[i].offset,diff);
     if (min_diff > diff) {
       min_diff = diff;
-      openair0_cfg->rx_gain_offset[chain_index] = openair0_cfg->rx_gain_calib_table[i].offset;
+      openair0_cfg->rx_gain_offset[chain_index] = openair0_cfg->rx_gain_calib_table[i].offset+gain_adj;
     }
     i++;
   }
@@ -366,8 +399,13 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
 
   uhd::device_addrs_t device_adds = uhd::device::find(args);
   size_t i;
+  
+  int vers=0,subvers=0,subsubvers=0;
+  int bw_gain_adjust=0;
+
+  sscanf(uhd::get_version_string().c_str(),"%d.%d.%d",&vers,&subvers,&subsubvers);
 
-  printf("Checking for USRPs\n");
+  printf("Checking for USRPs : UHD %s (%d.%d.%d)\n",uhd::get_version_string().c_str(),vers,subvers,subsubvers);
   
   if(device_adds.size() == 0)
   {
@@ -388,6 +426,7 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
 
     }
 
+
     printf("Found USRP X300\n");
     s->usrp = uhd::usrp::multi_usrp::make(args);
     //  s->usrp->set_rx_subdev_spec(rx_subdev);
@@ -410,21 +449,29 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
             // from usrp_time_offset
       openair0_cfg[0].samples_per_packet    = 2048;
       openair0_cfg[0].tx_sample_advance     = 15;
+      openair0_cfg[0].tx_bw                 = 20e6;
+      openair0_cfg[0].rx_bw                 = 20e6;
       openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
       break;
     case 15360000:
       openair0_cfg[0].samples_per_packet    = 2048;
       openair0_cfg[0].tx_sample_advance     = 45;
+      openair0_cfg[0].tx_bw                 = 10e6;
+      openair0_cfg[0].rx_bw                 = 10e6;
       openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
       break;
     case 7680000:
       openair0_cfg[0].samples_per_packet    = 1024;
       openair0_cfg[0].tx_sample_advance     = 50;
+      openair0_cfg[0].tx_bw                 = 5e6;
+      openair0_cfg[0].rx_bw                 = 5e6;
       openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
       break;
     case 1920000:
       openair0_cfg[0].samples_per_packet    = 256;
       openair0_cfg[0].tx_sample_advance     = 50;
+      openair0_cfg[0].tx_bw                 = 1.25e6;
+      openair0_cfg[0].rx_bw                 = 1.25e6;
       openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
       break;
     default:
@@ -446,30 +493,56 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
     // set master clock rate and sample rate for tx & rx for streaming
 
     device->type = USRP_B200_IF;
-    s->usrp->set_master_clock_rate(30.72e6);
 
-    openair0_cfg[0].rx_gain_calib_table = calib_table_b210;
 
+    if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) {
+      openair0_cfg[0].rx_gain_calib_table = calib_table_b210;
+      bw_gain_adjust=0;
+    }
+    else {
+      openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38;
+      bw_gain_adjust=1;
+    }
     switch ((int)openair0_cfg[0].sample_rate) {
     case 30720000:
+      s->usrp->set_master_clock_rate(30.72e6);
             // from usrp_time_offset
-      openair0_cfg[0].samples_per_packet    = 2048;
+      openair0_cfg[0].samples_per_packet    = 4096;
       openair0_cfg[0].tx_sample_advance     = 115;
+      openair0_cfg[0].tx_bw                 = 20e6;
+      openair0_cfg[0].rx_bw                 = 20e6;
       openair0_cfg[0].tx_scheduling_advance = 11*openair0_cfg[0].samples_per_packet;
       break;
+    case 23040000:
+      s->usrp->set_master_clock_rate(46.08e6);
+      openair0_cfg[0].samples_per_packet    = 2048;
+      openair0_cfg[0].tx_sample_advance     = 113;
+      openair0_cfg[0].tx_bw                 = 20e6;
+      openair0_cfg[0].rx_bw                 = 20e6;
+      openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
+      break;
     case 15360000:
+      s->usrp->set_master_clock_rate(30.72e6);
       openair0_cfg[0].samples_per_packet    = 2048;
       openair0_cfg[0].tx_sample_advance     = 113;
+      openair0_cfg[0].tx_bw                 = 10e6;
+      openair0_cfg[0].rx_bw                 = 10e6;
       openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
       break;
     case 7680000:
+      s->usrp->set_master_clock_rate(30.72e6);
       openair0_cfg[0].samples_per_packet    = 1024;
       openair0_cfg[0].tx_sample_advance     = 70;//103;
+      openair0_cfg[0].tx_bw                 = 5e6;
+      openair0_cfg[0].rx_bw                 = 5e6;
       openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
       break;
     case 1920000:
+      s->usrp->set_master_clock_rate(30.72e6);
       openair0_cfg[0].samples_per_packet    = 256;
       openair0_cfg[0].tx_sample_advance     = 40;
+      openair0_cfg[0].tx_bw                 = 1.25e6;
+      openair0_cfg[0].rx_bw                 = 1.25e6;
       openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
       break;
     default:
@@ -485,7 +558,7 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
       s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
       printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
       s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i);
-      set_rx_gain_offset(&openair0_cfg[0],i);
+      set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust);
 
       ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i);
       // limit to maximum gain
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf
index 1d47abdd60841208eded5833d54685844981c5f1..174eda2c81cf009191bdd943efe9402f0dc6a1cb 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf
@@ -28,7 +28,7 @@ eNBs =
         tdd_config_s            			      = 0;
         prefix_type             			      = "NORMAL";
         eutra_band              			      = 7;
-        downlink_frequency      			      = 2660000000L;
+        downlink_frequency      			      = 2680000000L;
         uplink_frequency_offset 			      = -120000000;
         Nid_cell					      = 0;
         N_RB_DL                 			      = 100;
@@ -36,7 +36,7 @@ eNBs =
         nb_antennas_tx          			      = 1;
         nb_antennas_rx          			      = 1;
         tx_gain                                            = 90;
-        rx_gain                                            = 120;
+        rx_gain                                            = 127;
         prach_root              			      = 0;
         prach_config_index      			      = 0;
         prach_high_speed        			      = "DISABLE";
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
index 8f9dc280ae1c2e1746176bcf887e4ac6f635481b..b19cca6e6deec974f435f6cd44860acee720736a 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
@@ -28,7 +28,7 @@ eNBs =
         tdd_config_s            			      = 0;
         prefix_type             			      = "NORMAL";
         eutra_band              			      = 7;
-        downlink_frequency      			      = 2660000000L;
+        downlink_frequency      			      = 2680000000L;
         uplink_frequency_offset 			      = -120000000;
         Nid_cell					      = 0;
         N_RB_DL                 			      = 50;
@@ -36,7 +36,7 @@ eNBs =
         nb_antennas_tx          			      = 1;
         nb_antennas_rx          			      = 1;
         tx_gain                                            = 90;
-        rx_gain                                            = 118;
+        rx_gain                                            = 125;
         prach_root              			      = 0;
         prach_config_index      			      = 0;
         prach_high_speed        			      = "DISABLE";
@@ -140,10 +140,10 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.213/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.212/24";
 
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.213/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.212/24";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf
index 4c760e19c2ca4f362c55278a9791d38ab18786aa..d0488f2d37b3812faf9887ceb60781a8a278b631 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf
@@ -35,7 +35,7 @@ eNBs =
         nb_antennas_tx          			      = 1;
         nb_antennas_rx          			      = 1;
         tx_gain                                            = 32;
-        rx_gain                                            = 120;
+        rx_gain                                            = 118;
         prach_root              			      = 0;
         prach_config_index      			      = 0;
         prach_high_speed        			      = "DISABLE";
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
index d8ea58910a66cfb45eeb394b6c2556295b32bb40..2883d8de0c60de90948b5ce9d852c3702e8e7650 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
@@ -36,7 +36,7 @@ eNBs =
       nb_antennas_tx          			      = 1;
       nb_antennas_rx          			      = 1;
       tx_gain                                            = 90;
-      rx_gain                                            = 132;
+      rx_gain                                            = 125;
       prach_root              			      = 0;
       prach_config_index      			      = 0;
       prach_high_speed        			      = "DISABLE";
@@ -143,10 +143,10 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.213/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.212/24";
 
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.213/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.212/24";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
index 6470b310f0bf25c58d4109709e52e39b340f842f..75969c04fd2bd8c02086d0f9076ce36384487210 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
@@ -16,50 +16,49 @@ eNBs =
     tracking_area_code  =  "1";
 
     mobile_country_code =  "208";
-
     mobile_network_code =  "95";
 
        ////////// Physical parameters:
 
     component_carriers = (
       {
-        frame_type					          = "FDD";
-        tdd_config 					          = 3;
-        tdd_config_s            			      = 0;
-        prefix_type             			      = "NORMAL";
-        eutra_band              			      = 7;
-        downlink_frequency      			      = 2660000000L;
-        uplink_frequency_offset 			      = -120000000;
-        Nid_cell					              = 0;
-        N_RB_DL                 			      = 25;
-        Nid_cell_mbsfn          			      = 0;
-        nb_antennas_tx          			      = 1;
-        nb_antennas_rx          			      = 1;
-        tx_gain                                = 90;
-        rx_gain                                = 132;
-        prach_root              			      = 0;
-        prach_config_index      			      = 0;
-        prach_high_speed        			      = "DISABLE";
-        prach_zero_correlation  			      = 1;
-        prach_freq_offset       			      = 2;
-        pucch_delta_shift       			      = 1;
-        pucch_nRB_CQI           			      = 1;
-        pucch_nCS_AN            			      = 0;
-        pucch_n1_AN             			      = 32;
-        pdsch_referenceSignalPower             = -26;
-        pdsch_p_b                              = 0;
-        pusch_n_SB                             = 1;
-        pusch_enable64QAM                      = "DISABLE";
-        pusch_hoppingMode                      = "interSubFrame";
-        pusch_hoppingOffset                    = 0;
-        pusch_groupHoppingEnabled              = "ENABLE";
-        pusch_groupAssignment      			  = 0;
-        pusch_sequenceHoppingEnabled		   	  = "DISABLE";
-        pusch_nDMRS1                           = 1;
-        phich_duration                         = "NORMAL";
-        phich_resource                         = "ONESIXTH";
+        frame_type                = "FDD";
+        tdd_config                = 3;
+        tdd_config_s                        = 0;
+        prefix_type                         = "NORMAL";
+        eutra_band                          = 7;
+        downlink_frequency                  = 2660000000L;
+        uplink_frequency_offset             = -120000000;
+        Nid_cell                = 0;
+        N_RB_DL                             = 25;
+        Nid_cell_mbsfn                      = 0;
+        nb_antennas_tx                      = 1;
+        nb_antennas_rx                      = 1;
+        tx_gain                                            = 90;
+        rx_gain                                            = 132;
+        prach_root                          = 0;
+        prach_config_index                  = 0;
+        prach_high_speed                    = "DISABLE";
+        prach_zero_correlation              = 1;
+        prach_freq_offset                   = 2;
+        pucch_delta_shift                   = 1;
+        pucch_nRB_CQI                       = 1;
+        pucch_nCS_AN                        = 0;
+        pucch_n1_AN                         = 32;
+        pdsch_referenceSignalPower            = -26;
+        pdsch_p_b                             = 0;
+        pusch_n_SB                            = 1;
+        pusch_enable64QAM                     = "DISABLE";
+        pusch_hoppingMode                                  = "interSubFrame";
+        pusch_hoppingOffset                                = 0;
+        pusch_groupHoppingEnabled             = "ENABLE";
+        pusch_groupAssignment                 = 0;
+        pusch_sequenceHoppingEnabled              = "DISABLE";
+        pusch_nDMRS1                                       = 1;
+        phich_duration                                     = "NORMAL";
+        phich_resource                                     = "ONESIXTH";
         srs_enable                                         = "DISABLE";
-        /*  srs_BandwidthConfig                                =;
+      /*  srs_BandwidthConfig                                =;
         srs_SubframeConfig                                 =;
         srs_ackNackST                                      =;
         srs_MaxUpPts                                       =;*/
@@ -72,15 +71,15 @@ eNBs =
         pucch_deltaF_Format1b                              = "deltaF3";
         pucch_deltaF_Format2                               = "deltaF0";
         pucch_deltaF_Format2a                              = "deltaF0";
-        pucch_deltaF_Format2b		    	      = "deltaF0";
+        pucch_deltaF_Format2b               = "deltaF0";
 
         rach_numberOfRA_Preambles                          = 64;
         rach_preamblesGroupAConfig                         = "DISABLE";
-        /*
+      /*
         rach_sizeOfRA_PreamblesGroupA                      = ;
         rach_messageSizeGroupA                             = ;
         rach_messagePowerOffsetGroupB                      = ;
-        */
+      */
         rach_powerRampingStep                              = 4;
         rach_preambleInitialReceivedTargetPower            = -108;
         rach_preambleTransMax                              = 10;
@@ -90,16 +89,17 @@ eNBs =
 
         pcch_default_PagingCycle                           = 128;
         pcch_nB                                            = "oneT";
-        bcch_modificationPeriodCoeff			      = 2;
-        ue_TimersAndConstants_t300			      = 1000;
-        ue_TimersAndConstants_t301			      = 1000;
-        ue_TimersAndConstants_t310			      = 1000;
-        ue_TimersAndConstants_t311			      = 10000;
-        ue_TimersAndConstants_n310			      = 20;
-        ue_TimersAndConstants_n311			      = 1;
+        bcch_modificationPeriodCoeff            = 2;
+        ue_TimersAndConstants_t300            = 1000;
+        ue_TimersAndConstants_t301            = 1000;
+        ue_TimersAndConstants_t310            = 1000;
+        ue_TimersAndConstants_t311            = 10000;
+        ue_TimersAndConstants_n310            = 20;
+        ue_TimersAndConstants_n311            = 1;
       }
     );
 
+
     srb1_parameters :
     {
         # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
@@ -129,28 +129,25 @@ eNBs =
         SCTP_OUTSTREAMS = 2;
     };
 
-
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.188.2.2";
-                              ipv6       = "192:168:30::17";
-                              active     = "yes";
-                              preference = "ipv4";
-                            }
-                          );
+    mme_ip_address      = ( {ipv4 = "192.170.0.1";
+                              ipv6="192:168:30::17";
+                              active="yes";
+                              preference="ipv4";});
 
     NETWORK_INTERFACES :
     {
-        ENB_INTERFACE_NAME_FOR_S1_MME            = "tun2";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.188.2.2/24";
+        ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0:3";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.170.0.2/24";
 
-        ENB_INTERFACE_NAME_FOR_S1U               = "lo";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "127.0.0.1/24";
-        ENB_PORT_FOR_S1U                         = 2153; # Spec 2152
+        ENB_INTERFACE_NAME_FOR_S1U               = "eth0:4";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.170.0.2/24";
+        ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
     };
 
     log_config :
     {
-      global_log_level                      ="info";
+      global_log_level                      ="debug";
       global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
       hw_log_verbosity                      ="medium";
@@ -164,10 +161,6 @@ eNBs =
       pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
       rrc_log_verbosity                     ="medium";
-      gtpu_log_level                        ="info";
-      gtpu_log_verbosity                    ="medium";
-      udp_log_level                         ="info";
-      udp_log_verbosity                     ="medium";
    };
 
   }
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index 464cb329a11b26659a00707db31f204130711b53..0b651ccb8df2671f18f4c2837c1988ea1bd5ee7c 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -235,6 +235,7 @@ static int                      time_offset[4] = {0,0,0,0};
 static char                     UE_flag=0;
 //static uint8_t                  eNB_id=0,UE_id=0;
 
+static char                     threequarter_fs=0;
 
 uint32_t                 downlink_frequency[MAX_NUM_CCs][4];
 int32_t                  uplink_frequency_offset[MAX_NUM_CCs][4];
@@ -909,13 +910,13 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
       if (phy_vars_eNB->lte_frame_parms.Ncp == EXTENDED) {
         PHY_ofdm_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F],
                      dummy_tx_b,
-                     phy_vars_eNB->lte_frame_parms.log2_symbol_size,
+                     phy_vars_eNB->lte_frame_parms.ofdm_symbol_size,
                      6,
                      phy_vars_eNB->lte_frame_parms.nb_prefix_samples,
                      CYCLIC_PREFIX);
         PHY_ofdm_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F+slot_sizeF],
                      dummy_tx_b+(phy_vars_eNB->lte_frame_parms.samples_per_tti>>1),
-                     phy_vars_eNB->lte_frame_parms.log2_symbol_size,
+                     phy_vars_eNB->lte_frame_parms.ofdm_symbol_size,
                      6,
                      phy_vars_eNB->lte_frame_parms.nb_prefix_samples,
                      CYCLIC_PREFIX);
@@ -2076,7 +2077,7 @@ static void get_options (int argc, char **argv)
     {NULL, 0, NULL, 0}
   };
 
-  while ((c = getopt_long (argc, argv, "A:a:C:dK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:Tx:",long_options,NULL)) != -1) {
+  while ((c = getopt_long (argc, argv, "A:a:C:dEK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:Tx:",long_options,NULL)) != -1) {
     switch (c) {
     case LONG_OPTION_MAXPOWER:
       tx_max_power[0]=atoi(optarg);
@@ -2178,6 +2179,10 @@ static void get_options (int argc, char **argv)
       printf("Running with XFORMS!\n");
 #endif
       break;
+      
+    case 'E':
+      threequarter_fs=1;
+      break;
 
     case 'K':
 #if defined(ENABLE_ITTI)
@@ -2687,6 +2692,7 @@ int main( int argc, char **argv )
     frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 0;
     frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
     frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0;
+    frame_parms[CC_id]->threequarter_fs = threequarter_fs;
     init_ul_hopping(frame_parms[CC_id]);
     init_frame_parms(frame_parms[CC_id],1);
     //   phy_init_top(frame_parms[CC_id]);
@@ -2892,10 +2898,18 @@ int main( int argc, char **argv )
   for (card=0; card<MAX_CARDS; card++) {
 
     if(frame_parms[0]->N_RB_DL == 100) {
-      openair0_cfg[card].sample_rate=30.72e6;
-      openair0_cfg[card].samples_per_frame = 307200; 
-      openair0_cfg[card].tx_bw = 10e6;
-      openair0_cfg[card].rx_bw = 10e6;
+      if (frame_parms[0]->threequarter_fs) {
+	openair0_cfg[card].sample_rate=23.04e6;
+	openair0_cfg[card].samples_per_frame = 230400; 
+	openair0_cfg[card].tx_bw = 10e6;
+	openair0_cfg[card].rx_bw = 10e6;
+      }
+      else {
+	openair0_cfg[card].sample_rate=30.72e6;
+	openair0_cfg[card].samples_per_frame = 307200; 
+	openair0_cfg[card].tx_bw = 10e6;
+	openair0_cfg[card].rx_bw = 10e6;
+      }
     } else if(frame_parms[0]->N_RB_DL == 50) {
       openair0_cfg[card].sample_rate=15.36e6;
       openair0_cfg[card].samples_per_frame = 153600;
@@ -2977,7 +2991,7 @@ int main( int argc, char **argv )
 	openair0_cfg[card].rx_gain[i] = PHY_vars_UE_g[0][0]->rx_total_gain_dB;
       }
 
-#ifdef OAI_USRP      
+#if 0  // UHD 3.8     
       switch(frame_parms[0]->N_RB_DL) {
       case 6:
         openair0_cfg[card].rx_gain[i] -= 12;
diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index 7f116b98250ceb84fad4e32aaab8ea6a84fdc69c..6293ad4264c609d2821c67dfb626ef6b7e647c05 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -279,7 +279,7 @@ static void *UE_thread_synch(void *arg)
 #ifdef OAI_USRP
         openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET;
 
-	
+#if 0 // UHD 3.8	
         switch(UE->lte_frame_parms.N_RB_DL) {
         case 6:
           openair0_cfg[card].rx_gain[i] -= 12;
@@ -301,7 +301,7 @@ static void *UE_thread_synch(void *arg)
           printf( "Unknown number of RBs %d\n", UE->lte_frame_parms.N_RB_DL );
           break;
         }
-	
+#endif
         printf( "UE synch: setting RX gain (%d,%d) to %f\n", card, i, openair0_cfg[card].rx_gain[i] );
 #endif
       }
@@ -357,7 +357,8 @@ static void *UE_thread_synch(void *arg)
           openair0_cfg[card].tx_freq[i] = downlink_frequency[card][i]+uplink_frequency_offset[card][i];
 #ifdef OAI_USRP
           openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET;  // 65 calibrated for USRP B210 @ 2.6 GHz
-	  
+
+#if 0 // UHD 3.8	  
           switch(UE->lte_frame_parms.N_RB_DL) {
           case 6:
             openair0_cfg[card].rx_gain[i] -= 12;
@@ -379,7 +380,7 @@ static void *UE_thread_synch(void *arg)
             printf("Unknown number of RBs %d\n",UE->lte_frame_parms.N_RB_DL);
             break;
           }
-	  
+#endif	  
 
           printf("UE synch: setting RX gain (%d,%d) to %f\n",card,i,openair0_cfg[card].rx_gain[i]);
 #endif
@@ -423,33 +424,25 @@ static void *UE_thread_synch(void *arg)
 	    openair0_cfg[0].sample_rate =1.92e6;
 	    openair0_cfg[0].rx_bw          =.96e6;
 	    openair0_cfg[0].tx_bw          =.96e6;
-#ifdef OAI_USRP
-            openair0_cfg[0].rx_gain[0] -= 12;
-#endif
+	    //            openair0_cfg[0].rx_gain[0] -= 12;
 	    break;
 	  case 25:
 	    openair0_cfg[0].sample_rate =7.68e6;
 	    openair0_cfg[0].rx_bw          =2.5e6;
 	    openair0_cfg[0].tx_bw          =2.5e6;
-#ifdef OAI_USRP
-            openair0_cfg[0].rx_gain[0] -= 6;
-#endif
+	    //            openair0_cfg[0].rx_gain[0] -= 6;
 	    break;
 	  case 50:
 	    openair0_cfg[0].sample_rate =15.36e6;
 	    openair0_cfg[0].rx_bw          =5.0e6;
 	    openair0_cfg[0].tx_bw          =5.0e6;
-#ifdef OAI_USRP
-            openair0_cfg[0].rx_gain[0] -= 3;
-#endif
+	    //            openair0_cfg[0].rx_gain[0] -= 3;
 	    break;
 	  case 100:
 	    openair0_cfg[0].sample_rate=30.72e6;
 	    openair0_cfg[0].rx_bw=10.0e6;
 	    openair0_cfg[0].tx_bw=10.0e6;
-#ifdef OAI_USRP
-            openair0_cfg[0].rx_gain[0] -= 0;
-#endif
+	    //            openair0_cfg[0].rx_gain[0] -= 0;
 	    break;
 	  }
 #ifndef EXMIMO