Visual Basic Development Bookmark and Share   
 Home > Visual Basic Power Packs > Using MSComm component to communicate via bluetooth
 

Using MSComm component to communicate via bluetooth

Hi,

I am developing a program to receive data from a device via bluetooth.

I set my bluetooth dongle to a com port and can easily read data from it. The article here (http://support.microsoft.com/default.aspx/kb/194922) was very useful.

But, I have a problem. When the bluetooth connection is lost (eg. when the device is shut down or when the device leaves its bt range), the program can not understand it.

In debug mode; I've realised that the events (comEvCTS, comEvDSR, comEvCd and comEvRing) onMCComm1_OnComm() runs in turn one by one when I switch off the device.

Do you think should I use this situation to control if the connection is lost?
fkucuk  Monday, October 26, 2009 2:07 PM
Hi fkucuk,

Go to http://www.devx.com/assets/sourcecode/5255.zip and when the dialog box comes up hit "Save" and save it to your hard drive.

http://www.devx.com/wireless/Article/11511/0/page/3


http://forums.devbuzz.com/m_36766/printable.htm

BeST Wishes
Xingwei Hu
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Xingwei Hu  Thursday, October 29, 2009 10:48 AM
Dear Xingwei Hu,

Thanks for your reply,

I have examinde the links you gave, but the device I connect is a linux driven basic barkod reader and I have no problem connecting to and receiving data from it.

My mayor problem is how can I understand when the bluetooth connection is lost.

Is there any event that I should trace which states the connection is alive. Or is there a kind of signal that I can send and receive which I can interpret that the connection is still alive (like pinging) which does not affect the device's operation.

I have to use vb 6.0 and my manoeuvres are limited.

Thanks..


fkucuk  Friday, October 30, 2009 7:18 AM

Hi

This forum is for VB.NET questions only (e.g. Visual Basic 2003, Visual Basic 2005, Visual Basic 2008).

Sticky: For Visual Basic 6 questions, please read...

Sticky: For VBA, Office (VSTO), Macros and VBScript Questions


For VBA (Visual Basic for Applications), Macros or Excel Questions, you will get better support in the VBA
Forum:

http://social.msdn.microsoft.com/forums/en-US/isvvba/threads/


Best Wishes
Xingwei Hu


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Xingwei Hu  Friday, October 30, 2009 7:49 AM

You can use google to search for other answers

Custom Search

More Threads

• is there any software to simulate stochastic model or monte carlo method..
• VB Power Pack 3 and VB 2K8 Express
• Printing multiple forms/pages under the same print queue (under one DocumentName)
• Printer Name in ActivePrinter
• Including DataGridView to VBA Excel Form
• how can i deliberately invalidate the visible repeater items?
• how to create separate database for every year using SQL 2000 and VB
• Set Document Name?
• how to identify the VB powerpacks shapes in a panel
• Help on VB