The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Mobile Programming
> Mobile Programming
|
SMS - Trouble setting up SMSC in Kannel
Discuss Trouble setting up SMSC in Kannel in the Mobile Programming forum on Dev Shed. Trouble setting up SMSC in Kannel Mobile Programming forum discussing development for mobile technologies from basic mark-up languages
such as WML and XHTML MP to server generated code and applications. Widsets, SMS, gateway and server
set up are also covered here.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 19th, 2012, 12:35 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 1 h 3 m 49 sec
Reputation Power: 0
|
|
|
SMS - Trouble setting up SMSC in Kannel
Hello,
I'm having trouble setting up a SMSC. I'm trying to use the Huawei K3770 USB Modem as a SMSC to send an sms to a mobile device. I'm running Kannel 1.4.3 in Ubuntu 11.10, all in a VirtualBox. When I run the bearerbox, Kannel doesn't connect to the device (the status page always says "connecting"). The following is a section of the bearerbox log file. The bold sections are ones I would really like explained, as well as why the device is continually closing and opening:
2012-01-19 15:09:53 [4726] [6] DEBUG: AT2[huawei_k3770_00]: device opened. Telnet mode = 0
2012-01-19 15:09:54 [4726] [6] DEBUG: AT2[huawei_k3770_00]: device opened
2012-01-19 15:09:54 [4726] [6] INFO: AT2[huawei_k3770_00]: speed set to 9600
2012-01-19 15:09:54 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> ^M
2012-01-19 15:09:56 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-19 15:10:00 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-19 15:10:01 [4726] [6] DEBUG: AT2[huawei_k3770_00]: <-- ^DSFLOWRPT:00001C86,00000000,00000000,000000000000E566,0000000000028248,00010000,00010000
2012-01-19 15:10:04 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-19 15:10:08 [4726] [6] INFO: AT2[huawei_k3770_00]: Closing device
2012-01-19 15:10:08 [4726] [6] INFO: AT2[huawei_k3770_00]: cannot detect speed
2012-01-19 15:10:08 [4726] [6] ERROR: AT2[huawei_k3770_00]: Couldn't connect (retrying in 10 seconds).
2012-01-19 15:10:18 [4726] [6] DEBUG: AT2[huawei_k3770_00]: detecting modem speed.
2012-01-19 15:10:18 [4726] [6] INFO: AT2[huawei_k3770_00]: opening device
2012-01-19 15:10:18 [4726] [6] DEBUG: AT2[huawei_k3770_00]: device opened. Telnet mode = 0
2012-01-19 15:10:19 [4726] [6] DEBUG: AT2[huawei_k3770_00]: device opened
2012-01-19 15:10:19 [4726] [6] INFO: AT2[huawei_k3770_00]: speed set to 115200
2012-01-19 15:10:19 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> ^M
2012-01-19 15:10:21 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-19 15:10:25 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-19 15:10:29 [4726] [6] DEBUG: AT2[huawei_k3770_00]: --> AT^M
2012-01-19 15:10:33 [4726] [6] INFO: AT2[huawei_k3770_00]: Closing device
2012-01-19 15:10:33 [4726] [6] INFO: AT2[huawei_k3770_00]: opening device
2012-01-19 15:10:33 [4726] [6] DEBUG: AT2[huawei_k3770_00]: device opened. Telnet mode = 0
etc... I also get "trying to open device with not closed device". Here is my configuration file contents:
#
# 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
# SMSC 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 = 7200000
detect-string = "Huawei"
detect-string2 = "K3770"
# 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
# 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 = xxxx
password = xxxx
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
I am very new to Kannel so any assistance would be greatly appreciated!!
|

January 20th, 2012, 02:17 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 6
Time spent in forums: 2 h 26 m 23 sec
Reputation Power: 0
|
|
|
Hi there!
I had a similar problem. Huawei modems are modems with integrated memory card and when you register it in Linux it takes two USB ports. One (usually ttyUSB0) for modem, and another (usually ttyUSB1) for memory card on which resides Windows drivers and dialup software. In futher, it has even /dev/ttyUSB2 which is free for use. When you configure Kannel to use modem on /dev/ttyUSB0, Kannel works well (at least it can start sofware) but when you configure Kannel to use /dev/ttyUSB1 it behaves like in your case.
That is why you have
2012-01-19 15:10:08 [4726] [6] INFO: AT2[huawei_k3770_00]: Closing device
2012-01-19 15:10:08 [4726] [6] INFO: AT2[huawei_k3770_00]: cannot detect speed
2012-01-19 15:10:08 [4726] [6] ERROR: AT2[huawei_k3770_00]: Couldn't connect (retrying in 10 seconds).
In further, be sure that in Linux you have same communication speed with modem like in Kannel configuration. I have choosen 57600 in Linux configuration of modem and in kannel.conf.
Finally, make a test and check "where is your modem connected to" using minicom or similar terminal software, here is a guide:
1) Shutdown Kannel
2) Open minicom sw and connect to modem on /dev/ttyUSB0
3) Using AT commands try to communicate with modem, type:
AT <enter>
you should get "OK"
if you don't switch to /dev/ttyUSB1 and try again.
From this test you will be sure "where is your modem"...where is "OK" there is modem and that port shoud be used in kannel.conf
And, don't bother for opening and closing device... I think (not sure...) Kannel is checking all the time for presence of modem ... something like keepalive ...
|

January 20th, 2012, 02:49 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 1 h 3 m 49 sec
Reputation Power: 0
|
|
|
Hello! Thank you so much for the reply!
By using Minicom I found that the modem is using ttyUSB1. I'm running the bearerbox now and it seems to be ok. I think you are right about the opening and closing. I also searched a bit and apparently the "DSFLOWRPT..." is feedback from the modem.
But the SMSC Connections on the status page (in the web browser) still shows as just "connecting". Is this normal, or should it change to "connected" or "online"?
|

January 20th, 2012, 03:09 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 6
Time spent in forums: 2 h 26 m 23 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by newmobdev Hello! Thank you so much for the reply!
By using Minicom I found that the modem is using ttyUSB1. I'm running the bearerbox now and it seems to be ok. I think you are right about the opening and closing. I also searched a bit and apparently the "DSFLOWRPT..." is feedback from the modem.
But the SMSC Connections on the status page (in the web browser) still shows as just "connecting". Is this normal, or should it change to "connected" or "online"? |
I am starting with Kannel ... and still away from web admin. Installation and configuration seems easy. First of all using URLs I tried to send SMSs and get stuck here - I have problem which I cannot resolve and move forward:
CMS ERROR: Unknown error. -> maybe Sim storage is full? I'll have a look at it. (500)
I have posted on this Forum the problem and waiting for some gurus to reply ...
|

January 20th, 2012, 05:56 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 1 h 3 m 49 sec
Reputation Power: 0
|
|
I'm also trying to send an SMS but using Kannel from the GSM Modem to a mobile phone. I keep getting a "Routing failed, re-queued." and "trying to open device with not closed device!!". The modem isn't sending OKs anymore
Quote: | Originally Posted by Olafson I am starting with Kannel ... and still away from web admin. Installation and configuration seems easy. First of all using URLs I tried to send SMSs and get stuck here - I have problem which I cannot resolve and move forward:
CMS ERROR: Unknown error. -> maybe Sim storage is full? I'll have a look at it. (500)
I have posted on this Forum the problem and waiting for some gurus to reply ... |
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|