Translate

Configuring Kannel WAP/SMS gateway (for HUAWEI E173)

Once you have installed Kannel, then you need to configure it for your device. I used a Huawei E173. And my OS is ubuntu 11.10

Go to /etc/Kannel/Kannel.conf and edit it like follows.

Here is my configuration file.



Here, to find the device in group smsc, I checked, /var/log/syslog. It shows when we plug a device in.

After configuration is done,

sudo bearerbox -v 0 kannel.conf
sudo smsbox -v 0 kannel.conf

If this not the first time and previous processes are still running, you need to kill them first. To do that,
first find the relevant processes by,

ps -ef|grep bearerbox
ps -ef|grep smsbox

Then kill them.

eg:
If the process ID is 914,
sudo kill -9 914

Now once you get bearer box and sms box running, try sending a message

http://localhost:13013/cgi-bin/sendsms?username=kannelUser&password=123&from=+94712345678&to=+94712121212&text=testing





5 comments:

  1. The blog posted is very interesting from all aspects and it will surely benefit the readers by all means.
    sms gateway

    ReplyDelete
  2. Thanks a lot. Works like a charm.

    ReplyDelete
  3. It worked fine for sending messages. But not able to receive SMS and process it. Following are modem setting and bearerbox logs (truncated in between)

    group = modems
    id = huawei
    name = Huawei
    detect-string = "huawei"
    init-string = "AT+CNMI=2,1,2,2,0"
    speed = 9600

    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: --> AT+CPMS?^M
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: <-- +CPMS: "SM",1,40,"SM",1,40,"SM",1,40
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: <-- OK
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: 1 messages waiting in memory
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: --> AT+CMGR=1^M
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: <-- OK
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: not deleted.
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: --> AT+CMGR=2^M
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: <-- OK
    2014-06-10 17:55:17 [2124] [6] DEBUG: AT2[/dev/com11]: not deleted.
    2014-06-10 17:55:22 [2124] [6] DEBUG: AT2[/dev/com11]: --> AT+CMGR=40^M
    2014-06-10 17:55:22 [2124] [6] DEBUG: AT2[/dev/com11]: <-- +CMS ERROR: 321
    2014-06-10 17:55:22 [2124] [6] ERROR: AT2[/dev/com11]: CMS ERROR: +CMS ERROR: 321
    2014-06-10 17:55:22 [2124] [6] ERROR: AT2[/dev/com11]: CMS ERROR: Invalid memory index -> don't worry, just memory fragmentation. (321)
    2014-06-10 17:55:22 [2124] [6] DEBUG: AT2[/dev/com11]: failed to get message 40.

    Can't know why?

    ReplyDelete
  4. @Shridhar I only wanted to send messages and only tested that. I'm sorry it was months ago I used Kannel so can't remember much about configuration.

    Try setting message-storage = "SM" under modem settings.


    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete