sl_bt_evt_connection_openedConnection#

Indicates that a new connection was opened.

Data Structures#


struct | sl_bt_evt_connection_opened_s
| Data structure of the opened event.

Macros#


#define | sl_bt_evt_connection_opened_id 0x000600a0
| Identifier of the opened event.

Detailed Description#

Indicates that a new connection was opened.

This event does not indicate that the connection was established (i.e., that a data packet was received within 6 connection interval). If the connection does not get established, an sl_bt_evt_connection_closed event may immediately follow. This event also reports whether the connected devices are already bonded and what the role of the Bluetooth device (central or peripheral) is. An open connection can be closed with sl_bt_connection_close command by giving the connection handle obtained from this event.


Data Structure Documentation#

◆ sl_bt_evt_connection_opened_s#

struct sl_bt_evt_connection_opened_s#

Data structure of the opened event.

Data Fields#

bd_addr | address |

Remote device address

uint8_t | address_type |

Enum sl_bt_gap_address_type_t. Remote device address type. Values:

  • sl_bt_gap_public_address (0x0): Public device address

  • sl_bt_gap_static_address (0x1): Static device address

  • sl_bt_gap_random_resolvable_address (0x2): Resolvable private random address

  • sl_bt_gap_random_nonresolvable_address (0x3): Non-resolvable private random address

uint8_t | master |

Device role in connection. Values:

  • 0: Peripheral

  • 1: Central

uint8_t | connection |

Handle for new connection

uint8_t | bonding |

Bonding handle. Values:

  • SL_BT_INVALID_BONDING_HANDLE (0xff): No bonding

  • Other: Bonding handle

uint8_t | advertiser |

The local advertising set that this connection was opened to. Values:

  • SL_BT_INVALID_ADVERTISING_SET_HANDLE (0xff): Invalid value or not applicable. Ignore this field

  • Other: The advertising set handle