New tests: 0186xx for TDD with the huawei 3276 dongle. All necessary files to configure and use it have been added. Existing code has been adapted for the TDD tests. Only the test setup v2 has been adapted. The file test_case_list.xml has been changed to add tests 0186xx, but only to work with test setup v2. It won't work with test setup v1. To be completed if needed. The tests are similar to FDD tests. Throughputs for TDD have to be adjusted, the throughputs of FDD are used for the moment.
30 lines
687 B
Python
30 lines
687 B
Python
import time
|
|
|
|
from modem import quit, Modem
|
|
|
|
try:
|
|
modem = Modem("/dev/ttyUSB0")
|
|
|
|
#test that modem is there
|
|
print "INFO: check modem's presence"
|
|
modem.send('AT')
|
|
r = modem.wait()
|
|
if r.ret != True and "NO CARRIER" not in r.data:
|
|
print "ERROR: no modem?"
|
|
quit(1)
|
|
if "NO CARRIER" in r.data:
|
|
print "WARNING: 'NO CARRIER' detected, not sure if handled correctly"
|
|
|
|
#deactivate the modem
|
|
print "INFO: deactivate the modem"
|
|
modem.send('AT+CFUN=0')
|
|
if modem.wait().ret != True:
|
|
print "ERROR: failed asking modem for deactivation"
|
|
quit(1)
|
|
|
|
except BaseException, e:
|
|
print "ERROR: " + str(e)
|
|
quit(1)
|
|
|
|
quit(0)
|