hi Guys,
so my phone is connected to the computer, on com7
From the hyperterminal I have no issues sending an sms.
I want to do it from a button in vb.net
My code is the following:
I know it interacts with com7 becuase when i try to use hyperterminal when the program is working, it says it is busy.Code:Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With comSerial .PortName = "COM7" .BaudRate = "460800" .StopBits = IO.Ports.StopBits.One .DataBits = 8 .Parity = IO.Ports.Parity.None .ReadBufferSize = 10000 .ReadTimeout = 1000 .WriteBufferSize = 10000 .WriteTimeout = 10000 .RtsEnable = True .Open() .DiscardOutBuffer() End With comSerial.Write("at+cmgf=1" + Chr(13)) 'Now enter message writing mode to send an sms to the number below comSerial.Write("at+cmgs=" & Chr(34) & "447725698210" & Chr(34) & Chr(13)) 'Now send the contents of the message comSerial.Write("Test message from coded program" + Chr(26)) End Sub End Class
I am basically just trying to simulate the at commands, when I click the button no errors or anything, just no text message either.
Any healp would be greatly appreciated
Alex


Reply With Quote
