When you attempt to connect to a Bluetooth device, the initial connection process involves establishing a link between your device and the remote device. This link is at the Bluetooth protocol level and does not yet involve specific services or ports. Here’s a breakdown of what happens:
Bluetooth Link Establishment: When you initiate a connection to a Bluetooth device, the Bluetooth stack on your device establishes a physical link with the remote device. This involves exchanging information such as device addresses and supported protocols.
Service Discovery: After the link is established, your device typically performs a service discovery process to identify the services (and their associated ports) that the remote device offers. This is done using the Service Discovery Protocol (SDP).
Port Connection Attempt: Once the services are discovered, your device attempts to connect to the specific port associated with the desired service. If the port is incorrect or the service is not available, this connection attempt will fail.
Disconnection: If the port connection attempt fails, the Bluetooth stack may then disconnect the link, resulting in the temporary "connected" status you observed.
Initial Link Establishment: The Bluetooth manager showed "connected" because the initial link between your device and the remote device was successfully established. This is a lower-level connection that does not yet verify the availability of specific services or ports.
Service Discovery and Port Connection: The connection to the specific port happens after the initial link is established. If the port is incorrect, the connection attempt to that port fails, but this happens after the initial link is already established.
Manager-Specific Behavior: The behavior you observed can also be influenced by the Bluetooth manager or stack implementation on your device. Some managers might show a "connected" status as soon as the initial link is established, even before the service discovery and port connection steps are completed.
The "connected" status you saw is due to the initial Bluetooth link being established successfully. The subsequent disconnection occurred because the specific port connection attempt failed. This behavior is typical of how Bluetooth connections work and is not necessarily specific to your Bluetooth manager. The network itself establishes the link first and then checks for the availability of the specific port or service.