Nokia WAP and SMS gateway Network Card User Manual


 
Chapter 3. Using the gateway
Running Kannel
To start the gateway, you need to start each box you need. You always need the bearer box, and
depending on whether you want WAP and SMS gateways you need to start the WAP and SMS boxes. If
you want, you can run several of them, but we’ll explain the simple case of only running one each.
Starting the gateway
After you have compiled Kannel and edited configuration file for your taste, you can either run Kannel
from command line or use supplied start-stop-daemon and run_kannel_box programs to use it as
a daemon service (more documentation about that later).
If you cannot or do not know how to set up daemon systems or just want to test Kannel, you probably
want to start it from command line. This means that you probably want to have one terminal window for
each box you want to start (xterm or screen will do fine). To start the bearerbox, give the following
command:
./bearerbox -v 1 [conffile]
The -v 1 sets the logging level to INFO. This way, you won’t see a large amount of debugging output
(the default is DEBUG). Full explanation of Kannel command line arguments is below.
[conffile] is the name of the configuration file you are using with Kannel. The basic distribution packet
comes with two sample configuration files, smskannel.conf and wapkannel.conf (in gw
subdirectory), of which the first one is for testing out SMS Kannel and the second one for setting up a
WAP Kannel. Feel free to edit those configuration files to set up your own specialized system.
After the bearer box, you can start the WAP box:
./wapbox -v 1 [conffile]
or the SMS box:
./smsbox -v 1 [conffile]
or both, of course. The order does not matter, except that you need to start the bearer box before the other
boxes. Without the bearer box, the other boxes won’t even start.
Command line options
Bearerbox, smsbox and wapbox each accept certain command line options and arguments when they are
launched. These arguments are:
Table 3-2. Kannel Command Line Options
-v <level>
Set verbosity level for stdout (screen) logging.
Default is 0, which means ’debug’. 1 is ’info, 2
’warning’, 3 ’error’ and 4 ’panic’
21