can anybody help me in sending a sms using bluetooth.

For user who dont speak german please use this part of my forum
Antworten
Hemnath

can anybody help me in sending a sms using bluetooth.

Beitrag von Hemnath »

hi, i am hemnath, from India. i am creating a small application in visual basic, to send Bulk SMS from my Computer using a Bluetooth dongle connected to a mobile.

I have BlueSoliel Driver for the Bluetooth Dongle and paired the device.
I am using AT commands to activate, initialize and send Messages to the destination mobiles.. I use a Microsoft Comm control object to do this.

I try send a the Command "AT + <CR>" through comm control.. but i don't get the response from the mobile as "OK". This thing is idle for detection of Port.

The same command is done through "Windows XP" Hyper Terminal it sends be a response as "OK" for the THE COMMAND ["AT + <CR>"].

I want to know what i am missing in the code, that the command work on hyper terminal, and how MyPhoneExplorer is able to detect the port and able to send and receive SMS, from the phone connected to the PC using Bluetooth Dongle.

Can any one help me on this..
FJ
Site Admin
Beiträge: 32117
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol

Beitrag von FJ »

Did you set the RThreshold-Property to 1 ? Maybe its also better to use AT+CBC for detection, cause regular ISDN-Modems answer also with OK on "AT+<CR>". MyPhoneExplorer does not use vbCR as Terminator, it uses vbNewLine
Hemnath
Beiträge: 7
Registriert: So 27. Sep 2009, 11:46
Wohnort: Chennai, Tamilnadu, India.

Re:Re: sending a sms using bluetooth.

Beitrag von Hemnath »

FJ hat geschrieben:Did you set the RThreshold-Property to 1 ? Maybe its also better to use AT+CBC for detection, cause regular ISDN-Modems answer also with OK on "AT+<CR>". MyPhoneExplorer does not use vbCR as Terminator, it uses vbNewLine
I set the RThreshold-Property to 1 and i used the Vbnewline which is send as Chr$(13).

ie
Mscomm1.RThreshold=1
Mscomm1.Output = "AT" + Chr$(13).

Still no results.

You know that this peice of Visual Basic 6.0 code work fine if i connect the Mobile T700 with the Data Cable DCU-65.
Using Bluetooth Works fine with Microsoft HyperTerminal. why my VB program doesnt works, i wil put my code to your view very soon.
Zuletzt geändert von Hemnath am So 27. Sep 2009, 12:47, insgesamt 1-mal geändert.
Hemnath
Hemnath
Beiträge: 7
Registriert: So 27. Sep 2009, 11:46
Wohnort: Chennai, Tamilnadu, India.

Beitrag von Hemnath »

FJ hat geschrieben:Did you set the RThreshold-Property to 1 ? Maybe its also better to use AT+CBC for detection, cause regular ISDN-Modems answer also with OK on "AT+<CR>". MyPhoneExplorer does not use vbCR as Terminator, it uses vbNewLine
Microsoft HyperTerminal.

AT
OK
ATI
Sony Ericsson T700

OK
AT+CMGS=23
> 0011000C911909304229510000AA0AE8329BFD4697D9EC37
+CMGS: 25
OK
--------------------------------------------------------------------------------------

I set the RThreshold Property to 1. I still didn't get the reply OK from the MSCOMM Input. I will put my VB code here. so that u can have a look at it, and can find the Error in it. I have also shown above that the AT Commands works fine with Microsoft HyperTerminal.

Note: Sony Ericsson doesnt support sending messages in Text Mode, it Supports only PDU MODE.

CODE:

Dim s As String, s1 As String
Dim iPort As Integer
Dim n As Single
Dim bModem As Boolean
On Error Resume Next
Me.MousePointer = 11
cmbPort.Text = "Detect..." [Combo box, where i load the ports.]
For iPort = 1 To 15
With MSComm1
.CommPort = iPort
.Settings = "9600,n,8,1" [Are the settings are correct for Sending messages for PDU mode.]
.InputLen = 0
.RThreshold = 1 [As u said i set the property to 1.]
On Error Resume Next
.PortOpen = True
If Err = 0 Then
Debug.Print iPort
.Output = "AT" & Chr$(13)
For n = 1 To 10
DoEvents
Module1.Sleep 500
s = s & .Input
If InStr(s, "OK") <> 0 Then
cmbPort.AddItem iPort
.Output = "AT+CMGF=0" & Chr$(13)
Module1.Sleep 1000
s1 = s1 & .Input
Exit For
End If
Next
.PortOpen = False
End If
End With
Next
If cmbPort.ListCount > 0 Then
cmbPort.ListIndex = 0
End If
Me.MousePointer = 0



can u tell me whats wrong in the code. since i dont receive the 'OK' Message from the Input of MSComm1
Hemnath
FJ
Site Admin
Beiträge: 32117
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol

Beitrag von FJ »

Another point (before is tart debuging your code)
MSComm does work only from COM1 to COM16 - with Bluetooth there are often much higher ports linked. Do you want also a notification on incoming messages ? If not then it would be possible to handle the communication via Win32-API in VB6.
Hemnath
Beiträge: 7
Registriert: So 27. Sep 2009, 11:46
Wohnort: Chennai, Tamilnadu, India.

Beitrag von Hemnath »

FJ hat geschrieben:Another point (before is tart debuging your code)
MSComm does work only from COM1 to COM16 - with Bluetooth there are often much higher ports linked. Do you want also a notification on incoming messages ? If not then it would be possible to handle the communication via Win32-API in VB6.

No i dont want to receive notification on incoming Messages. I am writing an application to send Bulk Sms.
Hemnath
FJ
Site Admin
Beiträge: 32117
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol

Beitrag von FJ »

You've got mail
Hemnath
Beiträge: 7
Registriert: So 27. Sep 2009, 11:46
Wohnort: Chennai, Tamilnadu, India.

Beitrag von Hemnath »

FJ hat geschrieben:You've got mail
This is my mail id adhemnath@gmail.com.
Hemnath
FJ
Site Admin
Beiträge: 32117
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol

Beitrag von FJ »

I have sent the email already when i posted
Hemnath
Beiträge: 7
Registriert: So 27. Sep 2009, 11:46
Wohnort: Chennai, Tamilnadu, India.

Beitrag von Hemnath »

Sorry FJ i didn't get any mails from you. till now.
This is my mail id: adhemnath@gmail.com
Hemnath
FJ
Site Admin
Beiträge: 32117
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol

Beitrag von FJ »

OK, i have sent it aain. Check also your Spam-Folder!
Hemnath
Beiträge: 7
Registriert: So 27. Sep 2009, 11:46
Wohnort: Chennai, Tamilnadu, India.

Beitrag von Hemnath »

I have downloaded your Sample SMS vb program from your Server. You Can delete the file. Thanks for your Sample code...
Hemnath
Antworten