944,082 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1706
  • VB.NET RSS
Aug 6th, 2007
0

sms

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
harry_hitechpoi is offline Offline
1 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: I want next record to Display
Next Thread in VB.NET Forum Timeline: failed to read data from database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC