SMS gateway

Mad Unix madunix at gmail.com
Sun Jan 6 09:11:00 CET 2008


Am trying to send an sms through smstools my GSM modem connected via serial
port

sendsms  0777488xxxxx 'lord2'

2008-01-06 11:01:01,6, GSM1: Modem is registered to the network
2008-01-06 11:01:01,6, GSM1: Selecting PDU mode
2008-01-06 11:01:01,7, GSM1: -> AT+CMGF=0
2008-01-06 11:01:01,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:02,7, GSM1: <- AT+CMGF=0
OK
2008-01-06 11:01:02,6, GSM1: Checking memory size
2008-01-06 11:01:02,7, GSM1: -> AT+CPMS?
2008-01-06 11:01:02,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:02,7, GSM1: <- AT+CPMS?
+CPMS: "MT",0,65,"MT",0,65,"MT",0,65
OK
2008-01-06 11:01:02,6, GSM1: Used memory is 0 of 65
2008-01-06 11:01:02,6, GSM1: No SMS received
2008-01-06 11:01:10,6, smsd: Moved file /var/spool/sms/outgoing/send_JD7682
to /var/spool/sms/checked
2008-01-06 11:01:13,6, smsd: I have to send 1 short message for
/var/spool/sms/checked/send_JD7682
2008-01-06 11:01:13,6, GSM1: Sending SMS from  to 0777xxxxxxx
2008-01-06 11:01:13,6, GSM1: Checking if modem is ready
2008-01-06 11:01:13,7, GSM1: -> AT
2008-01-06 11:01:13,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:13,7, GSM1: <- AT
OK
2008-01-06 11:01:13,6, GSM1: Checking if Modem is registered to the network
2008-01-06 11:01:13,7, GSM1: -> AT+CREG?
2008-01-06 11:01:13,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:14,7, GSM1: <- AT+CREG?
+CREG: 0,1
OK
2008-01-06 11:01:14,6, GSM1: Modem is registered to the network
2008-01-06 11:01:14,6, GSM1: Selecting PDU mode
2008-01-06 11:01:14,7, GSM1: -> AT+CMGF=0
2008-01-06 11:01:14,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:14,7, GSM1: <- AT+CMGF=0
OK
2008-01-06 11:01:14,7, GSM1: -> AT+CMGS=18
2008-01-06 11:01:14,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:14,7, GSM1: <- AT+CMGS=18
>
2008-01-06 11:01:14,7, GSM1: ->
0011000A9.........................F05ECB79C2C03
2008-01-06 11:01:14,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:18,7, GSM1: <-
0011000A9..........................F1FF05ECB79C2C03
ERROR
2008-01-06 11:01:18,3, GSM1: The modem said ERROR or did not answer.
2008-01-06 11:01:18,5, GSM1: Waiting 10 sec. before retrying
2008-01-06 11:01:28,6, GSM1: Checking if modem is ready
2008-01-06 11:01:28,7, GSM1: -> AT
2008-01-06 11:01:28,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:28,7, GSM1: <- AT
OK
2008-01-06 11:01:28,6, GSM1: Checking if Modem is registered to the network
2008-01-06 11:01:28,7, GSM1: -> AT+CREG?
2008-01-06 11:01:28,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:29,7, GSM1: <- AT+CREG?
+CREG: 0,1
OK
2008-01-06 11:01:29,6, GSM1: Modem is registered to the network
2008-01-06 11:01:29,6, GSM1: Selecting PDU mode
2008-01-06 11:01:29,7, GSM1: -> AT+CMGF=0
2008-01-06 11:01:29,7, GSM1: Command is sent, waiting for the answer
2008-01-06 11:01:29,7, GSM1: <- AT+CMGF=0
OK
2008-01-06 11:01:29,7, GSM1: -> AT+CMGS=18

[root at linux2 ~]#


my config


# Example smsd.conf. Read the manual for a description

devices = GSM1
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
sent = /var/spool/sms/sent
incoming = /var/spool/sms/incoming
logfile = /var/log/smsd.log
loglevel = 7

[GSM1]
device = /dev/ttyS0
incoming = yes
#baudrate = 115200
#cs_convert = yes
#pin = 0000
#mode = nw
#baudrate = 115200
#rtscts = yes
#pin = 1111


what could be wrong?


On Jan 5, 2008 10:15 PM, Dario B. Bestetti <dario.bestetti at opservices.com.br>
wrote:

>
> ----- Original Message -----
> From: "Mad Unix" <madunix at gmail.com>
> To: "Peter Edmonds" <termx23 at gmail.com>
> Cc: nagios-users at lists.sourceforge.net
> Sent: Saturday, January 5, 2008 4:53:56 PM (GMT-0300) Auto-Detected
> Subject: Re: [Nagios-users] SMS gateway
>
>
>
> in the future am thinking of a good enhancements of SMS (gnokii or
> smstools) to be 2 way communications, i.e. so the server can be controled
> via mobile phone.
> if a server/service goes down, you can reply to the
> alert SMS message with a reboot command or start an application,
> to fix a service as long the server reachable and the signal can get to
> the server.
>
> What do you think ?
>
> Thanks Dennis and Peter for you inputs ... i have downloaded smstools
> started with the configuration.....
>
>
>
>
>
>
>
> On 1/5/08, Peter Edmonds <termx23 at gmail.com> wrote:
> >
> > > which tools do you use to send sms through GSM modem (connected via
> > COM)
> > > through nagios:
> > > smstools, kanal, or smsclient
> >
> > I use gnokii. Modem is a Telular GSM SX5D
> >
> > /etc/gnokiirc looks like this
> >
> > [global]
> > port = /dev/ttyS0
> > model = AT
> > initlength = default
> > connection = serial
> > use_locking = yes
> > serial_baudrate = 19200
> > smsc_timeout = 10
> > [gnokiid]
> > bindir = /usr/sbin/
> > [connect_script]
> > TELEPHONE = 12345678
> > [disconnect_script]
> > [logging]
> > debug = on
> > rlpdebug = off
> > xdebug = off
> >
> >
> >
> > Notify command for service notifications looks like this
> >
> > echo -e
> > "<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGDATETIME$"
> > |gnokii --sendsms $CONTACTPAGER$ >>
> > /usr/local/groundwork/nagios/var/gnokii.log 2>&1
> >
> > For host notifications this does the job
> >
> > echo -e
> > "<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$HOSTOUTPUT$\n$LONGDATETIME$"
> > |gnokii --sendsms $CONTACTPAGER$ >> /usr/local/nagios/var/gnokii.log
> > 2>&1
> >
> > Peter Edmonds
> >
>
>
>
> --
> madunix
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft Defy all challenges.
> Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________ Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please
> include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
>
> Actually, smstools allow you to interact with any application. You can
> send a message back and execute any command, it´s just a matter of
> configuration. And keep in mind the security issues.
>
> []s
> _________________________________________________
> Dario B. Bestetti        OpServices
>                                   R. Luciana de Abreu, 471 - Sala 403
>                                   Porto Alegre, RS - CEP 90570-060
> Fone 55(51)30613588 Mobile  55(51)81518218
> Fax     55(51)30613588  Email    dario.bestetti at opservices.com.br
>
>                "In God we trust, the rest we monitor ..."
> _________________________________________________
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>



-- 
madunix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080106/88f17f61/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list