Linux Open Source WAP Gateway-kannel1.4.3 installation Method __linux

Source: Internet
Author: User

(1) Kannel installation
The latest Kannel stable version is 1.4.3 and can be downloaded at http://www.kannel.org. To install after downloading:
After decompression, enter the directory of the source files such as: cd/usr/local/gateway-1.4.3, followed by the following command:
Apt-get Install LIBXML2 Libxml2-dev
./configure
Make
Make Bindir=/gateway-1.4.3/bin Install
After compiling, you will see two executables in the GW directory in the source file: Bearerbox, Wapbox

(2) Bearerbox, Wapbox
1) Bearerbox
The Bearerbox module connects to the CSD router, provides the interface to the Wapbox, and realizes the WDP layer of the WAP protocol stack.
Bearerbox records the current running Wapbox, receives UDP packets from the CSD router, routes packets received from the same terminal to the same wapbox, and sends the Wapbox processing results to the corresponding
Household terminals.
2) Wapbox
The Wapbox module implements the upper part of the WAP protocol stack, and the sessions and transactions belonging to the same transaction are handled by the same wapbox. The Wapbox implements the WTLS, WTP, and WSP layers. Wapbox received it from the phone.
HTTP-like requests, the actual HTTP request sent to the content server, compressed response data, sent back to the terminal.

Connections between Bearerbox and Wapbox are established via TCP. Bearerbox acts as a server waiting for Wapbox to connect. This way, Bearerbox does not need to keep a static Wapbox list. It starts with an empty list, waits for Wapbox to register, and this design makes it easy to add new Wapbox dynamically: Just install one, configure it, and connect to the corresponding Bearerbox.
If the TCP connection between Bearerbox and Wapbox is disconnected, Bearerbox will be notified to remove it from its own clients list. When the collapsed wapbox is removed from the Bearerbox clients list, packets received from terminals that should be routed to this wapbox are considered to be received from a new terminal. This means that Wapbox must be able to handle the packages in one session.
It may also be the case that Wapbox is still alive, but has been unable to deal with any news. To detect this, wapbox periodically sends a heartbeat (heartbeat) packet to Bearerbox, and if Bearerbox fails to receive the heartbeat message, it considers the wapbox of the problem to be a crash, but failed to disconnect the TCP connection. Bearerbox will disconnect and remove it from the list of clients. When the Wapbox is restored, the connection is reopened. The heartbeat message also contains the Wapbox load, Bearerbox load balancing accordingly.

(3) Configure the Gateway
You can also customize the gateway parameters after installation.
Observe one of the profiles and execute the command: VI gw/wapkannel.conf

# Kannle WAP Sample Configuration document
# Created by Nanu
# http://nanu.8866.org
# This is a must variable core
Group = Core
# The port number used to Bearerbox listening for HTTP management commands. Can be set to any port above 1023
Admin-port = 13333
# Specifies whether SSL is enabled
Admin-port-ssl = False
# Password for HTTP admin command
Admin-password = yourpasswd
# Request password for Kannel status. If there is no setting, no password is required.
Status-password = rose123
# Deny connections from this IP address
Admin-deny-ip = "123.123.123.123"
# allow these IP connections, you can use the wildcard character
Admin-allow-ip = "*.*.*.*"
# The port used for the Wapbox connection. If it is not set, Kannel cannot process the WAP transport
Wapbox-port = 13002
# Deny connections from this IP address
Box-deny-ip = "123.123.123.123"
# allow these IP to connect to the WAP unit, you can use the wildcard character
Box-allow-ip = "*.*.*.*"
# Reject UDP packets from this IP
Udp-deny-ip = "123.123.123.123"
# Allow UDP packets from this IP, you can use wildcard characters
Udp-allow-ip = "*.*.*.*"
# If this parameter is set, Kannel will listen for WAP UDP packets of 9200 to 9208 ports of the specified IP.
# If you don't need a specific qualification, you can use only one asterisk
Wdp-interface-name = "*"
# log file
Log-file = "Kannel.log"
# Log Level
# 0 Dispatch
# 1 Information
# 2 Warning
# 3 Error
# 4 Fatal problems
Log-level = 1
# Wapbox Group configuration information
# Required Variables
Group = Wapbox
# a computer running Bearerbox
Bearerbox-host = localhost
# The more frequency of the timer
Timer-freq = 1
# log file
Log-file = "Wap.log"
# Log Level
# 0 Dispatch
# 1 Information
# 2 Warning
# 3 Error
# 4 Fatal problems
Log-level = 1

(4) Start gateway
Bearerbox must be started before Wapbox is started. Since Bearerbox is a basic part of the gateway, it must be started first.
Go to the GW folder under the source code directory: CD gw/
Start Bearerbox:
./bearerbox-v 1 Pushkannel.conf &
Start Wapbox:
./wapbox-v 1 Pushkannel.conf &

Pushkannel.conf the configuration file that is brought by the package

(5) Management Gateway via HTTP
At the command line, enter the following:
wget Http://localhost:13000/shutdown?password=bar (Close gateway)
wget Http://localhost:13000/status?password=bar (Get gateway status)
Wget Http://localhost:13000/resume?password=bar (continue to run the gateway)

or browser input:

Http://localhost:13000/shutdown?password=bar (Close Gateway)
Http://localhost:13000/status?password=bar (Get gateway status)
Http://localhost:13000/resume?password=bar (continue to run the gateway)


13000: Admin-port The specified port for the configuration file
Password: Admin-password The specified password for the configuration file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.