Commit c3f3d1ac authored by Rohit Gupta's avatar Rohit Gupta

fixed a bug to search for an open port

parent 4b4e2213
...@@ -7,9 +7,20 @@ import re ...@@ -7,9 +7,20 @@ import re
import threading import threading
import signal import signal
import traceback import traceback
import os
# configure the serial connections (the parameters differs on the device you are connecting to) # configure the serial connections (the parameters differs on the device you are connecting to)
serial_port = '/dev/ttyUSB2' #First we find an open port to work with
serial_port=''
max_ports=100
for port in range(1,100):
serial_port = '/dev/ttyUSB'+str(port)
if os.path.exists(serial_port) == True:
break
print 'Using Serial port : ' + serial_port
#serial_port = '/dev/ttyUSB2'
bandrich_ppd_config = '$OPENAIR_DIR/cmake_targets/autotests/tools/wdial.bandrich.conf' bandrich_ppd_config = '$OPENAIR_DIR/cmake_targets/autotests/tools/wdial.bandrich.conf'
exit_flag=0 exit_flag=0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment