Hi all,
I'm experiencing the same problem described in this
thread:
http://www.mail-archive.com/[email protected]/msg05889.html
environment description:
- kannel: ver 1.4.1 (compiled from source)
- system: linux (debian stable)
- conf:
digicom (actually wavecom) gsm modem attached
to kannel through serial port, configured as smsc
kannel.conf / modem.conf attached
problem:
if modem receives a sms or a phone call while sending
sms queued for delivery an error occurs and almost
all the queued message will be discarded (NACK/MALFORMED)
solution:
applying a patch sent by Andrija Petrovic to gw/smsc/smsc_at.c
you can find it here:
http://www.mail-archive.com/[email protected]/msg05916.html
if you mind you can go on reading to find what
our log files trace while experiencing the problem
bearerbox.log:
* start receiving message to send (circa 150)
2007-01-30 15:30:01 [15047] [8] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2007-01-30 15:30:01 [15047] [8] DEBUG: boxc_receiver: sms received
[...]
2007-01-30 15:30:04 [15047] [8] DEBUG: boxc_receiver: sms received
2007-01-30 15:30:04 [15047] [8] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2007-01-30 15:30:05 [15047] [8] DEBUG: boxc_receiver: got ack
* start sending message:
2007-01-30 15:30:05 [15047] [6] DEBUG: AT2[Wavecom]: <-- >
2007-01-30 15:30:05 [15047] [6] DEBUG: AT2[Wavecom]: send command status: 1
2007-01-30 15:30:05 [15047] [6] DEBUG: AT2[Wavecom]: -->
0031000A8143390904240000A758CC30082E7FCFE7E97618647FB3E961D0185D06D9D365771A1406B1
C3F6B73C2C2F83C66910BCFE4E83E06F393D2C2F83EAEE30C8FCA6BFE9E5F9BC2C0FFF404779589F2EBB40C472BB4C97875D
2007-01-30 15:30:05 [15047] [6] DEBUG: AT2[Wavecom]: --> ^Z
2007-01-30 15:30:08 [15047] [6] DEBUG: AT2[Wavecom]: <-- >
2007-01-30 15:30:08 [15047] [6] DEBUG: AT2[Wavecom]: <-- +CMGS: 160
2007-01-30 15:30:08 [15047] [6] DEBUG: AT2[Wavecom]: <-- OK
2007-01-30 15:30:08 [15047] [6] DEBUG: AT2[Wavecom]: send command status: 0
2007-01-30 15:30:08 [15047] [6] DEBUG: DLR[internal]: Adding DLR smsc=Wavecom, ts=160,
src=39335328226, dst=3493904042, mask=31, boxc=
2007-01-30 15:30:08 [15047] [6] DEBUG: SMSC[Wavecom]: creating DLR message
2007-01-30 15:30:08 [15047] [6] DEBUG: SMSC[Wavecom]: DLR =
2007-01-30 15:30:08 [15047] [6] DEBUG: AT2[Wavecom]: TP-Validity-Period: 24.0
hours
2007-01-30 15:30:08 [15047] [6] DEBUG: AT2[Wavecom]: --> AT+CMGS=90^M
2007-01-30 15:30:08 [15047] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2007-01-30 15:30:08 [15047] [9] DEBUG: boxc_sender: sent message to <127.0.0.1>
2007-01-30 15:30:08 [15047] [8] DEBUG: boxc_receiver: got ack
2007-01-30 15:30:09 [15047] [6] DEBUG: AT2[Wavecom]: <-- >
2007-01-30 15:30:09 [15047] [6] DEBUG: AT2[Wavecom]: send command status: 1
2007-01-30 15:30:09 [15047] [6] DEBUG: AT2[Wavecom]: -->
0031000A8143893981460000A758CC30082E7FCFE7E97618647FB3E961D0185D06D9D365771A1406B1
C3F6B73C2C2F83C66910BCFE4E83E06F393D2C2F83EAEE30C8FCA6BFE9E5F9BC2C0FFF404779589F2EBB40C472BB4C97875D
2007-01-30 15:30:09 [15047] [6] DEBUG: AT2[Wavecom]: --> ^Z
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: <-- >
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: <-- +CMGS: 161
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: <-- OK
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: send command status: 0
2007-01-30 15:30:15 [15047] [6] DEBUG: DLR[internal]: Adding DLR smsc=Wavecom, ts=161,
src=39335328226, dst=3498931864, mask=31, boxc=
2007-01-30 15:30:15 [15047] [6] DEBUG: SMSC[Wavecom]: creating DLR message
2007-01-30 15:30:15 [15047] [6] DEBUG: SMSC[Wavecom]: DLR =
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: TP-Validity-Period: 24.0
hours
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: --> AT+CMGS=90^M
2007-01-30 15:30:15 [15047] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2007-01-30 15:30:15 [15047] [9] DEBUG: boxc_sender: sent message to <127.0.0.1>
2007-01-30 15:30:15 [15047] [8] DEBUG: boxc_receiver: got ack
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: <-- >
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: send command status: 1
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: -->
0031000A8143606819400000A758CC30082E7FCFE7E97618647FB3E961D0185D06D9D365771A1406B1
C3F6B73C2C2F83C66910BCFE4E83E06F393D2C2F83EAEE30C8FCA6BFE9E5F9BC2C0FFF404779589F2EBB40C472BB4C97875D
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: --> ^Z
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: <-- +CDS: 24
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: <--
00069F0A814350169467701003510340407010035103014000
* receive a status report for message 159 (ts)
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: got STATUS-REPORT for message
<159>:
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: Numeric receiver
<3405614976>
2007-01-30 15:30:15 [15047] [6] DEBUG: DLR[internal]: Looking for DLR smsc=Wavecom, ts=159,
dst=3405614976, type=1
2007-01-30 15:30:15 [15047] [6] DEBUG: DLR[internal]: created DLR message for URL
<>
2007-01-30 15:30:15 [15047] [6] DEBUG: AT2[Wavecom]: --> AT+CNMA^M
2007-01-30 15:30:15 [15047] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1>
* start dropping queued sms:
2007-01-30 15:30:15 [15047] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2007-01-30 15:30:15 [15047] [9] DEBUG: boxc_sender: sent message to <127.0.0.1>
2007-01-30 15:30:15 [15047] [8] DEBUG: boxc_receiver: got ack
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <-- >
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <-- ERROR
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: send command status: -1
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: --> AT+CMGS=90^M
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <--
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <-- ERROR
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: send command status: -1
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: --> AT+CMGS=90^M
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <--
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <-- ERROR
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: send command status: -1
2007-01-30 15:30:16 [15047] [6] DEBUG: SMSC[Wavecom]: creating DLR message
2007-01-30 15:30:16 [15047] [6] DEBUG: SMSC[Wavecom]: DLR =
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: TP-Validity-Period: 24.0
hours
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: --> AT+CMGS=90^M
2007-01-30 15:30:16 [15047] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2007-01-30 15:30:16 [15047] [9] DEBUG: boxc_sender: sent message to <127.0.0.1>
2007-01-30 15:30:16 [15047] [8] DEBUG: boxc_receiver: got ack
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <--
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: <-- ERROR
2007-01-30 15:30:16 [15047] [6] DEBUG: AT2[Wavecom]: send command status: -1
[...]
#
# THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL
#
# It is run like this:
#
# 1% gw/bearerbox gw/smskannel.conf
# 2% gw/smsbox gw/smskannel.conf
# 3% test/fakesmsc -p 10000 -H localhost -i 1 -m 100 "123 345 text nop"
#
# ..all 3 commands in separate shells (or screen sessions)
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, send email to [email protected]
#
# Kalle Marjola May 2000
# Changed for new fakesmsc version by Uoti Urpala Jan 2001
# Added service and sendsms for HTTP SMSC by Kalle Marjola Mar 2001
#
#BAREBOX
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = **********
status-password = **********
admin-deny-ip = "*.*.*.*"
admin-allow-ip = "127.0.0.1;192.168.0.*"
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1;192.168.0.*"
unified-prefix = "+39,0039;+,00"
access-log=/var/log/kannel/access.log
#SMSC CONNECTIONS
group = smsc
smsc = at
smsc-id = Wavecom
modemtype = wavecom
device = /dev/ttyS0
speed = auto
sim-buffering = true
log-level=1
include=/etc/kannel/modems.conf
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 39335328226
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/smsaccess.log"
http-request-retry = 2
# SEND-SMS USERS
group = sendsms-user
username = sms
password = 5m51nv14
dlr-url =
"http://127.0.0.1/smsreceiver/dlr.php?type=%d&msg=%a&sender=%p&receiver=%P&time=%t&report=%A"
# SERVICES
group = sms-service
keyword = default
get-url = "http://127.0.0.1/smsreceiver/logsms.php?phone=%p&text=%a"
max-messages = 0
split-suffix = "Demetra"
concatenation=true
split-chars="#!"
# 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 = wavecom
name = Wavecom
detect-string = "WAVECOM"
init-string ="AT+CNMI=2,2,0,0,0"
keepalive-cmd = "AT+CBC;+CSQ"
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 = false
keepalive-cmd = "AT+CBC;+CSQ"
enable-mms = true
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 = alcatel
name = "Alcatel"
detect-string = "Alcatel"
init-string = "AT+CNMI=3,2,0,0"