Hi Lukasz, >>> Before sending any ssp request or pin code request up to HAL library we >>> need to send bond state change with bonding state. Otherwise incoming >>> bonding is impossible. >>> --- >>> android/adapter.c | 21 ++++++++++++++++++--- >>> 1 file changed, 18 insertions(+), 3 deletions(-) >> >> Wont this cause HAL_BOND_STATE_BONDING to be sent twice if the pairing >> was locally initiated through create_bond()? > > Well, of course we could try to keep track our local bond state and > send HAL_BOND_STATE_BONDING in smarter way, but we don't need to. It > is not a problem for Android to handle HAL_BOND_STATE_BONDING twice. > Actually It works like this even now with current BT stack. > And of course we need to send this event up as soon as we start > bonding procedure, so it should stay in create_bond(). I think we should keep track of our bond state internally. I get the feeling we will need that eventually anyway. For example we already know that we need to keep a mapping of BD_ADDR to address types to make LE work. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html