You are on page 1of 9

Kannel Setup Guide

(For Openbravo Mobile Alerts Module)


Kannel is an advanced open-source SMS (Short Messaging Service) and WAP (Wireless Application Protocol) gateway, owned and maintained by Kannel Group (http://www.kannel.org). A detailed setup and usage guide for Kannel as well as other technical documentation is available at http://kannel.org/doc.shtml. This document is not meant to be an advanced guide for Kannel, but will only serve as an illustrated instruction set in order to setup Kannel using a pre-packaged Ubuntu Virtual Machine, specifically configured for the purpose of testing and using Openbravo Mobile Alerts Module. In order to get further information about Kannel, please visit http://www.kannel.org.

Setting up Kannel
Setting up Kannel, for the purpose of testing Openbravo Mobile Alerts Module, is a twostep process: 1. Connecting and configuring the GSM Modem 2. Configuring and launching Kannel

Connecting and configuring the GSM Modem


The easiest way to get Kannel up and running for SMS relay is to use your mobile phone or a GSM Modem. The purpose of using an SMS gateway (like Kannel) is to provide a unified interface for various SMS Centers (SMSC) that are responsible for relaying a SMS message from one terminal to other. Different Mobile Service Providers (also known as operators) use different SMSC at their installations, most of which are supported by Kannel. A complete list can be viewed in the official Kannel Users Guide (http://kannel.org/userguide.shtml). One way of sending SMS through Kannel is to have direct access to your operators SMSC, but since not everybody has such kind of access, the easiest way to use Kannel is to use a GSM Modem. The list of supported GSM Modems is available at http://kannel.org/compatibility.shtml.

You can also use your GSM mobile phone that can connect with your computer using a USB data cable, as a GSM Modem. Most of the Nokia mobile phones are supported. Development of the Openbravo Mobile Alerts Module was tested using a Nokia 7210 Supernova hand set (http://europe.nokia.com/find-products/devices/nokia-7210supernova). The instructions in this document assume any Nokia mobile phone as a GSM Modem, ultimately acting as SMSC. In order to configure your Nokia mobile phone, follow the instructions below. 1. Start a Windows XP Machine (This is because drivers for Nokia mobile phones are most readily available on the Windows XP platform) 2. Download and setup device drivers for your mobile phone. In this case, setup Nokia PC Suite (http://europe.nokia.com/get-support-and-software/downloadsoftware/nokia-pc-suite). 3. Launch Nokia PC Suite 4. Connect your mobile phone with your PC using the appropriate USB data cable. System will automatically detect your modem 5. Enable the PC Suite mode from your mobile. 6. In order to verify that your mobile is properly connected with the system, open the Computer Management Console (Control Panel -> Administrative Tools -> Computer Management) and select the Device Manager option

7. Expand the Modems node. Your mobile shall be listed there under the modems node

8. Double-click on your modem node to show its properties. Go to Diagnostics tab and click on Query Modem button to test the modem. Modem should respond to various AT commands successfully

9. Now, go to the Modem tab and note the COM port the modem is using

10. Enable the remote communication over the telnet, since the communication between Kannel and the mobile phone will be done using a telnet channel. In order to enable telnet communication with the modem, you will need to map a TCP/IP port (used for telnet session) to the modem serial port (the COM port noted in step 9 above). This mapping will be created using tcp2com an open-source solution to bridge a TCP socket and a serial (COM) port for Windows platform. tcp2com is hosted on Source Forge .Net at http://sourceforge.net/projects/tcp2com/. tcp2com is also shipped with this release package. In order to create the mapping: a. Open the Windows Command Prompt b. Go to the directory where you downloaded the tcp2com program c. Type the following command on the command prompt d. tcp2com --install tcp/[port] com[num] [port] is the TCP/IP port number to be mapped e.g. 8888 [num] is the COM port number being used by the mobile as noted in step 9, which in this case is 5. As an illustration, see the image below

11. Step 10 above will create a Window Service named tcp2com-5. Make sure that this service is running. Select the Services option in Computer Management console and locate the above-mentioned service. If the service is not running, start this service

12. Now, you can test if your mobile is properly configured for telnet session or not. Open a telnet session on your machine at the specified port (i.e. 8888 in this case) and type command AT. Your mobile shall respond with a message OK.

Configuring and launching Kannel


In order to configure and launch Kannel, follow the instructions below: Configuring Kannel 1. Start the shipped Ubuntu Virtual Box appliance. Make sure that your Virtual Box appliance is available on the network and can access the Windows XP machine to which your mobile is connected. In order to understand the Virtual Box networking, please read Virtual Box User Manual (http://www.virtualbox.org/manual/UserManual.html). Note: This appliance was created using Virtual Box 2.0.2 2. Login into the machine using the following credentials Username: administrator Password: administrator 3. Open a terminal and go to Kannel Gateway directory by typing the following command: cd /opt/Kannel/gateway-1.4.3/gw

4. Open the Kannel configuration for SMS gateway. You may use any text editor, say, gedit. Type the following command on your terminal gedit smskannel.conf 5. Scroll through the configuration file to locate the SMSC settings for Nokia mobile. This will be available under the SMS Connections section.

6. Configure the host IP and port number of your Windows XP machine to which your mobile is connected

7. Save the configuration file and exit Launching Kannel 8. Open a terminal and type the following command bearerbox smskannel.conf

9. Open another terminal and type the following command smsbox smskannel.conf

After this step, Kannel will be successfully configured and ready to send your alerts via SMS. Now, configure your Mobile Alerts Module according to the module configuration document and start receiving the alerts on your mobile.

Summary
Just to re-cap, verify that you have completed the following steps: 1. Connected your mobile to a Windows XP machine and verified that your mobile is properly detected as a modem 2. Created a bridge between a TCP Socket and the modems COM port, using tcp2com executable 3. Properly configured Kannel 4. Launch Kannel 5. Configured the Openbravo Mobile Alerts Module Figure below summarizes the overall configuration and deployment environment

Workstation Workstation

Ubuntu Virtual Box Appliance


Mobile Alerts Module

Kannel
Http

bearerbox

smsbox

tcp2com

Modem Drivers

Windows XP

Workstation

You might also like