Serial port in windows mobile 6.5 - handheld device RRS feed

  • Question

  • Hi,

    I am currently working on an application which requires to pair with the bluetooth devices. However, are there any way which I can check which serial ports have allocated to which bluetooth devices? Because sometimes, there are 2 serial ports available, but now it only has 1 serial port I can use. I am trying to find where I can find the serial port being used in some other application in window mobile. Any idea?

    Thanks for any helps in advance.


    SW Lau

    Thursday, March 29, 2012 8:07 PM


  • It is common to have two serial ports for a GPS (or other) Bluetooth device.  One is designated "outgoing" and is the port that you will open to receive data from the device.  The other is designated "incomming" and is the one that can be used to send commands to the device.  However... Most GPS devices (and some other types of Bluetooth devices) do not use the incomming port -- it is assigned by the driver, but does nothing.  The GetPortNames method will return a String array of port names, after pairing.   But, there is nothing built-into the Framework to perform pairing, and nothing in the SerialPort object that tells you which of the set of available ports is usable.  So, what you have to do is to open each port in sequence, test the data stream that may be sent to your compact device from the Bluetooth port, and if that data is what you expect, you now are where you need to be.


    Dick Grier. Author of Visual Basic Programmer's Guide to Serial Communications 4. See www.hardandsoftware.net.

    • Proposed as answer by Jesse Jiang Monday, April 2, 2012 9:34 AM
    • Marked as answer by Jesse Jiang Thursday, April 5, 2012 5:26 AM
    Friday, March 30, 2012 4:50 PM