views:

25

answers:

1

I want to do the following using C# on .NET compact framework

1) know the list of all COM ports,

2) know whether a particular Blue-tooth device I have, is paired with my PDA (running Windows Mobile 6.1) or not.

3) If it's not paired I need to figure a COM port that can be used for my Bluetooth device.

+1  A: 

For #1, the simplest way is to use the static GetPortNames method of the System.IO.SerialPort class. An alternate would be to look in the registry at HKLM\Drivers\BuiltIn for drivers that are serial ports (a prefix of "COM" is a good indicator, though not always the only one).

For pairing, etc. you might look at the 32 feet library.

ctacke
Thank you ctacke :) Your answer is really helpful. Will look into the link you have provided.
Amey
Thank you very much. It's very useful.
Amey

related questions