GAP#
Enumerations#
enum gap_address_type_t { gap_public_address = 0x0, gap_static_address = 0x1, gap_random_resolvable_address = 0x2, gap_random_nonresolvable_address = 0x3 } Device Address Types.
enum gap_phy_type_t { gap_1m_phy = 0x1, gap_2m_phy = 0x2, gap_coded_phy = 0x4 } PHY Types in gap Class.
Functions#
sl_status_t sl_bt_gap_set_privacy_mode (uint8_t privacy, uint8_t interval) sl_status_t sl_bt_gap_set_data_channel_classification (size_t channel_map_len, const uint8_t *channel_map) sl_status_t sl_bt_gap_enable_whitelisting (uint8_t enable)
Detailed Description#
GAP.
The commands and events in this class are related to the Generic Access Profile (GAP) in Bluetooth.
Enumeration Type Documentation#
gap_address_type_t#
enum gap_address_type_t
Device Address Types.
Enumerator | |
---|---|
gap_public_address | (0x0) Public device address |
gap_static_address | (0x1) Static device address |
gap_random_resolvable_address | (0x2) Private resolvable random address |
gap_random_nonresolvable_address | (0x3) Private non-resolvable random address |
gap_phy_type_t#
enum gap_phy_type_t
PHY Types in gap Class.
Enumerator | |
---|---|
gap_1m_phy | (0x1) 1M PHY |
gap_2m_phy | (0x2) 2M PHY |
gap_coded_phy | (0x4) Coded PHY |
Function Documentation#
sl_bt_gap_set_privacy_mode()#
sl_status_t sl_bt_gap_set_privacy_mode | (uint8_t |
|
uint8_t) |
| |
Enable or disable the privacy feature on all GAP roles. New privacy mode will take effect for advertising next time advertising is enabled, for scanning next time scanning is enabled, and for initiating on the next open connection command. When privacy is enabled and the device is advertising or scanning, the stack will maintain a periodic timer with the specified time interval as a timeout value. At each timeout, the stack will generate a new private resolvable address and use it in advertising data packets and scanning requests.
By default, privacy feature is disabled.
Parameters | ||
---|---|---|
[in] |
| Values:
|
[in] |
| The minimum time interval between a private address change. This parameter is ignored if this command is issued to disable privacy mode. Values:
|
Returns#
SL_STATUS_OK if successful. Error code otherwise.
sl_bt_gap_set_data_channel_classification()#
sl_status_t sl_bt_gap_set_data_channel_classification | (size_t |
|
const uint8_t *) |
| |
Specify a channel classification for data channels. This classification persists until overwritten with a subsequent command or until the system is reset.
Parameters | ||
---|---|---|
[in] |
| Array length |
[in] |
| This parameter is 5 bytes and contains 37 1-bit fields. The nth such field (in the range 0 to 36) contains the value for the link layer channel index n.
|
Returns#
SL_STATUS_OK if successful. Error code otherwise.
sl_bt_gap_enable_whitelisting()#
sl_status_t sl_bt_gap_enable_whitelisting | (uint8_t |
|
Enable or disable whitelisting. The setting will be effective the next time that scanning is enabled. To add devices to the whitelist, either bond with the device or add it manually with sl_bt_sm_add_to_whitelist.
Parameters | ||
---|---|---|
[in] |
| 1 enable, 0 disable whitelisting. |
Returns#
SL_STATUS_OK if successful. Error code otherwise.