Hi
I am setting up Kannel SMS gateway (Version 1.4.4)  Using Cygwin in Windows. I 
am Using GSM modem SIM900A for sending SMS’s.Two times this gateway running 
successfully.It sends SMS's.But now it does not connecting to GSM  modem. It 
shows error 'Initialization of device failed' .My kannel.conf is given below.

#
# THIS IS A SAMPLE CONFIGURATION FOR KANNEL
#
# For any modifications to this file, see Kannel User Guide 
# If that does not help, send email to us...@kannel.org
#

group = core
admin-port = 13000
admin-password = bar
smsbox-port = 13001
#status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
log-file = "/Kannel/log/bearerbox.log"
log-level = 0
#dlr-storage = mysql
#access-log = "access.log"
#http-proxy-host = "127.0.0.1"
#http-proxy-port = 8080
#http-proxy-exceptions = "127.0.0.1"
#http-proxy-username = "user"
#http-proxy-password = "password"
#ssl-certkey-file = "mycertandprivkeyfile.pem"

# SMSC SMPP
#group = smsc
#smsc = smpp
#host = 127.0.0.1
#port = 10000
#receive-port = 16400
#smsc-username = kannel
#smsc-password = kannel
#system-type = type
#address-range =


# SMSC GSM
group = smsc
smsc = at
modemtype = simcom 
device = /dev/ttyS2
#pin = 1234
speed = auto
smsc-id = simcom
#validityperiod = 167
log-file = "/Kannel/log/smsc.log"
#smsc-username = kannel
#smsc-password = kannel

group = modems
id = simcom     
name = Simcom 
detect-string2 = "SIM900A"
#detect-string2 = “SIM900A”
#init-string = "ATZ"


# SMSBOX SETUP

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
#bearerbox-port = 13001
#sendsms-chars = "0123456789 +-"
#global-sender = 13013
log-file = "/Kannel/log/smsbox.log"
log-level = 0
smsbox-id = smsc1

group = smsbox-route
smsbox-id = smsc1
smsc-id = simcom

# SEND-SMS USERS

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

# this sender is for Kannel relay testing (http_smsc)

group = sendsms-user
username = kannel
password = rL4y
user-deny-ip = "*.*.*.*"
user-allow-ip = "127.0.0.1"


# SMS SERVICE Default
# there should be default always
group = sms-service
keyword = default
text = "No service specified"

#include = /Kannel/cfg/modems.conf

#mysql connection
#group = mysql-connection
#id = sqlbox-db
#host = localhost
#username = root
#password = “”
#database = kanneldb
#max-connections = 10

# DLR SETUP
#mysql connection
#group = mysql-connection
#id = mydlr
#host = localhost
#username = root
#password = “”
#database = kanneldb
#max-connections = 10

#group = dlr-db
#id = mydlr
#table = kannel_dlr
#field-smsc = smsc
#field-timestamp = timestamp
#field-destination = destination
#field-source = source
#field-service = service
#field-url = url
#field-mask = mask
#field-status = status
#field-boxc-id = boxc_id


And the modem log is shown below

2014-10-21 09:00:34 [5744] [6] INFO: AT2[simcom]: trying to use speed <9600> 
from modem definition
2014-10-21 09:00:34 [5744] [6] INFO: AT2[simcom]: opening device
2014-10-21 09:00:34 [5744] [6] DEBUG: AT2[simcom]: device opened. Telnet mode = 0
2014-10-21 09:00:34 [5744] [6] DEBUG: AT2[simcom]: device opened
2014-10-21 09:00:34 [5744] [6] INFO: AT2[simcom]: speed set to 9600
2014-10-21 09:00:34 [5744] [6] DEBUG: AT2[simcom]: --> ^M
2014-10-21 09:00:36 [5744] [6] DEBUG: AT2[simcom]: --> AT^M
2014-10-21 09:00:36 [5744] [6] DEBUG: AT2[simcom]: <-- AT
2014-10-21 09:00:36 [5744] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-21 09:00:36 [5744] [6] INFO: AT2[simcom]: Closing device
2014-10-21 09:00:36 [5744] [6] INFO: AT2[simcom]: speed is 9600
2014-10-21 09:00:36 [5744] [6] INFO: AT2[simcom]: opening device
2014-10-21 09:00:36 [5744] [6] DEBUG: AT2[simcom]: device opened. Telnet mode = 0
2014-10-21 09:00:36 [5744] [6] DEBUG: AT2[simcom]: device opened
2014-10-21 09:00:36 [5744] [6] INFO: AT2[simcom]: Logging in
2014-10-21 09:00:37 [5744] [6] INFO: AT2[simcom]: init device
2014-10-21 09:00:37 [5744] [6] INFO: AT2[simcom]: speed set to 9600
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: --> ATZ^M
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- ATZ
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: --> AT^M
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- AT
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: --> AT&F^M
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- AT&F
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: --> ATE0^M
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- ATE0
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: --> AT+IFC=2,2^M
2014-10-21 09:00:44 [5744] [6] INFO: AT2[simcom]: cannot enable hardware 
handshake
2014-10-21 09:00:44 [5744] [6] DEBUG: AT2[simcom]: --> AT+CPIN?^M
2014-10-21 09:01:04 [5744] [6] ERROR: AT2[simcom]: Initialization of device 
failed. Attempt #0 on -1 max.
2014-10-21 09:01:04 [5744] [6] INFO: AT2[simcom]: Closing device
2014-10-21 09:01:04 [5744] [6] ERROR: AT2[simcom]: Couldn't connect (retrying 
in 10 seconds).
2014-10-21 09:01:14 [5744] [6] INFO: AT2[simcom]: opening device
2014-10-21 09:01:14 [5744] [6] DEBUG: AT2[simcom]: device opened. Telnet mode = 0
2014-10-21 09:01:14 [5744] [6] DEBUG: AT2[simcom]: device opened
2014-10-21 09:01:14 [5744] [6] INFO: AT2[simcom]: Logging in
2014-10-21 09:01:14 [5744] [6] INFO: AT2[simcom]: init device
2014-10-21 09:01:14 [5744] [6] INFO: AT2[simcom]: speed set to 9600
2014-10-21 09:01:14 [5744] [6] DEBUG: AT2[simcom]: --> ATZ^M
2014-10-21 09:01:21 [5744] [6] ERROR: AT2[simcom]: Wrong or no answer to ATZ, 
ignoring
2014-10-21 09:01:21 [5744] [6] ERROR: AT2[simcom]: Initialization of device 
failed. Attempt #1 on -1 max.
2014-10-21 09:01:21 [5744] [6] INFO: AT2[simcom]: Closing device
2014-10-21 09:01:21 [5744] [6] ERROR: AT2[simcom]: Couldn't connect (retrying 
in 10 seconds).
2014-10-21 09:01:31 [5744] [6] INFO: AT2[simcom]: opening device
2014-10-21 09:01:31 [5744] [6] DEBUG: AT2[simcom]: device opened. Telnet mode = 0
2014-10-21 09:01:31 [5744] [6] DEBUG: AT2[simcom]: device opened
2014-10-21 09:01:31 [5744] [6] INFO: AT2[simcom]: Logging in
2014-10-21 09:01:31 [5744] [6] INFO: AT2[simcom]: init device
2014-10-21 09:01:31 [5744] [6] INFO: AT2[simcom]: speed set to 9600
2014-10-21 09:01:31 [5744] [6] DEBUG: AT2[simcom]: --> ATZ^M
2014-10-21 09:01:37 [5744] [6] ERROR: AT2[simcom]: Wrong or no answer to ATZ, 
ignoring
2014-10-21 09:01:37 [5744] [6] ERROR: AT2[simcom]: Initialization of device 
failed. Attempt #2 on -1 max.
2014-10-21 09:01:37 [5744] [6] INFO: AT2[simcom]: Closing device
2014-10-21 09:01:37 [5744] [6] ERROR: AT2[simcom]: Couldn't connect (retrying 
in 10 seconds).

Given below modem log when kannel send SMS successfully

2014-10-18 12:10:22 [5876] [6] INFO: AT2[simcom]: opening device
2014-10-18 12:10:22 [5876] [6] DEBUG: AT2[simcom]: device opened. Telnet mode = 0
2014-10-18 12:10:22 [5876] [6] DEBUG: AT2[simcom]: device opened
2014-10-18 12:10:22 [5876] [6] INFO: AT2[simcom]: speed set to 9600
2014-10-18 12:10:22 [5876] [6] DEBUG: AT2[simcom]: --> ^M
2014-10-18 12:10:24 [5876] [6] DEBUG: AT2[simcom]: --> AT^M
2014-10-18 12:10:24 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:24 [5876] [6] INFO: AT2[simcom]: Closing device
2014-10-18 12:10:24 [5876] [6] INFO: AT2[simcom]: speed is 9600
2014-10-18 12:10:24 [5876] [6] INFO: AT2[simcom]: opening device
2014-10-18 12:10:24 [5876] [6] DEBUG: AT2[simcom]: device opened. Telnet mode = 0
2014-10-18 12:10:24 [5876] [6] DEBUG: AT2[simcom]: device opened
2014-10-18 12:10:24 [5876] [6] INFO: AT2[simcom]: Logging in
2014-10-18 12:10:25 [5876] [6] INFO: AT2[simcom]: init device
2014-10-18 12:10:25 [5876] [6] INFO: AT2[simcom]: speed set to 9600
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: --> ATZ^M
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: --> AT^M
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- ATZ
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: --> AT&F^M
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- ATZ
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- AT
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: --> ATE0^M
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- AT&F
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: --> AT+IFC=2,2^M
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- ATE0
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: --> AT+CPIN?^M
2014-10-18 12:10:25 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:45 [5876] [6] DEBUG: AT2[simcom]: --> AT+CPIN?^M
2014-10-18 12:10:46 [5876] [6] DEBUG: AT2[simcom]: <-- +CPIN: READY
2014-10-18 12:10:46 [5876] [6] DEBUG: AT2[simcom]: --> AT+CMGF=0^M
2014-10-18 12:10:46 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:46 [5876] [6] DEBUG: AT2[simcom]: --> AT+CSMS=?^M
2014-10-18 12:10:46 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:46 [5876] [6] DEBUG: AT2[simcom]: --> AT+CNMI=1,2,0,1,0^M
2014-10-18 12:10:46 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:46 [5876] [6] INFO: AT2[simcom]: AT SMSC successfully opened.
2014-10-18 12:10:48 [5876] [6] DEBUG: AT2[simcom]: TP-Validity-Period: 24.0 
hours
2014-10-18 12:10:48 [5876] [6] DEBUG: AT2[simcom]: --> AT+CMGS=19^M
2014-10-18 12:10:48 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 12:10:48 [5876] [6] DEBUG: AT2[simcom]: send command status: 1
2014-10-18 12:10:48 [5876] [6] DEBUG: AT2[simcom]: --> 
0011000C811949697017020000A705C8329BFD06
2014-10-18 12:10:48 [5876] [6] DEBUG: AT2[simcom]: --> ^Z
2014-10-18 12:10:52 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 12:10:52 [5876] [6] DEBUG: AT2[simcom]: <-- +CMGS: 52
2014-10-18 12:10:52 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:10:52 [5876] [6] DEBUG: AT2[simcom]: send command status: 0
2014-10-18 12:10:54 [5876] [6] DEBUG: AT2[simcom]: TP-Validity-Period: 24.0 
hours
2014-10-18 12:10:54 [5876] [6] DEBUG: AT2[simcom]: --> AT+CMGS=19^M
2014-10-18 12:10:55 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 12:10:55 [5876] [6] DEBUG: AT2[simcom]: send command status: 1
2014-10-18 12:10:55 [5876] [6] DEBUG: AT2[simcom]: --> 
0011000C811949697017020000A705C8329BFD06
2014-10-18 12:10:55 [5876] [6] DEBUG: AT2[simcom]: --> ^Z
2014-10-18 12:11:05 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 12:11:05 [5876] [6] DEBUG: AT2[simcom]: <-- +CMGS: 53
2014-10-18 12:11:05 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:11:05 [5876] [6] DEBUG: AT2[simcom]: send command status: 0
2014-10-18 12:18:02 [5876] [6] DEBUG: AT2[simcom]: TP-Validity-Period: 24.0 
hours
2014-10-18 12:18:02 [5876] [6] DEBUG: AT2[simcom]: --> AT+CMGS=17^M
2014-10-18 12:18:03 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 12:18:03 [5876] [6] DEBUG: AT2[simcom]: send command status: 1
2014-10-18 12:18:03 [5876] [6] DEBUG: AT2[simcom]: --> 
0011000C811949697017020000A703C8701A
2014-10-18 12:18:03 [5876] [6] DEBUG: AT2[simcom]: --> ^Z
2014-10-18 12:18:14 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 12:18:14 [5876] [6] DEBUG: AT2[simcom]: <-- +CMGS: 54
2014-10-18 12:18:14 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 12:18:14 [5876] [6] DEBUG: AT2[simcom]: send command status: 0
2014-10-18 13:11:42 [5876] [6] DEBUG: AT2[simcom]: TP-Validity-Period: 24.0 
hours
2014-10-18 13:11:42 [5876] [6] DEBUG: AT2[simcom]: --> AT+CMGS=16^M
2014-10-18 13:11:42 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 13:11:42 [5876] [6] DEBUG: AT2[simcom]: send command status: 1
2014-10-18 13:11:42 [5876] [6] DEBUG: AT2[simcom]: --> 
0011000C811949697017020000A702E834
2014-10-18 13:11:42 [5876] [6] DEBUG: AT2[simcom]: --> ^Z
2014-10-18 13:11:46 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 13:11:46 [5876] [6] DEBUG: AT2[simcom]: <-- +CMGS: 55
2014-10-18 13:11:46 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 13:11:46 [5876] [6] DEBUG: AT2[simcom]: send command status: 0
2014-10-18 13:12:27 [5876] [6] DEBUG: AT2[simcom]: TP-Validity-Period: 24.0 
hours
2014-10-18 13:12:27 [5876] [6] DEBUG: AT2[simcom]: --> AT+CMGS=18^M
2014-10-18 13:12:27 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 13:12:27 [5876] [6] DEBUG: AT2[simcom]: send command status: 1
2014-10-18 13:12:27 [5876] [6] DEBUG: AT2[simcom]: --> 
0011000C811969502207510000A704E832FB0D
2014-10-18 13:12:27 [5876] [6] DEBUG: AT2[simcom]: --> ^Z
2014-10-18 13:12:31 [5876] [6] DEBUG: AT2[simcom]: <-- >
2014-10-18 13:12:31 [5876] [6] DEBUG: AT2[simcom]: <-- +CMGS: 56
2014-10-18 13:12:31 [5876] [6] DEBUG: AT2[simcom]: <-- OK
2014-10-18 13:12:31 [5876] [6] DEBUG: AT2[simcom]: send command status: 0
2014-10-18 13:19:52 [5876] [6] DEBUG: AT2[simcom]: <-- +CMT: "",101
2014-10-18 13:19:52 [5876] [6] DEBUG: AT2[simcom]: <-- 
07911949719899792410D0C26B6B289C4E85540000410181319184225BD9775D0E0A0E41582C168B8DCD7239DC0C442C8BD3F4321994744A4131160CC682C1602E180CF4768362B8570CF68AD140AD61700A1A22A320ACB1E80205ED6C9030CC06259D52508DC6CADD622E180C
2014-10-18 13:19:52 [5876] [6] DEBUG: AT2[simcom]: received message from SMSC: 
+919417899997
2014-10-18 13:19:52 [5876] [6] DEBUG: AT2[simcom]: Alphanumeric sender 
<BW-CBSSBT>
2014-10-18 13:19:52 [5876] [6] DEBUG: AT2[simcom]: User data length read as (91)


In both case am use same kannel configuration as given..

Is it require any PIN? When am testing Modem with Hyperterminal AT+CPIN gives 
the result +CPIN:READY..
Please help me to find the reason for this error..
-- 
With regards,
Anjaly Kurian

Reply via email to