Reputation: 121
My understanding (which may very well be wrong) of Bluetooth is that in order to communicate, two Bluetooth devices must be part of a piconet. To create a piconet the two devices perform pairing and choose a common radio channel to communicate on.
Android provides a way for two devices to communicate by using an insecure RFCOMM connection which does not require pairing.
Given that no common channel is agreed upon by the two devices, how are they able to exchange packets?
Upvotes: 1
Views: 2941
Reputation: 91
The practical answer of Android insecure versus secure connections, is that the pairing (which is mandatory for Bluetooth v2.1 +) can be "unauthenticated" versus "authenticated". Basically, automatic pairing procedures create "unauthenticated" pairings, while user interactive pairing procedures create "authenticated" pairings. The Bluetooth connection is exactly the same for either. This is just a simple flag reflecting the type of pairing that occurred. Usually embedded devices, without keypads or displays, will have to use the "Just Works" automatic pairing method, and will generate an "unauthenticated" pairing.
Since Bluetooth v2.1, all connections must pair (except for legacy connections still supported), and the pairing scheme used is determined by the advertised IO capabilities of the two devices. There is a lookup table to determine: Just Works, Numeric Comparison, or Passkey Entry (different than legacy pin code).
PDF: Bluetooth Org Secure Simple Pairing (new pairing schemes) User Interface
Upvotes: 1
Reputation: 2335
To quote the official Android BT specs:
Remember there is a difference between being paired and being connected. To be paired means that two devices are aware of each other's existence, have a shared link-key that can be used for authentication, and are capable of establishing an encrypted connection with each other. To be connected means that the devices currently share an RFCOMM channel and are able to transmit data with each other. The current Android Bluetooth API's require devices to be paired before an RFCOMM connection can be established. (Pairing is automatically performed when you initiate an encrypted connection with the Bluetooth APIs.)
For RFCOMM under the hood, you should look in to the specifications of RFCOMM
Upvotes: 1