maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] smssend: send sms from the command line (CLI) (https://talk.maemo.org/showthread.php?t=69661)

getnani 2011-03-29 09:16

Re: [Announce] smssend: send sms from the command line (CLI)
 
yup, tested the 0.1.7. Works like a charm. No issues.

That is good, please see if you can. it would be great if you can do that mate.

by the way, I am trying to pass a text file as the SMS content for the option -m. ("I am Testing" => only "I" is sent out)
Only the first word comes out. Nothing after the space comes out. I also tried using a variable instead. Behaves similarly. Why?
ex:
cat sms.txt => I am Testing

smssend -s -v 167 -m $(cat sms.txt) -n +1234567890 => "I" is smsd

val="I am Testing"
smssend -s -v 167 -m $val -n +1234567890 => "I" is smsd

val="I am Testing"
smssend -s -v 167 -m $(echo $val) -n +1234567890 => "I" is smsd

but
smssend -s -v 167 -m "I am Testing" -n +1234567890 => "I am Testing" is smsd!!

any thoughts on what I am missing?

Megaltariak 2011-03-29 09:32

Re: [Announce] smssend: send sms from the command line (CLI)
 
smssend -s -v 167 -m "$val" -n +1234567890 should works

lucianjustme 2011-03-29 14:35

Re: [Announce] smssend: send sms from the command line (CLI)
 
1 Attachment(s)
hi..i tried to use this app but it ghives me an error..i attached a screenshot with it..can someone help me please..thx

sakya 2011-03-29 15:01

Re: [Announce] smssend: send sms from the command line (CLI)
 
Are you running smssend from root?
Can you please try to run it as "user"?
This error is probably due to the eventlogger (which wasn't used in the first release where I said "run it as root").

lucianjustme 2011-03-29 16:34

Re: [Announce] smssend: send sms from the command line (CLI)
 
it worked..i entered the wrong prefix..

smilingshark 2011-03-30 09:15

Re: [Announce] smssend: send sms from the command line (CLI)
 
Thank you!
Great work.

b666m 2011-04-17 20:06

Re: [Announce] smssend: send sms from the command line (CLI)
 
hey all!

maybe this is helpful for some of you guys:
i wanted to ssh from my laptop into my n900 to send sms from cli.
smssend was exactly what i needed...
...except that i only have the numbers of my contacts on my n900.
these numbers are stored in a nasty database and not easily accessible.
so i needed a way to get those numbers.
fortunately there are some smart programers at this forum:
http://talk.maemo.org/showthread.php...608#post990608
big thanks to nicolai once again!

with his python script i was able to write an own little script which makes smssend more comfortable to use:
PHP Code:

number=$(python /usr/bin/nicolais_script -$-grep -A 3 -B 3 NICKNAME:$grep CELL cut -d: -f2 sed '$s/.$//')
smssend -n $number -"$2"
echo "SMS to $1 ($number): \"$2\""
exit 

usage: mysmssend nickname "text of sms"

it searches the database for the nickname, extracts the (first) cellphone number and sends the text via smssend to the contact.
and it produces a control output afterwards.

i.e.:
mysmssend Chris "hi chris!"
output:
SMS to Chris (+49123456789): "hi chris!"

but there is a problem if two contacts start with the same nickname string like "Chris" and "Christina".
this could be solved by advanced programing of nicolai's python or my script.

i think nicolai's script will help some of you - that was the main reason for this post. :)

edit:
i forgot to mention that i forward all received sms to an email-acc with another of nicolai's great apps:
http://talk.maemo.org/showthread.php?t=69264

i fetch/sync the emails from this acc every minute via imap in thunderbird.
so i'm always informed about the sms on my phone even it isn't in my pocket. :)
(and because my phone is always connected to my home-wlan i can ssh into it and answer the sms without searching/grabbing my phone xD)

b666m 2011-04-17 22:05

Re: [Announce] smssend: send sms from the command line (CLI)
 
nicolai updated his neat little script, so i adapted mine:

PHP Code:

name=$(python /usr/bin/nicolais_script -$-a mobile-phone head -1)
number=$(python /usr/bin/nicolais_script -$-a mobile-phone tail -1)
smssend -n $number -"$2"
echo "SMS to $name ($number): \"$2\""
exit 

with the updated python script there's only one exact nickname match possible. :D

edit: the search is case-sensitive *just wanted to mention*

hutchinsfairy 2011-05-26 08:04

Re: [Announce] smssend: send sms from the command line (CLI)
 
I love the program and use it at work several times a day in almost exactly the same way as b666m. My only niggle is that I use the -C option to send and if the conversation window for that contact isn't already open the sent message doesn't appear (although does get sent). Subsequent messages that I send do appear if the conversation window is open. Can you call the conversation window and send the message as separate actions or add a pause? Thanks again!

krutznikov 2011-09-06 20:12

Re: [Announce] smssend: send sms from the command line (CLI)
 
thanks a lot for this work! usefull with a PC connected SSH! by cons there is indeed an encodage problem with french chars (accents) but I donc't know if it's because of the X-terminal... further, without the -c or -C option, the message isn't always saved in the sent folder...


All times are GMT. The time now is 23:33.

vBulletin® Version 3.8.8