SMS with modemmanager and Nokia N900



Hi,

i tried to use the testscript test/mm-send-sms.py to send a sms with my
Nokia N900 phone. 
I got the following exception when i try to use the script with:

$ python mm-send-sms.py 0123456789 mytext
Sending message failed.
Exception is: org.freedesktop.ModemManager.Modem.Gsm.Unknown: Unknown
error

I tried the same with d-feet and the dict:
{'number':'123456789', 'text':'my text'}

same result.

Any ideas why sending sms doesn't work? And how to fix this problem?


Cheers,

Tom


p.s.
I had to fix the script to output the exception. See patch attachment
and please apply the patch to git master. 


diff --git a/test/mm-send-sms.py b/test/mm-send-sms.py
index 55d453c..fad33fa 100755
--- a/test/mm-send-sms.py
+++ b/test/mm-send-sms.py
@@ -46,7 +46,8 @@ msg_dict = dbus.Dictionary({ dbus.String('number') : dbus.String(number),
 sms_iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.ModemManager.Modem.Gsm.SMS')
 try:
     sms_iface.Send(msg_dict)
-except:
-    print "Sending message failed"
+except Exception, e:
+    print "Sending message failed."
+    print "Exception is: %s" % str(e)
 finally:
     modem.Enable(False)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]