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)

sakya 2011-02-28 14:00

Re: SMS from CLI (Command Line)?
 
I'll add an argument to pass the pin to the program. ;)
Or maybe as you say it's stored somewhere (I'm not sure that this information is easily available, it shouldn't...)

laustmcgregor 2011-02-28 22:08

Re: SMS from CLI (Command Line)?
 
I think it must be available in d-bus stuff somewhere but haven't managed to get it yet..

tremby 2011-04-05 13:07

Re: SMS from CLI (Command Line)?
 
I finally got around to trying your SMS sender, sakya. From the small amount of testing I've done so far it seems good, but both of the >160 character tests I've tried so far (without the compose dialog) have failed. In both cases I got this output (same number of dots each time too):

Code:

WARNING: SMS exceding 160 characters
        Splitted in 2 parts
Sendind SMS:
[1/2]....
ERR: Failed to send text message
[2/2].....OK

My friend's phone gets the second half of the message fine, the first half has not arrived.

The content of the text, if it matters, was this:
Code:

1......... 2......... 3......... 4......... 5......... 6......... 7......... 8......... 9......... 10........ 11........ 12........ 13........ 14........ 15........ 16........ 17........ let's see if this all gets through
I've got some suggestions for other improvements but we'll get to those soon.

tremby 2011-04-05 13:24

Re: SMS from CLI (Command Line)?
 
Not sure if it's a clue, but I looked at the events database and in the remote_uid column for both of the failed >160-char texts contains
Code:

+447
rather than the full number they were sent to (which did start +447 -- not sure where the 0011 character came from).

sakya 2011-04-05 16:45

Re: SMS from CLI (Command Line)?
 
@tremby: thanks for the feedback.
Can you please try to send the message adding this argument?
Code:

-l logfile.txt
It should log the strings sent/received from pnatd.

tremby 2011-04-05 18:00

Re: SMS from CLI (Command Line)?
 
Hope the following helps:

Code:

$ smssend -l smslog -n $(num Pat) -m "1........ 2........ 3........ 4........ 5........ 6........ 7........ 8........ 9........ 10....... 11....... 12....... 13....... 14.......  this was the half and here is second half. let me know if you got the first half"

[snip]
WARNING: SMS exceding 160 characters
        Splitted in 2 parts
Sendind SMS:
[1/2]....
ERR: Failed to send text message
[2/2].....OK

$ cat smslog
AT
AT+CMGF=1
OK
AT+CSMP=17,167,0,0
OK
AT+CMGS="+447xxxxxxxxx"
> 1........ 2........ 3........ 4........ 5........ 6........ 7........ 8........ 9........ 10....... 11....... 12....... 13....... 14.......  this was the half 1........ 2........ 3........ 4........ 5........ 6........ 7........ 8........ 9........ 10AT..... 11....... 12....... 13....... 14.......  this was the half AT
AT+CMGF=1
OK
AT+CSMP=17,167,0,0
OK
AT+CMGS="+447xxxxxxxxx"
> and here is second half. let me know if you got the first halfand here is second half. let me know if you got the first half
+CMGS: 203

OK


sakya 2011-04-05 19:30

Re: SMS from CLI (Command Line)?
 
Fixed, updated to version 0.1.8. ;)
Many thanks for your help.

godofwar424 2011-04-06 09:36

Re: SMS from CLI (Command Line)?
 
Hi

Could somebody help me make a desktop shortcut that sends this through x-term?

Code:

sudo smssend -n 150 -m "Ba"
Just need the desktop shortcut to open x-term, enter the command and then close x-term when done. Could anybody help me with this?

The reason I want this is because my service provider T-Mobile UK only allows me to check my balance using this method. I have to send a text to that number and they reply with my balance. A desktop shortcut that sends the text for me would save me ALOT of time.

Thanks in advance :)

EDIT: Figured it out myself :) Thanks for the awesome smssend app though :)

tremby 2011-04-06 12:10

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

Originally Posted by sakya (Post 982607)
Fixed, updated to version 0.1.8. ;)
Many thanks for your help.

This time:

Code:

$ smssend -l smslog -n $(num Pat) -m "1........ 2........ 3........ 4........ 5........ 6........ 7........ 8........ 9........ 10....... 11....... 12....... 13....... 14... this was the first half and here is second half. let me know if you got the first half"
The output of that showed two "OK"s.

Here is the log:

Code:

AT
AT+CMGF=1
OK
AT+CSMP=17,167,0,0
OK
AT+CMGS="+447xxxxxxxxx"
> 1........ 2........ 3........ 4........ 5........ 6........ 7........ 8........ 9........ 10....... 11....... 12....... 13....... 14... this was the first half 1........ 2........ 3........ 4........ 5........ 6........ 7........ 8........ 9........ 10....... 11....... 12....... 13....... 14... this was the first half
+CMGS: 219

OK
AT
AT+CMGF=1
OK
AT+CSMP=17,167,0,0
OK
AT+CMGS="+447xxxxxxxxx"
> and here is second half. let me know if you got the first halfand here is second half. let me know if you got the first half
+CMGS: 220

OK

He received all the text but with the halves as separate messages, not a single joined message. Is that a known problem? Any plan to implement proper concatenated SMS?

Also, I then note that in the conversations app the message appears as sent to "(null)" and I can't open its conversation window. I looked in the database and I see that everything looks normal except the remote_uid column, which is, in this case (censored):

Code:

447xxxxxxxxx' AND local_uid = 'ring/tel/ring';
Any idea why that's happening?

sakya 2011-04-06 18:19

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

Originally Posted by tremby (Post 982989)
He received all the text but with the halves as separate messages, not a single joined message. Is that a known problem? Any plan to implement proper concatenated SMS?

Yes it is a known problem (I never read about joined sms, but I thought something should be done to join them on the receiver mobile).
I'll read some docs to see if it is feasible.

Quote:

Also, I then note that in the conversations app the message appears as sent to "(null)" and I can't open its conversation window. I looked in the database and I see that everything looks normal except the remote_uid column, which is, in this case (censored):
It happened to me also a couple of times, I'll check if something is wrong.
If you update that record with the correct number all should be fine.

Many thanks again for the feedback.


All times are GMT. The time now is 03:31.

vBulletin® Version 3.8.8