TI BLE5-Stack API Documentation  1.01.01.00
Data Structures | Macros | Typedefs | Enumerations | Functions
gap.h File Reference

Detailed Description

GAP layer interface.

Go to the source code of this file.

Data Structures

struct  gapAuthCompleteEvent_t
 
struct  gapAuthParams_t
 
struct  gapBondCompleteEvent_t
 
struct  gapBondMgrCBs_t
 Callback Registration Structure. More...
 
struct  gapDeviceInitDoneEvent_t
 
struct  gapEstLinkReqEvent_t
 
struct  gapEventHdr_t
 GAP event header format. More...
 
struct  gapLinkUpdateEvent_t
 
struct  gapPairingReq_t
 
struct  gapPairingReqEvent_t
 
struct  gapPasskeyNeededEvent_t
 
struct  gapPeriConnectParams_t
 
struct  gapSignUpdateEvent_t
 
struct  gapSlaveSecurityReqEvent_t
 
struct  gapTerminateLinkEvent_t
 
struct  gapUpdateLinkParamReq_t
 
struct  gapUpdateLinkParamReqEvent_t
 GAP_UPDATE_LINK_PARAM_REQ_EVENT message format. More...
 
struct  gapUpdateLinkParamReqReply_t
 

Macros

#define GAP_ADTYPE_128BIT_COMPLETE   0x07
 Service: Complete list of 128-bit UUIDs.
 
#define GAP_ADTYPE_128BIT_MORE   0x06
 Service: More 128-bit UUIDs available.
 
#define GAP_ADTYPE_16BIT_COMPLETE   0x03
 Service: Complete list of 16-bit UUIDs.
 
#define GAP_ADTYPE_16BIT_MORE   0x02
 Service: More 16-bit UUIDs available.
 
#define GAP_ADTYPE_32BIT_COMPLETE   0x05
 Service: Complete list of 32-bit UUIDs.
 
#define GAP_ADTYPE_32BIT_MORE   0x04
 Service: More 32-bit UUIDs available.
 
#define GAP_ADTYPE_3D_INFO_DATA   0x3D
 3D Information Data
 
#define GAP_ADTYPE_ADV_INTERVAL   0x1A
 Advertising Interval.
 
#define GAP_ADTYPE_APPEARANCE   0x19
 Appearance.
 
#define GAP_ADTYPE_FLAGS   0x01
 Gap Advertising Flags.
 
#define GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED   0x04
 Discovery Mode: BR/EDR Not Supported.
 
#define GAP_ADTYPE_FLAGS_GENERAL   0x02
 Discovery Mode: LE General Discoverable Mode.
 
#define GAP_ADTYPE_FLAGS_LIMITED   0x01
 Discovery Mode: LE Limited Discoverable Mode.
 
#define GAP_ADTYPE_LE_BD_ADDR   0x1B
 LE Bluetooth Device Address.
 
#define GAP_ADTYPE_LE_ROLE   0x1C
 LE Role.
 
#define GAP_ADTYPE_LOCAL_NAME_COMPLETE   0x09
 Complete local name.
 
#define GAP_ADTYPE_LOCAL_NAME_SHORT   0x08
 Shortened local name.
 
#define GAP_ADTYPE_MANUFACTURER_SPECIFIC   0xFF
 
#define GAP_ADTYPE_OOB_CLASS_OF_DEVICE   0x0D
 Simple Pairing OOB Tag: Class of device (3 octets)
 
#define GAP_ADTYPE_OOB_SIMPLE_PAIRING_HASHC   0x0E
 Simple Pairing OOB Tag: Simple Pairing Hash C (16 octets)
 
#define GAP_ADTYPE_OOB_SIMPLE_PAIRING_RANDR   0x0F
 Simple Pairing OOB Tag: Simple Pairing Randomizer R (16 octets)
 
#define GAP_ADTYPE_POWER_LEVEL   0x0A
 TX Power Level: 0xXX: -127 to +127 dBm.
 
#define GAP_ADTYPE_PUBLIC_TARGET_ADDR   0x17
 Public Target Address.
 
#define GAP_ADTYPE_RANDOM_TARGET_ADDR   0x18
 Random Target Address.
 
#define GAP_ADTYPE_SERVICE_DATA   0x16
 Service Data - 16-bit UUID.
 
#define GAP_ADTYPE_SERVICE_DATA_128BIT   0x21
 Service Data - 128-bit UUID.
 
#define GAP_ADTYPE_SERVICE_DATA_32BIT   0x20
 Service Data - 32-bit UUID.
 
#define GAP_ADTYPE_SERVICES_LIST_128BIT   0x15
 Service Solicitation: list of 128-bit Service UUIDs.
 
#define GAP_ADTYPE_SERVICES_LIST_16BIT   0x14
 Service Solicitation: list of 16-bit Service UUIDs.
 
#define GAP_ADTYPE_SIGNED_DATA   0x13
 Signed Data field.
 
#define GAP_ADTYPE_SIMPLE_PAIRING_HASHC_256   0x1D
 Simple Pairing Hash C-256.
 
#define GAP_ADTYPE_SIMPLE_PAIRING_RANDR_256   0x1E
 Simple Pairing Randomizer R-256.
 
#define GAP_ADTYPE_SLAVE_CONN_INTERVAL_RANGE   0x12
 
#define GAP_ADTYPE_SM_OOB_FLAG   0x11
 Security Manager OOB Flags.
 
#define GAP_ADTYPE_SM_TK   0x10
 Security Manager TK Value.
 
#define GAP_APPEARE_GENERIC_BARCODE_SCANNER   0x02C0
 Generic Barcode Scanner.
 
#define GAP_APPEARE_GENERIC_BLOOD_PRESSURE   0x0380
 Generic Blood Pressure.
 
#define GAP_APPEARE_GENERIC_BP_ARM   0x0381
 Blood Pressure: Arm.
 
#define GAP_APPEARE_GENERIC_BP_WRIST   0x0382
 Blood Pressure: Wrist.
 
#define GAP_APPEARE_GENERIC_CLOCK   0x0100
 Generic Clock.
 
#define GAP_APPEARE_GENERIC_COMPUTER   0x0080
 Generic Computer.
 
#define GAP_APPEARE_GENERIC_DISPLAY   0x0140
 Generic Display.
 
#define GAP_APPEARE_GENERIC_EYE_GALSSES   0x01C0
 Generic Eye-glasses.
 
#define GAP_APPEARE_GENERIC_HID   0x03C0
 Generic Human Interface Device (HID)
 
#define GAP_APPEARE_GENERIC_HR_SENSOR   0x0340
 Generic Heart rate Sensor.
 
#define GAP_APPEARE_GENERIC_HRS_BELT   0x0341
 Heart Rate Sensor: Heart Rate Belt.
 
#define GAP_APPEARE_GENERIC_KEYRING   0x0240
 Generic Keyring.
 
#define GAP_APPEARE_GENERIC_MEDIA_PLAYER   0x0280
 Generic Media Player.
 
#define GAP_APPEARE_GENERIC_PHONE   0x0040
 Generic Phone.
 
#define GAP_APPEARE_GENERIC_RC   0x0180
 Generic Remote Control.
 
#define GAP_APPEARE_GENERIC_TAG   0x0200
 Generic Tag.
 
#define GAP_APPEARE_GENERIC_THERMO_EAR   0x0301
 Thermometer: Ear.
 
#define GAP_APPEARE_GENERIC_THERMOMETER   0x0300
 Generic Thermometer.
 
#define GAP_APPEARE_GENERIC_WATCH   0x00C0
 Generic Watch.
 
#define GAP_APPEARE_HID_BARCODE_SCANNER   0x03C8
 HID Barcode Scanner.
 
#define GAP_APPEARE_HID_DIGITAL_CARDREADER   0x03C6
 HID Card Reader.
 
#define GAP_APPEARE_HID_DIGITAL_PEN   0x03C7
 HID Digital Pen.
 
#define GAP_APPEARE_HID_DIGITIZER_TYABLET   0x03C5
 HID Digitizer Tablet.
 
#define GAP_APPEARE_HID_GAMEPAD   0x03C4
 HID Gamepad.
 
#define GAP_APPEARE_HID_JOYSTIC   0x03C3
 HID Joystick.
 
#define GAP_APPEARE_HID_KEYBOARD   0x03C1
 HID Keyboard.
 
#define GAP_APPEARE_HID_MOUSE   0x03C2
 HID Mouse.
 
#define GAP_APPEARE_UNKNOWN   0x0000
 Unknown.
 
#define GAP_APPEARE_WATCH_SPORTS   0x00C1
 Watch: Sports Watch.
 
#define GAP_AUTHENTICATION_COMPLETE_EVENT   0x0A
 
#define GAP_AUTHENTICATION_FAILURE_EVT   0x10
 
#define GAP_BOND_COMPLETE_EVENT   0x0E
 
#define GAP_CONNECTING_CANCELLED_EVENT   0x13
 
#define GAP_DEVICE_INIT_DONE_EVENT   0x00
 
#define GAP_EVT_ADV_DATA_TRUNCATED   (uint32_t)BV(6)
 
#define GAP_EVT_ADV_END   (uint32_t)BV(3)
 
#define GAP_EVT_ADV_END_AFTER_DISABLE   (uint32_t)BV(1)
 
#define GAP_EVT_ADV_EVT_MASK
 Mask for all advertising events. More...
 
#define GAP_EVT_ADV_REPORT   (uint32_t)BV(22)
 
#define GAP_EVT_ADV_REPORT_FULL   (uint32_t)BV(23)
 
#define GAP_EVT_ADV_SET_TERMINATED   (uint32_t)BV(4)
 
#define GAP_EVT_ADV_START   (uint32_t)BV(2)
 
#define GAP_EVT_ADV_START_AFTER_ENABLE   (uint32_t)BV(0)
 
#define GAP_EVT_INSUFFICIENT_MEMORY   (uint32_t)BV(31)
 A memory failure has occurred.
 
#define GAP_EVT_SCAN_DISABLED   (uint32_t)BV(17)
 
#define GAP_EVT_SCAN_DUR_ENDED   (uint32_t)BV(19)
 Scan duration has ended.
 
#define GAP_EVT_SCAN_ENABLED   (uint32_t)BV(16)
 Scanner has been enabled.
 
#define GAP_EVT_SCAN_EVT_MASK
 Mask for all scan events. More...
 
#define GAP_EVT_SCAN_INT_ENDED   (uint32_t)BV(20)
 
#define GAP_EVT_SCAN_PRD_ENDED   (uint32_t)BV(18)
 
#define GAP_EVT_SCAN_REQ_RECEIVED   (uint32_t)BV(5)
 
#define GAP_EVT_SCAN_WND_ENDED   (uint32_t)BV(21)
 Scan window has ended.
 
#define GAP_IS_ADDR_RAND(pAddr)
 
#define GAP_IS_ADDR_RPN(pAddr)
 
#define GAP_IS_ADDR_RPR(pAddr)
 
#define GAP_IS_ADDR_RS(pAddr)
 
#define GAP_LINK_ESTABLISHED_EVENT   0x05
 
#define GAP_LINK_PARAM_UPDATE_EVENT   0x07
 
#define GAP_LINK_TERMINATED_EVENT   0x06
 
#define GAP_PAIRING_REQ_EVENT   0x0F
 
#define GAP_PASSKEY_NEEDED_EVENT   0x0B
 
#define GAP_PRIVACY_MODE_DEVICE   1
 Network Privacy Mode.
 
#define GAP_PRIVACY_MODE_NETWORK   0
 Device Privacy Mode.
 
#define GAP_PROFILE_BROADCASTER   0x01
 A device that sends advertising events only.
 
#define GAP_PROFILE_CENTRAL   0x08
 
#define GAP_PROFILE_OBSERVER   0x02
 A device that receives advertising events only.
 
#define GAP_PROFILE_PERIPHERAL   0x04
 
#define GAP_SCAN_SESSION_END_EVENT   0x12
 Sent when an advertising report session ends. This is an internal event.
 
#define GAP_SIGNATURE_UPDATED_EVENT   0x09
 
#define GAP_SLAVE_REQUESTED_SECURITY_EVENT   0x0C
 
#define GAP_STATE_ADV   0x01
 Device is advertising.
 
#define GAP_STATE_IDLE   0x00
 Device is idle.
 
#define GAP_STATE_INIT   0x04
 Device is establishing a connection.
 
#define GAP_STATE_SCAN   0x02
 Device is scanning.
 
#define GAP_UPDATE_LINK_PARAM_REQ_EVENT   0x11
 
#define MASK_ADDRTYPE_ID   0x01
 AND with addrtype to remove ID from type.
 
#define PRIVATE_NON_RESOLVE_ADDR_HDR   0x80
 Random Private Non-Resolvable Address (b10)
 
#define PRIVATE_RESOLVE_ADDR_HDR   0x40
 Random Private Resolvable Address (b01)
 
#define RANDOM_ADDR_HDR_MASK   0xC0
 Get top 2 bits of address.
 
#define SET_ADDRTYPE_ID   0x02
 OR with addrtype to change addr type to ID.
 
#define STATIC_ADDR_HDR   0xC0
 Random Static Address (b11)
 

Typedefs

typedef void(* pfnGapCB_t) (uint32_t event, void *pBuf, uintptr_t arg)
 
typedef uint8_t(* pfnGapDevPrivModeCB_t) (GAP_Peer_Addr_Types_t addrType, uint8_t *pAddr)
 GAP Device Privacy Mode Callback Function.
 
typedef void(* pfnGapIdleCB_t) ()
 GAP Idle Callback Function.
 
typedef uint8_t(* pfnSuppCentAddrRes_t) (uint8_t *deviceAddr, GAP_Peer_Addr_Types_t addrType)
 Central Address Resolution (CAR) Support Callback Function.
 

Enumerations

enum  GAP_Addr_Modes_t { ADDRMODE_PUBLIC = 0x00, ADDRMODE_RANDOM = 0x01, ADDRMODE_RP_WITH_PUBLIC_ID = 0x02, ADDRMODE_RP_WITH_RANDOM_ID = 0x03 }
 Address modes to initialize the local device. More...
 
enum  GAP_Addr_Types_t {
  ADDRTYPE_PUBLIC = 0x00, ADDRTYPE_RANDOM = 0x01, ADDRTYPE_PUBLIC_ID = 0x02, ADDRTYPE_RANDOM_ID = 0x03,
  ADDRTYPE_RANDOM_NR = 0xFE, ADDRTYPE_NONE = 0xFF
}
 Address types used for identifying peer address type. More...
 
enum  Gap_configParamIds_t { GAP_CONFIG_PARAM_IRK, GAP_CONFIG_PARAM_SRK }
 
enum  Gap_ParamIDs_t {
  GAP_PARAM_LINK_UPDATE_DECISION, GAP_PARAM_CONN_PARAM_TIMEOUT, GAP_PARAM_PRIVATE_ADDR_INT, GAP_PARAM_SM_TIMEOUT,
  GAP_PARAM_SM_MIN_KEY_LEN, GAP_PARAM_SM_MAX_KEY_LEN
}
 
enum  GAP_Peer_Addr_Types_t { PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID = 0x00, PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID = 0x01 }
 Address types used for specifying peer address type. More...
 
enum  Gap_updateDecision_t { GAP_UPDATE_REQ_ACCEPT_ALL, GAP_UPDATE_REQ_DENY_ALL, GAP_UPDATE_REQ_PASS_TO_APP }
 

Functions

bStatus_t GAP_Authenticate (gapAuthParams_t *pParams, gapPairingReq_t *pPairReq)
 
bStatus_t GAP_Bond (uint16_t connectionHandle, uint8_t authenticated, uint8_t secureConnections, smSecurityInfo_t *pParams, uint8_t startEncryption)
 
bStatus_t GAP_DeviceInit (uint8_t profileRole, uint8_t taskID, GAP_Addr_Modes_t addrMode, uint8_t *pRandomAddr)
 
uint8_t * GAP_GetIRK (void)
 
uint16_t GAP_GetParamValue (uint16_t paramID)
 
uint8_t * GAP_GetSRK (void)
 
void GAP_Init (uint8_t task_id)
 
uint8_t GAP_isPairing (void)
 
uint8_t GAP_NumActiveConnections (void)
 
bStatus_t GAP_PasscodeUpdate (uint32_t passcode, uint16_t connectionHandle)
 
bStatus_t GAP_PasskeyUpdate (uint8_t *pPasskey, uint16_t connectionHandle)
 
uint16_t GAP_ProcessEvent (uint8_t task_id, uint16_t events)
 
void GAP_RegisterBondMgrCBs (gapBondMgrCBs_t *pCBs)
 
void GAP_RegisterForMsgs (uint8_t taskID)
 
bStatus_t GAP_SendSlaveSecurityRequest (uint16_t connectionHandle, uint8_t authReq)
 
bStatus_t GAP_SetParamValue (uint16_t paramID, uint16_t paramValue)
 
bStatus_t GAP_SetPrivacyMode (GAP_Peer_Addr_Types_t addrType, uint8_t *pAddr, uint8_t mode)
 
bStatus_t GAP_Signable (uint16_t connectionHandle, uint8_t authenticated, smSigningInfo_t *pParams)
 
bStatus_t GAP_TerminateAuth (uint16_t connectionHandle, uint8_t reason)
 
bStatus_t GAP_TerminateLinkReq (uint16_t connectionHandle, uint8_t reason)
 
bStatus_t GAP_UpdateLinkParamReq (gapUpdateLinkParamReq_t *pParams)
 
bStatus_t GAP_UpdateLinkParamReqReply (gapUpdateLinkParamReqReply_t *pParams)
 
bStatus_t GapConfig_SetParameter (Gap_configParamIds_t param, void *pValue)
 
Copyright 2018, Texas Instruments Incorporated