I want to connect a mobile phone from my pocket pc over Bluetooth com port using the new System.IO.Ports.SerialPort function in .Net Compact Framework 2.0. I can open the com port, but when I want to write data to it, the whole pocket pc hangs and I have to hard reset it. I tested it also with a normal com port on the pocket pc and with it, it works.
Are there maybe problems with the Bluetooth com port emulation driver, or is this a bug in the framework Does anybody have the same problems
I am running the code on an Fujitsu Siemens Pocket Loox 720.

Problem with System.IO.Ports when sending data to Bluetooth com port.
elitvak
You would need to pair up your mobile phone with your Pocket PC and create a virtual COM port server on your mobile phone. The COM port you write to on your Pocket PC needs to be configured to communicate with the COM port server on your mobile phone. On Windows Mobile 5.0, there is a user interface to configure BT virtual COM ports. Devices based on WM 2003 would need to use the UI supplied by OEM to do this. You can find more information about creating a connection using a virtual COM port here:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/wcecomm5/html/wce50concomportemulationfacility.asp
Cheers,
Anthony Wong [MSFT]
coolio
Thank you.
seeIT
Thanks for your answer, I use this code for writing a string to the Bluetooth virtual com port:
Dim WithEvents port As System.IO.Ports.SerialPort
port = New System.IO.Ports.SerialPort("COM6", 9600, IO.Ports.Parity.None, 8, IO.Ports.StopBits.One)
port.Open()
port.Write("String") --> At this position the PocketPc hangs and I have to reset it.
I use the integrated Bluetooth from my Pocket Loox 720:
BT HW Vers: BRF6150
BT FW Vers: 3.16
What do you mean with "set up the Bluetooth virtual serial port properly" How can I configure the Port
Jonathan Caves
Can you attach a small piece of code reproducing the issue you are experiencing What OS and Bluetooth card are you using You would need to set up the Bluetooth virtual serial port properly before reading/writing from the port. What is the function call that caused the device to hang
Cheers,
Anthony Wong [MSFT]
Burkhard M
srichand
Unfortunately that might be the case. You should refer to the mobile phone manufacturer as to whether the functionality is supported.
Cheers,
Anthony Wong [MSFT]