Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Go Back  Xtreme Visual Basic Talk > > > Sending SMS From PC to Mobile Using AT Command


Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2010, 09:17 AM
mvmkandan mvmkandan is offline
Newcomer
 
Join Date: Dec 2009
Location: Tuticorin(Peart City) Ind
Posts: 4
Default Sending SMS From PC to Mobile Using AT Command


Hi

I am developing a project that send the SMS from PC to mobile phones. It was developed in VB. I have installed Nokia PC Suite(Version 7) and my mobile model is Nokia 5233. After Installing PC Suite i can send sms from PC Suite. But i cannot send from VB. The settings and coding are

In Device Manager, it shows Nokia USB(Com3). And Port Settings are "9600,N,8,1".
My coding

Private Sub Fom_Load()
MSCOMM1.CommPOrt = 3
MSCOMM1.Settings ="9600,N,8,1"
If MSCOMM1.POrtOPen = true then MSCOMM1.POrtOPen = False
MSCOMM1.POrtOPen = TRue
End sub

Private Sub cmdSend_Click()
Dim sMSg as string
MSComm1.Output = "AT"
MSComm1.Output = "AT+CMGF=1" & vbCrLf
sMsg = "AT+CMMS="
sMsg = sMsg & """+91" & "9787932199" & """"
MSComm1.Output = "AT+CMGS=" + Chr$(34) + Trim("+919787932199") + Chr$(34) + vbCr
MSComm1.Output = "hi good morning" & Chr(26)
MSComm1.Output = vbCrLf
End Sub

Private Sub MSComm1_OnComm()
If MSComm1.CommEvent = comEvReceive Then
msgbox MSCOMM1.Input
End If
End sub


----
It runs successfulyt without any error. But I did not receive any SMS and cursor will not move to MSCOMM_ONComm event.

Please give me a Solution.

Thanks and Regards
Veera Manikandan M
TUT-TN
Reply With Quote
  #2  
Old 08-17-2010, 12:20 AM
DougT's Avatar
DougT DougT is offline
Ultimate Antique

Administrator
* Expert *
 
Join Date: Sep 2005
Location: Maldon,Essex, UK
Posts: 3,939
Default

Here's an extract from an example I created a while ago.
(The ",129" is there because the number is not preceded with a "+")

Code:
Private Sub SendMsg(strNumber As String, strMessage As String)
Dim strMsg As String
'
' Extended AT Commands:
' CMGF = Set Message Format (1 = SMS)
' CMGS = Send Message
' Method: Send "number",129 vbCr
'         Send the text of the Message followed by an Escape Character
'
strMsg = "AT+CMGF=1;+CMGS=" & Chr(34) & strNumber & Chr(34) & ",129" & vbCr
MSComm1.Output = strMsg
strMsg = strMessage & Chr(26)
MSComm1.Output = strMsg
End Sub
The reason you're not getting an OnComm event is because you need to set RThreshold to a non-zero value to allow the OnComm event to trigger. I always use RThreshold = 1 and buffer the output in the OnComm event.
__________________
semel insanivimus omnes
S Data in context = Information, S Information in context = Knowledge, S Knowledge in context = Experience
S Experience in context = Wisdom= Data
Reply With Quote
  #3  
Old 08-17-2010, 02:14 AM
mvmkandan mvmkandan is offline
Newcomer
 
Join Date: Dec 2009
Location: Tuticorin(Peart City) Ind
Posts: 4
Default

Hi Mr. DougT

Thanks for your reply.

I have changed my coding as below..
Private Sub Form_Load()
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"
MSComm1.RThreshold = 1

If MSComm1.PortOpen Then MSComm1.PortOpen = False
MSComm1.PortOpen = True

End Sub

private sub sendsms()
MSComm1.Output = "AT"
MSComm1.Output = "AT+CMGF=1" & vbCrLf
strMsg = "AT+CMGF=1;+CMGS=" & Chr(34) & sNumber & Chr(34) & ",129" & vbCr
MSComm1.Output = strMsg
MSComm1.Output = "hi good morning" & Chr(26)
MSComm1.Output = vbCrLf
end sub

Private Sub MSComm1_OnComm()
MsgBox MSComm1.Output
If MSComm1.CommEvent = comEvReceive Then
MsgBox MSComm1.Input
End If
End Sub

But now also i did not get any sms also i cannot get any message from MSCOMM1_COMM() event.

Kindly help me

Thanks
Veera
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
 
Sending SMS From PC to Mobile Using AT Command
Sending SMS From PC to Mobile Using AT Command
 
-->