sms through GSM mobile
Could any body give me code how to sen开发者_运维知识库d sms through GSM mobiles, connected with computer? Thanks Furqan
About one year ago I have used mCore library for this purpose. It is very simple to use (if my VB.NET is correct):
Private objSMS As New mCore.SMS()
' Set up connection and check '
' if connection is open '
Private Sub SendSms()
If Not objSMS.IsConnected Then
objSMS.Port = "COM4"
objSMS.BaudRate = mCore.BaudRate.BaudRate_19200
objSMS.DataBits = mCore.DataBits.Eight
objSMS.Parity = mCore.Parity.None
objSMS.StopBits = mCore.StopBits.One
objSMS.FlowControl = mCore.FlowControl.None
objSMS.DisableCheckPIN = False
objSMS.Encoding = mCore.Encoding.Unicode_16Bit
End If
Dim strSendResult As String = objSMS.SendSMS("+7921XXXXXXX", "Server CORP_DB2 is down!", False)
End Sub
This library supports a lot of mobile phones and has a lot of useful functions: sending USSD requests, receiving incoming SMS and so on.
mCore is shareware but it has trial version. Trial version will add text to all SMSs that SMS sent by mCore.
精彩评论