Application: serial cable replacement using Bluetooth classic SPP to Windows 8.1.
I'm using a BT121 via BGLIB from a host microprocessor, using
code based on BlueGiga "Host Example". BLE is disabled; classic only.
I pair with Windows 7, everything works perfectly with one of the virtual serial ports.
But, for some reason, Windows is creating two virtual COM ports.
Image from Device Manager below.
One works perfectly, but why is there a 2nd port (which doesn't seem to be connected)?
Best Regards, Dave
I've been using Bluetooth for quite some time (with seveal BT devices) and the Windows Bluetooth manager has always created 2 serial ports. My understanding is that one of them is used for incoming connection requests from the device and the other is used to initiate a connection to the device (outgoing).
The Toshiba stack only creates a single serial port.
Looking at google, I can't seem to find a definitive answer, though i do see things like this thread.
I'd prefer Windows to only create a single serial port myself, if you find some way of suppressing the incoming port.
It is true that with Windows own Bluetooth software two virtual COM ports are created after pairing:
- when connecting your terminal program to the first you are actually instructing Windows to attempt to establish the Bluetooth connection to the remote paired device, and if the connection is established the RFCOMM channel will be opened for the exchange of data
- when connecting your terminal program to the second you are actually instructing Windows to load the SPP SDP record and to remain waiting for incoming connections from the remote paired device (with the BT121 we do something similar by the BGAPI/BGScript command bt_rfcomm_start_server)
This is discussed as well in one of the logs from the article at http://community.silabs.com/t5/Bluetooth-Wi-Fi-Knowledge-Base/SPP-connections-between-BT121-and-Windows-10-Windows-7-and-Linux/ta-p/160330