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)

krutznikov 2011-10-01 17:07

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by sakya (Post 1100581)
This command worked fine for me (via ssh):
Code:

smssend -n xxxxx -m "مرحبا"

Does not work for me: I've received "ÙØ±ØØ¨Ø§" ("latin-1" chars according to oppenoffice). I'm using ssh on bash.

白い熊 2011-10-02 07:37

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by sakya (Post 1100581)
This command worked fine for me (via ssh):
Code:

smssend -n xxxxx -m "مرحبا"
Probably the terminal encoding is different.

I can confirm to you a 100% that this doesn't work, either from the terminal directly or via SSH from a GNU/Linux PC.

My locale is set to UTF-8.

It must be associated with the fact that you're sshing in from Windows and that messes up the encoding somehow...

And latin-1 is used by Windows often, so that must be it, you're not encoding it properly...

krutznikov 2011-10-28 23:35

Re: [Announce] smssend: send sms from the command line (CLI)
 
I've understood that the problem directly comes from Xterm, I've posted here http://talk.maemo.org/showthread.php...91#post1115291

白い熊 2011-10-30 19:20

Re: [Announce] smssend: send sms from the command line (CLI)
 
It doesn't, I've tried from the terminal, from urxvt, and from emacs within a proper UTF-8 locale.

It's a problem with properly trascoding the character set, caused by erroneous programming within the script.

krutznikov 2011-11-05 09:49

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by 白い熊 (Post 1116083)
It doesn't, I've tried from the terminal, from urxvt, and from emacs within a proper UTF-8 locale.

It's a problem with properly trascoding the character set, caused by erroneous programming within the script.

I've solved my busybox problem. You're right, the latin-1 problem comes from smssend...

sakya 2011-11-05 10:43

Re: [Announce] smssend: send sms from the command line (CLI)
 
Uploaded now version 0.1.10, please test it when available in the repository.

With LANG set to "it_IT.UTF8" I'm able to send message like "èòàù€" from the n900 terminal.

Btw the -c option isn't working with utf8 text, while the -C option works. I don't really know why (it's just a QtMobility call but conversation doesn't show to compose the message)

krutznikov 2011-11-05 11:57

Re: [Announce] smssend: send sms from the command line (CLI)
 
true: the -c option no longer works (no message composed), but the -C has no more error :-)

saturnino 2011-11-14 14:10

Re: [Announce] smssend: send sms from the command line (CLI)
 
really cool! is there any chance that we could have blinking sms in future releases? :rolleyes:

getnani 2011-11-29 09:49

Re: [Announce] smssend: send sms from the command line (CLI)
 
I can send only 70 characters at a time!! any other ppl experience same issue? I am pretty sure I used to send sms that automatically got converted to multiple sms if greater than 160 chars... Please fix this.

FYI - i am currently on 0.1.10 version

Thanks.

krutznikov 2011-12-13 18:21

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by getnani (Post 1130466)
I can send only 70 characters at a time!! any other ppl experience same issue? I am pretty sure I used to send sms that automatically got converted to multiple sms if greater than 160 chars... Please fix this.

FYI - i am currently on 0.1.10 version

Today I sent 6976 chars at a time, my friend tells me that he received 9 sms... So it works for me with the same version!

Estel 2011-12-13 19:12

Re: [Announce] smssend: send sms from the command line (CLI)
 
It doesn't work for me. Also, in case Saturn missed it, encoding of special characters still doesn't work (at least, for polish special chars). Tried it both with sending SMS to myself, and just using smssend to input message into conversation - all special characters appear as junk.

/Estel

// Edit

As for long sms'es - while trying to send more than 70 characters, I just get "FAILED" after trying to send SMS, without any additional informations.

krutznikov 2011-12-14 23:34

Re: [Announce] smssend: send sms from the command line (CLI)
 
For me it works with my special french chars now. Note that I always use the -C option...

Estel 2011-12-14 23:56

Re: [Announce] smssend: send sms from the command line (CLI)
 
Strange, because it replaces polish characters with junk no matter of -C or -c option (conversations window that pop-ups also contain text with junked polish characters).

/Estel

sakya 2011-12-15 10:00

Re: [Announce] smssend: send sms from the command line (CLI)
 
@Estel: What's your LANG?
Code:

echo $LANG
For this to correctly work in the N900 terminal you need to set it to UTF8:
Code:

export LANG="it_IT.UTF8"

Estel 2011-12-15 16:49

Re: [Announce] smssend: send sms from the command line (CLI)
 
Thanks, of course it was my noobines, and with LANG set to pl_PL.UTF8, it works correctly.

ho ever, I noticed another strange thing - when I try to send message with special characters using -c, I got loading screen, that closes itself after a while, and nothing else happens. When i use -C, ho ever, I got message sent properly.

Furthermore, using message with only one or two special characters, works well with -c! Still, when I try to send message with all (9 only) special characters, it just end as I described it (loading screen, and nothing happens).

/Estel

// Edit

Furthermore, despite -C working properly, even if I manage to make -c working (by using only few special characters), all of them are replaced by "?" symbol in conversations window.

daniel_m 2012-02-20 12:28

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

I was looking for an app like smssend for a while, thanks! :)
Unfortunately it doesn't exactly do what it's supposed to do. I have a GSM-unit in my car that can switch a relay when it receives a message from a pre-defined mobile-number with specific text. This works very well when I use option "-c" and send the message with conversation, but it doesn't work at all without conversation. Shouldn't the message be the same with and without "-c"?

Edit: I tried both as user and root.

Halftux 2012-04-22 20:55

Re: [Announce] smssend: send sms from the command line (CLI)
 
Thank you for the nice tool it is very useful.
I have a brainchild for another option to point to an ascii or utf8 file with the sms message. I would realy appreciate it if it is possible.:)

krutznikov 2012-04-23 08:01

Re: [Announce] smssend: send sms from the command line (CLI)
 
I think you can just use a command line like
smssend -c -n +37XXXXXXX -m "$(cat file.txt)"

Halftux 2012-04-23 18:22

Re: [Announce] smssend: send sms from the command line (CLI)
 
Yeah this works but when you have an unicode text with different language characters this will not work.
With an extra option you can process the text different and pass it to conversation that it display properly with 16bit unicode encoding.

Halftux 2012-04-24 22:29

Re: [Announce] smssend: send sms from the command line (CLI)
 
So I added an option to pass a txt file to the conversation. No problems with character encoding.
Now I can send every character which I can write with ukeyboard through the conversation. So far tested it only with "-c" and "-C". Works only with "-c". service.compose switch itself to UCS2 sms and service.send does it not.
Is there a way to set maybe the codec to "ISO-10646-UCS-2" before sending?

Here is nearly all what I did. Only added a new param and using it instead "-m". Maybe it is helpful for somebody.

Code:

case SmsSender::argFile:
                {
                        QByteArray fullmess;
                            m_TxtFile = new QFile(param);
                        if (!m_TxtFile->open(QIODevice::ReadOnly | QIODevice::Text))
                                return errLogfileOpenFailed;
                       
                        while (!m_TxtFile->atEnd()) {                       
                        fullmess = m_TxtFile->readLine();
                        message.append(fullmess);
                        }
                        m_TxtFile->close();
                }               
                  break;


Halftux 2012-04-26 22:43

Re: [Announce] smssend: send sms from the command line (CLI)
 
Ok I found for me a quick and dirty solution to send an UCS2 sms at a specific time through conversation.

I am using alarmed to trigger smssend with option read sms from file and -c, also added function to call cnee after that and the mouse will automaticly push the send button.

In the scratchbox emulator I recorded the mouse movements.

cnee is a part of xnee.

It is sad that I don't have the knowledge to modify smssend for UCS2 support. I would maybe rewrite the app with pdu mode and not with text mode but since I found a way...

Halftux 2012-04-27 20:40

Re: [Announce] smssend: send sms from the command line (CLI)
 
1 Attachment(s)
I want to share my smssend binary with file support for the message.
Added option "-x /path/to/smsfile.txt" you can use it instead of "-m". It should work with utf8 characters with or without -c, -C.
For utf16 characters only the "-c" option works.

I added an option "-a" for use with "-c" and this option look if the screen is locked and will unlock the screen. After that the conversation pops up and cnee will be called to push the send button.
I added a mouse movement file "mouse_send.xnl" it should be in "/user/home/MyDocs/" and is useable for landscape mode.
For more information about to get and to use cnee look [here].



Attached you will find:

smssend-0.1.10mod_armel_binary.tar.gz

Including:

smssend -- binary
smssend-0.1.10mod.patch -- source patch (with my Makefile!!)
mouse_send.xnl -- cnee mouse push/release event (landscape)

If you wonna try overwrite smssend in /usr/bin

Estel 2012-04-28 00:35

Re: [Announce] smssend: send sms from the command line (CLI)
 
Could You upload it to extras-devel, please?

Halftux 2012-04-28 11:34

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by Estel (Post 1198443)
Could You upload it to extras-devel, please?

I can try but I have problems with dh_make under scratchbox and it will be my first time. Also I need to ask sakya first.

By the way my version has a small bug. With -c option it calls everytime cnee. However if you have no mouse movement file or no cnee nothing should happen. I will fix this if I uploading it to extra-devel.

florian 2012-05-06 11:07

Re: [Announce] smssend: send sms from the command line (CLI)
 
This is just what I've been looking for.

Has anyone tried this on the N9? Could it easily be ported?

raviepic3 2012-08-27 11:16

Re: [Announce] smssend: send sms from the command line (CLI)
 
Whenever i try to send message using the option

smssend -c -n +xxyyyyyyyyyy -m "check"

i get the following error

send arguments to dbus_connection_add_filter() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5257

Halftux 2012-08-27 22:13

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by raviepic3 (Post 1256196)
Whenever i try to send message using the option

smssend -c -n +xxyyyyyyyyyy -m "check"

i get the following error

send arguments to dbus_connection_add_filter() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5257

Which version of smssend and os are you using?
Have you tried after a reboot?

It seems this error comes from the eventlogger.

This is what the app is doing.
First creating an event with the sms and than simply calling qtmobility routine. The eventlogger uses dbus.

raviepic3 2012-08-28 06:23

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by Halftux (Post 1256475)
Which version of smssend and os are you using?
Have you tried after a reboot?

It seems this error comes from the eventlogger.

This is what the app is doing.
First creating an event with the sms and than simply calling qtmobility routine. The eventlogger uses dbus.

OS version is 2.6.28-omap1

Smssend version is 0.1.8

raviepic3 2012-09-04 04:54

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by Halftux (Post 1256475)
Which version of smssend and os are you using?
Have you tried after a reboot?

It seems this error comes from the eventlogger.

This is what the app is doing.
First creating an event with the sms and than simply calling qtmobility routine. The eventlogger uses dbus.

Any update ! ?

krutznikov 2012-09-04 11:36

Re: [Announce] smssend: send sms from the command line (CLI)
 
raviepic3, I'm using the version 0.1.10 of smssend and the last community SSU. I don't have any issue with this version, available in the official repositories...

raviepic3 2012-09-04 13:38

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by krutznikov (Post 1260845)
raviepic3, I'm using the version 0.1.10 of smssend and the last community SSU. I don't have any issue with this version, available in the official repositories...

Oh - but when i connect to internet its not automatically updating. usually if there are any application updates it will indicate me

Can you please post your repository configurations here ?
I will configure mine accordingly

I also wanted to install "cateroise plus" and one more app forgot its name which acts as a firewall and "call blocker"

But when i search for them in my application installer its not available

krutznikov 2012-09-04 13:54

Re: [Announce] smssend: send sms from the command line (CLI)
 
You can see there that the 0.1.10 version is in Extras-devel, like catorise plus and most of the apps you need.

raviepic3 2012-09-04 14:18

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by krutznikov (Post 1260845)
raviepic3, I'm using the version 0.1.10 of smssend and the last community SSU. I don't have any issue with this version, available in the official repositories...

You have the development repository added ! ?
Isn't that risky ?

krutznikov 2012-09-04 17:28

Re: [Announce] smssend: send sms from the command line (CLI)
 
If you are scared, you can install manually your softwares by downloading deb binaries from maemo.org, or you can install them from development repository and then desactivate this repository from your package manager.
If I do have bugs? Yes of course, but not serious (actually), and anyway that's linux!

Halftux 2013-01-04 11:37

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by florian (Post 1202490)
This is just what I've been looking for.

Has anyone tried this on the N9? Could it easily be ported?

I tried to port it to N9. But it seems that pnatd do not work like I want.
I have N950 on PR1.2 but could not reproduce what is shown here.
I could not successful execute at+cmgf=1 neither I could find phone-at command.
So smssend for N9 works only with -c and -C option it calls the conversation application with qtmobility.

If somebody knows how to get pnatd working or would like to have a copy of my N9 binary reply to this thread please.

Halftux 2013-01-30 01:37

Re: [Announce] smssend: send sms from the command line (CLI)
 
1 Attachment(s)
So smssend is now running on N9(50). I attach a version without saving to database when not used conversation.

I need to figure out how to save the message. Because it is different compared to maemo.
To have the full function (also use without conversation), you need to have interception.

How to run:
Code:

devel-su
opensh
smssend


hawaii 2013-02-15 02:59

Re: [Announce] smssend: send sms from the command line (CLI)
 
FYI, I'm unable to send switch the N950 BB to PDU mode-- most likely because I'm on PR1.3?

Can you post which CMT version you're running?

smssend version 0.1.10 for N9(50)
copyright(c) 2011 by Paolo Iommarini <sakya_tg@yahoo.it>
modified by Halftux
Sending SMS:
[1/1].
ERR: Failed to send at+cmgf command

RM680-21-3_PR_RM680:~# uname -a
Linux RM680 2.6.32.54-dfl61-20121301 #1 PREEMPT Mon Apr 2 14:14:32 EEST 2012 armv7l GNU/Linux

Halftux 2013-02-15 12:46

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by hawaii (Post 1323072)
FYI, I'm unable to send switch the N950 BB to PDU mode-- most likely because I'm on PR1.3?

I also have PR1.3 on my N950 and smssend is running in text mode not PDU and the unicode is calculated in hex.

Quote:

Originally Posted by hawaii (Post 1323072)
Can you post which CMT version you're running?

I am sorry I am atm for 1 month in holiday because I have full holiday left from last year and my N950 is at home.

Quote:

Originally Posted by hawaii (Post 1323072)
ERR: Failed to send at+cmgf command

Are you sure that you are in openmode or have interception?
I tried the application with PR1.3 + interception and it was working for me.

Try to run (maybe /usr/sbin/pnatd can't remember):

Code:

devel-su
opensh
pnatd
at+cmgf=?


hawaii 2013-02-16 06:46

Re: [Announce] smssend: send sms from the command line (CLI)
 
Results in ERROR returns.

I am running in full root with open mode enabled, verified by accli. No big deal, I was specifically looking for PDU mode so I could put my N950 to use, however I can send PDU packets from an iP4, so all is well.

pmrb 2013-07-01 08:40

Re: [Announce] smssend: send sms from the command line (CLI)
 
Quote:

Originally Posted by Halftux (Post 1318969)
So smssend is now running on N9(50). I attach a version without saving to database when not used conversation.

Hi,

I try to use smssend on my N9 (PR1.3).

Only "-c" with ASCII characters works.

Without "-c": "ERR: Failed to send at+cmgf command" (it seems, that something
like opensh or interception is needed, but why?)

With "-C": "OK: SMS queued to be sent to xxx" but nothing happens

With "-c" and "-x file-with-utf8-chars": 8-bit chars interpreted as iso-latin
chars. For example "ö" in the file becomes "ö" in the SMS. (locale is set to en_US.UTF-8)

Also, with "-c", I still have to press the "send" button. Perhaps this can be
avoided by sending an X-Event automatically?

TIA for any hints how to get a working smssend with utf-8 characters,
Peter


All times are GMT. The time now is 17:48.

vBulletin® Version 3.8.8