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.0  (6826 KB - .exe file)
  Download Manual  (623 KB - .htm file)

SMS and MMS Toolkit - SmsProtocolGsm object


    Overview

A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like an ordinary dial-up modem. The difference between them is that a dial-up modem sends and receives data through a fixed telephone line, while a wireless modem sends and receives data through GSM.
A GSM modem can be an external (USB/COM) device or a PC Card. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.

SMS and MMS Toolkit supports GSM modems through its SmsProtocolGsm object.

The SmsProtocolGsm object features the following:
  • Send SMS messages through a external/internal GSM modem (or GSM phone) connected to your computer;
  • Send alphanumeric text and binary multimedia SMS messages, including ringtones, pictures and logo's;
  • Send WAP Push messages, WAP Bookmark messages, voicemail/e-mail/fax indications;
  • Verify delivery (so called 'status reports');
  • Receive SMS messages through a external/internal GSM modem (or GSM phone) connected to your computer;
  • Receive alphanumeric text and binary multimedia SMS messages, including ringtones, pictures and logo's;
  • Receive WAP Push messages, WAP Bookmark messages, voicemail/e-mail/fax indications;
  • Support for Unicode, to support foreign languages like Chinese, Turkish, etc.;
  • Support for multi-part messages, to allow messages longer than 160 characters;
  • Support Windows 'Phone and Modem devices' and direct COM ports.
The SmsProtocolGsm object is part of the ActiveXperts SMS and MMS Toolkit component. Overview of all SMS and MMS Toolkit objects:
  • SmsProtocolGsm - Send and receive SMS messages using a GSM modem or a modem-capable GSM phone.
  • SmsProtocolSmpp - Send and receive SMS messages via an SMPP provider.
  • SmsProtocolHttp - Send (bulk) SMS messages through an SMS/HTTP compliant SMS provider over the internet/VPN.
  • SmsProtocolDialup - Send SMS messages using a normal Hayes compatible modem (1200 bps or higher).
  • MmsProtocolMM1 - Send and receive MMS messages via a GPRS modem through WAP (wireless application protocol).
  • MmsProtocolMM4 - Send MMS messages via an SMTP server. The protocol is based on SMTP, messages are MIME encoded.
  • MmsProtocolMM7 - Send and receive MMS messages via SOAP/XML using HTTP as the transport protocol.
  • PagerProtocolSnpp - Send pager messages via an SNPP provider through the internet/VPN.

    Sample code

     VBScript sample: Send a plain text SMS message (via GSM/GPRS modem or phone)

   Set objGsmProtocol           = CreateObject ( "ActiveXperts.SmsProtocolGsm" )
   Set objSmsMessage            = CreateObject ( "ActiveXperts.SmsMessage" )
   Set objConstants             = CreateObject ( "ActiveXperts.SmsConstants" )

   objGsmProtocol.Device        = "MultiTech GSM MultiModem"         ' Use a Windows Telephony device 
   objGsmProtocol.EnterPin ( "1234" )                                ' SIM card's PIN code

   objSmsMessage.Clear
   objSmsMessage.Recipient      = "+31624896641"                     ' Recipient's mobile number
   objSmsMessage.Data           = "Hello, world!"                    ' SMS message text

   objGsmProtocol.Send( objSmsMessage )	
   WScript.Echo "Result: " & objGsmProtocol.LastError

     VB .NET sample: Send a plain text SMS message (via GSM Modem / GSM phone)

   Imports AXmsCtrl

   Module Module1
    Sub Main()

        Dim objGsmProtocol As SmsProtocolGsm = New SmsProtocolGsm
        Dim objSmsMessage As SmsMessage = New SmsMessage

        objGsmProtocol.Device = "COM1"                               ' Device Settings 

        objSmsMessage.Clear()
        objSmsMessage.Recipient = "31647134225"                      ' Message Settings 
        objSmsMessage.Data = "ActiveXperts SMS and MMS Toolkit GSM test message!"

        objGsmProtocol.Send(objSmsMessage)                           ' Send the message 
        Console.WriteLine( "Send message, result: {0} ( {1} )", 
                objGsmProtocol.LastError.ToString, 
                objGsmProtocol.GetErrorDescription( objGsmProtocol.LastError ) )
    End Sub
   End Module

     VBScript sample: Receive a plain text SMS message (GSM Modem / GSM phone)

   Set objGsmProtocol             = CreateObject ( "ActiveXperts.SmsProtocolGsm" )

   objGsmProtocol.Device          = "MultiTech GSM MultiModem"
   objGsmProtocol.DeleteAfterReceive = FALSE                        ' Don't delete messages after receive
   objGsmProtocol.EnterPin ( "1234" )                               ' SIM card's PIN code
   
   objGsmProtocol.Receive()                                         ' Receive messages from SIM or memory 
   If ( objGsmProtocol.LastError <> 0 ) Then 
     WScript.Echo "Failed to receive, error: " & objGsmProtocol.LastError
     WScript.Quit
   End If

   ' Iterate over all received messages
   On Error Resume Next
   Set objSmsMessage = objGsmProtocol.GetFirstMessage()
   On Error Goto 0
   If( objGsmProtocol.LastError = 33060 ) Then
     WScript.Echo "No messages received."
   ElseIf( objGsmProtocol.LastError <> 0  ) Then 
     WScript.Echo "GetFirstMessage, result: " & objGsmProtocol.LastError
   Else
     While( objGsmProtocol.LastError = 0 ) 
       WScript.Echo "Message from: " & objSmsMessage.Sender
       If( objSmsMessage.Format = objConstants.asMESSAGEFORMAT_DATA ) Then
         WScript.Echo "  " & "<DATA>"
       Else
         WScript.Echo "  " & objSmsMessage.Data
       End If
       WScript.Echo
       On Error Resume Next
       Set objSmsMessage = objGsmProtocol.GetNextMessage()
       On Error Goto 0
     Wend
   End If

     VBScript sample: Send a Unicode SMS message (via GSM Modem / GSM phone)

   Set objGsmProtocol           = CreateObject ( "ActiveXperts.SmsProtocolGsm" )
   Set objSmsMessage            = CreateObject ( "ActiveXperts.SmsMessage" )
   Set objConstants             = CreateObject ( "ActiveXperts.SmsConstants" )

   objGsmProtocol.Device        = "MultiTech GSM MultiModem"         ' Use a Windows Telephony device 
   objGsmProtocol.EnterPin ( "1234" )                                ' SIM card's PIN code

   objSmsMessage.Clear
   objSmsMessage.Recipient      = "+31624896641"                     ' Recipient's mobile number
   objSmsMessage.Format         = objConstants.asMESSAGFORMAT_UNICODE  ' SMS message text
   objSmsMessage.Data           = "ملحق خاصملحق خاص"                 ' SMS message text

   objGsmProtocol.Send( objSmsMessage )	
   WScript.Echo "Result: " & objGsmProtocol.LastError


    More samples

Samples are available for: Visual Basic, Visual C/C++, VB .NET, VC# .NET, ASP, ASP .NET, Java, Javascript, PHP, HTML and more.
On ftp.activexperts-labs.com, you can find many SMS and MMS Toolkit samples. Samples are also part of the SMS and MMS Toolkit installation.

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