Use Jelly Bean Simple Secure Communications (Bluetooth) to pair with NFC

Starting with # io2012 and the JellyBean doc, there is now a way to connect Bluetooth devices via NFC.

It sounds very good, but I can not find documentation about it.

I am particularly interested to know if this works with SPP modules that do not support SDP. Can I just write an NFC tag using PIN-Info and the device will be paired? It would help just like many users who have problems with the process of creating a PIN code.

+7
source share
3 answers

There are two types of NDEF Bluetooth messages supported by JellyBean. A standardized, defined Bluetooth SIG along with the NFC Forum and a (older) proprietary, Nokia-defined (see "What is the tag format for connecting the Nokia 6131 NFC with a Bluetooth display device?" At http://www.developer.nokia.com/ Community / Wiki / Nokia_6131_NFC _-_ FAQs # SDK_APIs for some details).

Standardized does not support PIN. It supports only the new Simple Pairing method. Message type Nokia supports PIN. However, when reading the corresponding source code on Android, which parses such messages with NDEF Bluetooth support ( parseNokia() in the HandoverManager ), you can see that the PIN code is not even read from the NDEF message. Thus, in the end, only the built-in PIN codes in the Android Bluetooth manager (by default, such as 0000 and 1234) will be checked to establish a connection if the device is not yet known and paired before reading the tag (in this case, the Tag NFC just functions as a way to activate the connection).

I also got the impression that this new functionality in Android should work first with audio devices such as headsets. I can’t say if it also works with SSP devices (there is no device to test with myself).

+6
source

Yes, you can simply create an NFC tag with Bluetooth pairing information. Somehow, this will only work now when the device uses the default output, since Android will try to use only 0000 by default, which I know. You can program such a tag using the NXP NFC TagWriter.

+2
source

You might want to take a look at the Stanford EasyNFC library on GitHub .

BluetoothConnector is particularly interesting because it "helps developers establish long-lasting Bluetooth connections on devices."

+2
source

All Articles