Shortcut Menu


Main Navigation

Choose your language

ActiveXperts Serial Port Component Add serial communication capabilities to any Windows or .NET application


Case Study: "Sorceress"


Gilbert Edward Martin II, Managing Director of Sorceress Entertainment (Pty) Ltd., South Africa. Also Marketing Manager of MTN Mobile Solutions, South Africa.


Most companies spend hundreds of rands to send SMS's in bulk or to send SMS's internally.

Both efficiently and from one central billing point, Mobile Solutions decided that it was necessary to do this from a component perspective and we ensued developing a system which would be intranet based and would communicate with the serial port using standard commands.

This case study defines our methodology and implementation of the Serial Port Component product into our systems as a serial port communication tool.


Our key issue was to ensure the system would work with any standard internal GSM modem; we tested the Serial Port Component application on a web layer on the following handsets and premicells:

  • Nokia 30;
  • Nokia 22;
  • Ericcson F221;
  • Nokia 6310i connected via a serial cable;

Serial Port Knowledge

After a bit of thinking and browsing the internet for compatible commands, we came up with the following commands which could be used to communicate with the serial port and the handset or premicell. These commands would then enable the handset / premicell to send an sms, we tested this in Hyper Terminal:

AT+CMGF=1 {Enter}
AT+CMGS="<mobile number>" {Enter}
> <short text message> {Enter}
Ctrl-Z {Enter}

These commands then sent the sms (<short text message>) to the relevant mobile number (<mobile number>).


After being able to this our next task was to complete this system and make it more user efficient by developing it on a web platform.

The end result was a fully functional and basic demo system for the Department of Justice who wanted to purchase a range of the Nokia 30 to send SMS's via their servers, we would be implementing these systems.

Fig 1.1 the web based system

Clicking on the send button automatically used the Serial Port Component product dll to send the commands to the serial interface (COM Port) that was selected, find below the code for this page.

' ****************************************************************
' Department of Justice Demonstration
'     The file must be named 'initmodem.asp'
' © Copyright 2001 by ActiveXperts Software - - Serial Port Component Serial Communicator 
' © Copyright 2003 by Sorceress Entertainment -  SMS Application
' ****************************************************************

<!--#include file=""-->
<object runat=server progid="ActiveXperts.ComPort" id=acObj> </object>
Sub WriteStr( o, str )
    o.WriteString str
    response.write(" Received:" &str & "<br>")
End Sub
Function ReadStr( o )
    strResult = ""
    str = "notempty"
    o.Sleep 200
    Do While str <> ""
        str = o.ReadString
        If str <> "" Then
        ReadStr = str
        response.write("Sent:" &str & "<br>")
        End If
End Function
If Request( "BUTTON_SUBMIT" ) <> "" Then
    acObj.PortID = Request( "NUM_PORTID" )
    If acObj.LastError = acERR_SUCCESS Then
  STR_CMD1 = "AT+CMGF=1"
    WriteStr acObj, STR_CMD1
    STR_CMD2 = "AT+CMGS=" + """" + Request( "STR_CMD2" ) + """"
  WriteStr acObj, STR_CMD2
        If Request( "STR_CMD3" ) <> "" Then
            WriteStr acObj, Request( "STR_CMD3" )
      str = chr(26)
        End If
    End If
     <h1>Department of Justice Demonstration</h1>
   <h2>Your message was sent successfully</h2>

     <h1>Department of Justice Demonstration</h1>
    <form action="initmodem.asp" method="post">
            <td width="100">Comport:</td>
                <select size="1" name="NUM_PORTID">
                    <option selected>1</option> <option>2</option>
                    <option>3</option> <option>4</option>
            <td>Cellphone:</td><td><input size=15 type=text name="STR_CMD2" value=""></td>
            <td>Message:</td><td><input type="text" name="STR_CMD3" value=""></td>
    <p><input type="submit" value="Send" name="BUTTON_SUBMIT"></p>
<% End If %>

In Conclusion

We highly recommend Serial Port Component, instead of developing your own code to use as a serial port communication object, we have found this product to be compatible to any device that has a standard GSM modem and that connects to a serial port for sending SMS's or paging.

This component assisted us in closing the deal and successfully presenting the combined efforts of telecommunications and web development. For one this application combined with a bit of technique can be used to save your company immense costs on SMS's and also save you extensively on bulk messaging applications, you may use the code above as a guideline, We used the standard code provided in the demo of the product.

We have contacted and ensued adding all of ActiveXperts Software and their services as our Strategic Partner going forward.