Service permissions. More...

+ Collaboration diagram for Service Permission:

Macros

#define BLE_GATTS_SRVC_SECONDARY_SET   (0x80)
 Secondary service set. More...
 
#define BLE_GATTS_SRVC_UUID_TYPE_SET(uuid_len)   ((uuid_len) << 5)
 Service UUID length set. More...
 
#define BLE_GATTS_SRVC_DISABLE   (0x10)
 Service disable. More...
 
#define BLE_GATTS_SRVC_PERM(sec_level)   (((sec_level) & SEC_LEVEL_MASK) << 2)
 Service permission authentication. More...
 
#define BLE_GATTS_SRVC_ENCRP_KEY_SIZE_16   (0x02)
 16 bytes service encryption key size . More...
 
#define BLE_GATTS_SRVC_MULTI_ENABLE   (0x01)
 Service is multi-instantiated. More...
 

Detailed Description

Service permissions.

7 6–5 4 3–2 1 0
SEC UUID_LEN DIS AUTH EKS MI

Bit [0] : Service is multi-instantiated (0 = not support; 1 = support)
Bit [1] : Encryption key size must be 16 bytes (0 = not need; 1 = need)
Bit [2-3]: Service permission (0 = NOAUTH; 1 = UNAUTH; 2 = AUTH; 3 = SEC_CON)
Bit [4] : Disable the service (0 = no; 1 = yes)
Bit [5-6]: UUID Length Type (0 = 16 bits; 2 = 128 bits)
Bit [7] : Secondary Service (0 = Primary Service; 1 = Secondary Service)

Macro Definition Documentation

◆ BLE_GATTS_SRVC_DISABLE

#define BLE_GATTS_SRVC_DISABLE   (0x10)

Service disable.

Definition at line 138 of file ble_gatts.h.

◆ BLE_GATTS_SRVC_ENCRP_KEY_SIZE_16

#define BLE_GATTS_SRVC_ENCRP_KEY_SIZE_16   (0x02)

16 bytes service encryption key size .

Definition at line 140 of file ble_gatts.h.

◆ BLE_GATTS_SRVC_MULTI_ENABLE

#define BLE_GATTS_SRVC_MULTI_ENABLE   (0x01)

Service is multi-instantiated.

Definition at line 141 of file ble_gatts.h.

◆ BLE_GATTS_SRVC_PERM

#define BLE_GATTS_SRVC_PERM (   sec_level)    (((sec_level) & SEC_LEVEL_MASK) << 2)

Service permission authentication.

See Attribute and Service Access Rights.

Definition at line 139 of file ble_gatts.h.

◆ BLE_GATTS_SRVC_SECONDARY_SET

#define BLE_GATTS_SRVC_SECONDARY_SET   (0x80)

Secondary service set.

Definition at line 136 of file ble_gatts.h.

◆ BLE_GATTS_SRVC_UUID_TYPE_SET

#define BLE_GATTS_SRVC_UUID_TYPE_SET (   uuid_len)    ((uuid_len) << 5)

Service UUID length set.

See Attribute and Service UUID Type.

Definition at line 137 of file ble_gatts.h.