Visual Basic >
Visual Basic Forums
>
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) on MCComm1_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?
- Changed TypeXingwei HuMSFT, ModeratorFriday, October 30, 2009 8:53 AMVB6 question
All Replies
- 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.- Unmarked As Answer byfkucuk Friday, October 30, 2009 7:18 AM
- Marked As Answer byXingwei HuMSFT, ModeratorThursday, October 29, 2009 2:13 PM
- 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..
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.


