Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsMobile ProgrammingMobile Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 20th, 2012, 05:35 AM
newmobdev newmobdev is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 5 newmobdev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 49 sec
Reputation Power: 0
SMS - Trouble sending SMS with Kannel

Hello all,

I think I finally got Kannel (1.4.3) and my GSM modem (Huawei K3770) set up. I tried to send an SMS to a mobile phone through the HTTP command:

http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=+2772xxxxxxx&text=hello

The result I get is: "3: Queued for later delivery", but when I check the bearerbox log I get this:

2012-01-20 13:21:46 [2426] [6] DEBUG: AT2[huawei_k3770_00]: detecting modem speed.
2012-01-20 13:21:46 [2426] [6] INFO: AT2[huawei_k3770_00]: opening device
2012-01-20 13:21:46 [2426] [6] DEBUG: AT2[huawei_k3770_00]: device opened. Telnet mode = 0
2012-01-20 13:21:47 [2426] [6] DEBUG: AT2[huawei_k3770_00]: device opened
2012-01-20 13:21:47 [2426] [6] INFO: AT2[huawei_k3770_00]: speed set to 115200
2012-01-20 13:21:47 [2426] [6] DEBUG: AT2[huawei_k3770_00]: --> ^M
2012-01-20 13:21:49 [2426] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-20 13:21:49 [2426] [7] DEBUG: sms_router: gwlist_len = 1
2012-01-20 13:21:49 [2426] [7] DEBUG: sms_router: handling message (0x9f0bf40 vs 0x9f0bf40)
2012-01-20 13:21:49 [2426] [7] DEBUG: Routing failed, re-queued.
2012-01-20 13:21:49 [2426] [7] DEBUG: sms_router: handling message (0x9f0bf40 vs 0x9f0bf40)
2012-01-20 13:21:49 [2426] [7] DEBUG: Routing failed, re-queued.
2012-01-20 13:21:49 [2426] [7] DEBUG: sms_router: time to sleep 30.00 secs.
2012-01-20 13:21:53 [2426] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-20 13:21:57 [2426] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-20 13:22:01 [2426] [6] INFO: AT2[huawei_k3770_00]: Closing device
2012-01-20 13:22:01 [2426] [6] INFO: AT2[huawei_k3770_00]: opening device
2012-01-20 13:22:01 [2426] [6] DEBUG: AT2[huawei_k3770_00]: device opened. Telnet mode = 0

This keeps happening so the queued SMS is never sent. The following is my configuration file for Kannel:

#
# Configuration file for Kannel Bearerbox and Smsbox
#

group = core
admin-port = 13000
admin-password = bar
admin-deny-ip = "*.*.*.*
admin-allow-ip = "127.0.0.1"
log-file = "/tmp/kannel.log"
log-level = 0
smsbox-port = 13001
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
dlr-storage = mysql

# SMSC CONNECTIONS
# GSM - Huawei K3770
group = smsc
smsc = at
smsc-id = huawei_k3770_00
port = 13012
modemtype = auto
device = /dev/ttyUSB1
sms-center = +2772xxxxxxx #SIM number
my-number = +2772xxxxxxx #SIM number
connect-allow-ip = "127.0.0.1"
pin = xxxx #SIM PIN

# MODEMS!
group = modems
id = huawei_k3770_00
name = "Huawei K3770"
speed = 115200
detect-string = "Huawei"
detect-string2 = "K3770"
# init-string = "~^MAT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0^M"

# SMSBOX SETUP
group = smsbox
smsbox-id = mysmsbox
bearerbox-host = "127.0.0.1"
sendsms-port = 13013
sendsms-chars = "0123456789 +-"
global-sender = 13013

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

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

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

# MYSQL CONNECTION
group = mysql-connection
id = mydlr
host = "127.0.0.1"
username = xxx #mysql username
password = xxx #mysql password
database = dlr
max-connections = 1

# DLR TABLE STRUCTURE
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc


Any tips on what I am doing wrong would be greatly appreciated!

Reply With Quote
  #2  
Old January 23rd, 2012, 12:34 AM
newmobdev newmobdev is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 5 newmobdev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 49 sec
Reputation Power: 0
I managed to solve this. The modem had automatically allowed a mobile broadband connection to be established so it was too busy for Kannel. By disconnecting the connection (but not the modem from the physical USB port) and restarting Kannel, I got everything running smoothly.

Reply With Quote
Reply

Viewing: Dev Shed ForumsMobile ProgrammingMobile Programming > SMS - Trouble sending SMS with Kannel

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap