Skip to content Skip to sidebar Skip to footer

How To Implement A Android Bluetooth Paring Without Pop Up A Dialog To Get A User Permition?

These days , i implement a blue tooth paring function on android platform,say in details: The master device is Google TV(3.2), the slave device is blue tooth keyboard,both are HID

Solution 1:

I found a simple way - in the Android code tree, in external\bluetooth\bluez\src\device.c:

/* If our IO capability is NoInputNoOutput use medium security
 * level (i.e. don't require MITM protection) else use high
 * security level */if (capability == 0x03)
    sec_level = BT_IO_SEC_MEDIUM;
else
    sec_level = BT_IO_SEC_HIGH;


//david10000 add if (device_is_david10000_BTDEV(device)) {
    sec_level = BT_IO_SEC_MEDIUM;
}

This means we can low level the security to let your special device connect automatically.

Another way is you can program it to auto fill the passkey/pin etc. when you get the Android pair request. If you have this problem, try this, it works for me.

Post a Comment for "How To Implement A Android Bluetooth Paring Without Pop Up A Dialog To Get A User Permition?"