Notices


Reply
Thread Tools
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#91
if I may suggest another option, Tpsession is even simpler to use in case it helps you. Its a wrapper over the telepathy libs, if you dont want to get your hands dirty
http://tpsession.garage.maemo.org/
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#92
Hmm, having had a look it looks nice but I don't even want to get my hands that dirty... If there were Python bindings on the other hand...

I actually just tried to install the Maemo SDK, thinking if it must be C it must be C, but am having no luck. That's a question for another thread, though.
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#93
Originally Posted by tremby View Post
I can't get the SMS script (http://www.paraiso.dk/pymaemosms.txt) working. I'm in the UK in case that matters and am feeding a number like
07123456789
and a message like
testing testing

It says "Message sent" but the phone I sent it to gets nothing. Any ideas what could be wrong?

There's also nothing new in the el.db file but perhaps I shouldn't be expecting anything there anyway when sending an SMS like this? (That's actually a major problem for me -- I will want my sent messages to appear in history.)

Thanks
it is some kind of a bug, number formatting function gives you errorenous data and message is not sent.

just copypaste the el.db code from gitorious?
www.gitorious.org/VertSMS

it is about 10 lines if I remember correctly. should be found in SMS.py

e: python bindings aren't a problem, you can use ctypes. But with rtcom API I haven't got anything working with storing the sms.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search

Last edited by ossipena; 2010-05-18 at 14:20.
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#94
Any idea how I can fix it?

And just so we're clear, the code you're pointing to is to add the SMS to the database, right?

Would the conversations app then have to be prodded to reload the database before the sent messages appear?

Thanks.
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#95
Originally Posted by tremby View Post
Any idea how I can fix it?

And just so we're clear, the code you're pointing to is to add the SMS to the database, right?

Would the conversations app then have to be prodded to reload the database before the sent messages appear?

Thanks.
I don't have any ideas yet. could you log the conversations dbus-output and the python scripts output when sending a message to 07 number?
(dbus-monitor > logfile.txt for example)

yes it adds it to database, there is small delay but don't know how it acts if conversations is open in background
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#96
This is with the http://www.paraiso.dk/pymaemosms.txt script as is: http://sprunge.us/aIhe

This is with Cue's script back on page 6: http://sprunge.us/YMHI

I've replaced the number with 07XXXXXXXXX (same number of digits though).
 

The Following User Says Thank You to tremby For This Useful Post:
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#97
update: there is now an API way to write stuff to rtcom eventlogger database!!! (million thankses again to frals and gri)

it can be found at newest push from gitorious.

should be straight in sms.py (green lines)

http://gitorious.org/vertsms/vertsms...faf78da4fed051
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
Posts: 267 | Thanked: 183 times | Joined on Jan 2010 @ Campinas, SP, Brazil
#98
Originally Posted by pende View Post
Hi there,

I added some code and now you are able to send sms and receive a reply. Code is available for download here http://ztbsauer.com/sender.py

For now it replies only for one command but feel free to expand it for own needs.
pende,

thanks for your script. It works wonderfully... For non-accented messages. It seems your deoctify() function fails for accented messages, any plans to fix this?
__________________
My nickname on freenode is ptl, that is, the consonants of my nickname here. Kind of a long story.
 
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#99
Originally Posted by Patola View Post
pende,

thanks for your script. It works wonderfully... For non-accented messages. It seems your deoctify() function fails for accented messages, any plans to fix this?
Many people tend to think, that English is the only language in the world and ascii is the only encoding. In real, SMS is not always hex encoded 7-bit ascii. You may need to convert it from GSM encoding to needed (UTF-8?) encoding. Or it can be in UCS encoding. Or it can be mysterious user defined encoding.
Many posts ago I've written correct solution for decoding SMS PDU:
http://kibergus.su/node/17
The only change is that gsmdecode.py is now in ussd4all package instead of ussd-common.
Use gsmdecode.decode_pdu() for decoding PDU.
 
Posts: 4 | Thanked: 0 times | Joined on Nov 2010
#100
Originally Posted by goodwill View Post
I used dbus_glib to do the job. To send your SMS, I can do something like this.
Code:
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#define MYTYPE (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_UCHAR_ARRAY))

DBusGConnection* dbus_conn;
DBusGProxy* dbus_proxy;

dbus_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
dbus_proxy = dbus_g_proxy_new_for_name(dbus_conn, "com.nokia.phone.SMS", "/com/nokia/phone/SMS/ba212ae1","com.nokia.csd.SMS.Outgoing");

GPtrArray* ptrarray;
GArray* array;
guchar values[] = {33,5,11,145,33,67,101,135,9,241,0,0,10,225,112,56,28,14,135,195,225,48};

ptrarray = g_ptr_array_new();
array = g_array_new(FALSE, FALSE, sizeof(guchar));

g_array_append_vals(array, values, sizeof(values)/sizeof(guchar));
g_ptr_array_add(ptrarray, (gpointer)array);

dbus_g_proxy_call_no_reply(dbus_proxy, "Send", MY_TYPE, ptrarray, G_TYPE_STRING,"",G_TYPE_INVALID);

g_ptr_array_free(ptrarray,TRUE);
g_object_unref(dbus_proxy);
dbus_g_connection_unref(dbus_conn);
Hello dear Goodwill

I have tried this example to send an sms via G-LIB library but currently I need to send an sms using "dbus_g_proxy_call" g-lib method. Unfortunately I got a Segmentation Failure (though sms is sent) when calling this:

GError* error;

dbus_g_proxy_call_no_reply(dbus_proxy, "Send", &error, MY_TYPE, ptrarray, G_TYPE_STRING,"",G_TYPE_INVALID);

Please could you please give a hint how to fix that or is there any way to send an sms with reply version.
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:43.