sms

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2007
Posts: 1
Reputation: harry_hitechpoi is an unknown quantity at this point 
Solved Threads: 0
harry_hitechpoi harry_hitechpoi is offline Offline
Newbie Poster

sms

 
0
  #1
Aug 6th, 2007
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC