Command Method

Description:

Command method is used to send AT Command string to the modem connected to the serial port and reading the modem response.

   

Usage strResponse = ObjectName.Command(ATCommand)
Parameters ATCommand As String
Returns The modem response as String value
Remarks The Command method can be particularly useful for:
  • Sending modem initialization strings
  • Setting message memory values other than "ME" or "SM"
  • Using other features of GSM modem which are not covered by mCore™ (e.g. reading phonebook entries etc.)

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS, strModemResponse As String
Set objSMS = New mCore.SMS
' You can also use Set objSMS = CreateObject("mCore.SMS")
' In case of ASP (VBScript) to create object use
' Set objSMS = Server.CreateObject("mCore.SMS")
' In ASP use Response.Write instead of MsgBox
objSMS.Port = "COM2"
objSMS.BaudRate = 57600
objSMS.Parity = "N"
objSMS.DataBits = 8
objSMS.StopBits = "1"
strModemResponse = objSMS.Command("ATE1")
If Not objSMS.IsError(True) Then
     MsgBox strModemResponse
End If
Set objSMS = Nothing

  

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved