Build a WAP gateway on Linux (basic)

Source: Internet
Author: User
Article title: Build a WAP gateway on Linux (basic ). Linux is a technology channel of the IT lab in China. The most popular technology that includes desktop applications, Linux system management, kernel research, embedded systems, open source, and other basic categories to implement mobile services is Wireless Application Protocol (WAP ). The open-source gateway for WAP implements protocol conversion between Web servers and mobile phones. This article discusses its advantages.
  
The working principle of the WAP gateway is to use the most optimized markup language, scripting language, and transmission protocol for wireless over-the-air, make the phone a simple Web browser. It uses the WAP protocol stack to communicate with the phone and converts the requests it receives to common HTTP. In this way, content providers can use any HTTP server and use existing knowledge about HTTP service implementation and management.
  
In addition to protocol conversion, the Gateway also compresses the WML (Wireless Markup Language, Wireless Markup Language) page into a more compact format, which saves bandwidth in the air, and further reduced the demand for telephone processing. It also compiles the WMLScript program into the byte code format.
  
There are multiple available commercial WAP gateways on the market, which are expensive. On the other hand, Kannel is an open-source gateway. you do not need to pay for it. you can edit the source code and create your own custom gateway. Because Kannel is developed on Linux (RedHat and Debian), it can be smoothly transplanted to other UNIX-like operating systems. However, in this article, I only show how to build a gateway on these two Linux systems.
  
   Kannel gateway architecture
  
The Gateway divides the processing workload into the following two locations:
  
Bearer box connects to the SMS (Short Message Service) Center and CSD (circuit switching number) router, providing a unified interface for wapbox. The Messenger unit completes this work by implementing the WDP (Wireless Datagram Protocol (WDP) layer of the WAP stack.
  
The higher layer in the wapbox and WAP stack is located in this unit. Each session and its transactions are processed by the same wapbox.
  
   How the system works
  
The Messenger unit receives UDP (User Datagram Protocol) packets from the CSD router, checks whether they are WAP packets, and routes them to the WAP unit. This simple design minimizes the processing of each packet by the Messenger unit. The Messenger unit also sends UDP data packets generated by other units, which adds some route processing. Wapbox implements the WTP (Wireless transfer Protocol, Wireless Transaction Protocol) and WSP (Wireless Session Protocol, Wireless Session Protocol) layers. They get requests similar to HTTP from the phone, send real HTTP requests to the content server, compress the response, and send them back to the terminal. (The session is maintained to limit the wireless bandwidth as much as possible .)
  
   Basic software and hardware requirements
  
Before creating a gateway, you must have the following basic conditions:
  
C compiler (CC or GCC), development library and related tools
  
Gnome XML Library (also known as gnome-xml and libxml), version 2.2.5 or updated (see the link in references)
  
GNU Make
  
Posix Thread Library (pthread. h)
  
   Build a Gateway
  
There are two ways to build a gateway. The first way is to obtain the source code, compile and install it on your own. The second approach is to get the pre-compiled binary RPM (RedHat Package Manager) and install it. RPM is a program designed to compile and manage source code and binary software packages. It is also portable and can run on different platforms. See references to obtain
Related Article

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.