Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Bluetooth Pairing


Can anybody tell me how to find out which pairing technique phone used while connecting to other device?
I have a Nexus S(Android 2.3.3) and a BT device(Bluetooth2.1+EDR).
When I try to pair them, I dont have to give any input(passkey). As both devices are having bluetooth 2.1, I want to know which pairing technique they used.
Can we specify the pairing technique to phone?

like image 216
Ashwini Shahapurkar Avatar asked Mar 23 '11 06:03

Ashwini Shahapurkar


People also ask

Why is my Bluetooth not pairing?

For Android phones, go to Settings > System > Advanced> Reset Options > Reset Wi-fi, mobile & Bluetooth. For iOS and iPadOS device, you'll have to unpair all of your devices (go to Setting > Bluetooth, select the info icon and choose Forget This Device for each device) then restart your phone or tablet.

What is pairing mode in Bluetooth?

Bluetooth pairing is a form of information registration for linking devices. By registering device information (pairing) between devices, they can connect. To use a Bluetooth device, you must first pair it with another Bluetooth device. Pairing is a bit like exchanging phone numbers.

Where is Bluetooth settings on Android?

From the Home screen, tap the Menu key > Settings > Bluetooth. Tap the Bluetooth switch to turn it on. Tap the check box next to your phone's name to make your phone visible to other Bluetooth devices. A list of available devices will be displayed.


2 Answers

When both devices are 2.1 and above the Secure Simple pairing (SSP) gets used instead of the legacy pairing (legacy pairing is the one where user was required to enter same PIN on both devices to connect and most of the cases PIN used to be well known common combinations of 0000 or 1234)

Secure simple pairing simplifies the process and gets rid of the need for PINs to be entered, instead it generates 6 digit passkeys automatically as part of the pairing process and user may only be required to verify/enter the passkey on one or more of the devices.

Secure Simple Pairing (SSP) further has few different association modes and the association model to be used is determined by the display and input capabilities on the devices that are trying to pair.

When there is no display or input to enter 6 digits on one of the devices, then "Just works" association model gets used , in this the user input is not required during pairing. In Android it is possible to force this model is SPP applications when using the createInsecureRfcommSocketToServiceRecord() API. This model gets used commonly when pairing with Headsets, other small devices without any display or input capability

Other association models are :

  • Numeric Comparison - Where a 6 digit number is shown on both devices and user is asked to confirm is they are the same. Used when both devices has display and capable of entering Yes/No.

  • Passkey entry - When one of the devices has only input capability and no output display capability and the other has an output / display capability, here the user will be asked to enter the 6 digits on the input only capable device as shown on the display capable device.

  • Out-of-Band - Where devices exchange pairing information over a different channel (other than Bluetooth) example NFC or some other secure mechanism.

like image 80
Dennis Mathews Avatar answered Sep 19 '22 12:09

Dennis Mathews


You can either sniff the Bluetooth traffic or take a log to figure out which technique is being used. On a Nexus-S $adb shell hcidump -XVt will show you the log. If I/O capabiltiies are being exchanged than its Bluetooth 2.1 pairing.

Another option is to enable bluetoothd log in init.herring.rc file and you can figure out which pairing method is used.

Its most definitely Bluetooth 2.1 pairing in your case and the problem is elsewhere.

like image 26
Jai Avatar answered Sep 23 '22 12:09

Jai