Hi,

Thanks for your comments. I'm not a bash expert, but had to google for
tee because that's a command I can't remember ever having used... I
now fully understand the sms.sh script and can modify it to fit my
needs... However, I can see that the exec-statement is never being
run...



On Mon, Jun 7, 2010 at 2:05 AM, Thomas Sieh <ts...@gmx.de> wrote:
> hi,

-----snip script talk----

> have you tried
>
> init-string = AT+CNMI=2,3,0,0,0;+CMEE=2
>
> for the init-string?

Cannot remember, but now I think everything works - except my
exec-script is not running... I'll post my new config-file in the
end...

> Have you closed kannel while testing the at-command with your terminal
> programm? you can not access the phones modem by two programs.
> the at-command is correct for retrieving the message at storage number
> 17.

Yep, I did that all the time... Then I tried AT&F and factory reset
and googled a lot, downloaded some sony ericsson at command list
etc... Suddenly it seemed to work from smsbox (haven't tried in
terminal again, but now I think I can just go into the log and see
which AT-commands is being sent, so this is not a problem anymore)...

> the following  error looks a little bit like not enough permissions.
> i'm not sure, but i would try to open the permissions to your device
> (the file in /dev/...) and try it again. or better make the kannel-user
> owner of the device.
>
> 2010-06-06 22:21:30 [977] [6] ERROR: System error 1: Operation not
> permitted
>
> maybe this is the problem.

When smsbox receives and sms it writes:

==> 2010-06-07 03:27:23 [2050] [4] INFO: Starting to service <HERE'S
MY EXACT TEXT/SMS MESSAGE FROM MY OTHER MOBILE PHONE!> from ==> <+45
HERE'S ORIGINATOR PHONE NUMBER> to <1234>
==> 2010-06-07 03:27:23 [2050] [4] DEBUG: formatted text answer:
<Thank you! I appreciate your sms...>
==> 2010-06-07 03:27:23 [2050] [4] INFO: No reply sent, denied.

<Thank you! I appreciate your sms...> is my "text"-entry under group =
sms-service and I've set max-messages = 0, which causes the "No reply
sent, denied" so everything's fine - EXCEPT one little thing in line
124 below:

=============================================
119 2010-06-07 03:47:59 [2111] [6] INFO:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     AT SMSC successfully
opened.
120 2010-06-07 03:47:59 [2111] [6] DEBUG:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     <-- OK
121 2010-06-07 03:48:25 [2111] [6] DEBUG:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     <-- +CMTI: "ME",24
122 2010-06-07 03:48:25 [2111] [6] DEBUG:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     +CMTI incoming SMS
indication: +CMTI: "ME",24
123 2010-06-07 03:48:27 [2111] [6] INFO:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     CMTI received, but no
message-storage is set in confiuration.setting now to     <ME>
124 2010-06-07 03:48:27 [2111] [6] INFO: System error 2: No such file
or directo    ry
125 2010-06-07 03:48:27 [2111] [6] DEBUG:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     --> AT+CPMS="ME"^M
126 2010-06-07 03:48:27 [2111] [6] DEBUG:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     <-- +CPMS:
24,98,0,100,24,98
127 2010-06-07 03:48:27 [2111] [6] DEBUG:
AT2[/dev/cu.MartinsPhone-SerialPort2]:     <-- OK
=============================================


I'm very sure the line (124) saying: "INFO: System error 2: No such
file or directory" has something to do with my exec-function
failing... Here's my config-file, I hope somebody has any suggestions,
because then everything will work perfectly, I think :-)


--------------------------------------------- new config file
---------------------------------------------
# CORE
#
# There is only one core group and it sets all basic settings
# of the bearerbox (and system). You should take extra notes on
# configuration variables like 'store-file' (or 'store-dir'),
# 'admin-allow-ip' and 'access.log'

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
#status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
log-file = "kannel.log.txt"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
#unified-prefix = "+358,00358,0;+,00"
access-log = "access_core.log.txt"
store-file = "kannel.store.txt"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"

group = modems
id = ericsson
name = "Sony Ericsson "
detect-string = "K700"
# AT+CMEE=1 gives extra error information!
#
init-string = "AT+CNMI=2,1,0,0,0;+CMEE=1"
#keepalive-cmd = AT+CSQ
reset-string = ATZ
#message-storage = ME
#broken = true


#---------------------------------------------
# SMSC CONNECTIONS
#
# SMSC connections are created in bearerbox and they handle SMSC specific
# protocol and message relying. You need these to actually receive and send
# messages to handset, but can use GSM modems as virtual SMSCs

group = smsc
smsc = at
modemtype = ericsson
device = /dev/cu.MartinsPhone-SerialPort2
log-level = 0
log-file = "MJ_log_DELETE_THIS.txt"
#speed = 9600
#validityperiod = 167


#---------------------------------------------
# SMSBOX SETUP
#
# Smsbox(es) do higher-level SMS handling after they have been received from
# SMS centers by bearerbox, or before they are given to bearerbox for delivery

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = 13013
#sendsms-chars = "0123456789 +-"
log-file = "smsbox.log.txt"
log-level = 0
access-log = "access_smsbox.log.txt"


#----------------------------------------------
# SMSBOX ROUTE
#
#group = smsbox-route
#smsbox-id = defaultRoute


#---------------------------------------------
# SEND-SMS USERS
#
# These users are used when Kannel smsbox sendsms interface is used to
# send PUSH sms messages, i.e. calling URL like
# http://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar...

group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""



#---------------------------------------------
# SERVICES
#
# These are 'responses' to sms PULL messages, i.e. messages arriving from
# handsets. The response is based on message content. Only one sms-service is
# applied, using the first one to match.

#group = sms-service
#keyword = nop
#text = "You asked nothing and I did it!"

# There should be always a 'default' service. This service is used when no
# other 'sms-service' is applied.

group = sms-service
keyword = default
text = "Thank you! I appreciate your sms..."
#accepted-smsc = defaultRoute
exec = "/Users/mac/Documents/gateway/gw/sms.sh %q %t %u"
#get-url = http://127.0.0.1/receive_sms?from=%q&date=%t&text=%a
# if max-messages = 0, then error "No reply sent, denied"
max-messages = 0
concatenation = true
catch-all = yes
#exec = /bin/echo ============>>>>> >> >> %q %Q %t %u %a %b
#exec = sms.sh %q %Q %t %u %a %b
#white-list = "http://localhost/whitelist";

--------------------------------------------- new config file
---------------------------------------------


I read on google (or the archive for this forum), that perhaps I'm
doing something wrong with the sms-box route... However: Any hints are
warmly welcome and thanks for your help so far... I feel I'm really
close now :-)


Regards,
Martin

Reply via email to