Click here to Skip to main content
15,909,591 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
This is i tried many times but still i am not getting work you may see code here
With SerialPort1
VB
.PortName = DropDownList1.Text
                .BaudRate = 9600
                .Parity = Parity.None
                .StopBits = StopBits.One
                .DataBits = 8
                .Handshake = Handshake.RequestToSend
                .DtrEnable = True
                .RtsEnable = True
                .NewLine = vbCrLf
                .Open()
                Label5.Text = ("Connected")


it shows o connected
With SerialPort1
VB
.Write("AT" & vbCrLf)
                .Write("AT+CMGF=1" & vbCrLf)
                .Write("AT+CMGS=" & Chr(34) & txtnumber.Text & Chr(34) & vbCrLf)
                .Write(txtbody.Text & Chr(26))
                Label5.Text = ("sms Sent")

            End With
            'Else
            Label5.Text = ("ERROR MSG ON PORT")
            'End If
        Catch ex As Exception
            Label5.Text = (ex.Message)

        End Try

just it shows still serial port closed please help how i can do it asp.net
Posted
Updated 26-Sep-13 8:17am
v3
Comments
Ron Beyer 26-Sep-13 13:11pm    
Do you actually have an SMS gateway on the serial port that the server is running?
irfanansari 26-Sep-13 13:18pm    
Sir i want to send sms by using nmy cell phone with At Command
[no name] 26-Sep-13 13:36pm    
Do you any particular number of times you are going to be asking this and getting the same answer?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900