script to send and read incoming SMS

15 messages Options
Embed this post
Permalink
RANJAN-3

script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Hi,

Any idea about a simple script to send and read the received SMS on the FR in python?

Sriranjan

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
RANJAN schrieb:
> Hi,
>
> Any idea about a simple script to send and read the received SMS on
> the FR in python?
i tried it at the moment: for example:

mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device
org.freesmartphone.GSM.SMS.SendMessage 0049987654321   "test message"    []

is this ok, or do you want a python script ?

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
In reply to this post by RANJAN-3
RANJAN schrieb:
> Hi,
>
> Any idea about a simple script to send and read the received SMS on
> the FR in python?
>


for reading, you can try:

mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device
org.freesmartphone.GSM.SIM.RetrieveMessagebook all

i tried here as parameter unread, but this doesn't work here. i must
provide "read" or "all"

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
In reply to this post by matzehuber


On Tue, Oct 27, 2009 at 11:02 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:

Hi,

Any idea about a simple script to send and read the received SMS on the FR in python?
i tried it at the moment: for example:

mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SMS.SendMessage 0049987654321   "test message"    []

is this ok, or do you want a python script ?

A script would help but I guess it is about creating an object and calling the function using it.

Sriranjan


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
RANJAN schrieb:


On Tue, Oct 27, 2009 at 11:02 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:

Hi,

Any idea about a simple script to send and read the received SMS on the FR in python?
i tried it at the moment: for example:

mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SMS.SendMessage 0049987654321   "test message"    []

is this ok, or do you want a python script ?

A script would help but I guess it is about creating an object and calling the function using it.

Sriranjan

of course, what else, but because i tried it already, you must not reinvent the wheel again:


root@om-gta02 ~/contactx # cat sms_read.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
device = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
iface = dbus.Interface(device, 'org.freesmartphone.GSM.SIM')
for i in iface.RetrieveMessagebook("all"):
    print repr(i)



root@om-gta02 ~/contactx # cat sms_send.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
gsm_device_obj = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
gsm_sms_iface = dbus.Interface(gsm_device_obj, 'org.freesmartphone.GSM.SMS')
gsm_sms_iface.SendMessage( sys.argv[1], sys.argv[2], [] )


-- 
Mit freundlichen Grüssen
Matthias Huber 
Kohlstattstr. 14
86459 Wollishausen
Tel: 08238-7998
LPI000181125

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
So you posted it in the wiki?

Sriranjan

On Tue, Oct 27, 2009 at 11:55 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:


On Tue, Oct 27, 2009 at 11:02 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:

Hi,

Any idea about a simple script to send and read the received SMS on the FR in python?
i tried it at the moment: for example:

mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SMS.SendMessage 0049987654321   "test message"    []

is this ok, or do you want a python script ?

A script would help but I guess it is about creating an object and calling the function using it.

Sriranjan

of course, what else, but because i tried it already, you must not reinvent the wheel again:


root@om-gta02 ~/contactx # cat sms_read.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
device = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
iface = dbus.Interface(device, 'org.freesmartphone.GSM.SIM')
for i in iface.RetrieveMessagebook("all"):
    print repr(i)



root@om-gta02 ~/contactx # cat sms_send.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
gsm_device_obj = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
gsm_sms_iface = dbus.Interface(gsm_device_obj, 'org.freesmartphone.GSM.SMS')
gsm_sms_iface.SendMessage( sys.argv[1], sys.argv[2], [] )


-- 
Mit freundlichen Grüssen
Matthias Huber 
Kohlstattstr. 14
86459 Wollishausen
Tel: 08238-7998
LPI000181125


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
RANJAN schrieb:
So you posted it in the wiki?

Sriranjan

On Tue, Oct 27, 2009 at 11:55 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:


On Tue, Oct 27, 2009 at 11:02 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:

Hi,

Any idea about a simple script to send and read the received SMS on the FR in python?
i tried it at the moment: for example:

mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SMS.SendMessage 0049987654321   "test message"    []

is this ok, or do you want a python script ?

A script would help but I guess it is about creating an object and calling the function using it.

Sriranjan

of course, what else, but because i tried it already, you must not reinvent the wheel again:


root@om-gta02 ~/contactx # cat sms_read.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
device = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
iface = dbus.Interface(device, 'org.freesmartphone.GSM.SIM')
for i in iface.RetrieveMessagebook("all"):
    print repr(i)



root@om-gta02 ~/contactx # cat sms_send.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
gsm_device_obj = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
gsm_sms_iface = dbus.Interface(gsm_device_obj, 'org.freesmartphone.GSM.SMS')
gsm_sms_iface.SendMessage( sys.argv[1], sys.argv[2], [] )


aeeeh no, not yet.

i was in the page mdbus, but while reading, i decided, it is not the right place.

what do you think, is the right place or shall i open a new page ?


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Well take the opinion of other as well.A new page might be good..

Sriranjan

On Wed, Oct 28, 2009 at 12:08 AM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:
So you posted it in the wiki?

Sriranjan

On Tue, Oct 27, 2009 at 11:55 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:


On Tue, Oct 27, 2009 at 11:02 PM, Matthias Huber <[hidden email]> wrote:
RANJAN schrieb:

Hi,

Any idea about a simple script to send and read the received SMS on the FR in python?
i tried it at the moment: for example:

mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SMS.SendMessage 0049987654321   "test message"    []

is this ok, or do you want a python script ?

A script would help but I guess it is about creating an object and calling the function using it.

Sriranjan

of course, what else, but because i tried it already, you must not reinvent the wheel again:


root@om-gta02 ~/contactx # cat sms_read.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
device = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
iface = dbus.Interface(device, 'org.freesmartphone.GSM.SIM')
for i in iface.RetrieveMessagebook("all"):
    print repr(i)



root@om-gta02 ~/contactx # cat sms_send.py
#!/usr/bin/python

import sys
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

bus = dbus.SystemBus()
gsm_device_obj = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
gsm_sms_iface = dbus.Interface(gsm_device_obj, 'org.freesmartphone.GSM.SMS')
gsm_sms_iface.SendMessage( sys.argv[1], sys.argv[2], [] )


aeeeh no, not yet.

i was in the page mdbus, but while reading, i decided, it is not the right place.

what do you think, is the right place or shall i open a new page ?



_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Michael 'Mickey' Lauer-2

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
In reply to this post by matzehuber
On the FSO wiki (www.freesmartphone.org) -> Tutorials would match fine.

Cheers,

:M:

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Michael 'Mickey' Lauer schrieb:
> On the FSO wiki (www.freesmartphone.org) -> Tutorials would match fine.
>
> Cheers,
>
> :M:
>  
i placed some examples there.

tomorrow i will place another example there with listening on signals in
c and glib.


Maybe one of the cracks in glib compound types could contribute something.

i broke my head nearly one week to get into it.

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
c_c

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Hi,
matzehuber wrote:
tomorrow i will place another example there with listening on signals in
c and glib.
  Would love to see an example of a dbus service that takes some parameters - in c / dbus / edbus. Have not been able to find anything worthwhile - not that I've spent much time on this.
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
c_c schrieb:
Hi,

matzehuber wrote:
  
tomorrow i will place another example there with listening on signals in 
c and glib.

    
  Would love to see an example of a dbus service that takes some parameters
- in c / dbus / edbus. Have not been able to find anything worthwhile - not
that I've spent much time on this.

  

:--)) aha, one more, who brakes his head and doesn't get in.

i did already:

http://www.freesmartphone.org/index.php/Tutorials

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
c_c

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Hi,
matzehuber wrote:
:--)) aha, one more, who brakes his head and doesn't get in.

i did already:
  :-) I wasn't too clear perhaps - but I'm looking for a service that implements the methods other uses can call.
  So a demo service like 'org.mhuber.demo' that pops up a window on a signal 'message' and shows a string.
Thanks.
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
c_c schrieb:
Hi,

matzehuber wrote:
  
:--)) aha, one more, who brakes his head and doesn't get in.

i did already:

    
  :-) I wasn't too clear perhaps - but I'm looking for a service that
implements the methods other uses can call.
  So a demo service like 'org.mhuber.demo' that pops up a window on a signal
'message' and shows a string.
Thanks.
  
oh, i am sorry. i have knoledge about many things, but not of all.

myself, i had a look into the freesmartphone.org services for learning about this compound types.

but as far as i understood the docu, it isn't so difiicult as one could think.
somewhere i found some samples for implementing services.

try to start here:
    http://dbus.freedesktop.org/doc/dbus-tutorial.html





_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
matzehuber

Re: script to send and read incoming SMS

Reply Threaded More More options
Print post
Permalink
In reply to this post by c_c
Some javascript/style in this post has been disabled (why?)
c_c schrieb:
Hi,

matzehuber wrote:
  
:--)) aha, one more, who brakes his head and doesn't get in.

i did already:

    
  :-) I wasn't too clear perhaps - but I'm looking for a service that
implements the methods other uses can call.
  So a demo service like 'org.mhuber.demo' that pops up a window on a signal
'message' and shows a string.
Thanks.
  
i searched a little further and found maybe helpful for you:

http://maemo.org/api_refs/4.1/dbus-glib-0.74/files.html

there are a few files beginning with example-. they could be of interest for you:

recipient:
  http://maemo.org/api_refs/4.1/dbus-glib-0.74/example-signal-recipient_8c-source.html

emitter:
  http://maemo.org/api_refs/4.1/dbus-glib-0.74/example-signal-emitter_8c-source.html



_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel