| | |
sms
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2007
Posts: 1
Reputation:
Solved Threads: 0
hi,
i want to send and recieve sms using gsm modem that is connected to my pc with serial port.i already build a application in vb.net but i am facing a problem with reading and deleting message.
i do that with following code-
Dim comSerial As New System.IO.Ports.SerialPort
Dim strPhone_Number As String = ""
Dim strMessage1 As String = ""
Dim atcCommand As String
With comSerial
.PortName = "COM1"
.BaudRate = "9600"
.StopBits = IO.Ports.StopBits.One
.DataBits = 8
.Parity = IO.Ports.Parity.None
.ReadBufferSize = 10000
.ReadTimeout = 1000
.WriteBufferSize = 10000
.WriteTimeout = 10000
.RtsEnable = True
.Open()
.DiscardOutBuffer()
Dim i As Integer = 0
For i = 1 To 10
atcCommand = "AT+CMGR=" & i 'to read from inbox"
.Write(atcCommand + vbCrLf) 'execute command on buffer
Label1.Text = .ReadExisting()
atcCommand = "AT+CMGD=1" 'to delete from inbox
.Write(atcCommand + vbCrLf) 'execute command on buffer
'.Close()
Next
.Close()
End With
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
any body have idea bout that
i want to send and recieve sms using gsm modem that is connected to my pc with serial port.i already build a application in vb.net but i am facing a problem with reading and deleting message.
i do that with following code-
Dim comSerial As New System.IO.Ports.SerialPort
Dim strPhone_Number As String = ""
Dim strMessage1 As String = ""
Dim atcCommand As String
With comSerial
.PortName = "COM1"
.BaudRate = "9600"
.StopBits = IO.Ports.StopBits.One
.DataBits = 8
.Parity = IO.Ports.Parity.None
.ReadBufferSize = 10000
.ReadTimeout = 1000
.WriteBufferSize = 10000
.WriteTimeout = 10000
.RtsEnable = True
.Open()
.DiscardOutBuffer()
Dim i As Integer = 0
For i = 1 To 10
atcCommand = "AT+CMGR=" & i 'to read from inbox"
.Write(atcCommand + vbCrLf) 'execute command on buffer
Label1.Text = .ReadExisting()
atcCommand = "AT+CMGD=1" 'to delete from inbox
.Write(atcCommand + vbCrLf) 'execute command on buffer
'.Close()
Next
.Close()
End With
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
any body have idea bout that
![]() |
Similar Threads
- sending sms using vb.net (VB.NET)
- Microsoft SMS vs. novadigm software and other software (Windows Software)
- sms via java (Java)
- SMS from VisualBasic? (Visual Basic 4 / 5 / 6)
- Email Client, SMS, Voice command (Java)
Other Threads in the VB.NET Forum
- Previous Thread: I want next record to Display
- Next Thread: failed to read data from database
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2008 access advanced application array basic beginner browser button buttons center click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function html images input lib listview map mobile module monitor msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read regex remove right-to-left save search serial settings shutdown socket sorting sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol validation vb vb.net vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms winsock wpf wrapingcode xml year





