Hello,

I am using Mac OS X 10.5.2 with a Sierra 881U GSM modem, AT&T service provider. I have configured Kannel with the following conf file. Everything seem to work fine but no messages are sent or received.

I am using this URL for sending a message (note I have scrubbed the complete phone numbers):

http://enterprise.local:13013/cgi-bin/sendsms?username=tester&password=foobar&to=1716xxxxxxx&text=testmessage-2

Based on the log files everything seems to work fine but no message is sent. I installed the Sierra Aircard on a Windows XP machine and was able to send and receive sms, so modem works fine from Windows.

Any help with this would be appreciated.

Cheers,

Mark



I have Apache 2 running with cgi-bin enabled and the python scripts seems to be working fine but I will list the text here anyway:

#!/usr/bin/python

import os, string, sys, urllib

HOST = "localhost"
PORT = 13013
USERNAME = "tester"
PASSWORD = "foobar"

NUMBERS = "~/.sendsms.dat"

def is_a_phone_number(str):
    if not str:
        return 0
    for c in str:
        if not c in "0123456789+- ":
            return 0
    return 1

def recipient(arg):
    if is_a_phone_number(arg):
        return arg
    f = open(os.path.expanduser(NUMBERS), "r")
    arg = string.lower(arg)
    number = None
    for line in f.readlines():
        parts = string.split(line)
        if len(parts) == 2 and string.lower(parts[0]) == arg:
            number = parts[1]
            break
    f.close()
    if number:
        return number
    print "Unknown recipient", arg
    sys.exit(1)

def sendsms():
    to = urllib.quote_plus(recipient(sys.argv[1]))
    text = urllib.quote_plus(string.join(sys.argv[2:], " "))
url="http://%s:%d/cgi-bin/sendsms?username=%s&password=%s&to= %s&text=%s" \
        % (HOST, PORT, USERNAME, PASSWORD, to, text)
    f = urllib.urlopen(url)
    print f.read()
    f.close()

if __name__ == "__main__":
    sendsms()


With log-level=0 the following logs are created:

bearerbox log:

2008-05-12 15:35:32 [19950] [0] INFO: Debug_lvl = -1, log_file = <none>, log_lvl = 0 2008-05-12 15:35:32 [19950] [0] WARNING: DLR: using default 'internal' for storage type.
2008-05-12 15:35:32 [19950] [0] INFO: DLR using storage type: internal
2008-05-12 15:35:32 [19950] [0] DEBUG: Kannel bearerbox version `1.4.1'.
Build `May 11 2008 14:14:17', compiler `4.0.1 (Apple Inc. build 5465)'.
System Darwin, release 9.2.2, version Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386, machine i386.
Hostname enterprise.local, IP 192.168.1.117.
Libxml version 2.6.16.
Using OpenSSL 0.9.7l 28 Sep 2006.
Using native malloc.

2008-05-12 15:35:32 [19950] [0] INFO: Added logfile `/tmp/kannel.log' with level `0'. 2008-05-12 15:35:32 [19950] [0] INFO: Started access logfile `/tmp/ access.log'. 2008-05-12 15:35:32 [19950] [0] INFO: HTTP: Opening server at port 13000. 2008-05-12 15:35:32 [19950] [0] DEBUG: Started thread 1 (gwlib/ fdset.c:poller) 2008-05-12 15:35:32 [19950] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 19950. 2008-05-12 15:35:32 [19950] [0] DEBUG: Started thread 2 (gwlib/ http.c:server_thread) 2008-05-12 15:35:32 [19950] [2] DEBUG: Thread 2 (gwlib/ http.c:server_thread) maps to pid 19950. 2008-05-12 15:35:32 [19950] [0] DEBUG: Started thread 3 (gw/ bb_http.c:httpadmin_run)
2008-05-12 15:35:32 [19950] [0] DEBUG: starting smsbox connection module
2008-05-12 15:35:32 [19950] [3] DEBUG: Thread 3 (gw/ bb_http.c:httpadmin_run) maps to pid 19950. 2008-05-12 15:35:32 [19950] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100). 2008-05-12 15:35:32 [19950] [0] DEBUG: Started thread 4 (gw/ bb_boxc.c:sms_to_smsboxes) 2008-05-12 15:35:32 [19950] [4] DEBUG: Thread 4 (gw/ bb_boxc.c:sms_to_smsboxes) maps to pid 19950. 2008-05-12 15:35:32 [19950] [0] DEBUG: Started thread 5 (gw/ bb_boxc.c:smsboxc_run) 2008-05-12 15:35:32 [19950] [0] INFO: Set SMS resend frequency to 60 seconds.
2008-05-12 15:35:32 [19950] [0] INFO: SMS resend retry set to unlimited.
2008-05-12 15:35:32 [19950] [0] INFO: DLR rerouting for smsc id <sierra> disabled. 2008-05-12 15:35:32 [19950] [0] INFO: AT2[sierra]: configuration doesn't show modemtype. will autodetect 2008-05-12 15:35:32 [19950] [5] DEBUG: Thread 5 (gw/ bb_boxc.c:smsboxc_run) maps to pid 19950. 2008-05-12 15:35:32 [19950] [0] DEBUG: Started thread 6 (gw/smsc/ smsc_at.c:at2_device_thread) 2008-05-12 15:35:32 [19950] [6] DEBUG: Thread 6 (gw/smsc/ smsc_at.c:at2_device_thread) maps to pid 19950.
2008-05-12 15:35:32 [19950] [6] DEBUG: AT2[sierra]: detecting modem type
2008-05-12 15:35:32 [19950] [6] INFO: AT2[sierra]: opening device
2008-05-12 15:35:32 [19950] [0] DEBUG: Started thread 7 (gw/ bb_smscconn.c:sms_router) 2008-05-12 15:35:32 [19950] [7] DEBUG: Thread 7 (gw/ bb_smscconn.c:sms_router) maps to pid 19950. 2008-05-12 15:35:32 [19950] [0] INFO: ----------------------------------------
2008-05-12 15:35:32 [19950] [6] DEBUG: AT2[sierra]: device opened
2008-05-12 15:35:32 [19950] [7] DEBUG: sms_router: time to sleep 30.00 secs. 2008-05-12 15:35:32 [19950] [0] INFO: Kannel bearerbox II version 1.4.1 starting 2008-05-12 15:35:32 [19950] [0] INFO: MAIN: Start-up done, entering mainloop
2008-05-12 15:35:32 [19950] [0] DEBUG: AT2[sierra]: start called
2008-05-12 15:35:32 [19950] [7] DEBUG: sms_router: gwlist_len = 0
2008-05-12 15:35:33 [19950] [6] DEBUG: AT2[sierra]: device opened
2008-05-12 15:35:33 [19950] [6] INFO: AT2[sierra]: speed set to 115200
2008-05-12 15:35:33 [19950] [6] DEBUG: AT2[sierra]: --> ^M
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: --> AT^M
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: --> AT&F^M
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: --> ATE0^M
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: --> ATI^M
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- Sierra Wireless, Inc.
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- MC8781
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- APP1
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: found string <Sierra Wireless, Inc.>, using modem definition <Sierra Wireless Aircard 881>
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: --> AT+CSMS=?^M
2008-05-12 15:35:35 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:35 [19950] [6] INFO: AT2[sierra]: closing device
2008-05-12 15:35:35 [19950] [6] INFO: AT2[sierra]: opening device
2008-05-12 15:35:37 [19950] [6] DEBUG: AT2[sierra]: device opened
2008-05-12 15:35:37 [19950] [6] DEBUG: AT2[sierra]: device opened
2008-05-12 15:35:37 [19950] [6] INFO: AT2[sierra]: init device
2008-05-12 15:35:37 [19950] [6] INFO: AT2[sierra]: speed set to 115200
2008-05-12 15:35:37 [19950] [6] DEBUG: AT2[sierra]: --> ATZ^M
2008-05-12 15:35:37 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:37 [19950] [6] DEBUG: AT2[sierra]: --> AT^M
2008-05-12 15:35:37 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:37 [19950] [6] DEBUG: AT2[sierra]: --> AT&F^M
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: --> ATE0^M
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: --> AT+IFC=2,2^M
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: --> AT+CPIN?^M
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- +CPIN: READY
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: --> AT+CMGF=0^M
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: --> AT+CSMS=?^M
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: --> AT +CGDCONT=1,"IP","ISP.CINGULAR"^M
2008-05-12 15:35:38 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:38 [19950] [6] INFO: AT2[sierra]: AT SMSC successfully opened.
2008-05-12 15:35:45 [19950] [5] INFO: Client connected from <127.0.0.1>
2008-05-12 15:35:45 [19950] [5] DEBUG: Started thread 8 (gw/ bb_boxc.c:function) 2008-05-12 15:35:45 [19950] [8] DEBUG: Thread 8 (gw/ bb_boxc.c:function) maps to pid 19950. 2008-05-12 15:35:45 [19950] [8] DEBUG: Started thread 9 (gw/ bb_boxc.c:boxc_sender) 2008-05-12 15:35:45 [19950] [9] DEBUG: Thread 9 (gw/ bb_boxc.c:boxc_sender) maps to pid 19950.
2008-05-12 15:35:57 [19950] [8] DEBUG: boxc_receiver: sms received
2008-05-12 15:35:57 [19950] [8] DEBUG: send_msg: sending msg to box: <127.0.0.1> 2008-05-12 15:35:58 [19950] [6] DEBUG: AT2[sierra]: TP-Validity- Period: 24.0 hours
2008-05-12 15:35:58 [19950] [6] DEBUG: AT2[sierra]: --> AT+CMGS=26^M
2008-05-12 15:35:58 [19950] [6] DEBUG: AT2[sierra]: <--
2008-05-12 15:35:58 [19950] [6] DEBUG: AT2[sierra]: <-- OK
2008-05-12 15:35:58 [19950] [6] DEBUG: AT2[sierra]: send command status: 0

smsbox log:

2008-05-12 15:35:45 [19951] [0] INFO: Debug_lvl = -1, log_file = <none>, log_lvl = 0
2008-05-12 15:35:45 [19951] [0] DEBUG: Kannel smsbox version `1.4.1'.
Build `May 11 2008 14:14:17', compiler `4.0.1 (Apple Inc. build 5465)'.
System Darwin, release 9.2.2, version Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386, machine i386.
Hostname enterprise.local, IP 192.168.1.117.
Libxml version 2.6.16.
Using OpenSSL 0.9.7l 28 Sep 2006.
Using native malloc.

2008-05-12 15:35:45 [19951] [0] INFO: Starting to log to file /tmp/ smsbox.log level 0 2008-05-12 15:35:45 [19951] [0] INFO: Added logfile `/tmp/smsbox.log' with level `0'. 2008-05-12 15:35:45 [19951] [0] INFO: Service global sender set as '17168668377' 2008-05-12 15:35:45 [19951] [0] INFO: Logging accesses to '/tmp/ access.log'. 2008-05-12 15:35:45 [19951] [0] INFO: Started access logfile `/tmp/ access.log'. 2008-05-12 15:35:45 [19951] [0] INFO: HTTP: Opening server at port 13013. 2008-05-12 15:35:45 [19951] [0] DEBUG: Started thread 1 (gwlib/ fdset.c:poller) 2008-05-12 15:35:45 [19951] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 19951. 2008-05-12 15:35:45 [19951] [0] DEBUG: Started thread 2 (gwlib/ http.c:server_thread) 2008-05-12 15:35:45 [19951] [2] DEBUG: Thread 2 (gwlib/ http.c:server_thread) maps to pid 19951. 2008-05-12 15:35:45 [19951] [0] INFO: Set up send sms service at port 13013 2008-05-12 15:35:45 [19951] [0] DEBUG: Started thread 3 (gw/ smsbox.c:sendsms_thread) 2008-05-12 15:35:45 [19951] [0] DEBUG: ---------------------------------------------- 2008-05-12 15:35:45 [19951] [0] DEBUG: Kannel smsbox version 1.4.1 starting 2008-05-12 15:35:45 [19951] [3] DEBUG: Thread 3 (gw/ smsbox.c:sendsms_thread) maps to pid 19951. 2008-05-12 15:35:45 [19951] [0] DEBUG: Started thread 4 (gw/ smsbox.c:obey_request_thread) 2008-05-12 15:35:45 [19951] [4] DEBUG: Thread 4 (gw/ smsbox.c:obey_request_thread) maps to pid 19951. 2008-05-12 15:35:45 [19951] [0] DEBUG: Started thread 5 (gw/ smsbox.c:url_result_thread) 2008-05-12 15:35:45 [19951] [5] DEBUG: Thread 5 (gw/ smsbox.c:url_result_thread) maps to pid 19951. 2008-05-12 15:35:45 [19951] [0] DEBUG: Started thread 6 (gw/ smsbox.c:http_queue_thread) 2008-05-12 15:35:45 [19951] [6] DEBUG: Thread 6 (gw/ smsbox.c:http_queue_thread) maps to pid 19951. 2008-05-12 15:35:45 [19951] [0] INFO: Connected to bearerbox at localhost port 13001. 2008-05-12 15:35:45 [19951] [0] DEBUG: Started thread 7 (gw/ heartbeat.c:heartbeat_thread) 2008-05-12 15:35:45 [19951] [7] DEBUG: Thread 7 (gw/ heartbeat.c:heartbeat_thread) maps to pid 19951. 2008-05-12 15:35:57 [19951] [2] DEBUG: HTTP: Creating HTTPClient for `192.168.1.117'. 2008-05-12 15:35:57 [19951] [2] DEBUG: HTTP: Created HTTPClient area 0x110a40. 2008-05-12 15:35:57 [19951] [3] INFO: smsbox: Got HTTP request </cgi- bin/sendsms> from <192.168.1.117>
2008-05-12 15:35:57 [19951] [3] INFO: sendsms used by <tester>
2008-05-12 15:35:57 [19951] [3] INFO: sendsms sender:<tester: 1716xxxxxxx> (192.168.1.117) to:<1716xxxxxxx> msg:<testmessage-2> 2008-05-12 15:35:57 [19951] [3] DEBUG: Stored UUID 75f7c77a-3189-47ff- bd29-54d0a126bfd9 2008-05-12 15:35:57 [19951] [3] DEBUG: message length 13, sending 1 messages
2008-05-12 15:35:57 [19951] [3] DEBUG: Status: 202 Answer: <Sent.>
2008-05-12 15:35:57 [19951] [3] DEBUG: Delayed reply - wait for bearerbox 2008-05-12 15:35:57 [19951] [0] DEBUG: Got ACK (0) of 75f7c77a-3189-47ff-bd29-54d0a126bfd9 2008-05-12 15:35:57 [19951] [0] DEBUG: HTTP: Resetting HTTPClient for `192.168.1.117'. 2008-05-12 15:36:27 [19951] [1] DEBUG: HTTP: Destroying HTTPClient area 0x110a40. 2008-05-12 15:36:27 [19951] [1] DEBUG: HTTP: Destroying HTTPClient for `192.168.1.117'.




Reply via email to