maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   SMS from CLI (Command Line)? (https://talk.maemo.org/showthread.php?t=36148)

Stargazers 2009-12-07 08:05

SMS from CLI (Command Line)?
 
Hi!

Is there any way to send SMSes from command line? It would be very nice if I can just ssh to my phone and send SMSes even my phone is not where I am. Is this possible some way?

twaelti 2009-12-07 08:06

Re: SMS from CLI (Command Line)?
 
Perhaps over D-Bus?
Or you could VNC onto it and have the full GUI available...

ossipena 2009-12-07 08:16

Re: SMS from CLI (Command Line)?
 
app request: mobile web server for maemo ;)

http://mymobilesite.net/

Stargazers 2009-12-07 08:21

Re: SMS from CLI (Command Line)?
 
ossipena, in maemo channel someone wrote that there is lighttpd in repos. Haven't checked it (yet, have to, when I am at home again) but if that is there maybe we can create a web pages for it ourselves :)

twaelti, thanks for the tip to use VNC but mainly I am trying to find a way to do this with CLI because I can ssh almost with every machine but cannot open VNC in many computers (not installed but putty is installed on many windows machines etc). I tried to look those DBUS-apis but have to look them more deeply if I can find any way to do it with CLI directly.

mike2k4 2009-12-07 16:35

Re: SMS from CLI (Command Line)?
 
Quote:

Originally Posted by Stargazers (Post 414047)
ossipena, in maemo channel someone wrote that there is lighttpd in repos. Haven't checked it (yet, have to, when I am at home again) but if that is there maybe we can create a web pages for it ourselves :)

twaelti, thanks for the tip to use VNC but mainly I am trying to find a way to do this with CLI because I can ssh almost with every machine but cannot open VNC in many computers (not installed but putty is installed on many windows machines etc). I tried to look those DBUS-apis but have to look them more deeply if I can find any way to do it with CLI directly.

I can confirm that lighttpd is there now. I downloaded it, but have yet to configure it.

ossipena 2009-12-07 16:41

Re: SMS from CLI (Command Line)?
 
Quote:

Originally Posted by Stargazers (Post 414047)
ossipena, in maemo channel someone wrote that there is lighttpd in repos. Haven't checked it (yet, have to, when I am at home again) but if that is there maybe we can create a web pages for it ourselves :)

twaelti, thanks for the tip to use VNC but mainly I am trying to find a way to do this with CLI because I can ssh almost with every machine but cannot open VNC in many computers (not installed but putty is installed on many windows machines etc). I tried to look those DBUS-apis but have to look them more deeply if I can find any way to do it with CLI directly.

I'd be mostly interested about the modules to be able read messages, calendar etc via httpd. but at an other hand it would consume the battery a lot.

白い熊 2009-12-19 21:36

Re: SMS from CLI (Command Line)?
 
Quote:

Originally Posted by twaelti (Post 414032)
Perhaps over D-Bus?

Indeed, dbus is the way, we just need to figure out the syntax.

Following https://garage.maemo.org/plugins/wik...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:

Code:

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:
Code:

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:
Code:

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

But this doesn't send the SMS.

Any thoughts anyone?

u2maemo 2009-12-19 22:34

Re: SMS from CLI (Command Line)?
 
very interesting, I need this. wait the resolution.

qole 2009-12-19 22:44

Re: SMS from CLI (Command Line)?
 
There's supposed to be a Telepathy API forthcoming for all of this... Supposedly, dbus is the "wrong way" to be doing it.

白い熊 2009-12-19 23:12

Re: SMS from CLI (Command Line)?
 
Yeah, telepathy is all fine and dandy, I've seen the presentation, but currently cannot be interfaced - maybe it's coming.

Second, dbus ain't the wrong way, it's low level, that's exactly what's needed.

For instance I wanna program an interface from GNU Emacs, so you can dial and send SMSes from BBDB etc. Dialing is already working, now the SMS is the part that's missing.

For this, I'd think a low-level way would be better, then interfacing to telepathy... But I wouldn't be opposed even to telepathy, if one would know how to do it now.


All times are GMT. The time now is 04:47.

vBulletin® Version 3.8.8