GAP Vendor Specific API¶
GAP Commands¶
GAP_DeviceInit¶
- Opcode:
0xFE00
- Command Description:
This command is used to setup the device. Can only be called once per reset. In order to change the address mode / random address, it is necessary to reset the device and call this API again. In the case where the address mode or random address is different than it was for the last initialization, all bonds and local information stored in NV will be erased.
Command Parameters
- profileRole:
Bit Mask - GAP Profile Roles
- Size:
1 byte(s)
- Default:
8
- Range:
Value
Description
0x01
GAP_PROFILE_BROADCASTER
0x02
GAP_PROFILE_OBSERVER
0x04
GAP_PROFILE_PERIPHERAL
0x08
GAP_PROFILE_CENTRAL
- addrMode:
Address Mode
- Size:
1 byte(s)
- Default:
2
- Range:
Value
Description
0x00
ADDRMODE_PUBLIC
0x01
ADDRMODE_RANDOM
0x02
ADDRMODE_RP_WITH_PUBLIC_ID
0x03
ADDRMODE_RP_WITH_RANDOM_ID
- ramdomAddr:
Address Mode
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value
Events Generated
When this command is received, the host will send the CommandStatus Event.When initialization task is complete, the host will send the GAP_DeviceInitDone event.
GAP_TerminateLinkReq¶
- Opcode:
0xFE0A
- Command Description:
Send this command to terminate a connection link or all active connections.
Command Parameters
- connectionHandle:
Connection handle of link to terminate.
- Size:
2 byte(s)
- Default:
0
- Range:
0 - 0xFFFD to terminate a connection, 0xFFFF to terminate all connections
- reason:
Error Code to send over the air in the termination request.
- Size:
1 byte(s)
- Default:
0x13
- Range:
Value
Description
0x05
Authentication Failure
0x13
Remote User Terminated Connection
0x14
Remote Device Terminated Connection Due To Low Resources
0x15
Remote Device Terminated Connection due to Power Off
0x1A
Unsupported Remote Feature
0x29
Pairing With Unit Key Not Supported
0x3B
Unacceptable Connection Interval
Events Generated
When this command is received, the host will send the CommandStatus Event. When the connection is terminated, the GAP_LinkTerminated Event will be generated.
GAP_Authenticate¶
- Opcode:
0xFE0B
- Command Description:
Send this command to initiate the pairing process (if Central device), wait for the pairing process (if Peripheral device), or accept a pairing request (if Peripheral device).
Command Parameters
- Connection Handle:
Identifies the connection.
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 to 0x0EFF
- secReq_ioCaps:
Defines the values which are used when exchanging IO capabilities
- Size:
1 byte(s)
- Default:
3
- Range:
Value
Description
0x00
DisplayOnly
0x01
DisplayYesNo
0x02
KeyboardOnly
0x03
NoInputNoOutput
0x04
KeyboardDisplay
- secReq_oobAvailable:
“Enable” if Out-of-band key available.
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0
Disable
1
Enable
- secReq_oob:
OOB data - Initial TK value for the pairing process.
- Size:
16 byte(s)
- Default:
“4d:9f:88:5a:6e:03:12:fe:00:00:00:00:00:00:00:00”
- Range:
Any 16 byte value
- secReq_oobConfirm:
OOB data Confirm value. Secure Connection only.
- Size:
16 byte(s)
- Default:
“00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00”
- Range:
Any 16 byte value
- secReq_localOobAvailable:
Secure Connections Local OOB data available
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
Locally generated OOB data is NOT available
0x01
Local generated OOB data is available
- secReq_localOob:
Secure Connections local OOB value - 16 bytes in length.
- Size:
16 byte(s)
- Default:
“00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00”
- Range:
Any 16 byte value
- secReq_isSCOnlyMode:
Type of pairing to allow
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
Legacy Pairing allowed
0x01
Only Secure Connections pairing allowed
- secReq_eccKeys_isUsed:
1 if ECC Keys are specified, 0 for internal generation.
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
Stack chooses ECC keys.
0x01
Use application provided ECC keys.
- secReq_eccKeys_sK:
P-256 ECC Private Key.
- Size:
32 byte(s)
- Default:
“BD:1A:3C:CD:A6:B8:99:58:99:B7:40:EB:7B:60:FF:4A:50:3F:10:D2:E3:B3:C9:74:38:5F:C5:A3:D4:F6:49:3F”
- Range:
Any 32 byte value
- secReq_eccKeys_pK_x:
P-256 ECC Public Key X-Coordinate.
- Size:
32 byte(s)
- Default:
“E6:9D:35:0E:48:01:03:CC:DB:FD:F4:AC:11:91:F4:EF:B9:A5:F9:E9:A7:83:2C:5E:2C:BE:97:F2:D2:03:B0:20”
- Range:
Any 32 byte value
- secReq_eccKeys_pK_y:
P-256 ECC Public Key Y-Coordinate.
- Size:
32 byte(s)
- Default:
“8B:D2:89:15:D0:8E:1C:74:24:30:ED:8F:C2:45:63:76:5C:15:52:5A:BF:9A:32:63:6D:EB:2A:65:49:9C:80:DC”
- Range:
Any 32 byte value
- secReq_authReq:
A bit field that indicates the requested security properties for STK and GAP bonding information.
- Size:
1 byte(s)
- Default:
1
- Range:
Value
Description
0x01
Bonding
0x04
MITM
0x08
SC
0x10
KP
0x20
CT2
- secReq_maxEncKeySize:
This value defines the maximum encryption key size in octets that the device can support.
- Size:
1 byte(s)
- Default:
16
- Range:
7-16
- secReq_keyDist:
The Key Distribution field indicates which keys will be distributed.
- Size:
1 byte(s)
- Default:
119
- Range:
Value
Description
0x01
GAPBOND_KEYDIST_SENCKEY
0x02
GAPBOND_KEYDIST_SIDKEY
0x04
GAPBOND_KEYDIST_SSIGN
0x08
GAPBOND_KEYDIST_SLINK
0x10
GAPBOND_KEYDIST_MENCKEY
0x20
GAPBOND_KEYDIST_MIDKEY
0x40
GAPBOND_KEYDIST_MSIGN
0x80
GAPBOND_KEYDIST_MLINK
- pairReq_Enable:
“Enable” if Pairing Request has already been received and to respond with a Pairing Response. This should only be used in a Peripheral device.
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0
Disable
1
Enable
- pairReq_ioCaps:
Defines the values which are used when exchanging IO capabilities
- Size:
1 byte(s)
- Default:
3
- Range:
Value
Description
0x00
DisplayOnly
0x01
DisplayYesNo
0x02
KeyboardOnly
0x03
NoInputNoOutput
0x04
KeyboardDisplay
- pairReq_oobDataFlag:
“Enable” if OOB key is available.
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0
Disable
1
Enable
- pairReq_authReq:
A bit field that indicates the requested security properties for STK and GAP bonding information.
- Size:
1 byte(s)
- Default:
1
- Range:
Value
Description
0x01
Bonding
0x04
MITM
0x08
SC
0x10
KP
0x20
CT2
- pairReq_maxEncKeySize:
This value defines the maximum encryption key size in octets that the device can support.
- Size:
1 byte(s)
- Default:
16
- Range:
7-16
- pairReq_keyDist:
The Key Distribution field indicates which keys will be distributed.
- Size:
1 byte(s)
- Default:
119
- Range:
Value
Description
0x01
GAPBOND_KEYDIST_SENCKEY
0x02
GAPBOND_KEYDIST_SIDKEY
0x04
GAPBOND_KEYDIST_SSIGN
0x08
GAPBOND_KEYDIST_SLINK
0x10
GAPBOND_KEYDIST_MENCKEY
0x20
GAPBOND_KEYDIST_MIDKEY
0x40
GAPBOND_KEYDIST_MSIGN
0x80
GAPBOND_KEYDIST_MLINK
Events Generated
When this command is received, the host will send the CommandStatus Event. When the pairing process is complete (either SUCCESS or Failure), a GAP_AuthenticationComplete will be generated. If a passkey is needed, a GAP_PasskeyNeeded will be generated.
GAP_TerminateAuth¶
- Opcode:
0xFE10
- Command Description:
Send this command to terminate a pairing process.
Command Parameters
- Connection Handle:
Identifies the connection.
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 to 0x0EFF
- reason:
Pairing Failed Message reason field.
- Size:
1 byte(s)
- Default:
3
- Range:
Value
Description
0x00
SUCCESS
0x01
SMP_PAIRING_FAILED_PASSKEY_ENTRY_FAILED
0x02
SMP_PAIRING_FAILED_OOB_NOT_AVAIL
0x03
SMP_PAIRING_FAILED_AUTH_REQ
0x04
SMP_PAIRING_FAILED_CONFIRM_VALUE
0x05
SMP_PAIRING_FAILED_NOT_SUPPORTED
0x06
SMP_PAIRING_FAILED_ENC_KEY_SIZE
0x07
SMP_PAIRING_FAILED_CMD_NOT_SUPPORTED
0x08
SMP_PAIRING_FAILED_UNSPECIFIED
0x09
SMP_PAIRING_FAILED_REPEATED_ATTEMPTS
0x0A
SMP_PAIRING_FAILED_INVALID_PARAMETERS
0x0B
SMP_PAIRING_FAILED_DHKEY_CHECK_FAILED
0x0C
SMP_PAIRING_FAILED_NUM_COMPARISON_FAILED
0x0D
SMP_PAIRING_FAILED_BREDR_PAIR_IN_PROGRESS
0x0E
SMP_PAIRING_FAILED_CT_KEYDER_NOT_ALLOWED
0x0F
SMP_PAIRING_FAILED_KEY_REJECTED
0x10
Command Disallowed
0x11
Unsupported Feature Or Parameter Value
0x12
Invalid HCI Command Parameters
0x17
bleTimeout
Events Generated
When this command is received, the host will send the CommandStatus Event. When the existing pairing had ended, the GAP_AuthenticationComplete with be generated.
GAP_UpdateLinkParamReq¶
- Opcode:
0xFE11
- Command Description:
Send this command to change the Link Layer connection parameters of a connection. This command can only be used when the local devices role is Master or Slave.
Command Parameters
- Connection Handle:
Identifies the connection.
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 to 0xFFFD
- intervalMin:
Minimum value (* 1.25 ms) for the connection event interval. This shall be less than or equal to intervalMax.
- Size:
2 byte(s)
- Default:
80
- Range:
6 - 3200
- intervalMax:
Maximum value (* 1.25 ms) for the connection event interval. This shall be greater than or equal to intervalMin./
- Size:
2 byte(s)
- Default:
160
- Range:
6 - 3200
- connLatency:
The desired slave latency for the connection in number of connection events.
- Size:
2 byte(s)
- Default:
0
- Range:
0 - 499
- connTimeout:
The desired supervision timeout (* 10 ms)
- Size:
2 byte(s)
- Default:
1000
- Range:
10 - 3200
Events Generated
When this command is received, the host will send the CommandStatus Event. When the connection parameters have been applied by the Controller, the GAP_LinkParamUpdate Event will be generated.
GAP_UpdateLinkParamReqReply¶
- Opcode:
0xFE12
- Command Description:
Reply to a GAP_LinkParamUpdateRequest that was received from a remote device
Command Parameters
- Connection Handle:
Identifies the connection.
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 to 0xFFFD
- intervalMin:
Minimum value (* 1.25 ms) for the connection event interval. This shall be less than or equal to intervalMax.
- Size:
2 byte(s)
- Default:
80
- Range:
6 - 3200
- intervalMax:
Maximum value (* 1.25 ms) for the connection event interval. This shall be greater than or equal to intervalMin./
- Size:
2 byte(s)
- Default:
160
- Range:
6 - 3200
- connLatency:
The desired slave latency for the connection in number of connection events.
- Size:
2 byte(s)
- Default:
0
- Range:
0 - 499
- connTimeout:
The desired supervision timeout (* 10 ms)
- Size:
2 byte(s)
- Default:
1000
- Range:
10 - 3200
- signalIdentifier:
Signal ID for L2CAP Connection Parameter Update Request. 0 for LL Connection Parameter Request. This must match the signal ID provided by the corresponding update request.
- Size:
1 byte(s)
- Default:
1
- Range:
0 - 255
- accepted:
Yes to accept Parameter Update Request, No to reject it.
- Size:
1 byte(s)
- Default:
1
- Range:
Value
Description
0x00
No
0x01
Yes
Events Generated
When this command is received, the host will send the CommandStatus Event. When the connection parameters have been applied by the Controller, the GAP_LinkParamUpdate Event will be generated.
Gap_RegisterConnEvent¶
- Opcode:
0xFE13
- Command Description:
Register/Unregister to receive connection event information.
Command Parameters
- Action:
Whether to register or unregister.
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
GAP_CB_REGISETER
0x01
GAP_CB_UNREGISTER
- Connection Handle:
Identifies the connection. If 0xFFFF, apply to all connections. Else, apply only for a specific connection
- Size:
2 byte(s)
- Default:
0xFFFF
- Range:
0x0000 to 0xFFFD
- Event Type:
Which Event Type Information to register to. This will prevent the event from getting generated after each connection event, instead it will be generated in specific cases of the connection event.
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x01
GAP_CB_CONN_ESTABLISHED
0x02
GAP_CB_PHY_UPDATE
0x03
GAP_CB_CONN_ESTABLISHED | GAP_CB_PHY_UPDATE
0xFF
GAP_CB_CONN_EVENT_ALL
Events Generated
When this command is received, the host will send the CommandStatus Event. If successfully registers, the GAP_ConnectionEventNotice Event will be generated after each connection event or on specific instances.
GapAdv_SetPeriodicAdvParams¶
- Opcode:
0xFE14
- Command Description:
Create a periodic advertising set.
Command Parameters
- Handle:
The extended advertising handle
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 to 0xEF
- Interval Min:
Periodic interval minimum time = Min Interval * 1.25 ms
- Size:
2 byte(s)
- Default:
0x0006
- Range:
0x0006 to 0xFFFF
- Interval Max:
Periodic interval maximum time = Min Interval * 1.25 ms
- Size:
2 byte(s)
- Default:
0x0006
- Range:
0x0006 to 0xFFFF
- Properties:
Periodic advertising properties. Set 0x0040 to include TxPower in the advertising PDU
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 or 0x0040
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GapAdv_SetPeriodicAdvParams VS event will be received with the controller completion status
GapAdv_setPeriodicAdvData¶
- Opcode:
0xFE15
- Command Description:
Add data to a periodic advertising set.
Command Parameters
- Handle:
The extended advertising handle
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 to 0xEF
- Operation:
Type of operation used to send the payload in the controller
- Size:
1 byte(s)
- Default:
0x03
- Range:
Value
Description
0x00
Intermediate fragment of data
0x01
First fragment of fragmented data
0x02
Last fragment of fragmented data
0x03
Complete data
- Payload Length:
- Size:
1 byte(s)
- Value:
size(dataLen)
- Data:
Periodic advertising data up to 252
- Size:
input byte(s)
- Default:
“00:11:22:33”
- Range:
0 to 252
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPAdv_SetPeriodicAdvData VS event will be received with the controller completion status
GapAdv_SetPeriodicAdvEnable¶
- Opcode:
0xFE16
- Command Description:
Enable a periodic advertising set
Command Parameters
- Enable:
Enable or disable the periodic adverising set
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 to 0x01
- Handle:
The extended advertising handle
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 to 0xEF
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPAdv_SetPeriodicAdvEnable VS event will be received with the controller completion status
GapScan_PeriodicAdvCreateSync¶
- Opcode:
0xFE17
- Command Description:
Set sync parameters for periodic scanning
Command Parameters
- advSID:
Persiodic Advertising SID
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 to 0x0F
- options:
Use periodic list and/or enable/disable periodic report
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x01
Use Periodic Advertiser List
0x02
Disable Periodic Advertising Report
- advAddrType:
Advertiser Address Type
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID
0x01
PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID
- advAddress:
Advertiser Address
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value
- skip:
Periodic Advertising events that can be skipped after a successful receive
- Size:
2 byte(s)
- Default:
0
- Range:
0x0000 to 0x01F3
- syncTimeout:
Synchronization timeout for the periodic advertising train
- Size:
2 byte(s)
- Default:
0x000A
- Range:
0x000A-0x4000
- syncCteType:
Select cte type for syncing periodic train (bit mask)
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x01
Do not sync to packets with AoA
0x02
Do not sync to packets with 1us AoD
0x04
Do not sync to packets with 2us AoD
0x08
not in use
0x10
Do not sync to packets without CTE
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPScan_PeriodicAdvCreateSync VS event will be received with the controller completion status
GapScan_PeriodicAdvCreateSyncCancel¶
- Opcode:
0xFE18
- Command Description:
Cancel the ongoing scanner’s synchronizing state
Events Generated
The host will send the CommandComplete Event to indicate whether the cancel was completed and periodic Advertising Sync Establish with status “Operation Cancelled by Host”
GapScan_PeriodicAdvTerminateSync¶
- Opcode:
0xFE19
- Command Description:
Used by the scanner to stop reception of the periodic advertising train identified by the syncHandle parameter
Command Parameters
- syncHandle:
Periodic Advertising train identifier
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 to 0x0EFF
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPScan_PeriodicAdvTerminateSync VS event will be received with the controller completion status
GapScan_SetPeriodicAdvReceiveEnable¶
- Opcode:
0xFE1A
- Command Description:
Used by the scanner to enabling or diabling the periodic advertising reports
Command Parameters
- syncHandle:
Periodic Advertising train identifier
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 to 0x0EFF
- Enable:
Enable or disable reports
- Size:
1 byte(s)
- Default:
1
- Range:
0 to 1
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPScan_SetPeriodicAdvReceiveEnable VS event will be received with the controller completion status
GapScan_AddDeviceToPeriodicAdvList¶
- Opcode:
0xFE1B
- Command Description:
Adding device to the periodic advertiser list
Command Parameters
- advAddrType:
Advertiser Address Type
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID
0x01
PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID
- advAddress:
Advertiser Address
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value
- advSID:
Persiodic Advertising SID
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 to 0x0F
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPScan_AddDeviceToPeriodicAdvList VS event will be received with the controller completion status
GapScan_RemoveDeviceFromPeriodicAdvList¶
- Opcode:
0xFE1C
- Command Description:
Removing device to the periodic advertiser list
Command Parameters
- advAddrType:
Advertiser Address Type
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID
0x01
PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID
- advAddress:
Advertiser Address
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value
- advSID:
Persiodic Advertising SID
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 to 0x0F
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPScan_RemoveDeviceFromPeriodicAdvList VS event will be received with the controller completion status
GapScan_ReadPeriodicAdvListSize¶
- Opcode:
0xFE1D
- Command Description:
Read the advertisers list size
Events Generated
When this command is received, the host will send the CommandStatus Event. After GAPScan_ReadPeriodicAdvListSize with the advertisers list size will be received
GapScan_ClearPeriodicAdvList¶
- Opcode:
0xFE1E
- Command Description:
Clear the advertisers list size
Events Generated
When this command is received, the host will send the CommandStatus Event. If the host returns SUCCESS GAPScan_ClearPeriodicAdvList VS event will be received with the controller completion status
GAP_Bond¶
- Opcode:
0xFE0F
- Command Description:
Send this command for a connected and bound device to load the encryption key.
Command Parameters
- Connection Handle:
Identifies the connection.
- Size:
2 byte(s)
- Default:
0x0000
- Range:
0x0000 to 0xFFFD
- authenticated:
1 if authenticated. 0 if not.
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
No
0x01
Yes
- secureConnections:
1 if Secure Connections. 0 if not.
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
No
0x01
Yes
- secInfo.LTK:
Long Term Key
- Size:
16 byte(s)
- Default:
“4d:9f:88:5a:6e:03:12:fe:00:00:00:00:00:00:00:00”
- Range:
Any 16 byte value
- secInfo.DIV:
Diversifier
- Size:
2 byte(s)
- Default:
0x1111
- Range:
Any 16-bit value
- secInfo.rand:
LTK Rand pairing
- Size:
8 byte(s)
- Default:
“11:22:33:44:55:66:77:88”
- Range:
Any 8-byte value
- secInfo.LTKsize:
LTK Key size (bytes)
- Size:
1 byte(s)
- Default:
16
- Range:
7-16
Events Generated
When this command is received, the host will send the CommandStatus Event. When both connected devices have setup encryption, the GAP_BondComplete is generated.
GAP_Signable¶
- Opcode:
0xFE0E
- Command Description:
Send this command for a connected and bound device to enable signed data.
Command Parameters
- connectionHandle:
Used to identify the connection
- Size:
2 byte(s)
- Default:
0
- Range:
0 - 0xFFFD
- authenticated:
“1 if the signing information was authenticated; 0 otherwise
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
No
0x01
Yes
- CSRK:
Connection Signature Resolving Key for the connected device
- Size:
16 byte(s)
- Default:
0
- Range:
Any 16 byte value
- signCounter:
Sign Counter for the connected device
- Size:
4 byte(s)
- Default:
0
- Range:
Any 4 byte value
Events Generated
When this command is received, the host will send the CommandStatus Event.
GAP_PasskeyUpdate¶
- Opcode:
0xFE0C
- Command Description:
Send this command when the GAP Passkey Needed Event is received. This command sends a passkey needed during the Pairing Process.
Command Parameters
- connectionHandle:
Used to identify the connection
- Size:
2 byte(s)
- Default:
0
- Range:
0 - 0xFFFD
- Passkey:
6 character ASCII string of numbers (ex. 019655? )
- Size:
6 byte(s)
- Default:
“019655”
- Range:
Any 6 character string
Events Generated
When this command is received, the host will send the CommandStatus Event.
GAP_SlaveSecurityRequest¶
- Opcode:
0xFE0D
- Command Description:
Send this command, Peripheral Role only, to initiate security from a slave device. This message is also sent, by the Peripheral, to upgrade security (Pairing) to “Authenticated”, make sure to ask for Man-In-The-Middle (MITM) protection in the “authReq” field.
Command Parameters
- connectionHandle:
Used to identify the connection
- Size:
2 byte(s)
- Default:
0
- Range:
0 - 0xFFFD
- authReq:
A bit field that indicates the requested security properties for STK and GAP bonding information.
- Size:
1 byte(s)
- Default:
5
- Range:
Value
Description
0x01
Bonding
0x04
MITM
0x08
SC
0x10
KP
0x20
CT2
Events Generated
When this command is received, the host will send the CommandStatus Event.
GapConfig_SetParameter¶
- Opcode:
0xFE2F
- Command Description:
Set a configuration parameter (IRK or SRK)
Command Parameters
- paramID:
Parameter ID
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0
GAP_CONFIG_PARAM_IRK
1
GAP_CONFIG_PARAM_SRK
- paramValue:
Key to set the parameter with
- Size:
16 byte(s)
- Default:
“00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00”
- Range:
Any 16-byte value
Events Generated
When this command is received, the host will send the CommandStatus Event.
GAP_SetParamValue¶
- Opcode:
0xFE30
- Command Description:
Set a GAP Parameter. See the respective parameter for more information
Command Parameters
- paramID:
Parameter to Set
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0
GAP_PARAM_LINK_UPDATE_DECISION
1
GAP_PARAM_CONN_PARAM_TIMEOUT
2
GAP_PARAM_PRIVATE_ADDR_INT
3
GAP_PARAM_SM_TIMEOUT
4
GAP_PARAM_SM_MIN_KEY_LEN
5
GAP_PARAM_SM_MAX_KEY_LEN
6
GAP_PARAM_AUTH_TASK_ID
7
GAP_PARAM_VERIFY_CAR
8
GAP_PARAM_GGS_PARAMS
9
GAP_PARAM_GAP_TESTCODE
10
GAP_PARAM_SM_TESTCODE
11
GAP_PARAM_GATT_TESTCODE
12
GAP_PARAM_ATT_TESTCODE
13
GAP_PARAM_L2CAP_TESTCODE
14
GAP_PARAM_SET_SCAN_CHAN
- GAP_PARAM_LINK_UPDATE_DECISION:
Action to take upon receiving a parameter update request
- Condition:
( paramID == 0)
- Size:
2 byte(s)
- Default:
0x02
- Range:
Value
Description
0x00
GAP_UPDATE_REQ_ACCEPT_ALL
0x01
GAP_UPDATE_REQ_DENY_ALL
0x02
GAP_UPDATE_REQ_PASS_TO_APP
- GAP_PARAM_CONN_PARAM_TIMEOUT:
Minimum time after an L2CAP Connection Parameter Update Response has been received that a L2CAP Connection Parameter Update Request can be sent. See section Version 5.0 Vol 3, Part C, Section 9.3.9.2 of the BT Core Spec
- Condition:
( paramID == 1)
- Size:
2 byte(s)
- Default:
30000
- Range:
1-65535
- GAP_PARAM_PRIVATE_ADDR_INT:
Minimum Time Interval between private (resolvable) address changes (in minutes)
- Condition:
( paramID == 2)
- Size:
2 byte(s)
- Default:
15
- Range:
1-65535
- GAP_PARAM_SM_TIMEOUT:
Time to wait for security manager response before returning bleTimeout (in ms)
- Condition:
( paramID == 3)
- Size:
2 byte(s)
- Default:
30000
- Range:
1-65535
- GAP_PARAM_SM_MIN_KEY_LEN:
SM Minimum Key Length supported
- Condition:
( paramID == 4)
- Size:
2 byte(s)
- Default:
7
- Range:
1-65535
- GAP_PARAM_SM_MAX_KEY_LEN:
SM Maximum Key Length supported
- Condition:
( paramID == 5)
- Size:
2 byte(s)
- Default:
16
- Range:
1-65535
- GAP_PARAM_AUTH_TASK_ID:
For TestMode Only
- Condition:
( paramID == 6)
- Size:
2 byte(s)
- Default:
0xFF
- Range:
Any 2 byte value
- GAP_PARAM_VERIFY_CAR:
Verify the Central Address Resolution (CAR) characteristic is set before sending directed advertisements using RPA
- Condition:
( paramID == 7)
- Size:
2 byte(s)
- Default:
1
- Range:
Value
Description
0x00
No
0x01
Yes
- GAP_PARAM_GGS_PARAMS:
For TestMode Only
- Condition:
( paramID == 8)
- Size:
2 byte(s)
- Default:
30720
- Range:
For TestMode Only
- GAP_PARAM_GAP_TESTCODE:
For TestMode Only
- Condition:
( paramID == 9)
- Size:
2 byte(s)
- Default:
30720
- Range:
For TestMode Only
- GAP_PARAM_SM_TESTCODE:
For TestMode Only
- Condition:
( paramID == 10)
- Size:
2 byte(s)
- Default:
30720
- Range:
For TestMode Only
- GAP_PARAM_GATT_TESTCODE:
For TestMode Only
- Condition:
( paramID == 11)
- Size:
2 byte(s)
- Default:
30720
- Range:
For TestMode Only
- GAP_PARAM_ATT_TESTCODE:
For TestMode Only
- Condition:
( paramID == 12)
- Size:
2 byte(s)
- Default:
30720
- Range:
For TestMode Only
- GAP_PARAM_L2CAP_TESTCODE:
For TestMode Only
- Condition:
( paramID == 13)
- Size:
2 byte(s)
- Default:
30720
- Range:
For TestMode Only
- GAP_PARAM_SET_SCAN_CHAN:
Set the Scan Channels Mapping
- Condition:
( paramID == 14)
- Size:
2 byte(s)
- Default:
0x7
- Range:
1-7
Events Generated
When this command is received, the host will send the CommandStatus Event.
GAP_GetParamValue¶
- Opcode:
0xFE31
- Command Description:
Get a Parameter value.
Command Parameters
- paramID:
Parameter to get
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0
GAP_PARAM_LINK_UPDATE_DECISION
1
GAP_PARAM_CONN_PARAM_TIMEOUT
2
GAP_PARAM_PRIVATE_ADDR_INT
3
GAP_PARAM_SM_TIMEOUT
4
GAP_PARAM_SM_MIN_KEY_LEN
5
GAP_PARAM_SM_MAX_KEY_LEN
6
GAP_PARAM_AUTH_TASK_ID
7
GAP_PARAM_VERIFY_CAR
8
GAP_PARAM_GGS_PARAMS
9
GAP_PARAM_GAP_TESTCODE
10
GAP_PARAM_SM_TESTCODE
11
GAP_PARAM_GATT_TESTCODE
12
GAP_PARAM_ATT_TESTCODE
13
GAP_PARAM_L2CAP_TESTCODE
14
GAP_PARAM_SET_SCAN_CHAN
Events Generated
When this command is received, the host will send the CommandStatus Event.
GapAdv_create¶
- Opcode:
0xFE3E
- Command Description:
Create an advertising set.
Command Parameters
- Properties:
Advertising Event Properties bit field
- Size:
2 byte(s)
- Default:
0x0013
- Range:
Value
Description
0x0001
GAP_ADV_PROP_CONNECTABLE
0x0002
GAP_ADV_PROP_SCANNABLE
0x0004
GAP_ADV_PROP_DIRECTED
0x0008
GAP_ADV_PROP_HDC
0x0010
GAP_ADV_PROP_LEGACY
0x0020
GAP_ADV_PROP_ANONYMOUS
0x0040
GAP_ADV_PROP_TX_POWER
- Interval Min:
- Size:
3 byte(s)
- Default:
160
- Range:
20 ms to 10,485.759375 s
- Interval Max:
- Size:
3 byte(s)
- Default:
160
- Range:
ms to 10,485.759375 s
- Primary channel map:
- Size:
1 byte(s)
- Default:
0x07
- Range:
Value
Description
0x01
GAP_ADV_CHAN_37
0x02
GAP_ADV_CHAN_38
0x04
GAP_ADV_CHAN_39
- Peer address type:
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID
0x01
PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID
- Peer Address:
Address of the peer. Only applicable for directed advertising.
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value.
- Filter Policy:
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
GAP_ADV_WL_POLICY_ANY_REQ
0x01
GAP_ADV_WL_POLICY_WL_SCAN_REQ
0x02
GAP_ADV_WL_POLICY_WL_CONNECT_IND
0x03
GAP_ADV_WL_POLICY_WL_ALL_REQ
- Tx Power:
- Size:
1 byte(s)
- Default:
127
- Range:
0 - 127
- Primary PHY:
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
GAP_ADV_PRIM_PHY_1_MBPS
0x03
GAP_ADV_PRIM_PHY_CODED_S8
0x83
GAP_ADV_PRIM_PHY_CODED_S2
- Secoondary PHY:
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
GAP_ADV_SEC_PHY_1_MBPS
0x02
GAP_ADV_SEC_PHY_2_MBPS
0x03
GAP_ADV_SEC_PHY_CODED_S8
0x83
GAP_ADV_SEC_PHY_CODED_S2
- sid:
- Size:
1 byte(s)
- Default:
0
- Range:
0-15
Events Generated
The host will send the CommandStatus Event to indicate the advertising handle that is associated with this set.
Additional Command Status Return Parameters
- length:
Length of data
- Size:
1 byte(s)
- Range:
- handle:
Advertising handle
- Size:
1 byte(s)
- Range:
GapAdv_enable¶
- Opcode:
0xFE3F
- Command Description:
This will attempt to enable advertising for a set identified by the handle. The advertising set must first be created with GapAdv_create.
Command Parameters
- handle:
handle of the advertisement set
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 - 0xFE
- enable options:
Whether to use the max possible duration for advertising, a user specified duration, or a user specified maximum number of events. Note that if the max possible duration is used, the maxEvent parameter is not applicable.
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
GAP_ADV_ENABLE_OPTIONS_USE_MAX
0x01
GAP_ADV_ENABLE_OPTIONS_USE_DURATION
0x02
GAP_ADV_ENABLE_OPTIONS_USE_MAX_EVENTS
- duration or max event:
- Size:
2 byte(s)
- Default:
0x00
- Range:
10 ms to 655,540 ms.
Events Generated
The host will send the CommandStatus Event to indicate the advertising handle that is associated with this set. Also, if enabled by GapAdv_setEventMask, GAP_Advertiser/Scanner_Event events with the following event ID’s can be received: GAP_EVT_ADV_START_AFTER_ENABLE after advertising is enabled, GAP_EVT_ADV_START after each advertising set starts, GAP_EVT_ADV_END after each advertising set ends, GAP_EVT_SCAN_REQ_RECEIVED after received scan requests
GapAdv_disable¶
- Opcode:
0xFE40
- Command Description:
Disable an active advertising set.
Command Parameters
- handle:
handle of the advertisement
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 - 0xFE
Events Generated
When this command is received, the host will send the CommandStatus Event to indicate advertising has been disabled.
GapAdv_setParam¶
- Opcode:
0xFE42
- Command Description:
Set a parameter for an advertising set by advertising handle.
Command Parameters
- handle:
handle of the advertisement set
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 - 0x0FE
- ParamID:
identification of the data to set
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0
GAP_ADV_PARAM_PROPS
1
GAP_ADV_PARAM_PRIMARY_INTERVAL_MIN
2
GAP_ADV_PARAM_PRIMARY_INTERVAL_MAX
3
GAP_ADV_PARAM_PRIMARY_CHANNEL_MAP
4
GAP_ADV_PARAM_PEER_ADDRESS_TYPE
5
GAP_ADV_PARAM_PEER_ADDRESS
6
GAP_ADV_PARAM_FILTER_POLICY
7
GAP_ADV_PARAM_TX_POWER
8
GAP_ADV_PARAM_PRIMARY_PHY
9
GAP_ADV_PARAM_SECONDARY_PHY
10
GAP_ADV_PARAM_SID
- Properties:
Advertising Event Properties bit field
- Condition:
( paramID == 0x0)
- Size:
2 byte(s)
- Default:
0x0013
- Range:
Value
Description
0x0001
GAP_ADV_PROP_CONNECTABLE
0x0002
GAP_ADV_PROP_SCANNABLE
0x0004
GAP_ADV_PROP_DIRECTED
0x0008
GAP_ADV_PROP_HDC
0x0010
GAP_ADV_PROP_LEGACY
0x0020
GAP_ADV_PROP_ANONYMOUS
0x0040
GAP_ADV_PROP_TX_POWER
- Interval Min:
Minimum advertising interval (n * 0.625 ms)
- Condition:
( paramID == 0x1)
- Size:
3 byte(s)
- Default:
160
- Range:
20 ms to 10,485.759375 s
- Interval Max:
Maximum advertising interval (n * 0.625 ms). This is currently ignored; the minimum advertising interval will always be used.
- Condition:
( paramID == 0x2)
- Size:
3 byte(s)
- Default:
160
- Range:
20 ms to 10,485.759375 s
- Primary channel map:
A bit field that indicates the advertising channels that shall be used when transmitting advertising packets on primary channels
- Condition:
( paramID == 0x3)
- Size:
1 byte(s)
- Default:
7
- Range:
Value
Description
0x01
GAP_ADV_CHAN_37
0x02
GAP_ADV_CHAN_38
0x04
GAP_ADV_CHAN_39
- Peer address type:
Address type of the peer. Only applicable for directed advertising.
- Condition:
( paramID == 0x4)
- Size:
1 byte(s)
- Default:
Public
- Range:
Value
Description
0x00
PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID
0x01
PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID
- Peer address:
The Peer address for directed advertising.
- Condition:
( paramID == 0x5)
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value
- Filter Policy:
Advertising filter policy.
- Condition:
( paramID == 0x6)
- Size:
1 byte(s)
- Default:
0
- Range:
Value
Description
0x00
GAP_ADV_WL_POLICY_ANY_REQ
0x01
GAP_ADV_WL_POLICY_WL_SCAN_REQ
0x02
GAP_ADV_WL_POLICY_WL_CONNECT_IND
0x03
GAP_ADV_WL_POLICY_WL_ALL_REQ
- Tx power:
The maximum power level at which the advertising packets are to be transmitted on the advertising channels. The Controller will choose a power level lower than or equal to this. The range is 0 - 126 or 127 if there is no preference.
- Condition:
( paramID == 0x7)
- Size:
1 byte(s)
- Default:
127
- Range:
0-127
- Primary PHY:
The PHY on which the advertising packets are transmitted on the primary advertising channels.
- Condition:
( paramID == 0x8)
- Size:
1 byte(s)
- Default:
1
- Range:
Value
Description
0x01
GAP_ADV_PRIM_PHY_1_MBPS
0x03
GAP_ADV_PRIM_PHY_CODED_S8
0x83
GAP_ADV_PRIM_PHY_CODED_S2
- Secondary PHY:
The PHY on which the advertising packets are transmitted on the secondary advertising channels.
- Condition:
( paramID == 0x9)
- Size:
1 byte(s)
- Default:
1
- Range:
Value
Description
0x01
GAP_ADV_SEC_PHY_1_MBPS
0x02
GAP_ADV_SEC_PHY_2_MBPS
0x03
GAP_ADV_SEC_PHY_CODED_S8
0x83
GAP_ADV_SEC_PHY_CODED_S2
- SID:
This is the value to be transmitted in the Advertising SID subfield of the ADI field of the Extended Header of those advertising channel PDUs that have an ADI field. If the advertising set only uses PDUs that do not contain an ADI field, this parameter is ignored. The range is 0-15.
- Condition:
( paramID == 0xA)
- Size:
1 byte(s)
- Default:
0
- Range:
0-15
Events Generated
The host will send the CommandStatus Event to indicate the parameter has been set.
GapAdv_destroy¶
- Opcode:
0xFE41
- Command Description:
Delete an advertising set. This will free any memory associated with the advertising set.
Command Parameters
- handle:
handle of the advertisement set to handle
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00-0xFE
Events Generated
The host will send the CommandStatus Event to indicate the set has been destroyed.
GapAdv_getParam¶
- Opcode:
0xFE43
- Command Description:
Get an advertising parameter for an advertising set.
Command Parameters
- handle:
handle of the advertisement set to handle
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 - 0xFE
- paramId:
parameter ID to get
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0
GAP_ADV_PARAM_PROPS
1
GAP_ADV_PARAM_PRIMARY_INTERVAL_MIN
2
GAP_ADV_PARAM_PRIMARY_INTERVAL_MAX
3
GAP_ADV_PARAM_PRIMARY_CHANNEL_MAP
4
GAP_ADV_PARAM_PEER_ADDRESS_TYPE
5
GAP_ADV_PARAM_PEER_ADDRESS
6
GAP_ADV_PARAM_FILTER_POLICY
7
GAP_ADV_PARAM_TX_POWER
8
GAP_ADV_PARAM_PRIMARY_PHY
9
GAP_ADV_PARAM_SECONDARY_PHY
10
GAP_ADV_PARAM_SID
Events Generated
The host will send the CommandStatus Event to return the parameter value in question.
Additional Command Status Return Parameters
- length:
- Size:
1 byte(s)
- Range:
- paramId:
- Condition:
( StatStatus==0x00)
- Size:
1 byte(s)
- Range:
Value
Description
0
GAP_ADV_PARAM_PROPS
1
GAP_ADV_PARAM_PRIMARY_INTERVAL_MIN
2
GAP_ADV_PARAM_PRIMARY_INTERVAL_MAX
3
GAP_ADV_PARAM_PRIMARY_CHANNEL_MAP
4
GAP_ADV_PARAM_PEER_ADDRESS_TYPE
5
GAP_ADV_PARAM_PEER_ADDRESS
6
GAP_ADV_PARAM_FILTER_POLICY
7
GAP_ADV_PARAM_TX_POWER
8
GAP_ADV_PARAM_PRIMARY_PHY
9
GAP_ADV_PARAM_SECONDARY_PHY
10
GAP_ADV_PARAM_SID
- GAP_ADV_PARAM_PROPS:
- Condition:
( StatStatus==0x00 paramId==0x00)
- Size:
2 byte(s)
- Range:
Value
Description
0x0001
GAP_ADV_PROP_CONNECTABLE
0x0002
GAP_ADV_PROP_SCANNABLE
0x0004
GAP_ADV_PROP_DIRECTED
0x0008
GAP_ADV_PROP_HDC
0x0010
GAP_ADV_PROP_LEGACY
0x0020
GAP_ADV_PROP_ANONYMOUS
0x0040
GAP_ADV_PROP_TX_POWER
- GAP_ADV_PARAM_PRIMARY_INTERVAL_MIN:
- Condition:
( StatStatus==0x00 paramId==0x01)
- Size:
3 byte(s)
- Range:
- GAP_ADV_PARAM_PRIMARY_INTERVAL_MAX:
- Condition:
( StatStatus==0x00 paramId==0x02)
- Size:
3 byte(s)
- Range:
- GAP_ADV_PARAM_PRIMARY_CHANNEL_MAP:
- Condition:
( StatStatus==0x00 paramId==0x03)
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAP_ADV_CHAN_37
0x02
GAP_ADV_CHAN_38
0x04
GAP_ADV_CHAN_39
- GAP_ADV_PARAM_PEER_ADDRESS_TYPE:
- Condition:
( StatStatus==0x00 paramId==0x04)
- Size:
1 byte(s)
- Range:
- GAP_ADV_PARAM_PEER_ADDRESS:
Note! The value is byte-reversed.
- Condition:
( StatStatus==0x00 paramId==0x05)
- Size:
6 byte(s)
- Range:
- GAP_ADV_PARAM_FILTER_POLICY:
- Condition:
( StatStatus==0x00 paramId==0x06)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
GAP_ADV_WL_POLICY_ANY_REQ
0x01
GAP_ADV_WL_POLICY_WL_SCAN_REQ
0x02
GAP_ADV_WL_POLICY_WL_CONNECT_IND
0x03
GAP_ADV_WL_POLICY_WL_ALL_REQ
- GAP_ADV_PARAM_TX_POWER:
- Condition:
( StatStatus==0x00 paramId==0x07)
- Size:
1 byte(s)
- Range:
- GAP_ADV_PARAM_PRIMARY_PHY:
- Condition:
( StatStatus==0x00 paramId==0x08)
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAP_ADV_PRIM_PHY_1_MBPS
0x03
GAP_ADV_PRIM_PHY_CODED_S8
0x83
GAP_ADV_PRIM_PHY_CODED_S2
- GAP_ADV_PARAM_SECONDARY_PHY:
- Condition:
( StatStatus==0x00 paramId==0x09)
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAP_ADV_SEC_PHY_1_MBPS
0x02
GAP_ADV_SEC_PHY_2_MBPS
0x03
GAP_ADV_SEC_PHY_CODED_S8
0x83
GAP_ADV_SEC_PHY_CODED_S2
- GAP_ADV_PARAM_SID:
- Condition:
( StatStatus==0x00 paramId==0x0A)
- Size:
1 byte(s)
- Range:
GapAdv_loadData¶
- Opcode:
0xFE44
- Command Description:
Load advertising or scan response data to an advertising set by handle.
Command Parameters
- Layer:
- Size:
1 byte(s)
- Value:
9
- Event Opcode:
- Size:
2 byte(s)
- Value:
0xFE44
- Payload Length:
- Size:
2 byte(s)
- Value:
size(HandleLen)+size(type)+size(LengthLen)+size(dataLen)
- Handle:
Handle of the advertisement set
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 - 0xFE
- type:
Type of Data to Load
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0
GAP_ADV_DATA_TYPE_ADV
1
GAP_ADV_DATA_TYPE_SCAN_RSP
- Data length:
The number of bytesthe Advertising Data parameter
- Size:
2 byte(s)
- Default:
16
- Range:
0-251
- Adv Data:
Data
- Size:
input byte(s)
- Default:
“00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F”
- Range:
This parameter has a variable length.
Events Generated
The host will send the CommandStatus Event to indicate the data has been loaded.
GapAdv_setEventMask¶
- Opcode:
0xFE45
- Command Description:
Set the per-advertising set event mask to select which events are sent
Command Parameters
- handle:
handle of the advertisement set to handle
- Size:
1 byte(s)
- Default:
0x00
- Range:
0x00 - 0xFE
- Event Mask:
Bitfield to enable / disable callback events:
- Size:
2 byte(s)
- Default:
0x0000
- Range:
Value
Description
0x01
GAP_EVT_SCAN_REQ_RECEIVED
0x02
GAP_EVT_ADV_SET_TERMINATED
0x10
GAP_EVT_ADV_START_AFTER_ENABLE
0x20
GAP_EVT_ADV_START
0x40
GAP_EVT_ADV_END
0x80
GAP_EVT_ADV_END_AFTER_DISABLE
Events Generated
The host will send the CommandStatus Event to indicate the event mask has been set.
GapAdv_setVirtualAdvAddr¶
- Opcode:
0xFE4B
- Command Description:
Set the advertiser’s virtual public address. This api shuold be used after a handle was created using GapAdv_create and before enabling the advertise set using GapAdv_enable. Setting virtual address is allowed only for Legacy Non-Connectable and Non-Scanable PDUs.
Command Parameters
- Handle:
Adv handle to which address will be assigned
- Size:
1 byte(s)
- Default:
“0”
- Range:
From 0 to 20 sets
- BDADDR:
Advertiser’s virtual public address
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value
Events Generated
The host will send the CommandStatus Event to indicate that the virtual address was associated
GapScan_enable¶
- Opcode:
0xFE51
- Command Description:
Start scanning.
Command Parameters
- period:
scan period in 1.28 sec. Ignore if duration is 0
- Size:
2 byte(s)
- Default:
0
- Range:
1-65535
- duration:
scan duration in 10 ms. If 0, scanning will not end until GapScan_disable is called. the time of scan duration shall be greater than the time of scan window.
- Size:
2 byte(s)
- Default:
500
- Range:
1-65535
- max number of records:
if non-zero, up to this number of adv reports will be recoreded during scanning
- Size:
1 byte(s)
- Default:
40
- Range:
1-65535 or until the heap is exhausted
Events Generated
The host will send the CommandStatus Event to indicate the scan has started
GapScan_disable¶
- Opcode:
0xFE52
- Command Description:
Stop the currently running scanning operation.
Events Generated
The host will send the CommandStatus Event to indicate the scan has ended.
GapScan_setPhyParams¶
- Opcode:
0xFE53
- Command Description:
Set parameters dependent on PHY. Note that if primPhys contains more than one PHY, the same parameters of those PHYs will be set with the same values.
Command Parameters
- primPhy:
PHY(s) to use on primary advertising channels
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
SCAN_PRIM_PHY_1M
0x04
SCAN_PRIM_PHY_CODED
- type:
scan type
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
SCAN_TYPE_PASSIVE
0x01
SCAN_TYPE_ACTIVE
- interval:
scan interval in 625-us unit. shall be equal to or greater than window.
- Size:
2 byte(s)
- Default:
800
- Range:
4-16384
- window:
scan window in 625-us unit
- Size:
2 byte(s)
- Default:
800
- Range:
4-16384
Events Generated
The host will send the CommandStatus Event to indicate the phy parameters have been set.
GapScan_getPhyParams¶
- Opcode:
0xFE54
- Command Description:
Get parameters of the specified PHY. Note that primPhy shall indicate only one PHY.
Command Parameters
- primPhy:
PHY to retrieve parameters relevant to
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
SCAN_PRIM_PHY_1M
0x04
SCAN_PRIM_PHY_CODED
Events Generated
The host will send the CommandStatus Event to return the parameter value in question.
Additional Command Status Return Parameters
- length:
Length of data
- Size:
1 byte(s)
- Range:
- type:
Scan type
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCAN_TYPE_PASSIVE
0x01
SCAN_TYPE_ACTIVE
- interval:
Scan Interval
- Size:
2 byte(s)
- Range:
- window:
Scan window
- Size:
2 byte(s)
- Range:
GapScan_setParam¶
- Opcode:
0xFE55
- Command Description:
Set a scan parameter.
Command Parameters
- paramID:
Parameter ID
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
SCAN_PARAM_RPT_FIELDS
0x01
SCAN_PARAM_PRIM_PHYS
0x02
SCAN_PARAM_FLT_POLICY
0x03
SCAN_PARAM_FLT_PDU_TYPE
0x04
SCAN_PARAM_FLT_MIN_RSSI
0x05
SCAN_PARAM_FLT_DISC_MODE
0x06
SCAN_PARAM_FLT_DUP
0x07
SCAN_PARAM_NUM_ADV_RPT (Read-only)
- SCAN_PARAM_RPT_FIELDS:
Fields of advertising report to keep in the list
- Condition:
( paramID == 0x0)
- Size:
2 byte(s)
- Default:
0x08a7
- Range:
Value
Description
0x0001
SCAN_ADVRPT_FLD_EVENTTYPE
0x0002
SCAN_ADVRPT_FLD_ADDRTYPE
0x0004
SCAN_ADVRPT_FLD_ADDRESS
0x0008
SCAN_ADVRPT_FLD_PRIMPHY
0x0010
SCAN_ADVRPT_FLD_SECPHY
0x0020
SCAN_ADVRPT_FLD_ADVSID
0x0040
SCAN_ADVRPT_FLD_TXPOWER
0x0080
SCAN_ADVRPT_FLD_RSSI
0x0100
SCAN_ADVRPT_FLD_DIRADDRTYPE
0x0200
SCAN_ADVRPT_FLD_DIRADDRESS
0x0400
SCAN_ADVRPT_FLD_PRDADVINTERVAL
0x0800
SCAN_ADVRPT_FLD_DATALEN
- SCAN_PARAM_PRIM_PHYS:
PHY to scan for on the primary channels
- Condition:
( paramID == 0x1)
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
SCAN_PRIM_PHY_1M
0x04
SCAN_PRIM_PHY_CODED
- SCAN_PARAM_FLT_POLICY:
Acceptlist filter policy
- Condition:
( paramID == 0x2)
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
SCAN_FLT_POLICY_ALL
0x01
SCAN_FLT_POLICY_WL
0x02
SCAN_FLT_POLICY_ALL_RPA
0x03
SCAN_FLT_POLICY_WL_RPA
- SCAN_PARAM_FLT_PDU_TYPE:
Filter by PDU types
- Condition:
( paramID == 0x3)
- Size:
2 byte(s)
- Default:
0x0800
- Range:
Value
Description
0x0001
SCAN_FLT_PDU_NONCONNECTABLE_ONLY
0x0002
SCAN_FLT_PDU_CONNECTABLE_ONLY
0x0004
SCAN_FLT_PDU_NONSCANNABLE_ONLY
0x0008
SCAN_FLT_PDU_SCANNABLE_ONLY
0x0010
SCAN_FLT_PDU_UNDIRECTED_ONLY
0x0020
SCAN_FLT_PDU_DIRECTED_ONLY
0x0040
SCAN_FLT_PDU_ADV_ONLY
0x0080
SCAN_FLT_PDU_SCANRSP_ONLY
0x0100
SCAN_FLT_PDU_EXTENDED_ONLY
0x0200
SCAN_FLT_PDU_LEGACY_ONLY
0x0400
SCAN_FLT_PDU_TRUNCATED_ONLY
0x0800
SCAN_FLT_PDU_COMPLETE_ONLY
- SCAN_PARAM_FLT_MIN_RSSI:
Filter by RSSI. Note this is a signed one-byte value.
- Condition:
( paramID == 0x4)
- Size:
1 byte(s)
- Default:
-128
- Range:
-128 - 127
- SCAN_PARAM_FLT_DISC_MODE:
Filter by discoverable mode
- Condition:
( paramID == 0x5)
- Size:
1 byte(s)
- Default:
0x04
- Range:
Value
Description
0x00
SCAN_FLT_DISC_NONE
0x01
SCAN_FLT_DISC_GENERAL
0x02
SCAN_FLT_DISC_LIMITED
0x03
SCAN_FLT_DISC_ALL
0x04
SCAN_FLT_DISC_DISABLE
- SCAN_PARAM_FLT_DUP:
Duplicate Filter
- Condition:
( paramID == 0x6)
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x00
SCAN_FLT_DUP_DISABLE
0x01
SCAN_FLT_DUP_ENABLE
0x02
SCAN_FLT_DUP_RESET (Duplicate filtering enabled, reset for each scan period)
Events Generated
The host will send the CommandStatus Event to indicate the parameter has been set.
GapScan_getParam¶
- Opcode:
0xFE56
- Command Description:
Set a scan parameter.
Command Parameters
- paramID:
Parameter ID
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
SCAN_PARAM_RPT_FIELDS
0x01
SCAN_PARAM_PRIM_PHYS
0x02
SCAN_PARAM_FLT_POLICY
0x03
SCAN_PARAM_FLT_PDU_TYPE
0x04
SCAN_PARAM_FLT_MIN_RSSI
0x05
SCAN_PARAM_FLT_DISC_MODE
0x06
SCAN_PARAM_FLT_DUP
0x07
SCAN_PARAM_NUM_ADV_RPT (Read-only)
Events Generated
The host will send the CommandStatus Event to return the parameter value in question.
Additional Command Status Return Parameters
- length:
Length of data
- Size:
1 byte(s)
- Range:
- paramId:
- Condition:
( StatStatus==0x00)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCAN_PARAM_RPT_FIELDS
0x01
SCAN_PARAM_PRIM_PHYS
0x02
SCAN_PARAM_FLT_POLICY
0x03
SCAN_PARAM_FLT_PDU_TYPE
0x04
SCAN_PARAM_FLT_MIN_RSSI
0x05
SCAN_PARAM_FLT_DISC_MODE
0x06
SCAN_PARAM_FLT_DUP
0x07
SCAN_PARAM_NUM_ADV_RPT (Read-only)
- SCAN_PARAM_RPT_FIELDS:
- Condition:
( StatStatus==0x00 paramId==0x00)
- Size:
2 byte(s)
- Range:
Value
Description
0x0001
SCAN_ADVRPT_FLD_EVENTTYPE
0x0002
SCAN_ADVRPT_FLD_ADDRTYPE
0x0004
SCAN_ADVRPT_FLD_ADDRESS
0x0008
SCAN_ADVRPT_FLD_PRIMPHY
0x0010
SCAN_ADVRPT_FLD_SECPHY
0x0020
SCAN_ADVRPT_FLD_ADVSID
0x0040
SCAN_ADVRPT_FLD_TXPOWER
0x0080
SCAN_ADVRPT_FLD_RSSI
0x0100
SCAN_ADVRPT_FLD_DIRADDRTYPE
0x0200
SCAN_ADVRPT_FLD_DIRADDRESS
0x0400
SCAN_ADVRPT_FLD_PRDADVINTERVAL
0x0800
SCAN_ADVRPT_FLD_DATALEN
- SCAN_PARAM_PRIM_PHYS:
- Condition:
( StatStatus==0x00 paramId==0x01)
- Size:
1 byte(s)
- Range:
Value
Description
0x01
SCAN_PRIM_PHY_1M
0x04
SCAN_PRIM_PHY_CODED
- SCAN_PARAM_FLT_POLICY:
- Condition:
( StatStatus==0x00 paramId==0x02)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCAN_FLT_POLICY_ALL
0x01
SCAN_FLT_POLICY_WL
0x02
SCAN_FLT_POLICY_ALL_RPA
0x03
SCAN_FLT_POLICY_WL_RPA
- SCAN_PARAM_FLT_PDU_TYPE:
- Condition:
( StatStatus==0x00 paramId==0x03)
- Size:
2 byte(s)
- Range:
Value
Description
0x0001
SCAN_FLT_PDU_NONCONNECTABLE_ONLY
0x0002
SCAN_FLT_PDU_CONNECTABLE_ONLY
0x0004
SCAN_FLT_PDU_NONSCANNABLE_ONLY
0x0008
SCAN_FLT_PDU_SCANNABLE_ONLY
0x0010
SCAN_FLT_PDU_UNDIRECTED_ONLY
0x0020
SCAN_FLT_PDU_DIRECTED_ONLY
0x0040
SCAN_FLT_PDU_ADV_ONLY
0x0080
SCAN_FLT_PDU_SCANRSP_ONLY
0x0100
SCAN_FLT_PDU_EXTENDED_ONLY
0x0200
SCAN_FLT_PDU_LEGACY_ONLY
0x0400
SCAN_FLT_PDU_TRUNCATED_ONLY
0x0800
SCAN_FLT_PDU_COMPLETE_ONLY
- SCAN_PARAM_FLT_MIN_RSSI:
- Condition:
( StatStatus==0x00 paramId==0x04)
- Size:
1 byte(s)
- Range:
- SCAN_PARAM_FLT_DISC_MODE:
- Condition:
( StatStatus==0x00 paramId==0x05)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCAN_FLT_DISC_NONE
0x01
SCAN_FLT_DISC_GENERAL
0x02
SCAN_FLT_DISC_LIMITED
0x03
SCAN_FLT_DISC_ALL
0x04
SCAN_FLT_DISC_DISABLE
- SCAN_PARAM_FLT_DUP:
- Condition:
( StatStatus==0x00 paramId==0x06)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCAN_FLT_DUP_DISABLE
0x01
SCAN_FLT_DUP_ENABLE
0x02
SCAN_FLT_DUP_RESET (Duplicate filtering enabled, reset for each scan period)
- SCAN_PARAM_NUM_ADV_RPT:
- Condition:
( StatStatus==0x00 paramId==0x07)
- Size:
1 byte(s)
- Range:
GapScan_setEventMask¶
- Opcode:
0xFE57
- Command Description:
Set which events to receive through the callback. One bit per event. If a bit is set to 1, the callback provided by GapScan_registerCb() will be called upon corresponding event.
Command Parameters
- eventMask:
The mask receive the wanted scan events
- Size:
4 byte(s)
- Default:
0x00C30000
- Range:
Value
Description
0x00010000
GAP_EVT_SCAN_ENABLED
0x00020000
GAP_EVT_SCAN_DISABLED
0x00040000
GAP_EVT_SCAN_PRD_ENDED
0x00080000
GAP_EVT_SCAN_DUR_ENDED
0x00100000
GAP_EVT_SCAN_INT_ENDED
0x00200000
GAP_EVT_SCAN_WND_ENDED
0x00400000
GAP_EVT_ADV_REPORT
0x00800000
GAP_EVT_ADV_REPORT_FULL
0x01000000
GAP_EVT_PRD_ADV_SYNC_ESTABLISHED
0x02000000
GAP_EVT_PRD_ADV_REPORT
0x04000000
GAP_EVT_PRD_ADV_SYNC_LOST
Events Generated
The host will send the CommandStatus Event to indicate the event mask has been set.
GapScan_getAdvReport¶
- Opcode:
0xFE58
- Command Description:
Get a specific advertising report from the advertising report list. Only the fields specified by GapScan_setParam(SCAN_PARAM_RPT_FIELDS, ..) will be filled out. All other fields will be filled with 0s.
Command Parameters
- rptIdx:
the index of the report to retrieve (number of reports available is returned by the GapScan_disable)
- Size:
1 byte(s)
- Default:
0
- Range:
0-maxNumReport as set by GapScan_enable
Events Generated
The host will send the CommandStatus Event to return the advertising report.
Additional Command Status Return Parameters
- length:
Length of data
- Size:
1 byte(s)
- Range:
- evtType:
- Size:
1 byte(s)
- Range:
- addrType:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- addr:
- Size:
6 byte(s)
- Range:
- primPhy:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCANNED_PHY_NONE
0x01
SCANNED_PHY_1M
0x02
SCANNED_PHY_2M
0x03
SCANNED_PHY_CODED
- secPhy:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCANNED_PHY_NONE
0x01
SCANNED_PHY_1M
0x02
SCANNED_PHY_2M
0x03
SCANNED_PHY_CODED
- advSid:
- Size:
1 byte(s)
- Range:
- txPower:
- Size:
1 byte(s)
- Range:
- rssi:
- Size:
1 byte(s)
- Range:
- directAddrType:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- directAddr:
- Size:
6 byte(s)
- Range:
GapInit_setPhyParam¶
- Opcode:
0xFE60
- Command Description:
Set parameters dependent on PHY. Note that if phys contains more than one PHY, the same parameter of those PHYs will be set with the same value.
Command Parameters
- phy:
PHY(s) to set parameter of
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
INIT_PHY_1M
0x02
INIT_PHY_2M
0x04
INIT_PHY_CODED
- paramId:
parameter ID
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
INIT_PHYPARAM_SCAN_INTERVAL
0x01
INIT_PHYPARAM_SCAN_WINDOW
0x02
INIT_PHYPARAM_CONN_INT_MIN
0x03
INIT_PHYPARAM_CONN_INT_MAX
0x04
INIT_PHYPARAM_CONN_LATENCY
0x05
INIT_PHYPARAM_SUP_TIMEOUT
- INIT_PHYPARAM_SCAN_INTERVAL:
scan interval in 625-us unit
- Condition:
( paramID == 0x0)
- Size:
2 byte(s)
- Default:
16
- Range:
4-16384
- INIT_PHYPARAM_SCAN_WINDOW:
scan window in 625-us unit
- Condition:
( paramID == 0x1)
- Size:
2 byte(s)
- Default:
16
- Range:
4-16384
- INIT_PHYPARAM_CONN_INT_MIN:
minimum connection interval in 1.25-ms unit
- Condition:
( paramID == 0x2)
- Size:
2 byte(s)
- Default:
80
- Range:
6-3200
- INIT_PHYPARAM_CONN_INT_MAX:
maximum connection interval in 1.25-ms unit
- Condition:
( paramID == 0x3)
- Size:
2 byte(s)
- Default:
80
- Range:
0 - 499
- INIT_PHYPARAM_CONN_LATENCY:
connection latency
- Condition:
( paramID == 0x4)
- Size:
2 byte(s)
- Default:
0
- Range:
10 - 3200
- INIT_PHYPARAM_SUP_TIMEOUT:
supervision timeout in 10-ms unit
- Condition:
( paramID == 0x5)
- Size:
2 byte(s)
- Default:
2000
- Range:
0 - 0xFFFF
Events Generated
The host will send the CommandStatus Event to indicate the parameter has been set.
GapInit_getPhyParam¶
- Opcode:
0xFE61
- Command Description:
Get parameters of the specified PHY. Note that phy shall indicate only one PHY.
Command Parameters
- phy:
PHY to get parameter of
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
INIT_PHY_1M
0x02
INIT_PHY_2M
0x04
INIT_PHY_CODED
- paramId:
Parameter ID
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
INIT_PHYPARAM_SCAN_INTERVAL
0x01
INIT_PHYPARAM_SCAN_WINDOW
0x02
INIT_PHYPARAM_CONN_INT_MIN
0x03
INIT_PHYPARAM_CONN_INT_MAX
0x04
INIT_PHYPARAM_CONN_LATENCY
0x05
INIT_PHYPARAM_SUP_TIMEOUT
Events Generated
The host will send the CommandStatus Event to return the parameter value in question.
Additional Command Status Return Parameters
- length:
Length of data
- Size:
1 byte(s)
- Range:
- paramId:
Parameter ID
- Size:
1 byte(s)
- Range:
Value
Description
0x00
INIT_PHYPARAM_SCAN_INTERVAL
0x01
INIT_PHYPARAM_SCAN_WINDOW
0x02
INIT_PHYPARAM_CONN_INT_MIN
0x03
INIT_PHYPARAM_CONN_INT_MAX
0x04
INIT_PHYPARAM_CONN_LATENCY
0x05
INIT_PHYPARAM_SUP_TIMEOUT
- INIT_PHYPARAM_SCAN_INTERVAL:
Phy
- Condition:
( paramId==0x00)
- Size:
2 byte(s)
- Range:
- INIT_PHYPARAM_SCAN_WINDOW:
- Condition:
( paramId==0x01)
- Size:
2 byte(s)
- Range:
- INIT_PHYPARAM_CONN_INT_MIN:
- Condition:
( paramId==0x02)
- Size:
2 byte(s)
- Range:
- INIT_PHYPARAM_CONN_INT_MAX:
- Condition:
( paramId==0x03)
- Size:
2 byte(s)
- Range:
- INIT_PHYPARAM_CONN_LATENCY:
- Condition:
( paramId==0x04)
- Size:
2 byte(s)
- Range:
- INIT_PHYPARAM_SUP_TIMEOUT:
- Condition:
( paramId==0x05)
- Size:
2 byte(s)
- Range:
GapInit_connect¶
- Opcode:
0xFE62
- Command Description:
Initiate connection with the specified peer device
Command Parameters
- peerAddrType:
peer device’s address type
- Size:
1 byte(s)
- Default:
0x00
- Range:
Value
Description
0x00
PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID
0x01
PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID
- pPeerAddress:
peer device’s address
- Size:
6 byte(s)
- Default:
“00:00:00:00:00:00”
- Range:
Any 6 byte value
- phys:
PHY(s) to use for connection
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
INIT_PHY_1M
0x02
INIT_PHY_2M
0x04
INIT_PHY_CODED
- timeout:
initiating timeout in ms
- Size:
2 byte(s)
- Default:
0
- Range:
Any 32-bit number
Events Generated
The host will send the CommandStatus Event to indicate whether the connect process has started successfully. If a connection is formed, the GAP_LinkEstablished event will be returned.
GapInit_connectWl¶
- Opcode:
0xFE63
- Command Description:
Initiate connection with a device in the acceptlist.
Command Parameters
- phys:
PHY(s) to use for connection
- Size:
1 byte(s)
- Default:
0x01
- Range:
Value
Description
0x01
INIT_PHY_1M
0x02
INIT_PHY_2M
0x04
INIT_PHY_CODED
- timeout:
initiating timeout in ms
- Size:
2 byte(s)
- Default:
0
- Range:
Any 32-bit number
Events Generated
The host will send the CommandStatus Event to indicate whether the connect process has started successfully. If a connection is formed, the GAP_LinkEstablished event will be returned
GapInit_cancelConnect¶
- Opcode:
0xFE64
- Command Description:
Cancel the ongoing connection process.
Events Generated
The host will send the CommandStatus Event to indicate whether the connect cancel process has started successfully. If the cancel completes, the GAP_ConnectingCancelled event will be returned.
GAP Events¶
GAP_DeviceInitDone¶
- Opcode:
0x0600
- Event Description:
This event is sent to indicate that the device is done initializing.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- devAddr:
The devices address.
- Size:
6 byte(s)
- Range:
- dataPktLen:
HC_LE_Data_Packet_Length
- Size:
2 byte(s)
- Range:
- numDataPkts:
HC_Total_Num_LE_Data_Packets
- Size:
1 byte(s)
- Range:
- IRK:
16 byte Identity Resolving Key (IRK). This is either a randomly generated key or the original key passed in the GAP_DeviceInit command.
- Size:
16 byte(s)
- Range:
- CSRK:
16 byte Connection Signature Resolving Key (CSRK). This is either a randomly generated key or the original key passed in the GAP_DeviceInit command.
- Size:
16 byte(s)
- Range:
GAP_LinkEstablished¶
- Opcode:
0x0605
- Event Description:
This message is sent when a connection is established with another device. On a Central device, this message is a result for a GAP Establish Link Request. On a Peripheral device, this message is received when a central device initiated a connection.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- Device Address Type:
Address type of the connected device.
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- Device Address:
Address of the connected device
- Size:
6 byte(s)
- Range:
Any 6-byte address
- connectionHandle:
Handle of the connection. This will be used to reference the connection in other “connection based” commands.
- Size:
2 byte(s)
- Range:
- connRole:
GAP role of the local device for this connection.
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAP_PROFILE_BROADCASTER
0x02
GAP_PROFILE_OBSERVER
0x04
GAP_PROFILE_PERIPHERAL
0x08
GAP_PROFILE_CENTRAL
- connInterval:
Connection interval used on this connection (* 1.25 ms)
- Size:
2 byte(s)
- Range:
- connLatency:
Connection latency used on this connection.
- Size:
2 byte(s)
- Range:
- connTimeout:
Connection supervision timeout (* 10 ms)
- Size:
2 byte(s)
- Range:
- clockAccuracy:
Clock accuracy (in ppm) of the connected device.
- Size:
1 byte(s)
- Range:
GAP_LinkTerminated¶
- Opcode:
0x0606
- Event Description:
This message is sent whenever a link is terminated.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- connectionHandle:
Connection Handle of terminated link
- Size:
2 byte(s)
- Range:
- reason:
Reason the link was terminated
- Size:
1 byte(s)
- Range:
See Status Table
GAP_LinkParamUpdate¶
- Opcode:
0x0607
- Event Description:
This message is sent whenever connection parameter update is completed
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
- connInterval:
New connection interval in use after the update (* 1.25 ms).
- Size:
2 byte(s)
- Range:
- connLatency:
New connection latency in use after the update
- Size:
2 byte(s)
- Range:
- connTimeout:
New connection supervision timeout in use after the update (* 10 ms)
- Size:
2 byte(s)
- Range:
GAP_SignatureUpdated¶
- Opcode:
0x0609
- Event Description:
This message is sent whenever sign counter is updated (incremented). This message will be generated when a new sign counter is received from a connected device or when this device increments its own sign counter.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- addrType:
Address type of the update
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- devAddr:
The device address of the sign counter that changed. It may be the local device or a connected device.
- Size:
6 byte(s)
- Range:
- signCounter:
The new sign counter value for the referenced device.
- Size:
4 byte(s)
- Range:
GAP_PasskeyNeeded¶
- Opcode:
0x060B
- Event Description:
This event is generated during the pairing process if a passkey is needed.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- deviceAddr:
Address of the pairing device.
- Size:
6 byte(s)
- Range:
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
- uiInputs:
Whether to ask for a passcode.
- Size:
1 byte(s)
- Range:
- uiOutputs:
Whether to display a passcode
- Size:
1 byte(s)
- Range:
- numComparison:
Numeric Comparison value if nonzero.
- Size:
4 byte(s)
- Range:
GAP_AuthenticationComplete¶
- Opcode:
0x060A
- Event Description:
This event is generated whenever the pairing process is completed (pass or fail).
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x01
SMP_PAIRING_FAILED_PASSKEY_ENTRY_FAILED
0x02
SMP_PAIRING_FAILED_OOB_NOT_AVAIL
0x03
SMP_PAIRING_FAILED_AUTH_REQ
0x04
SMP_PAIRING_FAILED_CONFIRM_VALUE
0x05
SMP_PAIRING_FAILED_NOT_SUPPORTED
0x06
SMP_PAIRING_FAILED_ENC_KEY_SIZE
0x07
SMP_PAIRING_FAILED_CMD_NOT_SUPPORTED
0x08
SMP_PAIRING_FAILED_UNSPECIFIED
0x09
SMP_PAIRING_FAILED_REPEATED_ATTEMPTS
0x0A
SMP_PAIRING_FAILED_INVALID_PARAMETERS
0x0B
SMP_PAIRING_FAILED_DHKEY_CHECK_FAILED
0x0C
SMP_PAIRING_FAILED_NUM_COMPARISON_FAILED
0x0D
SMP_PAIRING_FAILED_BREDR_PAIR_IN_PROGRESS
0x0E
SMP_PAIRING_FAILED_CT_KEYDER_NOT_ALLOWED
0x0F
SMP_PAIRING_FAILED_KEY_REJECTED
0x10
Command Disallowed
0x11
Unsupported Feature Or Parameter Value
0x12
Invalid HCI Command Parameters
0x17
bleTimeout
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
- authState:
Pairing / bonding state of the link
- Size:
1 byte(s)
- Range:
Value
Description
0x01
Bonding
0x04
MITM
0x08
SC
0x10
KP
0x20
CT2
- securityInfo:
Whether or not the securityInfo parameters are enabled in this event
- Size:
1 byte(s)
- Range:
Value
Description
0
Disable
1
Enable
- securityInfo.LTKsize:
Encryption key size
- Size:
1 byte(s)
- Range:
- securityInfo.LTK:
Long Term Key
- Size:
16 byte(s)
- Range:
- securityInfo.DIV:
DIV for this LTK
- Size:
2 byte(s)
- Range:
- securityInfo.rand:
Random number for this LTK
- Size:
8 byte(s)
- Range:
- devSecInfo:
Whether or not the devSecInfo parameters are enabled in this event.
- Size:
1 byte(s)
- Range:
Value
Description
0
Disable
1
Enable
- devSecInfo.LTKsize:
Encryption key size
- Size:
1 byte(s)
- Range:
- devSecInfo.LTK:
Long term key
- Size:
16 byte(s)
- Range:
- devSecInfo.DIV:
Div for this LTK
- Size:
2 byte(s)
- Range:
- devSecInfo.rand:
Random number for this LTK
- Size:
8 byte(s)
- Range:
- identityInfo:
Whether the identityInfo parameters are enabled in this event.
- Size:
1 byte(s)
- Range:
Value
Description
0
Disable
1
Enable
- identityInfo.IRK:
Identity Resolving Key used to resolve private resolvable addresses.
- Size:
16 byte(s)
- Range:
- identityInfo.BD_ADDR:
The connected devices Public Address.
- Size:
6 byte(s)
- Range:
- identityInfo.addrType:
The connected device’s address type
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- signingInfo:
Whether the signingInfo parameters are enabled in this event.
- Size:
1 byte(s)
- Range:
Value
Description
0
Disable
1
Enable
- signingInfo.CSRK:
Connected Signature Resolving Key
- Size:
16 byte(s)
- Range:
- signingInfo.signCounter:
The connected devices current sign counter
- Size:
4 byte(s)
- Range:
GAP_SlaveRequestedSecurity¶
- Opcode:
0x060C
- Event Description:
This message is generated when the master device receives an SM Slave Request from the connected slave device.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
- deviceAddr:
The connected devices address.
- Size:
6 byte(s)
- Range:
- authReq:
Requested pairing / bonding properties from the slave.
- Size:
1 byte(s)
- Range:
Value
Description
0x01
Bonding
0x04
MITM
0x08
SC
0x10
KP
0x20
CT2
GAP_BondComplete¶
- Opcode:
0x060E
- Event Description:
This message is sent when a bond is complete and the connection is encrypted.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x06
KEY_REQ_REJECTED
0x1A
KEY_REQ_UNSUPPORTED
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
GAP_PairingRequested¶
- Opcode:
0x060F
- Event Description:
This message is sent when a pairing request is received from a master..
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
- ioCap:
I/O Capabilities of the connected device
- Size:
1 byte(s)
- Range:
Value
Description
0x00
DisplayOnly
0x01
DisplayYesNo
0x02
KeyboardOnly
0x03
NoInputNoOutput
0x04
KeyboardDisplay
- oobDataFlag:
Wheter OOB data is enabled or not.
- Size:
1 byte(s)
- Range:
Value
Description
0
Disable
1
Enable
- authReq:
Type of pairing / bonding that is requested
- Size:
1 byte(s)
- Range:
Value
Description
0x01
Bonding
0x04
MITM
0x08
SC
0x10
KP
0x20
CT2
- maxEncKeySize:
Maximum encryption key size to supported
- Size:
1 byte(s)
- Range:
- keyDist:
Desired key distribution
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAPBOND_KEYDIST_SENCKEY
0x02
GAPBOND_KEYDIST_SIDKEY
0x04
GAPBOND_KEYDIST_SSIGN
0x08
GAPBOND_KEYDIST_SLINK
0x10
GAPBOND_KEYDIST_MENCKEY
0x20
GAPBOND_KEYDIST_MIDKEY
0x40
GAPBOND_KEYDIST_MSIGN
0x80
GAPBOND_KEYDIST_MLINK
GAP_ConnectingCancelled¶
- Opcode:
0x0615
- Event Description:
This event is sent when a connection has been canceled.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
GAP_ConnectionEventNotice¶
- Opcode:
0x0616
- Event Description:
This event is sent to when a connection handle has been registered for connection event notices after each connection event.
Event Parameters
- Status:
Status of Connection Event
- Size:
1 byte(s)
- Range:
Value
Description
0x00
GAP_CONN_EVT_STAT_SUCCESS
0x01
GAP_CONN_EVT_STAT_CRC_ERROR
0x02
GAP_CONN_EVT_STAT_MISSED
- handle:
Connection handle of connection event
- Size:
2 byte(s)
- Range:
0-0xFFFD
- channel:
BLE RF channel index of connection event
- Size:
1 byte(s)
- Range:
0-39
- phy:
PHY of connection event
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAP_CONN_EVT_PHY_1MBPS
0x02
GAP_CONN_EVT_PHY_2MBPS
0x04
GAP_CONN_EVT_PHY_CODED
- lastRssi:
RSSI of last packet received
- Size:
1 byte(s)
- Range:
-128 - 127
- packets:
Number of packets received for this connection event
- Size:
2 byte(s)
- Range:
0-0xFFFF
- errors:
Total number of CRC errors for the entire connection
- Size:
2 byte(s)
- Range:
0-0xFFFF
- nextTaskType:
Type of next BLE task
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAP_CONN_EVT_TASK_TYPE_ADV
0x02
GAP_CONN_EVT_TASK_TYPE_SCAN
0x04
GAP_CONN_EVT_TASK_TYPE_INIT
0x40
GAP_CONN_EVT_TASK_TYPE_SLAVE
0x80
GAP_CONN_EVT_TASK_TYPE_MASTER
0xFF
GAP_CONN_EVT_TASK_TYPE_NONE
- nextTaskTime:
Time to next BLE task (in us). Note that the actual time will be shorter due to latency from sending this event over the transport layer. If 0xFFFFFFFF, there is no next RF command scheduled.
- Size:
4 byte(s)
- Range:
0-0xFFFFFFFF
- eventCounter:
Event Counter
- Size:
2 byte(s)
- Range:
0-0xFFFF
- timeStamp:
The anchor point of the current event.
- Size:
4 byte(s)
- Range:
0-0xFFFFFFFF
- eventType:
Event Type registerted to
- Size:
1 byte(s)
- Range:
Value
Description
0x01
GAP_CB_CONN_ESTABLISHED
0x02
GAP_CB_PHY_UPDATE
0x03
GAP_CB_CONN_ESTABLISHED | GAP_CB_PHY_UPDATE
0xFF
GAP_CB_CONN_EVENT_ALL
SM_GetEccKeys¶
- Opcode:
0x0610
- Event Description:
This message is sent when ECC Keys have been generated by the BLE Stack.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- privateKey:
Private key to use
- Size:
32 byte(s)
- Range:
- publicKeyX:
Public Key X-coordinate.
- Size:
32 byte(s)
- Range:
- publicKeyY:
Public Key Y-coordinate.
- Size:
32 byte(s)
- Range:
SM_GetDHKey¶
- Opcode:
0x0611
- Event Description:
This message is sent when Diffie-Hellman Key have been generated by the BLE Stack.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- DHKey:
Diffie-Hellman Key
- Size:
32 byte(s)
- Range:
GAP_LinkParamUpdateRequest¶
- Opcode:
0x0612
- Event Description:
This message is sent whenever connection parameter update is completed.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
- minConnInterval:
Minimum desired connection interval (n * 1.25 ms)
- Size:
2 byte(s)
- Range:
- maxConnInterval:
Maximum desired connection interval (n * 1.25 ms)
- Size:
2 byte(s)
- Range:
- connLatency:
Desired connection latency
- Size:
2 byte(s)
- Range:
- connTimeout:
Desired connection timeout (n * 10 ms)
- Size:
2 byte(s)
- Range:
- signalIdentifier:
L2CAP signal identifier. 0 for LL Connection Parameter Request
- Size:
1 byte(s)
- Range:
GAP_Advertiser/Scanner_Event¶
- Opcode:
0x0613
- Event Description:
Gap Advertising / Scanning Event.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- event:
- Size:
4 byte(s)
- Range:
Value
Description
0x00000001
GAP_EVT_ADV_START_AFTER_ENABLE
0x00000002
GAP_EVT_ADV_END_AFTER_DISABLE
0x00000004
GAP_EVT_ADV_START
0x00000008
GAP_EVT_ADV_END
0x00000010
GAP_EVT_ADV_SET_TERMINATED
0x00000020
GAP_EVT_SCAN_REQ_RECEIVED
0x00000040
GAP_EVT_ADV_DATA_TRUNCATED
0x00010000
GAP_EVT_SCAN_ENABLED
0x00020000
GAP_EVT_SCAN_DISABLED
0x00040000
GAP_EVT_SCAN_PRD_ENDED
0x00080000
GAP_EVT_SCAN_DUR_ENDED
0x00100000
GAP_EVT_SCAN_INT_ENDED
0x00200000
GAP_EVT_SCAN_WND_ENDED
0x00400000
GAP_EVT_ADV_REPORT
0x00800000
GAP_EVT_ADV_REPORT_FULL
0x01000000
GAP_EVT_PRD_ADV_SYNC_ESTABLISHED
0x02000000
GAP_EVT_PRD_ADV_REPORT
0x04000000
GAP_EVT_PRD_ADV_SYNC_LOST
0x80000000
GAP_EVT_INSUFFICIENT_MEMORY
- advertising handle:
- Condition:
( eventID<0x00010000)
- Size:
1 byte(s)
- Range:
- data length:
- Condition:
( eventID<0x00010000)
- Size:
1 byte(s)
- Range:
- connection handle:
- Condition:
( eventID==0x00000010)
- Size:
2 byte(s)
- Range:
- num of completed adv events:
- Condition:
( eventID==0x00000010)
- Size:
1 byte(s)
- Range:
- scanner address type:
- Condition:
( eventID==0x00000020)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- scanner address:
- Condition:
( eventID==0x00000020)
- Size:
6 byte(s)
- Range:
- channel:
- Condition:
( eventID==0x00000020)
- Size:
1 byte(s)
- Range:
- RSSI:
- Condition:
( eventID==0x00000020)
- Size:
1 byte(s)
- Range:
Value
Description
127
Invalid RSSI
- truncated adv data size:
- Condition:
( eventID==0x00000040)
- Size:
1 byte(s)
- Range:
- attempted adv data size:
- Condition:
( eventID==0x00000040)
- Size:
2 byte(s)
- Range:
- reason:
- Condition:
( eventID==0x00020000)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCAN_END_REASON_USR_REQ
0x01
SCAN_END_REASON_DUR_EXP
- number of reports:
- Condition:
( eventID==0x00020000)
- Size:
1 byte(s)
- Range:
- evtType:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
Value
Description
0x0000
AE Undir NC/NS | Data Complete
0x0001
AE Undir Conn | Data Complete
0x0002
AE Undir Scan | Data Complete
0x0003
Invalid Event Type!
0x0004
AE Dir NC/NS | Data Complete
0x0005
AE Dir Conn | Data Complete
0x0006
AE Dir Scan | Data Complete
0x0007
Invalid Event Type!
0x0008
Invalid Event Type!
0x0009
Invalid Event Type!
0x000A
AE Scan Rsp to AE Undir Scan | Data Complete
0x000B
Invalid Event Type!
0x000C
Invalid Event Type!
0x000D
Invalid Event Type!
0x000E
AE Scan Rsp to AE Dir Scan | Data Complete
0x000F
Invalid Event Type!
0x0010
Legacy ADV_NONCONN | Data Complete
0x0011
Invalid Event Type!
0x0012
Legacy ADV_SCAN | Data Complete
0x0013
Legacy ADV_IND | Data Complete
0x0014
Invalid Event Type!
0x0015
Legacy ADV_DIR | Data Complete
0x0016
Invalid Event Type!
0x0017
Invalid Event Type!
0x0018
Invalid Event Type!
0x0019
Invalid Event Type!
0x001A
Legacy SCAN_RSP to ADV_SCAN | Data Complete
0x001B
Legacy SCAN_RSP to ADV_IND | Data Complete
0x001C
Invalid Event Type!
0x001D
Invalid Event Type!
0x001E
Invalid Event Type!
0x001F
Invalid Event Type!
0x0020
AE Undir NC/NS | Data Incomplete, More to Come
0x0021
AE Undir Conn | Data Incomplete, More to Come
0x0022
AE Undir Scan | Data Incomplete, More to Come
0x0023
Invalid Event Type!
0x0024
AE Dir NC/NS | Data Incomplete, More to Come
0x0025
AE Dir Conn | Data Incomplete, More to Come
0x0026
AE Dir Scan | Data Incomplete, More to Come
0x0027
Invalid Event Type!
0x0028
Invalid Event Type!
0x0029
Invalid Event Type!
0x002A
AE Scan Rsp to AE Undir Scan | Data Incomplete, More to Come
0x002B
Invalid Event Type!
0x002C
Invalid Event Type!
0x002D
Invalid Event Type!
0x002E
AE Scan Rsp to AE Dir Scan | Data Incomplete, More to Come
0x002F
Invalid Event Type!
0x0030
Legacy ADV_NONCONN | Data Incomplete, More to Come
0x0031
Invalid Event Type!
0x0032
Legacy ADV_SCAN | Data Incomplete, More to Come
0x0033
Legacy ADV_IND | Data Incomplete, More to Come
0x0034
Invalid Event Type!
0x0035
Legacy ADV_DIR | Data Incomplete, More to Come
0x0036
Invalid Event Type!
0x0037
Invalid Event Type!
0x0038
Invalid Event Type!
0x0039
Invalid Event Type!
0x003A
Legacy SCAN_RSP to ADV_SCAN | Data Incomplete, More to Come
0x003B
Legacy SCAN_RSP to ADV_IND | Data Incomplete, More to Come
0x003C
Invalid Event Type!
0x003D
Invalid Event Type!
0x003E
Invalid Event Type!
0x003F
Invalid Event Type!
0x0040
AE Undir NC/NS | Data Incomplete, Truncated
0x0041
AE Undir Conn | Data Incomplete, Truncated
0x0042
AE Undir Scan | Data Incomplete, Truncated
0x0043
Invalid Event Type!
0x0044
AE Dir NC/NS | Data Incomplete, Truncated
0x0045
AE Dir Conn | Data Incomplete, Truncated
0x0046
AE Dir Scan | Data Incomplete, Truncated
0x0047
Invalid Event Type!
0x0048
Invalid Event Type!
0x0049
Invalid Event Type!
0x004A
AE Scan Rsp to AE Undir Scan | Data Incomplete, Truncated
0x004B
Invalid Event Type!
0x004C
Invalid Event Type!
0x004D
Invalid Event Type!
0x004E
AE Scan Rsp to AE Dir Scan | Data Incomplete, Truncated
0x004F
Invalid Event Type!
0x0050
Legacy ADV_NONCONN | Data Incomplete, Truncated
0x0051
Invalid Event Type!
0x0052
Legacy ADV_SCAN | Data Incomplete, Truncated
0x0053
Legacy ADV_IND | Data Incomplete, Truncated
0x0054
Invalid Event Type!
0x0055
Legacy ADV_DIR | Data Incomplete, Truncated
0x0056
Invalid Event Type!
0x0057
Invalid Event Type!
0x0058
Invalid Event Type!
0x0059
Invalid Event Type!
0x005A
Legacy SCAN_RSP to ADV_SCAN | Data Incomplete, Truncated
0x005B
Legacy SCAN_RSP to ADV_IND | Data Incomplete, Truncated
0x005C
Invalid Event Type!
0x005D
Invalid Event Type!
0x005E
Invalid Event Type!
0x005F
Invalid Event Type!
0x0060
AE Undir NC/NS | Reserved!
0x0061
AE Undir Conn | Reserved!
0x0062
AE Undir Scan | Reserved!
0x0063
Invalid Event Type!
0x0064
AE Dir NC/NS | Reserved!
0x0065
AE Dir Conn | Reserved!
0x0066
AE Dir Scan | Reserved!
0x0067
Invalid Event Type!
0x0068
Invalid Event Type!
0x0069
Invalid Event Type!
0x006A
AE Scan Rsp to AE Undir Scan | Reserved!
0x006B
Invalid Event Type!
0x006C
Invalid Event Type!
0x006D
Invalid Event Type!
0x006E
AE Scan Rsp to AE Dir Scan | Reserved!
0x006F
Invalid Event Type!
0x0070
Legacy ADV_NONCONN | Reserved!
0x0071
Invalid Event Type!
0x0072
Legacy ADV_SCAN | Reserved!
0x0073
Legacy ADV_IND | Reserved!
0x0074
Invalid Event Type!
0x0075
Legacy ADV_DIR | Reserved!
0x0076
Invalid Event Type!
0x0077
Invalid Event Type!
0x0078
Invalid Event Type!
0x0079
Invalid Event Type!
0x007A
Legacy SCAN_RSP to ADV_SCAN | Reserved!
0x007B
Legacy SCAN_RSP to ADV_IND | Reserved!
0x007C
Invalid Event Type!
0x007D
Invalid Event Type!
0x007E
Invalid Event Type!
0x007F
Invalid Event Type!
0x0080
AE Undir NC/NS | Data Complete (Previous Truncated)
0x0081
AE Undir Conn | Data Complete (Previous Truncated)
0x0082
AE Undir Scan | Data Complete (Previous Truncated)
0x0083
Invalid Event Type!
0x0084
AE Dir NC/NS | Data Complete (Previous Truncated)
0x0085
AE Dir Conn | Data Complete (Previous Truncated)
0x0086
AE Dir Scan | Data Complete (Previous Truncated)
0x0087
Invalid Event Type!
0x0088
Invalid Event Type!
0x0089
Invalid Event Type!
0x008A
AE Scan Rsp to AE Undir Scan | Data Complete (Previous Truncated)
0x008B
Invalid Event Type!
0x008C
Invalid Event Type!
0x008D
Invalid Event Type!
0x008E
AE Scan Rsp to AE Dir Scan | Data Complete (Previous Truncated)
0x008F
Invalid Event Type!
0x0090
Legacy ADV_NONCONN | Data Complete (Previous Truncated)
0x0091
Invalid Event Type!
0x0092
Legacy ADV_SCAN | Data Complete (Previous Truncated)
0x0093
Legacy ADV_IND | Data Complete (Previous Truncated)
0x0094
Invalid Event Type!
0x0095
Legacy ADV_DIR | Data Complete (Previous Truncated)
0x0096
Invalid Event Type!
0x0097
Invalid Event Type!
0x0098
Invalid Event Type!
0x0099
Invalid Event Type!
0x009A
Legacy SCAN_RSP to ADV_SCAN | Data Complete (Previous Truncated)
0x009B
Legacy SCAN_RSP to ADV_IND | Data Complete (Previous Truncated)
0x009C
Invalid Event Type!
0x009D
Invalid Event Type!
0x009E
Invalid Event Type!
0x009F
Invalid Event Type!
0x00A0
AE Undir NC/NS | Data Incomplete, More to Come (Previous Truncated)
0x00A1
AE Undir Conn | Data Incomplete, More to Come (Previous Truncated)
0x00A2
AE Undir Scan | Data Incomplete, More to Come (Previous Truncated)
0x00A3
Invalid Event Type!
0x00A4
AE Dir NC/NS | Data Incomplete, More to Come (Previous Truncated)
0x00A5
AE Dir Conn | Data Incomplete, More to Come (Previous Truncated)
0x00A6
AE Dir Scan | Data Incomplete, More to Come (Previous Truncated)
0x00A7
Invalid Event Type!
0x00A8
Invalid Event Type!
0x00A9
Invalid Event Type!
0x00AA
AE Scan Rsp to AE Undir Scan | Data Incomplete, More to Come (Previous Truncated)
0x00AB
Invalid Event Type!
0x00AC
Invalid Event Type!
0x00AD
Invalid Event Type!
0x00AE
AE Scan Rsp to AE Dir Scan | Data Incomplete, More to Come (Previous Truncated)
0x00AF
Invalid Event Type!
0x00B0
Legacy ADV_NONCONN | Data Incomplete, More to Come (Previous Truncated)
0x00B1
Invalid Event Type!
0x00B2
Legacy ADV_SCAN | Data Incomplete, More to Come (Previous Truncated)
0x00B3
Legacy ADV_IND | Data Incomplete, More to Come (Previous Truncated)
0x00B4
Invalid Event Type!
0x00B5
Legacy ADV_DIR | Data Incomplete, More to Come (Previous Truncated)
0x00B6
Invalid Event Type!
0x00B7
Invalid Event Type!
0x00B8
Invalid Event Type!
0x00B9
Invalid Event Type!
0x00BA
Legacy SCAN_RSP to ADV_SCAN | Data Incomplete, More to Come (Previous Truncated)
0x00BB
Legacy SCAN_RSP to ADV_IND | Data Incomplete, More to Come (Previous Truncated)
0x00BC
Invalid Event Type!
0x00BD
Invalid Event Type!
0x00BE
Invalid Event Type!
0x00BF
Invalid Event Type!
0x00C0
Invalid Data Status!
0x00C1
Invalid Data Status!
0x00C2
Invalid Data Status!
0x00C3
Invalid Event Type!
0x00C4
Invalid Data Status!
0x00C5
Invalid Data Status!
0x00C6
Invalid Data Status!
0x00C7
Invalid Event Type!
0x00C8
Invalid Event Type!
0x00C9
Invalid Event Type!
0x00CA
Invalid Data Status!
0x00CB
Invalid Event Type!
0x00CC
Invalid Event Type!
0x00CD
Invalid Event Type!
0x00CE
Invalid Data Status!
0x00CF
Invalid Event Type!
0x00D0
Invalid Data Status!
0x00D1
Invalid Event Type!
0x00D2
Invalid Data Status!
0x00D3
Invalid Data Status!
0x00D4
Invalid Event Type!
0x00D5
Invalid Data Status!
0x00D6
Invalid Event Type!
0x00D7
Invalid Event Type!
0x00D8
Invalid Event Type!
0x00D9
Invalid Event Type!
0x00DA
Invalid Data Status!
0x00DB
Invalid Data Status!
0x00DC
Invalid Event Type!
0x00DD
Invalid Event Type!
0x00DE
Invalid Event Type!
0x00DF
Invalid Event Type!
0x00E0
Invalid Data Status!
0x00E1
Invalid Data Status!
0x00E2
Invalid Data Status!
0x00E3
Invalid Event Type!
0x00E4
Invalid Data Status!
0x00E5
Invalid Data Status!
0x00E6
Invalid Data Status!
0x00E7
Invalid Event Type!
0x00E8
Invalid Event Type!
0x00E9
Invalid Event Type!
0x00EA
Invalid Data Status!
0x00EB
Invalid Event Type!
0x00EC
Invalid Event Type!
0x00ED
Invalid Event Type!
0x00EE
Invalid Data Status!
0x00EF
Invalid Event Type!
0x00F0
Invalid Data Status!
0x00F1
Invalid Event Type!
0x00F2
Invalid Data Status!
0x00F3
Invalid Data Status!
0x00F4
Invalid Event Type!
0x00F5
Invalid Data Status!
0x00F6
Invalid Event Type!
0x00F7
Invalid Event Type!
0x00F8
Invalid Event Type!
0x00F9
Invalid Event Type!
0x00FA
Invalid Data Status!
0x00FB
Invalid Data Status!
0x00FC
Invalid Event Type!
0x00FD
Invalid Event Type!
0x00FE
Invalid Event Type!
0x00FF
Invalid Event Type!
- addrType:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- address:
- Condition:
( eventID==0x00400000)
- Size:
6 byte(s)
- Range:
- primPhy:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCANNED_PHY_NONE
0x01
SCANNED_PHY_1M
0x02
SCANNED_PHY_2M
0x03
SCANNED_PHY_CODED
- secPhy:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SCANNED_PHY_NONE
0x01
SCANNED_PHY_1M
0x02
SCANNED_PHY_2M
0x03
SCANNED_PHY_CODED
- advSid:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
- txPower:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
- rssi:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
- directAddrType:
- Condition:
( eventID==0x00400000)
- Size:
1 byte(s)
- Range:
Value
Description
0x00
ADDRTYPE_PUBLIC
0x01
ADDRTYPE_RANDOM
0x02
ADDRTYPE_PUBLIC_ID
0x03
ADDRTYPE_RANDOM_ID
0xFE
ADDRTYPE_RANDOM_NR
0xFF
ADDRTYPE_NONE
- directAddr:
- Condition:
( eventID==0x00400000)
- Size:
6 byte(s)
- Range:
- periodicAdvInt:
- Condition:
( eventID==0x00400000)
- Size:
2 byte(s)
- Range:
- dataLen:
- Condition:
( eventID==0x00400000)
- Size:
2 byte(s)
- Range:
- data:
- Condition:
( eventID==0x00400000)
- Size:
DataLength byte(s)
- Range:
GAP_BondLost¶
- Opcode:
0x0617
- Event Description:
This message is generated when bond has been removed on peer.
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
- connectionHandle:
Connection Handle of link
- Size:
2 byte(s)
- Range:
Any 2 byte value
- deviceAddr:
The connected devices address.
- Size:
6 byte(s)
- Range:
GAPAdv_SetPeriodicAdvParams¶
- Opcode:
0x0619
- Event Description:
This event is sent when creating periodic advertising set
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
GAPAdv_SetPeriodicAdvData¶
- Opcode:
0x061A
- Event Description:
This event is sent when creating periodic advertising set
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
GAPAdv_SetPeriodicAdvEnable¶
- Opcode:
0x061B
- Event Description:
This event is sent when enabling periodic advertising set
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
Value
Description
0x00
SUCCESS
0x12
bleIncorrectMode
0x02
INVALIDPARAMETER
GAP_PeriodicAdvSyncEstablishEvent¶
- Opcode:
0x061C
- Event Description:
The scanner was received the first periodic advertisong packet from an advertiser
Event Parameters
- BLEEventCode:
- Size:
1 byte(s)
- Range:
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
- SyncHandle:
Handle identifying the periodic advertising train
- Size:
2 byte(s)
- Range:
- AdvSID:
Value of the Advertising SID
- Size:
1 byte(s)
- Range:
- PHY:
Advertiser PHY
- Size:
1 byte(s)
- Range:
- Interval:
Periodic advertising interval
- Size:
2 byte(s)
- Range:
- ClockAccuracy:
Accuracy of the periodic advertiser’s clock
- Size:
1 byte(s)
- Range:
- AddressType:
Advertiser address type
- Size:
1 byte(s)
- Range:
- Address:
Advertiser address
- Size:
6 byte(s)
- Range:
GAP_PeriodicAdvReportEvent¶
- Opcode:
0x061D
- Event Description:
Periodic Advertising Report
Event Parameters
- SyncHandle:
Handle identifying the periodic advertising train
- Size:
2 byte(s)
- Range:
- TxPower:
Tx Power information (Range: -127 to +20)
- Size:
1 byte(s)
- Range:
- RSSI:
RSSI value for the received packet (Range: -127 to +20). If the packet contains CTE, this value is not available
- Size:
1 byte(s)
- Range:
- cteType:
Constant Tone Extension type
- Size:
1 byte(s)
- Range:
- DataStatus:
Data status
- Size:
1 byte(s)
- Range:
- dataLength:
Advertiser data length
- Size:
1 byte(s)
- Range:
- Data:
Data received from a Periodic Advertising packet
- Size:
length byte(s)
- Range:
GAP_PeriodicAdvSyncLostEvent¶
- Opcode:
0x061E
- Event Description:
Periodic Advertising - Sync Lost Event
Event Parameters
- SyncHandle:
- Size:
2 byte(s)
- Range:
GAPScan_PeriodicAdvCreateSync¶
- Opcode:
0x061F
- Event Description:
Periodic Advertising - Create Sync command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
GAPScan_PeriodicAdvCreateSyncCancel¶
- Opcode:
0x0620
- Event Description:
Periodic Advertising - Create Sync cancel command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
GAPScan_PeriodicAdvTerminateSync¶
- Opcode:
0x0621
- Event Description:
Periodic Advertising - Terminate Sync command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
GAPScan_SetPeriodicAdvReceiveEnable¶
- Opcode:
0x0622
- Event Description:
Periodic Advertising - Receive enable command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
GAPScan_AddDeviceToPeriodicAdvList¶
- Opcode:
0x0623
- Event Description:
Periodic Advertising - Add device to advertisers list command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
GAPScan_RemoveDeviceFromPeriodicAdvList¶
- Opcode:
0x0624
- Event Description:
Periodic Advertising - Remove device to advertisers list command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
GAPScan_ReadPeriodicAdvListSize¶
- Opcode:
0x0625
- Event Description:
Periodic Advertising - Read advertisers list size command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table
- ListSize:
- Size:
1 byte(s)
- Range:
GAPScan_ClearPeriodicAdvList¶
- Opcode:
0x0626
- Event Description:
Periodic Advertising - Clear advertisers list command complete Event
Event Parameters
- Status:
- Size:
1 byte(s)
- Range:
See Status Table