CTE Receiver (cte_receiver)#

Commands and events in this class manage Constant Tone Extension (CTE) receiving.

CTE feature is only supported by specific devices. Commands from this class will return bg_err_not_supported on devices that do not support CTE.

cte_receiver commands#

cte_receiver_clear_dtm_parameters#

Clear CTE-related parameters that were previously set for LE receiver test. Default values will be restored for these parameters.

C API#

/* Function */  
struct gecko_msg_cte_receiver_clear_dtm_parameters_rsp_t *gecko_cmd_cte_receiver_clear_dtm_parameters();  
  
/* Response id */  
gecko_rsp_cte_receiver_clear_dtm_parameters_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_clear_dtm_parameters_rsp_t  
{  
  uint16 result;  
}  

Command does not have parameters (for BGAPI headers refer to#

link)

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

cte_receiver_disable_connection_cte#

Stop the IQ sampling on a connection. CTEs will not be requested on the given connection.

C API#

/* Function */  
struct gecko_msg_cte_receiver_disable_connection_cte_rsp_t *gecko_cmd_cte_receiver_disable_connection_cte(uint8 connection);  
  
/* Response id */  
gecko_rsp_cte_receiver_disable_connection_cte_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_disable_connection_cte_rsp_t  
{  
  uint16 result;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

connection

Connection handle

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

cte_receiver_disable_connectionless_cte#

Stop IQ sampling on a periodic advertising synchronization.

C API#

/* Function */  
struct gecko_msg_cte_receiver_disable_connectionless_cte_rsp_t *gecko_cmd_cte_receiver_disable_connectionless_cte(uint8 sync);  
  
/* Response id */  
gecko_rsp_cte_receiver_disable_connectionless_cte_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_disable_connectionless_cte_rsp_t  
{  
  uint16 result;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

sync

Periodic advertising synchronization handle

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

cte_receiver_disable_silabs_cte#

Disable IQ sampling of Silicon Labs CTE.

C API#

/* Function */  
struct gecko_msg_cte_receiver_disable_silabs_cte_rsp_t *gecko_cmd_cte_receiver_disable_silabs_cte();  
  
/* Response id */  
gecko_rsp_cte_receiver_disable_silabs_cte_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_disable_silabs_cte_rsp_t  
{  
  uint16 result;  
}  

Command does not have parameters (for BGAPI headers refer to#

link)

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

cte_receiver_enable_connection_cte#

Start IQ samplings on a connection. A CTE requests will be initiated periodically on the given connection and IQ sampling will be made on the received CTE responses.

C API#

/* Function */  
struct gecko_msg_cte_receiver_enable_connection_cte_rsp_t *gecko_cmd_cte_receiver_enable_connection_cte(uint8 connection, uint16 interval, uint8 cte_length, uint8 cte_type, uint8 slot_durations, uint8 switching_pattern_len, const uint8 *switching_pattern_data);  
  
/* Response id */  
gecko_rsp_cte_receiver_enable_connection_cte_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_enable_connection_cte_rsp_t  
{  
  uint16 result;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

connection

Connection handle

uint16

interval

Measurement interval

  • 0: No interval. The request is initiated only once.

  • Other values N: Initiate the request every N-th connection events

uint8 | cte_length | Minimum CTE length requested in 8 us units.

  • Range: 0x02 to 0x14

  • Time Range: 16 us to 160 us

uint8 | cte_type | Requested CTE type

  • 0: AoA CTE

  • 1: AoD CTE with 1 us slots

  • 2: AoD CTE with 2 us slots

uint8 | slot_durations | Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

uint8 | switching_pattern_len | Array length.
uint8array | switching_pattern_data | Antenna switching pattern. Antennas will be switched in this order with the antenna switch pins during CTE. If the CTE is longer than the switching pattern, the pattern starts over.

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

Events generated#

Event

Description

cte_receiver_connection_iq_report

Triggered when IQ samples have been

received.

cte_receiver_enable_connectionless_cte#

Start IQ sampling on a periodic advertising synchronization. IQ samples are taken on each CTE found in the periodic advertisements.

C API#

/* Function */  
struct gecko_msg_cte_receiver_enable_connectionless_cte_rsp_t *gecko_cmd_cte_receiver_enable_connectionless_cte(uint8 sync, uint8 slot_durations, uint8 cte_count, uint8 switching_pattern_len, const uint8 *switching_pattern_data);  
  
/* Response id */  
gecko_rsp_cte_receiver_enable_connectionless_cte_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_enable_connectionless_cte_rsp_t  
{  
  uint16 result;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

sync

Periodic advertising synchronization handle

uint8

slot_durations

Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

uint8 | cte_count |

  • 0: Sample and report all available CTEs

  • Other values: Maximum number of sampled CTEs in each periodic advertising interval

uint8 | switching_pattern_len | Array length.
uint8array | switching_pattern_data | Antenna switching pattern. Antennas will be switched in this order with the antenna switch pins during CTE. If the CTE is longer than the switching pattern, the pattern starts over.

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

Events generated#

Event

Description

cte_receiver_connectionless_iq_report

Triggered when IQ samples have been

received.

cte_receiver_enable_silabs_cte#

Enable IQ sampling of Silicon Labs CTE found in extended advertisements.

C API#

/* Function */  
struct gecko_msg_cte_receiver_enable_silabs_cte_rsp_t *gecko_cmd_cte_receiver_enable_silabs_cte(uint8 slot_durations, uint8 cte_count, uint8 switching_pattern_len, const uint8 *switching_pattern_data);  
  
/* Response id */  
gecko_rsp_cte_receiver_enable_silabs_cte_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_enable_silabs_cte_rsp_t  
{  
  uint16 result;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

slot_durations

Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

uint8 | cte_count |

  • 0: Sample and report all available CTEs

  • Other values: Maximum number of sampled CTEs in each extended advertising interval

uint8 | switching_pattern_len | Array length.
uint8array | switching_pattern_data | Antenna switching pattern. Antennas will be switched in this order with the antenna switch pins during CTE. If the CTE is longer than the switching pattern, the pattern starts over.

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

Events generated#

Event

Description

cte_receiver_silabs_iq_report

Triggered when IQ samples of Silicon Labs CTE

have been received.

cte_receiver_set_dtm_parameters#

Set CTE-related parameters of LE receiver test.

C API#

/* Function */  
struct gecko_msg_cte_receiver_set_dtm_parameters_rsp_t *gecko_cmd_cte_receiver_set_dtm_parameters(uint8 cte_length, uint8 cte_type, uint8 slot_durations, uint8 switching_pattern_len, const uint8 *switching_pattern_data);  
  
/* Response id */  
gecko_rsp_cte_receiver_set_dtm_parameters_id  
  
/* Response structure */  
struct gecko_msg_cte_receiver_set_dtm_parameters_rsp_t  
{  
  uint16 result;  
}  

Command Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint8

cte_length

Expected CTE length in 8 us units

  • 0: No CTE

  • 0x02 to 0x14: Expected CTE length

Default: 0 (no CTE)
uint8 | cte_type | Expected CTE type

  • 0: Expect AoA CTE

  • 1: Expect AoD CTE with 1 us slots

  • 2: Expect AoD CTE with 2 us slots

Default: 0
uint8 | slot_durations | Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

Default: 1
uint8 | switching_pattern_len | Array length.
uint8array | switching_pattern_data | Antenna switching pattern. Antennas will be switched in this order with the antenna switch pins during CTE. If the CTE is longer than the switching pattern, the pattern starts over. Default: empty array

Response Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

result

Result code

  • 0: success

  • Non-zero: an error has occurred

For other values see Error codes

Events generated#

Event

Description

cte_receiver_dtm_iq_report

Triggered when IQ samples have been received.

cte_receiver events#

cte_receiver_connection_iq_report#

IQ sample report from connection CTE packets.

C API#

/* event id*/  
gecko_evt_cte_receiver_connection_iq_report_id  
  
/* event structure*/  
struct gecko_msg_cte_receiver_connection_iq_report_evt_t  
{  
  uint16 status;  
  uint8 connection;  
  uint8 phy;  
  uint8 channel;  
  int8 rssi;  
  uint8 rssi_antenna_id;  
  uint8 cte_type;  
  uint8 slot_durations;  
  uint16 event_counter;  
  uint8array samples;  
}  

Event Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

status

Status of CTE IQ sampling

uint8

connection

Connection handle or periodic advertising

synchronization handle

uint8

phy

The PHY on which the packet is received.

  • 1: 1M PHY

  • 2: 2M PHY

uint8 | channel | The channel on which the CTE packet was received
int8 | rssi | RSSI in the received CTE packet. Unit: dBm
uint8 | rssi_antenna_id | The ID of the antenna on which RSSI was measured
uint8 | cte_type | The CTE type

  • 0: AoA CTE response

  • 1: AoD CTE response with 1us slots

  • 2: AoD CTE response with 2us slots

uint8 | slot_durations | Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

uint16 | event_counter | The event counter of the connection
uint8array | samples | IQ samples of the received CTE packet. I and Q samples follow each other alternately (I, Q, I, Q , ...)

cte_receiver_connectionless_iq_report#

IQ sample report from connectionless CTE packets.

C API#

/* event id*/  
gecko_evt_cte_receiver_connectionless_iq_report_id  
  
/* event structure*/  
struct gecko_msg_cte_receiver_connectionless_iq_report_evt_t  
{  
  uint16 status;  
  uint8 sync;  
  uint8 channel;  
  int8 rssi;  
  uint8 rssi_antenna_id;  
  uint8 cte_type;  
  uint8 slot_durations;  
  uint16 event_counter;  
  uint8array samples;  
}  

Event Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

status

Status of CTE IQ sampling

uint8

sync

Periodic advertising synchronization handle

uint8

channel

The channel on which the CTE packet was received

int8

rssi

RSSI in the received CTE packet. Unit: dBm

uint8

rssi_antenna_id

The ID of the antenna on which RSSI was measured

uint8

cte_type

The CTE type

  • 0: AoA CTE response

  • 1: AoD CTE response with 1us slots

  • 2: AoD CTE response with 2us slots

uint8 | slot_durations | Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

uint16 | event_counter | The event counter of the periodic advertising train
uint8array | samples | IQ samples of the received CTE packet. I and Q samples follow each other alternately (I, Q, I, Q , ...)

cte_receiver_dtm_iq_report#

IQ sample report from DTM CTE packets.

C API#

/* event id*/  
gecko_evt_cte_receiver_dtm_iq_report_id  
  
/* event structure*/  
struct gecko_msg_cte_receiver_dtm_iq_report_evt_t  
{  
  uint16 status;  
  uint8 channel;  
  int8 rssi;  
  uint8 rssi_antenna_id;  
  uint8 cte_type;  
  uint8 slot_durations;  
  uint16 event_counter;  
  uint8array samples;  
}  

Event Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

status

Status of CTE IQ sampling

uint8

channel

The channel on which the CTE packet was received

int8

rssi

RSSI in the received CTE packet. Unit: dBm

uint8

rssi_antenna_id

The ID of the antenna on which RSSI was measured

uint8

cte_type

The CTE type

  • 0: AoA CTE response

  • 1: AoD CTE response with 1us slots

  • 2: AoD CTE response with 2us slots

uint8 | slot_durations | Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

uint16 | event_counter | The event counter of the periodic advertising train or the connection
uint8array | samples | IQ samples of the received CTE packet. I and Q samples follow each other alternately (I, Q, I, Q , ...)

cte_receiver_silabs_iq_report#

IQ samples report from Silicon Labs CTE packets.

C API#

/* event id*/  
gecko_evt_cte_receiver_silabs_iq_report_id  
  
/* event structure*/  
struct gecko_msg_cte_receiver_silabs_iq_report_evt_t  
{  
  uint16 status;  
  bd_addr address;  
  uint8 address_type;  
  uint8 phy;  
  uint8 channel;  
  int8 rssi;  
  uint8 rssi_antenna_id;  
  uint8 cte_type;  
  uint8 slot_durations;  
  uint16 packet_counter;  
  uint8array samples;  
}  

Event Parameters (for BGAPI headers refer to link)#

Type

Name

Description

uint16

status

Status of CTE IQ sampling

bd_addr

address

Bluetooth address of the remote device

uint8

address_type

Advertiser address type. Values:

  • 0: Public address

  • 1: Random address

  • 255: No address provided (anonymous advertising)

uint8 | phy | The PHY on which the packet is received.

  • 1: 1M PHY

  • 2: 2M PHY

uint8 | channel | The channel on which the CTE packet was received
int8 | rssi | RSSI in the received CTE packet. Unit: dBm
uint8 | rssi_antenna_id | The ID of the antenna on which RSSI was measured
uint8 | cte_type | The CTE type

  • 0: AoA CTE response

  • 1: AoD CTE response with 1us slots

  • 2: AoD CTE response with 2us slots

uint8 | slot_durations | Slot durations

  • 1: Switching and sampling slots are 1 us each

  • 2: Switching and sampling slots are 2 us each

uint16 | packet_counter | The event counter of the periodic advertising train or the connection
uint8array | samples | IQ samples of the received CTE packet. I and Q samples follow each other alternately (I, Q, I, Q , ...)