Bluetooth: Add infrastructure to handle multiple identities

Make it possible to have multiple identity addresses as an LE
peripheral. For central role only the default identity is supported
for now. This also extends the flash storage in a backward compatible
way.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2018-07-04 12:58:10 +03:00 committed by Johan Hedberg
commit 5708f1e8b1
22 changed files with 340 additions and 168 deletions

View file

@ -83,13 +83,14 @@ void bt_conn_unref(struct bt_conn *conn);
*
* Look up an existing connection based on the remote address.
*
* @param id Local identity (in most cases BT_ID_DEFAULT).
* @param peer Remote address.
*
* @return Connection object or NULL if not found. The caller gets a
* new reference to the connection object which must be released with
* bt_conn_unref() once done using the object.
*/
struct bt_conn *bt_conn_lookup_addr_le(const bt_addr_le_t *peer);
struct bt_conn *bt_conn_lookup_addr_le(u8_t id, const bt_addr_le_t *peer);
/** @brief Get destination (peer) address of a connection.
*
@ -134,6 +135,7 @@ enum {
*
* @param type Connection Type
* @param role Connection Role
* @param id Which local identity the connection was created with
* @param le LE Connection specific Info
* @param br BR/EDR Connection specific Info
*/
@ -142,6 +144,8 @@ struct bt_conn_info {
u8_t role;
u8_t id;
union {
struct bt_conn_le_info le;