In order to support the Bluetooth 5 advertisement extensions and to make the API scalable, several changes have been made to the le_gap class of APIs starting in version 2.8.x of the Silicon Labs Bluetooth SDK.
Discussion
Several of the API functions in the le_gap class have been marked as deprecated and are to be replaced by new API functions as summarized in the following table
It is worth noting that version 2.8.x of our Bluetooth SDK implements a new feature which can be enabled by calling cmd_le_gap_set configuration. This feature, known as anonymous advertising, causes the address of the advertising device to be omitted from all advertising packets. Another new feature supported in this version is the duration parameter in cmd_le_gap_set_advertise_timing(). This parameter allows the user to specify the duration that advertising will continue for in increments of 10 ms. It is also possible now to mask off certain BLE channels to prevent them from being used. The API function cmd_le_gap_set_data_channel_classification() is provided for this purpose. Please see the API guide for details.
It is recommended to switch to the new style API functions.
Bluetooth Knowledge Base
KBA_BT_0310: Changes to the le_gap class of API functions
Changes to le_gap APIs
Introduction
In order to support the Bluetooth 5 advertisement extensions and to make the API scalable, several changes have been made to the le_gap class of APIs starting in version 2.8.x of the Silicon Labs Bluetooth SDK.
Discussion
Several of the API functions in the le_gap class have been marked as deprecated and are to be replaced by new API functions as summarized in the following table
Old API
New API
cmd_le_gap_bt5_set_adv_parameters
cmd_le_gap_set_advertise_timing
cmd_le_gap_set_advertise_channel_map
cmd_le_gap_report_scan_request
cmd_le_gap_set_mode
cmd_le_gap_start_advertising
cmd_le_gap_stop_advertising
cmd_experiment_set_coded_phy_advertising
cmd_le_gap_set_advertise_phy
none
cmd_le_gap_set_configuration
cmd_le_gap_clear_configuration
cmd_le_gap_set_scan_parameters
cmd_le_gap_set_discovery_timing
cmd_le_gap_set_discovery_type
cmd_le_gap_discover, cmd_experiment_set_coded_phy_discovery
cmd_le_gap_start_discovery
cmd_le_gap_open
cmd_le_gap_connect
none
cmd_le_gap_set_data_channel_classification
It is worth noting that version 2.8.x of our Bluetooth SDK implements a new feature which can be enabled by calling cmd_le_gap_set configuration. This feature, known as anonymous advertising, causes the address of the advertising device to be omitted from all advertising packets. Another new feature supported in this version is the duration parameter in cmd_le_gap_set_advertise_timing(). This parameter allows the user to specify the duration that advertising will continue for in increments of 10 ms. It is also possible now to mask off certain BLE channels to prevent them from being used. The API function cmd_le_gap_set_data_channel_classification() is provided for this purpose. Please see the API guide for details.
It is recommended to switch to the new style API functions.