 |
TJ_01 Level: VB Lord

 Registered: 24-08-2005 Posts: 320
|
Send SMS from PC to mobile phones using VB
Hi.
These topic is for those who wants to learn how to send SMS (Short Message Service) from pc to mobile phones.
Devices
1. Mobile phone (Nokia Model Only)
2. Connecting Device (Such as: Infrared, DataCable, or Bluetooth)
3. Download the appropriate Nokia PC Connectivity SDK depends on the version or model of the Nokia Phone you are using.
Procedures
1. Install the connecting device (Such as: Infrared, DataCable, or Bluetooth) in you pc.
NOTE: You must connect first the phone to your pc before installing.
2. Install the Nokia PC COnnectivity.
3. Open a Visual Studio and start new project.
4. Add the Nokia Components in your preferences.
5. Then copy the code below.
Private Sub cmdSend_Click()
On Error GoTo ErrorTrap
Dim message As String
message = txtMsg.Text
Select Case chkUnicode.Value
Case vbUnchecked
If (Len(message) > SMS_TEXT_MAX_SIZE) Then
pMsgPart1 = Left(message, SMS_CONCATENATED_TEXT_MAX_SIZE)
pMsgPart2 = Right(message, Len(message) - SMS_CONCATENATED_TEXT_MAX_SIZE)
SendConcatenatedMessage
Exit Sub
End If
Case vbChecked
If (Len(message) > SMS_UNICODE_MAX_SIZE) Then
pMsgPart1 = Left(message, SMS_CONCATENATED_UNICODE_MAX_SIZE)
pMsgPart2 = Right(message, Len(message) - SMS_CONCATENATED_UNICODE_MAX_SIZE)
SendConcatenatedMessage
Exit Sub
End If
Case Else
MsgBox ("Select coding scheme")
End Select
Dim smsEntry As NokiaCLMessaging.ShortMessageItem
Set smsEntry = New NokiaCLMessaging.ShortMessageItem
smsEntry.Type = SHORTMESSAGE_TYPE_GSM_SUBMIT
Set pIGSMSubmit = smsEntry.TypeProperties
pIGSMSubmit.message = txtMsg.Text
pIGSMSubmit.DestinationAddress = txtDestination.Text
pIGSMSubmit.ServiceCenterAddress = txtMsgCenter.Text
pIGSMSubmit.ProtocolID = 0
If (chkUnicode.Value = vbChecked) Then
pIGSMSubmit.DataCodingScheme = CODING_SCHEME_UNICODE
Else
pIGSMSubmit.DataCodingScheme = CODING_SCHEME_TEXT
End If
pIGSMSubmit.ValidityPeriodRelative = 255
Call pSMSAdapter.SendSMS(SHORTMESSAGE_ROUTE_TYPE_ANY, pIGSMSubmit)
'Insert your code here to store the sent message in the database.
MsgBox "Message Sent TO " & txtDestination.Text & vbCrLf & "With Reference Number: " & pIGSMSubmit.MessageReference, vbOKOnly, "Message Sent"
Exit Sub
ErrorTrap:
If Err.Number = -2147467259 Or Err.Number = -2147467259 Then
End If
MsgBox Err.Description, vbInformation, "SMS Cannot Send"
End Sub |
[Edited by admin on 01-10-2005 at 12:45 PM GMT]
____________________________
Im JAMES
|
|
29-08-2005 at 04:11 AM |
|
|
luckyboy Level: VB Lord
 Registered: 05-05-2005 Posts: 161
|
Re: SEND SMS FROM PC TO MOBILE PHONES USING VB
How about no device? can we send from pc to phone(no device require)?
____________________________
Please help out.
|
|
16-09-2005 at 09:50 AM |
|
|
resty2k5 Level: Trainee
 Registered: 03-10-2005 Posts: 2
|
Re: SEND SMS FROM PC TO MOBILE PHONES USING VB
quote: TJ_01 wrote:
Yes. You can use a modem as your device but the code is not similar compare to the code i have written. You gonna use AT Commands.
can you give me sample code for AT command b'coz i'm newbie for this syntax
|
|
03-10-2005 at 07:10 AM |
|
|
potetojb Level: Protégé
 Registered: 27-03-2006 Posts: 4
|
Re: Send SMS from PC to mobile phones using VB
if i want change use sony ericsson phone (T610) with At command what part i much change..
|
|
27-03-2006 at 08:20 AM |
|
|
nkmomin Level: Protégé
 Registered: 21-09-2006 Posts: 6
|
Re: Send SMS from PC to mobile phones using VB
Hi all i am a new over here.
I am facing some problem in this code. this doesn't work for me can some one please find a solution to that and suggest me how to send bulk sms via VB.
please
Thanks in Advance....
|
|
21-09-2006 at 03:05 PM |
|
|
joshua__lim Level: Trainee
 Registered: 24-10-2007 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
quote: potetojb wrote:
if i want change use sony ericsson phone (T610) with At command what part i much change..
You can issue the following thru COM:
AT+CMGF=1
AT+CMGS= receiver phone number here <CR>
Text can be entered.
<CTRL-Z>/<ESC>
Nokia Suite does not use AT commands, you can try this SMS sender - http://www.visualgsm.com/products_vgsmlite.htm
Rgds,
Joshua Lim
SMS Gateway@Expert
[Edited by joshua__lim on 24-10-2007 at 10:16 AM GMT]
|
|
24-10-2007 at 10:16 AM |
|
|
ravi_samsher211 Level: Trainee
 Registered: 26-07-2008 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
This code is not working Properly
I m facing Some Problem
Please Help me
|
|
26-07-2008 at 08:30 AM |
|
|
khuzaimasalaam Level: Trainee
 Registered: 24-09-2008 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
Hi,
I tried to implement this code but it gives error "No Phone connected". Although I have connected my E51 using BlueTooth. I also connected E51 with USB cable. In both the cases, Nokia PC Suite shows that E51 is connected, but I cannot send sms using the above code. It immediately gives error "No Phone Connected".
Can anyone please help me solve this problem?
Also, can anyone help me sending sms using CDMA mobile connected to the PC through BlueTooth?
Thanks & Regards
Khuzaima
[Edited by khuzaimasalaam on 25-09-2008 at 05:08 PM GMT]
|
|
24-09-2008 at 05:39 AM |
|
|
wire2air Level: Trainee
 Registered: 21-11-2008 Posts: 2
|
Re: Send SMS from PC to mobile phones using VB
Hi,
Why don't you try Txtimpact.
They provide Activ X as wel as HTTP API.
Here is the site
http://www.txtimpact.com/
Try it............
|
|
21-11-2008 at 07:12 PM |
|
|
lazers Level: Trainee
 Registered: 03-12-2008 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
Sorry for bumping an old thread.
Hi, i have a nokia 6300 and downloaded the appropriate Nokia PC Suite. Now i want to write an application in VB or C to send an SMS through the phone. I have the phone connected through USB cable. I came accross various forums and sample codes but none is successfull. Can anyone help.
Regards.
|
|
03-12-2008 at 07:58 AM |
|
|
leila_lhe Level: Trainee
 Registered: 28-12-2008 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
could you please put the solution of your project for download?
because this code is full of error and did not work
____________________________
Leila
|
|
28-12-2008 at 08:17 AM |
|
|
jerick31586 Level: Trainee
 Registered: 03-01-2009 Posts: 3
|
Re: Send SMS from PC to mobile phones using VB
hi! ! ! !
after i do your procedure,copy and paste the following code,now how the vb will send a sms from pc to cellphone, to think that my cellphone is connected to my pc, i want to manipulate the msg. i want to send to cellphone,using our code. . .please answer it i need it badly. . .tnx
|
|
03-01-2009 at 06:48 AM |
|
|
carolynjoseph Level: Trainee
 Registered: 02-06-2010 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
I recommend you Wire2Air SMS Gateway software to send and receive sms from computer to mobile and mobile to computer. wire2air is a US based company engaged in providing sms gateway, bulk sms, mobile contents delivery(like ringtones, wallpapers, videos, images, animations)and mobile marketing solutions and platforms.
|
|
02-06-2010 at 02:28 PM |
|
|
bishneet Level: Trainee
 Registered: 03-12-2010 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
quote: TJ_01 wrote:
Hi.
These topic is for those who wants to learn how to send SMS (Short Message Service) from pc to mobile phones.
Devices
1. Mobile phone (Nokia Model Only)
2. Connecting Device (Such as: Infrared, DataCable, or Bluetooth)
3. Download the appropriate Nokia PC Connectivity SDK depends on the version or model of the Nokia Phone you are using.
Procedures
1. Install the connecting device (Such as: Infrared, DataCable, or Bluetooth) in you pc.
NOTE: You must connect first the phone to your pc before installing.
2. Install the Nokia PC COnnectivity.
3. Open a Visual Studio and start new project.
4. Add the Nokia Components in your preferences.
5. Then copy the code below.
Private Sub cmdSend_Click()
On Error GoTo ErrorTrap
Dim message As String
message = txtMsg.Text
Select Case chkUnicode.Value
Case vbUnchecked
If (Len(message) > SMS_TEXT_MAX_SIZE) Then
pMsgPart1 = Left(message, SMS_CONCATENATED_TEXT_MAX_SIZE)
pMsgPart2 = Right(message, Len(message) - SMS_CONCATENATED_TEXT_MAX_SIZE)
SendConcatenatedMessage
Exit Sub
End If
Case vbChecked
If (Len(message) > SMS_UNICODE_MAX_SIZE) Then
pMsgPart1 = Left(message, SMS_CONCATENATED_UNICODE_MAX_SIZE)
pMsgPart2 = Right(message, Len(message) - SMS_CONCATENATED_UNICODE_MAX_SIZE)
SendConcatenatedMessage
Exit Sub
End If
Case Else
MsgBox ("Select coding scheme")
End Select
Dim smsEntry As NokiaCLMessaging.ShortMessageItem
Set smsEntry = New NokiaCLMessaging.ShortMessageItem
smsEntry.Type = SHORTMESSAGE_TYPE_GSM_SUBMIT
Set pIGSMSubmit = smsEntry.TypeProperties
pIGSMSubmit.message = txtMsg.Text
pIGSMSubmit.DestinationAddress = txtDestination.Text
pIGSMSubmit.ServiceCenterAddress = txtMsgCenter.Text
pIGSMSubmit.ProtocolID = 0
If (chkUnicode.Value = vbChecked) Then
pIGSMSubmit.DataCodingScheme = CODING_SCHEME_UNICODE
Else
pIGSMSubmit.DataCodingScheme = CODING_SCHEME_TEXT
End If
pIGSMSubmit.ValidityPeriodRelative = 255
Call pSMSAdapter.SendSMS(SHORTMESSAGE_ROUTE_TYPE_ANY, pIGSMSubmit)
'Insert your code here to store the sent message in the database.
MsgBox "Message Sent TO " & txtDestination.Text & vbCrLf & "With Reference Number: " & pIGSMSubmit.MessageReference, vbOKOnly, "Message Sent"
Exit Sub
ErrorTrap:
If Err.Number = -2147467259 Or Err.Number = -2147467259 Then
End If
MsgBox Err.Description, vbInformation, "SMS Cannot Send"
End Sub |
i'm not able to find nokia components...plz help
|
|
03-12-2010 at 07:25 PM |
|
|
ruben_benz Level: Trainee
 Registered: 15-01-2011 Posts: 1
|
Re: Send SMS from PC to mobile phones using VB
Hey guys try this code maybe it could be help..
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Dim message As Integer
Private Sub Form_Load()
'MSComm1.Settings = "460800,n,8,1" 'Change this with the Baud rate of your modem (The one you use with Hyper Terminal)
'MSComm1.CommPort = 10 ' Change this with the port your Modem is attached,(eg bluetooth)
'MSComm1.PortOpen = True
With MSComm1
.CommPort = 10
.Settings = "9600,N,8,1"
.Handshaking = comRTS
.RTSEnable = True
.DTREnable = True
.RThreshold = 1
.SThreshold = 1
.InputMode = comInputModeText
.InputLen = 0
.PortOpen = True 'must be the last
End With
End Sub
Private Sub Command1_Click()
' Send an 'AT' command to the phone
MSComm1.Output = "AT" & vbCrLf
Sleep 500
MSComm1.Output = "AT+CMGF=1" & vbCrLf 'This line can be removed if your modem will always be in Text Mode...
Sleep 500
MSComm1.Output = "AT+CMGS=" & Chr(34) & TxtNumber.Text & Chr(34) & vbCrLf 'Replace this with your mobile Phone's No.
Sleep 1000
MSComm1.Output = TxtMessage.Text & Chr(26)
Sleep 2000
MsgBox "Message Send"
End Sub
Private Sub MSComm1_OnComm()
Me.List1.AddItem MSComm1.Input
'Me.List1.AddItem MSComm1.Output
End Sub
____________________________
Source code is my life
|
|
16-01-2011 at 03:42 AM |
|
|
|
|
 |
 |