The Port property specifies the serial port or the virtual serial port of the computer to which the GSM Modem or Phone is connected.
| Usage | ObjectName.Port = strPort |
| Value Type | String |
| Access Mode | Write |
| Valid Values | 'COM1', 'COM2', 'COM3'... 'COM256' |
| Remarks | For GSM devices connected through Infrared Port or USB to Serial converter or Bluetooth interface, the Port property value should be set to the virtual serial port address. |
| 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" If objSMS.Connect Then MsgBox "Connected Successfully!" objSMS.Disconnect Else MsgBox "Error " & CStr(objSMS.ErrorCode) & _ ": " & objSMS.ErrorDescription End If Set objSMS = Nothing |