Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using Serialport in visual basic 2008 for Communicating and sending SMS through Com port.My Modem is attatched.Connection to Modem and sending SMS through Modem work Fine.The code that i used for Connecting and sending SMS is that :
VB
Imports System
Imports System.IO.Ports
Imports System.Threading

Connection Code:

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Try
            With SerialPort1
                .PortName = ComboBox2.Text
                .BaudRate = 9600
                .Parity = Parity.None
                .StopBits = StopBits.One
                .DataBits = 8
                .Handshake = Handshake.RequestToSend
                .DtrEnable = True
                .RtsEnable = True
                .NewLine = vbCrLf
                .Open()
            End With
            Label5.Text = " Connection With Modem OK!"
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub


Sending SMS Code:

VB
Try
            If SerialPort1.IsOpen Then
                With SerialPort1
                    .Write("AT" & vbCrLf)
                    .Write("AT+CMGF=1" & vbCrLf)
                    .Write("AT+CMGS=" & Chr(34) & Label1.Text & Chr(34) & vbCrLf)
                    .Write(RichTextBox1.Text & Chr(26))
                    'Put some code in here to send the SMS
                    Label3.Text = "sending SMS to " + Label1.Text
                End With
            Else
                MsgBox("Sorry ! there is some error in your computer port")
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

But i want to know that how can i Get Menufacture , IMEI , Modem information (etc) about Modem.Please Help me for solving this issue.Thanks
Posted
Updated 4-Jun-13 23:18pm
v2
Comments
Richard MacCutchan 5-Jun-13 5:23am    
You need to get a copy of the documentation for the modem, which should tell you what information is available, and what commands are needed to read it out.
[no name] 5-Jun-13 6:47am    
Repost of a repost of a repost, ad nauseum.

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