|
-
May 16th, 2006, 03:24 AM
#1
Thread Starter
New Member
Wait for a SMS with Visual Basic
I need to wait for an SMS message. I read something about AT+CNMI command, but I don't know how can I use it. I need the phone wait for recive a SMS, and when it recive the SMS it detect and the computer show a notice. How can implement that?
-
May 22nd, 2006, 02:39 AM
#2
Hyperactive Member
Re: Wait for a SMS with Visual Basic
What phone U have?
B.R
VB Client/Server
-
May 22nd, 2006, 03:00 AM
#3
Thread Starter
New Member
Re: Wait for a SMS with Visual Basic
I have diferent phones:
Motorola V220
Siemens S55
Sharp GX17
Nokia 6230
Can you help me with any?
-
May 22nd, 2006, 03:11 AM
#4
Hyperactive Member
Re: Wait for a SMS with Visual Basic
 Originally Posted by Ainara
I have diferent phones:
Motorola V220
Siemens S55
Sharp GX17
Nokia 6230
Can you help me with any?
1. Search AT-commands for this phone
I will try to send U AT commands for Siemens mobile, I know I have it somewhere...
D U have data cable for Siemens?
B.R
VB Client/Server
U could analyze this sw http://www.softpedia.com/get/Mobile-...-Control.shtml
Download HHD Serial Port Monitor, and see what this sw send's to phone and
what phone returns.
U will see also mscomm settings for communication etc...
Last edited by VB Client/Server; May 22nd, 2006 at 04:26 AM.
-
May 22nd, 2006, 07:53 AM
#5
Thread Starter
New Member
Re: Wait for a SMS with Visual Basic
 Originally Posted by VB Client/Server
Can you help me with any?
1. Search AT-commands for this phone
I will try to send U AT commands for Siemens mobile, I know I have it somewhere...
D U have data cable for Siemens?
B.R
VB Client/Server
U could analyze this sw http://www.softpedia.com/get/Mobile-...-Control.shtml
Download HHD Serial Port Monitor, and see what this sw send's to phone and
what phone returns.
U will see also mscomm settings for communication etc...
I conect the phones by infrared or by bluetooth. Only Motorola V220 is conected by cable because it doesn't have anymore conectivity.
I have used AT commands to sent SMS commands and dial. But I don't know how can I wait for SMS and when one arrive open a message in the PC.
Do you know what AT command is used for this?
Thank you very much.
-
May 23rd, 2006, 04:08 AM
#6
Hyperactive Member
Re: Wait for a SMS with Visual Basic
I have never use infrared or bluetooth protocol, so I dont know how
code would look like...
This is sample for Siemens mobile, and for that U need Data cable.
Dim out1, out2, out3 As String
Private Sub Command2_Click()
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
Private Sub Form_Load()
On Error GoTo OpenError
MSComm1.CommPort = 1
MSComm1.Settings = "19200,N,8,1"
MSComm1.InputLen = 0
MSComm1.PortOpen = True
Timer1.Interval = 300
Timer2.Interval = 2000
Exit Sub
OpenError:
MsgBox "Error " & Format$(Err.Number) & _
": " & vbCrLf & _
Err.Description
Exit Sub
End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub
Private Sub Timer1_Timer()
Dim inp1, out1 As String
Dim Ascnum As Integer
On Error GoTo OpenError
hulp = ""
MSComm1.Output = "AT+GSN" ' edit AT commands here
MSComm1.Output = Chr(13)
Do While Len(inp1) = 0
DoEvents
inp1 = inp1 & MSComm1.Input
Loop
For s = 1 To Len(inp1)
Ascnum = Asc(Mid(inp1, s, 1))
If Ascnum > 47 And Ascnum < 58 Then
out1 = out1 + Mid(inp1, s, 1)
End If
Next s
Text1.Text = out1
If Not (Text1.Text = "") Then
Timer1.Enabled = False
End If
Exit Sub
OpenError:
MsgBox "Error " & Format$(Err.Number) & _
": " & vbCrLf & _
Err.Description
Exit Sub
End Sub
Private Sub Timer2_Timer()
If Text1.Text = "" Or Text1.Text = "turn on phone !" Then
Timer1.Enabled = False
Timer2.Enabled = False
MSComm1.Break = True
Duration! = Timer + 0.1
Do Until Timer > Duration!
Dummy = DoEvents()
Loop
MSComm1.Break = False
flag = 1
MSComm1.PortOpen = False
MsgBox "Check connection and restart program"
End
End If
End Sub
Sorry, I cant find AT-commands, but maybe U can...
B.R
VB Client/Server
-
May 25th, 2006, 10:02 AM
#7
Hyperactive Member
Re: Wait for a SMS with Visual Basic
http://www.serasidis.gr/circuits/sms...controller.htm
Check this link, maybe will help U.
B.R
VB Client/Server
-
May 26th, 2006, 01:11 AM
#8
New Member
Re: Wait for a SMS with Visual Basic
Hello,
I m doing the same and it is working. I m using GSM Modem which is connected to PC using USB cable (To findout the port to which it is connected goto Device Manager and see the properties).
You can send SMS using simple Text as well as In PDU Format ( For PDU Format you have to define Message Headers and many other information)
For PDU Format, Download the software PDUSpy
-
May 29th, 2006, 01:55 AM
#9
Thread Starter
New Member
Re: Wait for a SMS with Visual Basic
I proved what you said but "AT+GSN" command gives me the phone's serial number. I visited the web-site you gave me too, but there is no information about I need. I know how can I read the messages are into the phone (the read and the unread messages) I need to alert about the new messages are arriving at the moment. Can you understand me? Perhaps I don't explain it very well because my English is not very good...
-
Jun 1st, 2006, 11:27 AM
#10
New Member
Re: Wait for a SMS with Visual Basic
Hi people
Does anyone have a site to learn how to trasfer data from a phone to PC using Bluetooth?
as if the phone was a client and the PC was the server
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|