Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]

Detailed Description

Macros

#define BLE_GATT_DEFAULT_MTU   (23)
 GATT Default MTU. More...
 
#define BLE_GATT_16_BIT_UUID_FORMAT   (0x01)
 GATT Identification for 16-bit UUID Format. More...
 
#define BLE_GATT_128_BIT_UUID_FORMAT   (0x02)
 GATT Identification for 128-bit UUID Format. More...
 
#define BLE_GATT_16_BIT_UUID_SIZE   (2)
 GATT 16-bit UUID Size. More...
 
#define BLE_GATT_128_BIT_UUID_SIZE   (16)
 GATT 128-bit UUID Size. More...
 
#define BLE_GATT_INVALID_ATTR_HDL_VAL   (0x0000)
 GATT Invalid Attribute Handle Value. More...
 
#define BLE_GATT_ATTR_HDL_START_RANGE   (0x0001)
 GATT Attribute Handle Start Range. More...
 
#define BLE_GATT_ATTR_HDL_END_RANGE   (0xFFFF)
 GATT Attribute Handle End Range. More...
 
#define BLE_GATTS_CLI_CNFG_NOTIFICATION   (0x0001)
 GATT Client Configuration values. Enable Notification. More...
 
#define BLE_GATTS_CLI_CNFG_INDICATION   (0x0002)
 GATT Client Configuration values. Enable Indication. More...
 
#define BLE_GATTS_CLI_CNFG_DEFAULT   (0x0000)
 GATT Client Configuration values. Default value or disable notification/indication. More...
 
#define BLE_GATTS_SER_CNFG_BROADCAST   (0x0001)
 GATT Server Configuration values. Enable broadcast. More...
 
#define BLE_GATTS_SER_CNFG_DEFAULT   (0x0000)
 GATT Server Configuration values. Default value. More...
 
#define BLE_GATTS_MAX_CB   (15)
 GATT Server Callback Number. More...
 
#define BLE_GATTS_OP_CHAR_VALUE_READ_REQ   (0x01)
 Characteristic Value Local Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_VALUE_WRITE_REQ   (0x02)
 Characteristic Value Local Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_VALUE_WRITE_WITHOUT_REQ   (0x03)
 Characteristic Value Local Write Without Response Operation. More...
 
#define BLE_GATTS_OP_CHAR_CLI_CNFG_READ_REQ   (0x11)
 Characteristic Client Configuration Local Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_CLI_CNFG_WRITE_REQ   (0x12)
 Characteristic Client Configuration Local Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_SER_CNFG_READ_REQ   (0x21)
 Characteristic Server Configuration Local Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_SER_CNFG_WRITE_REQ   (0x22)
 Characteristic Server Configuration Local Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_READ_REQ   (0x81)
 Characteristic Value Peer Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_WRITE_REQ   (0x82)
 Characteristic Value Peer Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_WRITE_CMD   (0x84)
 Characteristic Value Peer Write Command. More...
 
#define BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_READ_REQ   (0x91)
 Characteristic Client Configuration Peer Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_WRITE_REQ   (0x92)
 Characteristic Client Configuration Peer Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_SER_CNFG_READ_REQ   (0xA1)
 Characteristic Server Configuration Peer Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_SER_CNFG_WRITE_REQ   (0xA2)
 Characteristic Server Configuration Peer Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_USR_DESC_READ_REQ   (0xB1)
 Characteristic User Description Peer Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_USR_DESC_WRITE_REQ   (0xB2)
 Characteristic User Description Peer Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_HLD_DESC_READ_REQ   (0xF1)
 Characteristic Higher Layer Defined Descriptor Peer Read Operation. More...
 
#define BLE_GATTS_OP_CHAR_PEER_HLD_DESC_WRITE_REQ   (0xF2)
 Characteristic Higher Layer Defined Descriptor Peer Write Operation. More...
 
#define BLE_GATTS_OP_CHAR_REQ_AUTHOR   (0x08)
 Operation Required Authorization. More...
 
#define BLE_GATT_DB_READ   (0x01)
 Allow clients to read. More...
 
#define BLE_GATT_DB_WRITE   (0x02)
 Allow clients to write. More...
 
#define BLE_GATT_DB_WRITE_WITHOUT_RSP   (0x04)
 Allow clients to write without response. More...
 
#define BLE_GATT_DB_READ_WRITE   (BLE_GATT_DB_READ | BLE_GATT_DB_WRITE | BLE_GATT_DB_WRITE_WITHOUT_RSP)
 Allow clients to access of all. More...
 
#define BLE_GATT_DB_NO_AUXILIARY_PROPERTY   (0x00)
 No auxiliary properties. More...
 
#define BLE_GATT_DB_FIXED_LENGTH_PROPERTY   (0x01)
 Fixed length attribute value. More...
 
#define BLE_GATT_DB_AUTHORIZATION_PROPERTY   (0x02)
 Attributes requiring authorization. More...
 
#define BLE_GATT_DB_ATTR_DISABLED   (0x10)
 The attribute is disabled. If this value is set, the attribute cannot be found and accessed by a GATT Client. More...
 
#define BLE_GATT_DB_128_BIT_UUID_FORMAT   (0x20)
 Attribute with 128 bit UUID. More...
 
#define BLE_GATT_DB_PEER_SPECIFIC_VAL_PROPERTY   (0x40)
 Attribute managed by each GATT Client. More...
 
#define BLE_GATT_DB_CONST_ATTR_VAL_PROPERTY   (0x80)
 Fixed attribute value. More...
 
#define BLE_GATT_DB_SER_SECURITY_UNAUTH   (0x00000001)
 Unauthenticated pairing(Security Mode1 Security Level 2, Security Mode 2 Security Level 1). Unauthenticated pairing is required to access the service. More...
 
#define BLE_GATT_DB_SER_SECURITY_AUTH   (0x00000002)
 Authenticated pairing(Security Mode1 Security Level 3, Security Mode 2 Security Level 2). Authenticated pairing is required to access the service. More...
 
#define BLE_GATT_DB_SER_SECURITY_SECONN   (0x00000004)
 Authenticated LE secure connections that generates 16bytes LTK(Security Mode1 Security Level 4). Authenticated LE secure connections pairing that generates 16bytes LTK is required to access the service. If this bit is set, bit24-27 are ignored. More...
 
#define BLE_GATT_DB_SER_SECURITY_ENC   (0x00000010)
 Encryption. Encryption by the LTK exchanged in pairing is required to access. More...
 
#define BLE_GATT_DB_SER_NO_SECURITY_PROPERTY   (0x00000000)
 No Security(Security Mode1 Security Level 1). More...
 
#define BLE_GATT_DB_SER_ENC_KEY_SIZE_DONT_CARE   (0x00000000)
 7-byte or larger encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_7   (0x01000000)
 7-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_8   (0x02000000)
 8-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_9   (0x03000000)
 9-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_10   (0x04000000)
 10-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_11   (0x05000000)
 11-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_12   (0x06000000)
 12-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_13   (0x07000000)
 13-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_14   (0x08000000)
 14-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_15   (0x09000000)
 15-byte encryption key. More...
 
#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_16   (0x0A000000)
 16-byte encryption key. More...
 

Macro Definition Documentation

◆ BLE_GATT_DEFAULT_MTU

#define BLE_GATT_DEFAULT_MTU   (23)

GATT Default MTU.

◆ BLE_GATT_16_BIT_UUID_FORMAT

#define BLE_GATT_16_BIT_UUID_FORMAT   (0x01)

GATT Identification for 16-bit UUID Format.

◆ BLE_GATT_128_BIT_UUID_FORMAT

#define BLE_GATT_128_BIT_UUID_FORMAT   (0x02)

GATT Identification for 128-bit UUID Format.

◆ BLE_GATT_16_BIT_UUID_SIZE

#define BLE_GATT_16_BIT_UUID_SIZE   (2)

GATT 16-bit UUID Size.

◆ BLE_GATT_128_BIT_UUID_SIZE

#define BLE_GATT_128_BIT_UUID_SIZE   (16)

GATT 128-bit UUID Size.

◆ BLE_GATT_INVALID_ATTR_HDL_VAL

#define BLE_GATT_INVALID_ATTR_HDL_VAL   (0x0000)

GATT Invalid Attribute Handle Value.

◆ BLE_GATT_ATTR_HDL_START_RANGE

#define BLE_GATT_ATTR_HDL_START_RANGE   (0x0001)

GATT Attribute Handle Start Range.

◆ BLE_GATT_ATTR_HDL_END_RANGE

#define BLE_GATT_ATTR_HDL_END_RANGE   (0xFFFF)

GATT Attribute Handle End Range.

◆ BLE_GATTS_CLI_CNFG_NOTIFICATION

#define BLE_GATTS_CLI_CNFG_NOTIFICATION   (0x0001)

GATT Client Configuration values. Enable Notification.

◆ BLE_GATTS_CLI_CNFG_INDICATION

#define BLE_GATTS_CLI_CNFG_INDICATION   (0x0002)

GATT Client Configuration values. Enable Indication.

◆ BLE_GATTS_CLI_CNFG_DEFAULT

#define BLE_GATTS_CLI_CNFG_DEFAULT   (0x0000)

GATT Client Configuration values. Default value or disable notification/indication.

◆ BLE_GATTS_SER_CNFG_BROADCAST

#define BLE_GATTS_SER_CNFG_BROADCAST   (0x0001)

GATT Server Configuration values. Enable broadcast.

◆ BLE_GATTS_SER_CNFG_DEFAULT

#define BLE_GATTS_SER_CNFG_DEFAULT   (0x0000)

GATT Server Configuration values. Default value.

◆ BLE_GATTS_MAX_CB

#define BLE_GATTS_MAX_CB   (15)

GATT Server Callback Number.

◆ BLE_GATTS_OP_CHAR_VALUE_READ_REQ

#define BLE_GATTS_OP_CHAR_VALUE_READ_REQ   (0x01)

Characteristic Value Local Read Operation.

◆ BLE_GATTS_OP_CHAR_VALUE_WRITE_REQ

#define BLE_GATTS_OP_CHAR_VALUE_WRITE_REQ   (0x02)

Characteristic Value Local Write Operation.

◆ BLE_GATTS_OP_CHAR_VALUE_WRITE_WITHOUT_REQ

#define BLE_GATTS_OP_CHAR_VALUE_WRITE_WITHOUT_REQ   (0x03)

Characteristic Value Local Write Without Response Operation.

◆ BLE_GATTS_OP_CHAR_CLI_CNFG_READ_REQ

#define BLE_GATTS_OP_CHAR_CLI_CNFG_READ_REQ   (0x11)

Characteristic Client Configuration Local Read Operation.

◆ BLE_GATTS_OP_CHAR_CLI_CNFG_WRITE_REQ

#define BLE_GATTS_OP_CHAR_CLI_CNFG_WRITE_REQ   (0x12)

Characteristic Client Configuration Local Write Operation.

◆ BLE_GATTS_OP_CHAR_SER_CNFG_READ_REQ

#define BLE_GATTS_OP_CHAR_SER_CNFG_READ_REQ   (0x21)

Characteristic Server Configuration Local Read Operation.

◆ BLE_GATTS_OP_CHAR_SER_CNFG_WRITE_REQ

#define BLE_GATTS_OP_CHAR_SER_CNFG_WRITE_REQ   (0x22)

Characteristic Server Configuration Local Write Operation.

◆ BLE_GATTS_OP_CHAR_PEER_READ_REQ

#define BLE_GATTS_OP_CHAR_PEER_READ_REQ   (0x81)

Characteristic Value Peer Read Operation.

◆ BLE_GATTS_OP_CHAR_PEER_WRITE_REQ

#define BLE_GATTS_OP_CHAR_PEER_WRITE_REQ   (0x82)

Characteristic Value Peer Write Operation.

◆ BLE_GATTS_OP_CHAR_PEER_WRITE_CMD

#define BLE_GATTS_OP_CHAR_PEER_WRITE_CMD   (0x84)

Characteristic Value Peer Write Command.

◆ BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_READ_REQ

#define BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_READ_REQ   (0x91)

Characteristic Client Configuration Peer Read Operation.

◆ BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_WRITE_REQ

#define BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_WRITE_REQ   (0x92)

Characteristic Client Configuration Peer Write Operation.

◆ BLE_GATTS_OP_CHAR_PEER_SER_CNFG_READ_REQ

#define BLE_GATTS_OP_CHAR_PEER_SER_CNFG_READ_REQ   (0xA1)

Characteristic Server Configuration Peer Read Operation.

◆ BLE_GATTS_OP_CHAR_PEER_SER_CNFG_WRITE_REQ

#define BLE_GATTS_OP_CHAR_PEER_SER_CNFG_WRITE_REQ   (0xA2)

Characteristic Server Configuration Peer Write Operation.

◆ BLE_GATTS_OP_CHAR_PEER_USR_DESC_READ_REQ

#define BLE_GATTS_OP_CHAR_PEER_USR_DESC_READ_REQ   (0xB1)

Characteristic User Description Peer Read Operation.

◆ BLE_GATTS_OP_CHAR_PEER_USR_DESC_WRITE_REQ

#define BLE_GATTS_OP_CHAR_PEER_USR_DESC_WRITE_REQ   (0xB2)

Characteristic User Description Peer Write Operation.

◆ BLE_GATTS_OP_CHAR_PEER_HLD_DESC_READ_REQ

#define BLE_GATTS_OP_CHAR_PEER_HLD_DESC_READ_REQ   (0xF1)

Characteristic Higher Layer Defined Descriptor Peer Read Operation.

◆ BLE_GATTS_OP_CHAR_PEER_HLD_DESC_WRITE_REQ

#define BLE_GATTS_OP_CHAR_PEER_HLD_DESC_WRITE_REQ   (0xF2)

Characteristic Higher Layer Defined Descriptor Peer Write Operation.

◆ BLE_GATTS_OP_CHAR_REQ_AUTHOR

#define BLE_GATTS_OP_CHAR_REQ_AUTHOR   (0x08)

Operation Required Authorization.

◆ BLE_GATT_DB_READ

#define BLE_GATT_DB_READ   (0x01)

Allow clients to read.

◆ BLE_GATT_DB_WRITE

#define BLE_GATT_DB_WRITE   (0x02)

Allow clients to write.

◆ BLE_GATT_DB_WRITE_WITHOUT_RSP

#define BLE_GATT_DB_WRITE_WITHOUT_RSP   (0x04)

Allow clients to write without response.

◆ BLE_GATT_DB_READ_WRITE

#define BLE_GATT_DB_READ_WRITE   (BLE_GATT_DB_READ | BLE_GATT_DB_WRITE | BLE_GATT_DB_WRITE_WITHOUT_RSP)

Allow clients to access of all.

◆ BLE_GATT_DB_NO_AUXILIARY_PROPERTY

#define BLE_GATT_DB_NO_AUXILIARY_PROPERTY   (0x00)

No auxiliary properties.

◆ BLE_GATT_DB_FIXED_LENGTH_PROPERTY

#define BLE_GATT_DB_FIXED_LENGTH_PROPERTY   (0x01)

Fixed length attribute value.

◆ BLE_GATT_DB_AUTHORIZATION_PROPERTY

#define BLE_GATT_DB_AUTHORIZATION_PROPERTY   (0x02)

Attributes requiring authorization.

◆ BLE_GATT_DB_ATTR_DISABLED

#define BLE_GATT_DB_ATTR_DISABLED   (0x10)

The attribute is disabled. If this value is set, the attribute cannot be found and accessed by a GATT Client.

◆ BLE_GATT_DB_128_BIT_UUID_FORMAT

#define BLE_GATT_DB_128_BIT_UUID_FORMAT   (0x20)

Attribute with 128 bit UUID.

◆ BLE_GATT_DB_PEER_SPECIFIC_VAL_PROPERTY

#define BLE_GATT_DB_PEER_SPECIFIC_VAL_PROPERTY   (0x40)

Attribute managed by each GATT Client.

◆ BLE_GATT_DB_CONST_ATTR_VAL_PROPERTY

#define BLE_GATT_DB_CONST_ATTR_VAL_PROPERTY   (0x80)

Fixed attribute value.

◆ BLE_GATT_DB_SER_SECURITY_UNAUTH

#define BLE_GATT_DB_SER_SECURITY_UNAUTH   (0x00000001)

Unauthenticated pairing(Security Mode1 Security Level 2, Security Mode 2 Security Level 1). Unauthenticated pairing is required to access the service.

◆ BLE_GATT_DB_SER_SECURITY_AUTH

#define BLE_GATT_DB_SER_SECURITY_AUTH   (0x00000002)

Authenticated pairing(Security Mode1 Security Level 3, Security Mode 2 Security Level 2). Authenticated pairing is required to access the service.

◆ BLE_GATT_DB_SER_SECURITY_SECONN

#define BLE_GATT_DB_SER_SECURITY_SECONN   (0x00000004)

Authenticated LE secure connections that generates 16bytes LTK(Security Mode1 Security Level 4). Authenticated LE secure connections pairing that generates 16bytes LTK is required to access the service. If this bit is set, bit24-27 are ignored.

◆ BLE_GATT_DB_SER_SECURITY_ENC

#define BLE_GATT_DB_SER_SECURITY_ENC   (0x00000010)

Encryption. Encryption by the LTK exchanged in pairing is required to access.

◆ BLE_GATT_DB_SER_NO_SECURITY_PROPERTY

#define BLE_GATT_DB_SER_NO_SECURITY_PROPERTY   (0x00000000)

No Security(Security Mode1 Security Level 1).

◆ BLE_GATT_DB_SER_ENC_KEY_SIZE_DONT_CARE

#define BLE_GATT_DB_SER_ENC_KEY_SIZE_DONT_CARE   (0x00000000)

7-byte or larger encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_7

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_7   (0x01000000)

7-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_8

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_8   (0x02000000)

8-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_9

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_9   (0x03000000)

9-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_10

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_10   (0x04000000)

10-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_11

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_11   (0x05000000)

11-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_12

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_12   (0x06000000)

12-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_13

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_13   (0x07000000)

13-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_14

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_14   (0x08000000)

14-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_15

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_15   (0x09000000)

15-byte encryption key.

◆ BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_16

#define BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_16   (0x0A000000)

16-byte encryption key.