ASP.NET SMS software for GSM modem

About | Contact us

 
 

Integration of Headwind GSM Modem Driver with ASP

Download ASP.NET SMS component!

With Headwind GSM Modem Driver you can either send SMS from the website (for example, through a SMS sending form) or process received SMS on the website (for example, by writing SMS messages in a guest book).

To add SMS capability to the web portal, you need to setup a Windows-based SMS server connected with one or several GSM devices, where Headwind GSM Modem Driver is installed.

The SMS server interacts with the web server through the HTTP protocol. SMS server is a HTTP client, it requests the status of a web server once per some seconds, using "SMS source" script. Received SMS are sent to the web server through the "SMS handler".

Send and receive SMS in ASP.NET

The ASP.NET component is built for ASP.NET 3.5.

Step-by-step manual

  • Download ASP.NET component;
  • Put sms.dll in directory bin, sms.aspx in root directory of your application;
  • Put test script send.aspx in root directory;
  • Check that Web.config contains the info about default SQL connection:
  • 
        <connectionStrings>
          <add name="DefaultConnection" providerName="System.Data.SqlClient" 
                connectionString="Data Source=[your-host.com];Initial Catalog=[db_name];
                user=[db_user];pwd=[db_password]"/>
        </connectionStrings> 
                        

    Create default SQL connection if it does not exist.

  • Create database tables
  • 
    CREATE TABLE dbo.headwind_inbox (
        id INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
        receive_time DATETIME,
        src VARCHAR(32),
        dst VARCHAR(32),
        body VARCHAR(1024)
    );
    CREATE TABLE dbo.headwind_sent (
        id INT IDENTITY(1,1) NOT NULL  PRIMARY KEY,
        queue_time DATETIME,
        send_time DATETIME,
        delivery_time DATETIME,
        src VARCHAR(32),
        dst VARCHAR(32),
        body VARCHAR(1024),
        report INT,
        status INT
    );
    
  • Install Headwind GSM Modem Driver;
  • Setup SMS handler for incoming SMS ("Receive" event), replace your-host.com to your domain name:
    http://your-host.com/sms.aspx?a=incoming&src=_FROM_&body=_BODY_
  • Setup SMS handlers for "Send" and "Delivery" events, replace your-host.com to your domain name:
    http://your-host.com/sms.aspx?a=report&id=_CUSTOM_&status=_STATUS_
  • Setup SMS source:
    http://your-host.com/sms.aspx?a=source
  • Connect Headwind GSM Modem Driver to the modem, test that SMS can be sent and received;
  • Test the component by entering URL
    http://your-host.com/send.aspx?dst=[recipient phone number]&body=[message]&report=1
  • Test receiving SMS by sending something to the modem number. Finally, the SMS should be placed in the dbo.headwind_inbox table.