Implementation of SMS gateway-Based WAP PUSH

Source: Internet
Author: User

SummaryWap push has the advantages of active and timely information transmission and the ability to receive information anytime and anywhere. Therefore, it has good application prospects. This article briefly introduces the wap push system framework, PUSH protocol and PUSH method, and focuses on the implementation of wap push through sms gateway.

KeywordsWireless Application Protocol, wap push, SMS gateway, PDU Mode

1 wap push technology Overview

1.1 What is WAP PUSH

The wap push technology is a mechanism established on the client server, that is, the server actively sends information to the client. Compared with the traditional PULL (PULL) technology, the main difference is that the PUSH (PUSH) technology is used by the server to actively send information to the client, while the PULL (PULL) Technology) the client actively requests information. The advantage of PUSH technology lies in the initiative and timeliness of information.

The PUSH technology fails to achieve great success in the Internet for many reasons. The main reason is that computers and other fixed devices in the fixed network provide users with sufficient resources and capabilities to find information. Therefore, users usually use it as a window for browsing information, rather than passive information recipients. At the same time, fixed network users require much more information accuracy than timeliness, so the PUSH technology has not been widely used.

However, in mobile networks, there are many restrictions such as network bandwidth, mobile terminal capabilities, and high self-Payment standards, which limit user information search, if important information is pushed to the user's mobile device in a timely manner, it is undoubtedly very convenient for the user. The advantage of mobile communication is that mobile devices can receive information anytime and anywhere. Therefore, the PUSH technology can be used in mobile networks. wap push is the product of the combination of PUSH technology and mobile communication. Wap push is the PUSH technology applied in mobile networks. It combines the general PUSH technology with the characteristics of mobile networks. Its system framework, usage protocols, and service methods are very different from those of the PUSH technology on the fixed network.

1.2 wap push system framework

The wap push framework consists of the PUSH Initiator (PI: PUSH Initiator), PUSH Proxy gateway (PPG: PUSH ProxyGateway), and PUSH Client (PC: PUSH Client. PI is in the Internet, while PC is in the WAP field. The protocols used by PI and WAP clients are different. A protocol conversion Gateway (PPG) needs to be established in the middle. PPG communicates with PI through the PUSH Access Protocol (PAP: PUSH AccessProtocol) and pushes the space Transfer Protocol (push ota: PUSH over-the-Air) complete the data transmission task for pushing information to the customer.

PPG completes most of the work in the PUSH architecture, including access from the Internet to the mobile network, as well as related authentication, security, client control, and so on. The main services provided by PPG include: 1) Identify, authenticate, and access control of PI; 2) analyze the syntax of the pushed content and check and correct errors Based on the Data Type Definition (DTD; 3) Customer addressing and information transmission; 4) protocol conversion between PAP and push ota; 5) information compression and compilation to improve the transmission efficiency in wireless channels.

In addition, PPG can also implement multicast and broadcast through the alias mechanism, which maps certain address aliases to multicast or broadcast operations. The specific scheme can be determined by the system implementer. Different clients have different capabilities. PPG is also responsible for responding to PI's customer capability query requests so that PI can construct appropriate content formats for different clients.

1.3 push Protocol

PAP is the communication protocol between PI and PPG. It uses Extensible Markup Language (XML) as the Message Description Language and transmits data through a simple request response mechanism. PAP can be implemented on multiple communication protocols (including Hypertext Transfer Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP.

Push ota is a simple protocol layer running on the Wireless Session Protocol (WSP), responsible for data transmission from PPG to customer proxy. Push ota can use connection-oriented sessions and non-connection sessions. For PUSH using connection sessions, an active session context must be pre-defined between the PPG and the client; for push without connection, the communication is completed through the reserved port.

1.4 PUSH Service Method

The push protocol of WAP defines Service Indication (SI: Service Indication) and Service Load (SL: Service Load) to give users and network operators more choices. Service indication refers to pushing the new information Indication and related Universal Resource Identifier (URI) to the user, and the user selects whether to process the information immediately or later. Service loading pushes the URI of a service to the user, and then the client automatically uses the PULL Technology to start the service based on the URI. The difference between the two services is whether the user is involved in the process of pushing information. SL is transparent to users for processing push information, while SI instructs users and asks users to make choices for subsequent processing.

PUSH can send a link to a site or business to a mobile phone supporting wap push via SMS, So that you only need to read this text message and open the link in the text message, you can directly access the business. Therefore, wap push achieves the combination of SMS and WAP services, saving users time to find services and facilitating users to directly find and use their favorite services.

2 Introduction to Short Message Gateway

Short Message Gateway (ISMG) is a device between the short message center (SMSC) and the service provider (SP). It provides a secure and fast channel for data exchange between the two entities. The gateway and the Short Message center use the SMPP protocol (Short Message Peer to Peer) and the SP use the CMPP protocol (China Mobile Peer to Peer, China Mobile Peer protocol ), therefore, the short message gateway must complete protocol conversion, billing, routing, security, network management, and other functions. Specifically, the SMPP communication proxy system connects the gateway and the short message center (SMSC) in the GSM network to ensure accurate receipt and transmission of data and efficient and reliable data transmission. To achieve a packet loss rate of up to 0.001%, The SMPP communication proxy must support traffic control. The CMPP communication proxy system is mainly used to connect to the SP service provider. Unlike the SMPP communication proxy system, the CMPP communication proxy is a server due to the Protocol impact, wait for the SP connection, and the SMPP communication proxy is a client. You need to actively connect to SMSC. The Short Message Gateway processing system is the most complex processing process in the gateway. Its tasks include querying routes to GNS, maintaining route tables, and performing protocol conversion and data distribution. The firewall system provides security protection for the gateway system, including IP packet filtering and authentication. The SMS gateway billing system forms various billing bills to provide a basis for billing. The business management system mainly provides statistical reports for businesses and generates reports, provides interfaces and interfaces for operators to add, modify, and delete user data and monitor, query, operate, and maintain the gateway system.

3 Send wap push based on SMS Gateway

There are two ways to send wap push: One is through the PPG gateway and the other is through the SMPP protocol. SMPP is a basic protocol. In China, there are three major protocols derived from it: CMPP protocol of China Mobile, SGIP of China Unicom (ETIP on CDMA ), and phs smgp. China Mobile's PPG gateway has a long development cycle and a complicated commissioning process. However, CMPP protocol makes it more flexible to send wap push messages based on SMS gateway, relatively simple.

3.1 Implementation Mode of WAP PUSH

Connect to the gsm modem through the serial port of the computer and send wap push to the mobile phone. This method divides wap push into three modes: BLOCK mode, TEXT mode, and PDU mode. Currently, the BLOCK mode is rarely used, while the TEXT mode can only send ASCII codes. It cannot send UNICODE codes in Chinese, while the PDU mode is more complicated to develop, it requires a special function to convert the text to the PDU format. However, the PDU mode is supported by all mobile phones and can use any character set. It is also the default encoding method for mobile phones, therefore, the PDU mode is used to send wap push.

3.2 PDU Mode

Three types of codes can be used to send wap push in PDU mode: 7-bit, 8-bit, and UCS2. 7-bit encoding is used to send Common ASCII characters, 8-bit encoding is usually used to send data messages, and UCS2 encoding is used to send Unicode characters. To enable Chinese wap push, use UCS2 encoding, that is, Chinese Unicode code.

(1) UCS2 encoding principle the so-called UCS2 encoding is to convert a single character (1-2 bytes) to a 16-bit Unicode wide character according to ISO/iec000046. Converts A single character to A string consisting of four digits '0'-'9' and 'A'-'F' and the denominator. The message to be sent is sent in ucs2.

(2) We can get the Chinese Unicode code through UCS2 encoding, and then we can compile the sending PDU string. On the surface, the PDU string is an ASCII string, which also consists of numbers and letters '0'-'9' and 'A'-'F. They are 8-bit hexadecimal numbers or BCD decimal numbers. In addition to the sent message, the PDU string also contains many other parameter information, such as the service center number, target number, and encoding method.

For example

0051000BA13108086406F600F5A7850B05040B8423F _

2017303010129060603ae81ea8dca02056a0045c6080c033231312e _

3133362e3135332e33302f776170707574252f70757109496e6465782e _

6a73703f7075742549643d30367%1313134313630%31000103e8a _

Partition _

A string of wap push that can be successfully sent, including the description of Chinese characters and the WAP page address. The specific analysis is as follows:

00 the length of the SMSC address information 00 indicates that the SMS center number is set on the mobile phone. The "SMSC address format" and "SMSC address" segments of the PDU string will be omitted.

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: 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.