Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Sending a command line SMS.

  1. #1

    Default Sending a command line SMS.

    I'm trying to send a text message from the command line to a cell phone. Right now I'm working with gnokii but it isn't panning out. I ran
    Code:
    echo "This is a test message" | gnokii --sendsms +17191234567 -r
    but it isn't working. The output I get is this
    Code:
    GNOKII Version 0.6.27                                                                           
    Couldn't read /root/.gnokiirc config file.                                                      
    Couldn't read /root/.gnokiirc config file.                                                      
    LOG: debug mask is 0x1                                                                          
    Config read from file /etc/gnokiirc.                                                            
    phone instance config:                                                                          
    model = 6510                                                                                    
    port = /dev/ttyS0                                                                               
    connection = serial
    initlength = default
    serial_baudrate = 19200
    serial_write_usleep = -1
    handshake = software
    require_dcd = 0
    smsc_timeout = 10
    rfcomm_channel = 0
    sm_retry = 0
    Connecting
    Serial device: opening device /dev/ttyS0
    Serial device: setting speed to 115200
    Serial device: setting RTS to low and DTR to low
    Getting model...
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Serial device: closing device
    Serial device: opening device /dev/ttyS0
    Serial device: setting speed to 115200
    Serial device: setting RTS to low and DTR to high
    Getting model...
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Serial device: closing device
    Serial device: opening device /dev/ttyS0
    Serial device: setting RTS to low and DTR to low
    Serial device: setting RTS to high and DTR to high
    Serial device: setting speed to 19200
    Switching to FBUS mode
    Serial device: setting speed to 115200
    Getting model...
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Message sent: 0x1b / 0x0006
    00 01 00 07 01 00                               |
    SM_Block: exiting the retry loop
    Serial device: closing device
    Telephone interface init failed: Command timed out.
    Quitting.
    Command timed out.
    I'm not particularly attached to gnokii, I just need to send text messages from the command line.

    Thanks!

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,516
    Blog Entries
    15

    Default Re: Sending a command line SMS.

    Quote Originally Posted by blank888
    I'm trying to send a text message from the command line to a cell phone.
    Right now I'm working with gnokii but it isn't panning out. I ran
    Hi
    Does the service provider have email to sms connectivity? I can send to
    my cellphone just via the mail command...

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.5-desktop
    up 1 day 3:01, 5 users, load average: 0.14, 0.10, 0.13
    GPU GeForce 8600 GTS Silent - Driver Version: 270.41.06


  3. #3

    Default Re: Sending a command line SMS.

    hmm.... They might, but I don't know. What incarnation of mail do you use? Do you just replace the email address with the 10 digit phone number?

  4. #4
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Sending a command line SMS.

    On 06/21/2011 07:06 PM, blank888 wrote:

    > I'm not particularly attached to gnokii, I just need to send text
    > messages from the command line.


    before the Skype for linux client could do SMS i used something named
    "send_sms.py" which (if i remember correctly) was a python script which
    sent SMS via Skype from the command line, using a format like this:

    send_sms.py [options] phone_number[,phone_number,(etc)] msgText

    i don't remember where i got it, but i guess Google does ;-)

    of course, i expect Skype's new owners to close all access to us, unless
    we boot their stuff..

    --
    DD
    Caveat
    Hardware
    Software
    21 June: Sunrise 4:34 AM, Sunset 10:03 PM

  5. #5
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Sending a command line SMS.

    On 06/21/2011 08:06 PM, blank888 wrote:
    >
    > Do you just replace the email address with the 10 digit phone
    > number?


    no....
    he said "service provider" or your ISP..

    check with your ISP, they may have an email address you can send to
    which will result in an SMS being sent to the phone you specify..

    there is usually a charge for that (at least in this country)

    --
    DD
    Caveat
    Hardware
    Software
    21 June: Sunrise 4:34 AM, Sunset 10:03 PM

  6. #6

    Default Re: Sending a command line SMS.

    I just figured it out. If your sending to an AT&T customer you can just replace the email address with phone_number@txt.att.net or if your sending to a verizon customer you can send it to phone_number@vtext.com. I know the AT&T works, but I'm not sure if the Verizon does since I don't know anyone that uses Verizon. If someone would try it out and post your results here I would really appreciate it.

  7. #7
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,043

    Default Re: Sending a command line SMS.

    On Tue, 21 Jun 2011 18:06:03 +0000, blank888 wrote:

    > hmm.... They might, but I don't know. What incarnation of mail do you
    > use? Do you just replace the email address with the 10 digit phone
    > number?


    No, you typically have an e-mail address from the mobile phone carrier
    that's set up as an e-mail address to receive SMS texts. The format
    varies from carrier to carrier, just like e-mail addresses at gmail,
    hotmail, or yahoo can have different address formats.

    The format needs to be an e-mail address format, otherwise your mailer
    won't know how to forward it along (e-mail programs only know about e-
    mail style addresses)

    Jim
    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Sending a command line SMS.

    On 2011-06-21 19:06, blank888 wrote:
    >
    > I'm trying to send a text message from the command line to a cell phone.
    > Right now I'm working with gnokii but it isn't panning out. I ran


    First, you have to make gnokii work standalone, no pipes. And do so as
    user, not root.

    There are two application for using the mobile phones, and both have
    problems; one is gnokii, the other I forget. Plus, connecting via cable has
    more problems than via bluetooth.

    In the end, to use some functions you need windows.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,865

    Default Re: Sending a command line SMS.

    I do not know if others allready pointd you to it, bbut recahing this point in the thread
    Code:
    GNOKII Version 0.6.27                                                                            
    Couldn't read /root/.gnokiirc config file.                                                       
    Couldn't read /root/.gnokiirc config file.
    I got the shivers. Are you realy running such an end-user program as root?????????
    Henk van Velden

  10. #10
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Sending a command line SMS.

    If you are going to be doing a lot of sending, I would recommend you subscribe to a commercial service on the Internet. They provide you with APIs. They can also do it much cheaper and faster, especially for bulk SMSes, than the retail rates you pay on your phone plan.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •