Connection Analyzer#

Connection Analyzer.

Analyze Bluetooth packets that are transmitted on the connections of external devices. Include component bluetooth_feature_connection_analyzer to use the commands and events in this class.

Modules#

Connection Analyzer Configuration flags

sl_bt_evt_connection_analyzer_report

sl_bt_evt_connection_analyzer_completed

Functions#

sl_status_t
sl_bt_connection_analyzer_start(uint32_t access_address, uint32_t crc_init, uint16_t interval, uint16_t supervision_timeout, uint8_t central_clock_accuracy, uint8_t central_phy, uint8_t peripheral_phy, uint8_t channel_selection_algorithm, uint8_t hop, const sl_bt_connection_channel_map_t *channel_map, uint8_t channel, uint16_t event_counter, int32_t start_time_us, uint32_t flags, uint8_t *analyzer)
sl_status_t

Function Documentation#

sl_bt_connection_analyzer_start#

sl_status_t sl_bt_connection_analyzer_start (uint32_t access_address, uint32_t crc_init, uint16_t interval, uint16_t supervision_timeout, uint8_t central_clock_accuracy, uint8_t central_phy, uint8_t peripheral_phy, uint8_t channel_selection_algorithm, uint8_t hop, const sl_bt_connection_channel_map_t * channel_map, uint8_t channel, uint16_t event_counter, int32_t start_time_us, uint32_t flags, uint8_t * analyzer)
Parameters
[in]access_address

Access address of the connection

[in]crc_init

The CRC initialization value

[in]interval

The connection interval. Time = Value x 1.25 ms

[in]supervision_timeout

The connection supervision time. Time = Value x 10 ms

[in]central_clock_accuracy

The central device's clock accuracy index value

[in]central_phy

Enum sl_bt_gap_phy_t. The PHY that the Central device is transmitting on. Values:

  • sl_bt_gap_phy_1m (0x1): 1M PHY

  • sl_bt_gap_phy_2m (0x2): 2M PHY

  • sl_bt_gap_phy_coded (0x4): Coded PHY, 125k (S=8) or 500k (S=2)

[in]peripheral_phy

Enum sl_bt_gap_phy_t. The PHY that the Peripheral device is transmitting on. Values:

  • sl_bt_gap_phy_1m (0x1): 1M PHY

  • sl_bt_gap_phy_2m (0x2): 2M PHY

  • sl_bt_gap_phy_coded (0x4): Coded PHY, 125k (S=8) or 500k (S=2)

[in]channel_selection_algorithm

Enum sl_bt_gap_channel_selection_algorithm_t. The channel selection algorithm. Values:

  • sl_bt_gap_channel_selection_algorithm_1 (0x0): Channel selection algorithm #1

  • sl_bt_gap_channel_selection_algorithm_2 (0x1): Channel selection algorithm #2

[in]hop

The hop increment when the channel selection algorithm #1 is used on the connection. Ignored if channel_selection_algorithm indicates that the connection uses channel selection algorithm #2.

[in]channel_map

5 byte bit field in little endian format. Only the first 37 bits are used. Bit 0 of the first byte is channel 0, bit 0 of the second byte is channel 8, etc. Ignore bits 37-39 that are reserved for future use.

A channel is unused when its bit is 0. A channel is used when its bit is 1.

[in]channel

The data channel number that transmissions will use in the next connection event

[in]event_counter

The event counter of the next connection event

[in]start_time_us

The start time of the given connection event in microseconds. The semantics depend on whether the configuration flag SL_BT_CONNECTION_ANALYZER_RELATIVE_TIME is set in parameter flags:

  • When the flag is set, the value is a time relative to the current time. A negative value means that the start time was in the past.

  • When the flag is not set, the value is an absolute time converted from the PROTIMER tick.

[in]flags

Configuration flags. This value is a bitmask of Connection Analyzer Configuration flags.

[out]analyzer

A handle that is assigned to the connection analyzer. This handle is valid only if the result code of this command is SL_STATUS_OK.

Start to analyze another device's connection and report the RSSI measurements. The parameters in this command provide necessary information to identify the connection and schedule operations to follow its transmissions.

If the other device uses Silabs' Bluetooth stack, the information of the connection could be retrieved with command sl_bt_connection_get_scheduling_details. The method of passing the information to this device is application layer logic.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 15233 of file /mnt/raid/workspaces/ws.XK183xwsq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_connection_analyzer_stop#

sl_status_t sl_bt_connection_analyzer_stop (uint8_t analyzer)
Parameters
[in]analyzer

The handle of the connection analyzer to stop

Stop analyzing another device's Bluetooth connection. The operation is stopped when this command returns, and the stack does not send additional event.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 15260 of file /mnt/raid/workspaces/ws.XK183xwsq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

Macro Definition Documentation#

sl_bt_cmd_connection_analyzer_start_id#

#define sl_bt_cmd_connection_analyzer_start_id
Value:
0x00480020

Definition at line 15096 of file /mnt/raid/workspaces/ws.XK183xwsq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_connection_analyzer_stop_id#

#define sl_bt_cmd_connection_analyzer_stop_id
Value:
0x01480020

Definition at line 15097 of file /mnt/raid/workspaces/ws.XK183xwsq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_connection_analyzer_start_id#

#define sl_bt_rsp_connection_analyzer_start_id
Value:
0x00480020

Definition at line 15098 of file /mnt/raid/workspaces/ws.XK183xwsq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_connection_analyzer_stop_id#

#define sl_bt_rsp_connection_analyzer_stop_id
Value:
0x01480020

Definition at line 15099 of file /mnt/raid/workspaces/ws.XK183xwsq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h