Bluetooth via SerialPort

M

Maxim

Hello, everybody.

I'm using PDA with WIDCOMM bluetooth stack. I cannot buy WIDCOMM SDK, so the
only possibility to connect devices via bluetooth is to use virtual serial
ports.
I connected PDA to Desktop using virtual serial port service. Then I tried
to execute the following code on the PDA:

SerialPort port = new SerialPort("COM8", 9600, Parity.None, 8,
StopBits.One);
port.Open();

After last line executed it raises exception with type IOException.

On the Bluetooth settings I found that two ports are used for SerialPort
service:
Inbound COM port: 8
Outbound COM Port: 6
These numbers are constants. User is not allowed to change them.
I have tied to use them both with the same result.

There are also other COM ports used by bluetooth services. For example
service 'Dial-Up Networking' uses COM1. When I use the above code to open
COM1 it works without any problems.

So what is wrong here?

Also I would like to know: Are there any PDA devices that use Microsoft
stack, so I can use standard classes and functions to work with bluetooth.

Thanks in advance.
 
M

Mehmet AVSAR

You should search for a device, query it's services and finally connect
to desired service before opening Widcomm's outbound "COM6:", if you do
not want to see the bluetooth browser every time you want to open the
serial port.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top