I am using Kannel 1.4.3:

2011-01-14 17:27:52 [7450] [0] DEBUG: Kannel smsbox version `1.4.3'.
Build `Dec 27 2010 16:55:34', compiler `4.1.2 20070925 (Red Hat 4.1.2-27)'.
System Linux, release 2.6.23.17-88.fc7, version #1 SMP Thu May 15 00:35:10 EDT 
2008, machine i686.

smskannel.conf as follow:


#
# THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL
#
# This basic version is used for system testing. It expects 'fakesmsc' to
# send messages which are replied with simple fixed text message.
# It is run like this:
#
#  1% gw/bearerbox gw/smskannel.conf
#  2% gw/smsbox gw/smskannel.conf
#  3% test/fakesmsc -i 0.1 -m 100 "123 345 text nop"
#
# ..all 3 commands in separate shells (or screen sessions)
# Note that you can run them in different machines but have to
# add certain command line argument and configuration variables then
#
#
# For any modifications to this file, see Kannel User Guide 
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
#  1) check security issues! (allowed IPs, passwords and ports)
#  2) groups cannot have empty rows inside them!
#  3) read the user guide
#
# Kalle Marjola for Kannel project 2001, 2004

#---------------------------------------------
# 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 = "/tmp/kannel.log"
#log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
#unified-prefix = "+358,00358,0;+,00"
#access-log = "/tmp/access.log"
#store-file = "kannel.store"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"

#---------------------------------------------
# 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


# This is a fake smsc connection, _only_ used to test the system and services.
# It really cannot relay messages to actual handsets!

#group = smsc
#smsc = fake
#smsc-id = FAKE
#port = 10000
#connect-allow-ip = 127.0.0.1

group = smsc
smsc = at
modemtype = moto
device=/dev/ttyACM0
my-number = 123123123123
connect-allow-ip = 127.0.0.1
log-level = 0


#---------------------------------------------
# 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 = "/tmp/smsbox.log"
log-level = 0
#access-log = "/tmp/access.log"

#---------------------------------------------
# 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 = ""
concatenation= true
max-messages = 10


#---------------------------------------------
# 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 = default
keyword-regex = .*
catch-all = yes
max-messages = 0
get-url = "http://localhost/~xxxxxxxxxx
#text = "default sms service no url"



#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 = "No service specified"

include = "/usr/local/kannel/modems.conf"


modems.conf as follow:

# Modems configuration
#
# Example and default values
# 
# group = modems
# id = "my-id"
# name = "my-name"
# detect-string = "MODEM"
# detect-string2 = "" [Default]
# init-string = "AT+CNMI=1,2,0,0,0" [Default]
# speed = 9600 [Default]
# enable-hwhs = "AT+IFC=2,2" [Default]
# need-sleep = false [Default]
# no-pin = false [Default]
# no-smsc = false [Default]
# sendline-sleep = 100 [Default, miliseconds]
# keepalive-cmd = "AT" [Default]
# broken = false [Default]
# message-storage = "SM"
# enable-mms = false [Default]


# If modemtype=auto, try everyone and defaults to this one
group = modems
id = generic
name = "Generic Modem"

group = modems
id = moto
name = 'motorola phone'
#init-string = "AT+CGDCONT=1"
# init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
# detect-string = "MODEM"
# detect-string2 = "" [Default]
 init-string = "AT+CNMI=3,2,0,0,0" 
# speed = 460800 [Default]
# enable-hwhs = "AT+IFC=2,2" [Default]
 need-sleep =  [Default]
 no-pin = false [Default]
# no-smsc = false [Default]
 sendline-sleep = 100 [Default, miliseconds]
 keepalive-cmd = "AT+CMEE=1" [Default]
 broken = false [Default]
 message-storage = "SM"
 enable-mms = false [Default]



group = modems
id = wavecom
name = Wavecom
detect-string = "WAVECOM"

group = modems
id = premicell
name = Premicell
detect-string = "PREMICEL"
no-pin = true
no-smsc = true

group = modems
id = siemens_tc35
name = "Siemens TC35"
detect-string = "SIEMENS"
detect-string2 = "TC35"
init-string = "AT+CNMI=1,2,0,1,1"
speed = 19200
enable-hwhs = "AT\\Q3"
need-sleep = true

group = modems
id = siemens_m20
name = "Siemens M20"
detect-string = "SIEMENS"
detect-string2 = "M20"
speed = 19200
enable-hwhs = "AT\\Q3"
keepalive-cmd = "AT+CBC;+CSQ"
need-sleep = true

group = modems
id = siemens_sl45
name = "Siemens SL45"
detect-string = "SIEMENS"
detect-string2 = "SL45"
init-string = "AT+CNMI=1,2,2,2,1"
keepalive-cmd = "AT+CBC;+CSQ"
speed = 19200
enable-hwhs = "AT\\Q3"
need-sleep = true
message-storage = "SM"

group = modems
id = nokiaphone
name = "Nokia Phone"
detect-string = "Nokia Mobile Phone"
need-sleep = true
keepalive-cmd = "AT+CBC;+CSQ"
enable-mms = true
# detect-string = "MODEM"
# detect-string2 = "" [Default]
 init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
# init-string = "AT+CNMI=3,1,0,0,0;+CMEE=1"
 speed = 9600 
# enable-hwhs = "AT+IFC=2,2" [Default]
# need-sleep = false [Default]
# no-pin = false [Default]
# no-smsc = false [Default]
# sendline-sleep = 100 [Default, miliseconds]
# keepalive-cmd = "AT" [Default]
# broken = false [Default]
# message-storage = "SM"
# enable-mms = false [Default]






group = modems
id = falcom
name = "Falcom"
detect-string = "Falcom"
#no-smsc = true

group = modems
id = ericsson_r520m
name = "Ericsson R520m"
detect-string = "R520m"
init-string = "AT+CNMI=3,2,0,0"

group = modems
id = ericsson_t68
name = "Ericsson T68"
detect-string = "T68"
init-string = "AT+CNMI=3,3"
keepalive-cmd = "AT+CBC;+CSQ"
broken = true

group = modems
id = sonyericsson_gr47
name = "Sony Ericsson GR47"
detect-string = "GR47"
message-storage = "ME"
# use this init-string for non sim-buffering
init-string = "AT+CNMI=3,2,0,0"
# use this init-string for sim-buffering
#init-string = "AT+CNMI=3,1,0,0"
reset-string = "ATZ"
broken = true

group = modems
id = alcatel
name = "Alcatel"
detect-string = "Alcatel"
init-string = "AT+CNMI=3,2,0,0"

group = modems
id = sonyericsson_T630-T628
name = "Sony Ericsson T630-T628?
init-string = "AT+CNMI=2,3,2,0,0;+CMGF=0?
keepalive-cmd = "AT+CBC;+CSQ;+CMGF=0?
broken = true

group = modems
id = sonyericsson_p1i
name = "Sony Ericsson P1i"
detect-string = "Sony Ericsson P1i"
init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
message-storage = "SM"
reset-string = "ATZ"
broken = true 



I am using a MOTOROLA U9 phone.  The phone can send and read SMS with manual AT 
command, in both Text and PDU mode.  Now I can send, but not yet receive.  When 
new sms arrives, no acknowledgement was detected by bearerbox.

In minicom, the phone return to +CNMI query like this:

AT+CNMI=?                                                                       
+CNMI: (0,3),(0-2),(0),(0),(0)    

That's why i set 

 init-string = "AT+CNMI=3,2,0,0,0" 

I am not sure if there is any other thing to change.  I am thinking of reading 
Kannel users manual again in the evening train ride :)

Helen


--- On Fri, 1/14/11, Joseph Koech <[email protected]> wrote:

From: Joseph Koech <[email protected]>
Subject: Re: no-smsc = false [Default] Is this a bug?
To: "Helen Sang" <[email protected]>
Date: Friday, January 14, 2011, 6:26 PM

Hellen,
Which kannel version are you using? Post more details (e.g your .conf file) so 
that we can help you.

On Thu, Jan 13, 2011 at 10:16 PM, Helen Sang <[email protected]> wrote:



Dear Kannel users,

I tested phone with kannel, and find a strange behaviour:

If the no-smsc clause in modems.conf is explicitly set to false, which is 
default, kannel will NO pre-fix 00 to the string it send to phone.


I have this line in my modem.conf

 no-smsc = false [Default]

And Kannel send this string to phone:

2011-01-13 15:28:47 [8114] [6] DEBUG: AT2[/dev/ttyACM0]: --> 
11000881183274090000A707F4F29C9E769F01


Note that the string is
 not prefixed with '00', which means use default smsc number from SIM card.

The phone returns error on this string.

After I comment off the above no-smsc clause in conf file, kannel will pre fix 
'00' to the string and phone will send sms out as expected.


However, Kannel user manual said no-smsc default value is false,  which is same 
as the no-smsc clause in conf file.  So someone please check if the clause is 
parsed correctly.

I am still not able to receive sms.  Will probe further, and may post here 
again.


Helen





      




      

Reply via email to