The ModemInitString allows you to set a modem initialization AT Command string. This command string is sent to the modem whenever the Connect method is called (either by application or internally by mCore™).
| Usage |
|
| Value Type | String |
| Access Mode | Read/Write |
| Valid Values |
|
| Default Value | Blank String |
| Remarks | if you enter AT Commands that are not supported by the GSM Modem, mCore will not report any error i.e. it will not be reflected in ErrorCode or ErrorDescription property. However, if you set the LogType property to 2, you can check the modem response to the ModemInitString. |
| Visual Basic / ASP (VBScript) |
| Dim objSMS As mCore.SMS 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" objSMS.ModemInitString = "AT&F" If objSMS.Connect Then MsgBox "Connected Successfully!" objSMS.Disconnect Else MsgBox "Error " & CStr(objSMS.ErrorCode) & _ ": " & objSMS.ErrorDescription End If Set objSMS = Nothing |