[maemo-developers] dbus-send from the CLI for SMS sending

From: 白い熊 maemo-developers_maemo.org at sumou.com
Date: Sun Dec 20 00:07:57 EET 2009
I'm trying to send SMSes from the commandline.

Following
https://garage.maemo.org/plugins/wiki/index.php?Tools&id=1106&type=g

I spied on dbus and sent an SMS containing "aaaaaaaaaa" (i.e. 10 `a's) to +12345678901

This is the dbus log, with the relevant part:

method call sender=:1.10 -> dest=org.freedesktop.DBus serial=1350 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal', interface='org.freedesktop.DBus', member='NameOwnerChanged', arg1=':1.58'"
method call sender=:1.35 -> dest=com.nokia.mce serial=598 path=/com/nokia/mce/request; interface=com.nokia.mce.request; member=req_vibrator_pattern_activate
   string "PatternTouchscreen"
method call sender=:1.49 -> dest=com.nokia.phone.SMS serial=74 path=/com/nokia/phone/SMS/ba212ae1; interface=com.nokia.csd.SMS.Outgoing; member=Send
   array [
      array [
         byte 33
         byte 5
         byte 11
         byte 145
         byte 33
         byte 67
         byte 101
         byte 135
         byte 9
         byte 241
         byte 0
         byte 0
         byte 10
         byte 225
         byte 112
         byte 56
         byte 28
         byte 14
         byte 135
         byte 195
         byte 225
         byte 48
      ]
   ]
   string ""
signal sender=:1.16 -> dest=(null destination) serial=6150 path=/com/nokia/phone/SMS/ba212ae1; interface=com.nokia.csd.SMS.Outgoing; member=OutgoingState
   int32 1
   string "29f9b8e4-1bb6-493b-ae56-bc8e6c1ead00"
   string "+12345678901"
method call sender=:1.58 -> dest=org.freedesktop.DBus serial=489 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal', interface='com.nokia.mce.signal', member='tklock_mode_ind'"
method call sender=:1.58 -> dest=org.freedesktop.DBus serial=490 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal', interface='com.nokia.mce.signal', member='sig_device_orientation_ind'"
method call sender=:1.58 -> dest=com.nokia.mce serial=491 path=/com/nokia/mce/request; interface=com.nokia.mce.request; member=req_accelerometer_enable
method call sender=:1.10 -> dest=org.freedesktop.DBus serial=1352 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal', interface='org.freedesktop.DBus', member='NameOwnerChanged', arg1=':1.58'"
method call sender=:1.35 -> dest=com.nokia.mce serial=599 path=/com/nokia/mce/request; interface=com.nokia.mce.request; member=req_vibrator_pattern_activate
   string "PatternTouchscreen"
method call sender=:1.35 -> dest=com.nokia.mce serial=600 path=/com/nokia/mce/request; interface=com.nokia.mce.request; member=req_vibrator_pattern_activate
   string "PatternTouchscreen"
method call sender=:1.58 -> dest=org.freedesktop.DBus serial=492 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal', interface='com.nokia.mce.signal', member='tklock_mode_ind'"
method call sender=:1.58 -> dest=org.freedesktop.DBus serial=493 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal', interface='com.nokia.mce.signal', member='sig_device_orientation_ind'"
method call sender=:1.58 -> dest=com.nokia.mce serial=494 path=/com/nokia/mce/request; interface=com.nokia.mce.request; member=req_accelerometer_disable
method call sender=:1.10 -> dest=org.freedesktop.DBus serial=1355 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal', interface='org.freedesktop.DBus', member='NameOwnerChanged', arg1=':1.58'"
signal sender=:1.16 -> dest=(null destination) serial=6151 path=/com/nokia/phone/SMS/ba212ae1; interface=com.nokia.csd.SMS.Outgoing; member=OutgoingSegment
   string "29f9b8e4-1bb6-493b-ae56-bc8e6c1ead00"
   uint32 113
   uint32 0
   uint32 0
   int32 0
signal sender=:1.16 -> dest=(null destination) serial=6152 path=/com/nokia/phone/SMS/ba212ae1; interface=com.nokia.csd.SMS.Outgoing; member=Outgoing
   string "29f9b8e4-1bb6-493b-ae56-bc8e6c1ead00"
   string "+12345678901"
   array [
      uint32 113
   ]
   array [
      int32 0
   ]
signal sender=:1.16 -> dest=(null destination) serial=6153 path=/com/nokia/phone/net; interface=Phone.Net; member=signal_strength_change
   byte 47
   byte 94

CLI calling BTW is working already perfectly: http://wiki.maemo.org/User:Jebba#DBUS

So, I experimented in a similar way.

Doing, based on the above dbus log:

dbus-send --system --dest=com.nokia.phone.SMS --type=method_call
--print-reply /com/nokia/phone/SMS/ba212ae1
com.nokia.csd.SMS.Outgoing.Send
array:byte:33,5,11,145,33,67,101,135,9,241,0,0,10,225,112,56,28,14,135,195,225,48
string:""

I get the following response:

method return sender=:1.16 -> dest=:1.307 reply_serial=2
     string ""
     int32 3

But this doesn't send the SMS.

Any thoughts anyone?
-- 
C уважением / 宜しく御願い致します / Best regards / S pozdravem / Z poważaniem / Mit freundlichen Grüßen

白い熊
k
More information about the maemo-developers mailing list