ActiveXperts
SMS & MMS Toolkit


 Product Overview

 Supported Protocols:
 
 How to use

 Online Samples

 Download (.exe)

 Brochure (.pdf)

 Manual (.htm)

 Release Notes


Support

 Knowledge Base

 Forum

 Contact Support


Purchase

 Licensing

 Pricing

 Order now


Providers

 SMPP Providers

 MMS Providers

 TAP/UCP Providers

 SNPP Providers


Related documents

 Case studies

 SMS Documents

 GSM Network Codes

 TAPI Documents

 About Mobile
 Communications


 AT Commands

 RFC's


  Download ActiveXperts SMS and MMS Toolkit 5.1  (6826 KB - .exe file)
  Download Manual  (623 KB - .htm file)


Sending SMS Data Messages using GSM


Introduction

Besides sending text messages, SMS can also be used to send small data messages. A single SMS message can contain up to 140 bytes of user data.
These messages can be used for custom applications, telemetry and over the air programming of the phone or SIM card.
Messages such as ringtones, operator logos and WAP Push messages are also encoded as datamessages.


Sending a simple datamessage

To send a simple data message to a device that can process the messages by itself, you only have to change the 'DCS' parameter of the message.
This is used for instance by telemetry devices.

Valid values for this 'DCS' paramater are:

0xF5 - Send the 8 bit datamessage to an application on the phone
0xF6 - Send the 8 bit datamessage to an application on the SIM (SIM Toolkit)

In some languages, when the standard GSM Alphabet is not sufficient, 8 bit data SMS is also used to send text messages.

Using the SMS and MMS toolkit, you can simply send data messages by passing a HEX formatted data string to the 'Data' property of the SmsMessage object.
You can find a sample for sending a simple data message using a GSM modem below:

Option Explicit

'Declare Variables
Dim objSmsProtocol
Dim objSmsMessage
Dim objConstants

Dim strHex

' Create Objects
Set objSmsProtocol = CreateObject ( "ActiveXperts.SmsProtocolGsm" )
Set objSmsMessage  = CreateObject ( "ActiveXperts.SmsMessage" )
Set objConstants   = CreateObject ( "ActiveXperts.SmsConstants" )

' Define Bytes
strHex   = "000102030405060708090A0B0C0D0E0FFEFF"

' Set Logfile
objSmsProtocol.LogFile = "C:\SmsData.log"

' Set Device
objSmsProtocol.Device  = "Siemens AG WM USB Modem"

' Set the recipient, format and data
objSmsMessage.Data        = strHex
objSmsMessage.Recipient   = "+31647134225"
objSmsMessage.Format      = objConstants.asMESSAGEFORMAT_DATA

' Send the message
objSmsProtocol.Send

' Display the result
WScript.Echo "Sending data message, result: #" & objSmsProtocol.LastError & " (" & objSmsProtocol.GetErrorDescription ( objSmsProtocol.LastError ) & ")"

Sending the data message to an applicationport on the phone

Mobile phones have the capability to listen to a specific port number, similar to UDP/TCP ports in a TCP/IP Network.
You can send data to a specific phone port by using the WDP (Wireless Datagram Protocol) Protocol.
This protocol can be encapsulated in the UDH (User Data Header) of the SMS.

The following UDH bytes are used to send data to port 1234 on the mobile phone:

06 05 04 04D2 0000

06 Length of UDH Header
05 Port addressing
04 Destination Port
D2 1234 ( 0x04D2 HEX )
00 Source Port
00 0

To notify the receiving phone that you included an User Data Header in your message, you should set the TP-UDHI bit in the SMS.
The bit is bit 6 of the first octet of the SMS-SUBMIT PDU. For more info about SMS PDU's see the GSM PDU document.
The sample below demonstrates how to send data to an application port of a mobile phone:

Option Explicit

'Declare Variables
Dim objSmsProtocol
Dim objSmsMessage
Dim objConstants

Dim strHex

' Create Objects
Set objSmsProtocol = CreateObject ( "ActiveXperts.SmsProtocolGsm" )
Set objSmsMessage  = CreateObject ( "ActiveXperts.SmsMessage" )
Set objConstants   = CreateObject ( "ActiveXperts.SmsConstants" )

' Set UDH Header
strHex   = "06050404D20000"

' Define Bytes
strHex   = strHex + "000102030405060708090A0B0C0D0E0FFEFF"

' Set Logfile
objSmsProtocol.LogFile = "C:\SmsData.log"

' Set Device
objSmsProtocol.Device  = "Siemens AG WM USB Modem"

' Set the recipient, format and data
objSmsMessage.Data        = strHex
objSmsMessage.Recipient   = "+31647134225"
objSmsMessage.Format      = objConstants.asMESSAGEFORMAT_DATA_UDH

' Send the message
objSmsProtocol.Send

' Display the result
WScript.Echo "Sending data message, result: #" & objSmsProtocol.LastError & " (" & objSmsProtocol.GetErrorDescription ( objSmsProtocol.LastError ) & ")"



There are many working samples included with the product.
You can also find them on the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/xmstoolkit.





The ActiveXperts SMS and MMS Toolkit is a SMS development component (SDK). This control can be used by any Windows development platform, including Visual Basic .NET, Visual CSharp .NET, ASP .NET (VB,CS), ASP, Visual Basic, Visual Basic for Applications (VBA), Visual Studio/Visual C++, Borland Delphi and C++ Builder, PHP, ColdFusion, HTML, VBScript and any other ActiveX/COM compliant platform. The SMS and MMS Toolkit is an ActiveXperts Software B.V. Product.

Copyright ©1999-2007 ActiveXperts Software. All rights reserved.