test: actually send username and password when connecting
This commit is contained in:
@@ -229,7 +229,12 @@ def gsm_connect(proxy, apn, user, password):
|
||||
# Modem.Simple interface
|
||||
simple = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_SIMPLE)
|
||||
try:
|
||||
simple.Connect({'apn': apn, 'number':"*99#"}, timeout=120)
|
||||
opts = {'apn': apn, 'number':"*99#"}
|
||||
if user is not None:
|
||||
opts['username'] = user
|
||||
if password is not None:
|
||||
opts['password'] = password
|
||||
simple.Connect(opts, timeout=120)
|
||||
print "\nConnected!"
|
||||
except Exception, e:
|
||||
print "Error connecting: %s" % e
|
||||
|
Reference in New Issue
Block a user