i am using  createInsecureRfcommSocketToServiceRecord()  function to
create the socket and here is the description what it says about
function in Android developers ...



public BluetoothSocket createInsecureRfcommSocketToServiceRecord (UUID
uuid)
Since: API Level 10 Create an RFCOMM BluetoothSocket socket ready to
start an insecure outgoing connection to this remote device using SDP
lookup of uuid.

The communication channel will not have an authenticated link key i.e
it will be subject to man-in-the-middle attacks. For Bluetooth 2.1
devices, the link key will be encrypted, as encryption is mandatory.
For legacy devices (pre Bluetooth 2.1 devices) the link key will be
not be encrypted. Use createRfcommSocketToServiceRecord(UUID) if an
encrypted and authenticated communication channel is desired.

This is designed to be used with
listenUsingInsecureRfcommWithServiceRecord(String, UUID) for peer-peer
Bluetooth applications.

Use connect() to initiate the outgoing connection. This will also
perform an SDP lookup of the given uuid to determine which channel to
connect to.

The remote device will be authenticated and communication on this
socket will be encrypted.

Hint: If you are connecting to a Bluetooth serial board then try using
the well-known SPP UUID 00001101-0000-1000-8000-00805F9B34FB. However
if you are connecting to an Android peer then please generate your own
unique UUID.

Requires BLUETOOTH

Parameters
uuid  service record uuid to lookup RFCOMM channel

Returns
a RFCOMM BluetoothServerSocket ready for an outgoing connection
Throws
IOException  on error, for example Bluetooth not available, or
insufficient permissions



On Dec 22, 5:27 pm, lbendlin <[email protected]> wrote:
> > Everything is working fine but i am getting a pairing request or to
> > match the keys on both the phones which should not come.
>
> How do you know if both devices support unsecure connections? They may just
> not.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to