bluetooth communication prerequisites (TCP/IP Socket)
Hello,
I have written an application, that uses TCP/IP socket communication between Desktop PC and Pocket PC via. USB connection (cradle). Now, I want to change the communication to bluetooth.
Will I have problems porting existing server client communication to bluetooth?
Are there some prerequisites for that kind communication? I heard for Microsoft Bluetooth stack.
If someone could give me some good web references connected with bluetooth communication [.net cf 1.1], I would be very grateful.
Thanks in advance.
[530 byte] By [
IgorP] at [2007-12-23]
It depends really, I mean for example if you activesync your device via bluetooth, then it will perform in the same way as it would when you cradled it/connected it by USB (so you don't need to worry about bluetooth stack etc... in this case).
Otherwise I guess you may need to look at the bluetooth stack
Ok. My device (Qtek 2020) is using Microsoft Bluetooth stack.
I am considering options of using virtual serial port connection or bluetooth stack. Which option is better?
Serial port option is easier in that it is stack-independent. You just open the port and start sending and receiving the data. The disadvantage is that you cannot discover devices, verify that the connection is present or connect to a device progammatically. Instead you must rely on the user having established connection for you. Also some of the stacks allow you only one active virtual com port at a time.
Sockets are much more flexible but require you to have access to the SDK. And Broadcom/Widcomm SDK is not cheap
A couple of thoughts from experience :
1. Make sure that the actual bluetooth device does support multiple concurrent serial ports,. Some do not, but there are a few USB dongles that do.
2. The Broadcom/Widcomm stack code is now published (free download). Its unfortunately all written in C++ but there are some C# wrappers around. That means that you can initiate device discovery, although its not a quick process (can be up to 10 seconds in the case of Broadcom/Widcomm). I'm not familiar with the Microsoft Bluetooth stack
3. I'd agree with Alex - the easiest method is virtual serial ports. Establish the pairing first with each device to make life easy.
Eric