2

I am using the listenUsingInsecureRfcommWithServiceRecord and createInsecureRfcommSocketToServiceRecord calls in order to connect one Android device to another.

On the first setting I had a Nexus One and a Nexus S both running Android 2.3.6 - on this setting, connecting did not pop "Pairing Request" Dialog.

On the second setting I tried the same Nexus One with a Samsung Galaxy S2 running Android 2.3.3 - on this setting the "Pairing Request" dialog did pop on both devices. This is weird as both devices are on API level 10 which is supposed to support insecure connection.

Did anyone else bump into this strange behavior? Can someone verify that this is a problem in 2.3.3, or perhaps in the specific model I tested? Is there any workaround?

If necessary I can post relevant parts from the logcat.

JJJ
  • 32,902
  • 20
  • 89
  • 102
smichak
  • 4,716
  • 3
  • 35
  • 47
  • Do you know the bluetooth versions on the 2 devices – Dennis Mathews Dec 31 '11 at 20:24
  • As far as I know Nexus one has 2.1 and Galaxy S2 has 3.0. – smichak Dec 31 '11 at 21:45
  • Note that lots of things change between Android versions within the same API level (that's kinda the point of those versions in between). For example, before Android 2.3.5, you can only enable visibility for 120 seconds, not permanently. I would imagine that the pairing requirements could be one of these things that changed. – Jan Schejbal Feb 01 '13 at 16:43
  • This bug occurs also on a Galaxy Ace with 2.3.3 and seems to be fixed when the Galaxy Ace is updated to 2.3.6. – Jan Schejbal May 05 '13 at 12:41

1 Answers1

3

Per Bluetooth v2.1, GAP, section 5.2.2:

When both devices support Secure Simple Pairing, GAP shall default to requiring an unauthenticated link key and enabling encryption.

So to enable encryption Bluetooth needs to create a link-key... Thus the need for SSP pairing.

Don't know whether its possible to avoid that in Android.

Otherwise handle the authentication event and confirm the pair -- the pair will very likely the "Just Works" form which just requires confirmation (no passkeys etc).

alanjmcf
  • 3,430
  • 1
  • 17
  • 14