| BlueNRG-1 ACI APIs and events callbacks

- Main Page
- Modules
- Classes
- Files

Macros
GATT

## Macros

#define | ATT_MTU (23)

## Well-Known UUIDs

#define | PRIMARY_SERVICE_UUID (0x2800)
#define | SECONDARY_SERVICE_UUID (0x2801)
#define | INCLUDE_SERVICE_UUID (0x2802)
#define | CHARACTERISTIC_UUID (0x2803)
#define | CHAR_EXTENDED_PROP_DESC_UUID (0x2900)
#define | CHAR_USER_DESC_UUID (0x2901)
#define | CHAR_CLIENT_CONFIG_DESC_UUID (0x2902)
#define | CHAR_SERVER_CONFIG_DESC_UUID (0x2903)
#define | CHAR_FORMAT_DESC_UUID (0x2904)
#define | CHAR_AGGR_FMT_DESC_UUID (0x2905)
#define | GATT_SERVICE_UUID (0x1801)
#define | GAP_SERVICE_UUID (0x1800)
#define | SERVICE_CHANGED_UUID (0x2A05)

## Access permissions

Access permissions for an attribute
#define | ATTR_NO_ACCESS (0x00)
#define | ATTR_ACCESS_READ_ONLY (0x01)
#define | ATTR_ACCESS_WRITE_REQ_ONLY (0x02)
#define | ATTR_ACCESS_READ_WRITE (0x03)
#define | ATTR_ACCESS_WRITE_WITHOUT_RESPONSE (0x04)
#define | ATTR_ACCESS_SIGNED_WRITE_ALLOWED (0x08)
#define | ATTR_ACCESS_WRITE_ANY (0x0E)

## Characteristic properties.

#define | CHAR_PROP_BROADCAST (0x01)
#define | CHAR_PROP_READ (0x02)
#define | CHAR_PROP_WRITE_WITHOUT_RESP (0x04)
#define | CHAR_PROP_WRITE (0x08)
#define | CHAR_PROP_NOTIFY (0x10)
#define | CHAR_PROP_INDICATE (0x20)
#define | CHAR_PROP_SIGNED_WRITE (0x40)
#define | CHAR_PROP_EXT (0x80)

## Security permissions for an attribute.

#define | ATTR_PERMISSION_NONE (0x00)
#define | ATTR_PERMISSION_AUTHEN_READ (0x01)
#define | ATTR_PERMISSION_AUTHOR_READ (0x02)
#define | ATTR_PERMISSION_ENCRY_READ (0x04)
#define | ATTR_PERMISSION_AUTHEN_WRITE (0x08)
#define | ATTR_PERMISSION_AUTHOR_WRITE (0x10)
#define | ATTR_PERMISSION_ENCRY_WRITE (0x20)

## Type of UUID (16 bit or 128 bit).

#define | UUID_TYPE_16 (0x01)
#define | UUID_TYPE_128 (0x02)

## Type of service (primary or secondary)

#define | PRIMARY_SERVICE (0x01)
#define | SECONDARY_SERVICE (0x02)

## Gatt Event Mask

Type of event generated by GATT server
#define | GATT_DONT_NOTIFY_EVENTS (0x00)
#define | GATT_NOTIFY_ATTRIBUTE_WRITE (0x01)
#define | GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP (0x02)
#define | GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP (0x04)

## Type of characteristic length

See aci_gatt_add_char()
#define | CHAR_VALUE_LEN_CONSTANT (0x00)
#define | CHAR_VALUE_LEN_VARIABLE (0x01)

## Encryption key size

#define | MIN_ENCRY_KEY_SIZE (7)
#define | MAX_ENCRY_KEY_SIZE (0x10)

## Characteristic Presentation Format

| charactFormat
typedef | PACKED (struct) _charactFormat

## Format

#define | FORMAT_UINT8 0x04
#define | FORMAT_UINT16 0x06
#define | FORMAT_SINT16 0x0E
#define | FORMAT_SINT24 0x0F

## Unit

#define | UNIT_UNITLESS 0x2700
#define | UNIT_TEMP_CELSIUS 0x272F
#define | UNIT_PRESSURE_BAR 0x2780

## Detailed Description

## Macro Definition Documentation

#define ATT_MTU (23)

ATT MTU size

Definition at line 224 of file bluenrg1_gatt_server.h.

#define ATTR_ACCESS_READ_ONLY (0x01)

Definition at line 61 of file bluenrg1_gatt_server.h.

#define ATTR_ACCESS_READ_WRITE (0x03)

Definition at line 63 of file bluenrg1_gatt_server.h.

#define ATTR_ACCESS_SIGNED_WRITE_ALLOWED (0x08)

Definition at line 65 of file bluenrg1_gatt_server.h.

#define ATTR_ACCESS_WRITE_ANY (0x0E)

Allows all write procedures

Definition at line 69 of file bluenrg1_gatt_server.h.

#define ATTR_ACCESS_WRITE_REQ_ONLY (0x02)

Definition at line 62 of file bluenrg1_gatt_server.h.

#define ATTR_ACCESS_WRITE_WITHOUT_RESPONSE (0x04)

Definition at line 64 of file bluenrg1_gatt_server.h.

#define ATTR_NO_ACCESS (0x00)

Definition at line 60 of file bluenrg1_gatt_server.h.

#define ATTR_PERMISSION_AUTHEN_READ (0x01)

Need authentication to read

Definition at line 98 of file bluenrg1_gatt_server.h.

#define ATTR_PERMISSION_AUTHEN_WRITE (0x08)

Need authentication to write

Definition at line 101 of file bluenrg1_gatt_server.h.

#define ATTR_PERMISSION_AUTHOR_READ (0x02)

Need authorization to read

Definition at line 99 of file bluenrg1_gatt_server.h.

#define ATTR_PERMISSION_AUTHOR_WRITE (0x10)

Need authorization to write

Definition at line 102 of file bluenrg1_gatt_server.h.

#define ATTR_PERMISSION_ENCRY_READ (0x04)

Link must be encrypted to read

Definition at line 100 of file bluenrg1_gatt_server.h.

#define ATTR_PERMISSION_ENCRY_WRITE (0x20)

Link must be encrypted for write

Definition at line 103 of file bluenrg1_gatt_server.h.

#define ATTR_PERMISSION_NONE (0x00)

No security.

Definition at line 97 of file bluenrg1_gatt_server.h.

#define CHAR_AGGR_FMT_DESC_UUID (0x2905)

Definition at line 46 of file bluenrg1_gatt_server.h.

#define CHAR_CLIENT_CONFIG_DESC_UUID (0x2902)

Definition at line 43 of file bluenrg1_gatt_server.h.

#define CHAR_EXTENDED_PROP_DESC_UUID (0x2900)

Definition at line 41 of file bluenrg1_gatt_server.h.

#define CHAR_FORMAT_DESC_UUID (0x2904)

Definition at line 45 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_BROADCAST (0x01)

Definition at line 79 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_EXT (0x80)

Definition at line 86 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_INDICATE (0x20)

Definition at line 84 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_NOTIFY (0x10)

Definition at line 83 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_READ (0x02)

Definition at line 80 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_SIGNED_WRITE (0x40)

Definition at line 85 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_WRITE (0x08)

Definition at line 82 of file bluenrg1_gatt_server.h.

#define CHAR_PROP_WRITE_WITHOUT_RESP (0x04)

Definition at line 81 of file bluenrg1_gatt_server.h.

#define CHAR_SERVER_CONFIG_DESC_UUID (0x2903)

Definition at line 44 of file bluenrg1_gatt_server.h.

#define CHAR_USER_DESC_UUID (0x2901)

Definition at line 42 of file bluenrg1_gatt_server.h.

#define CHAR_VALUE_LEN_CONSTANT (0x00)

Definition at line 157 of file bluenrg1_gatt_server.h.

#define CHAR_VALUE_LEN_VARIABLE (0x01)

Definition at line 158 of file bluenrg1_gatt_server.h.

#define CHARACTERISTIC_UUID (0x2803)

Definition at line 40 of file bluenrg1_gatt_server.h.

#define FORMAT_SINT16 0x0E

Definition at line 203 of file bluenrg1_gatt_server.h.

#define FORMAT_SINT24 0x0F

Definition at line 204 of file bluenrg1_gatt_server.h.

#define FORMAT_UINT16 0x06

Definition at line 202 of file bluenrg1_gatt_server.h.

#define FORMAT_UINT8 0x04

Definition at line 201 of file bluenrg1_gatt_server.h.

#define GAP_SERVICE_UUID (0x1800)

Definition at line 48 of file bluenrg1_gatt_server.h.

#define GATT_DONT_NOTIFY_EVENTS (0x00)

Do not notify events.

Definition at line 136 of file bluenrg1_gatt_server.h.

#define GATT_NOTIFY_ATTRIBUTE_WRITE (0x01)

The application will be notified when a client writes to this attribute. An EVT_BLUE_GATT_ATTRIBUTE_MODIFIED will be issued.

Definition at line 137 of file bluenrg1_gatt_server.h.

#define GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP (0x04)

The application will be notified when a read request of any type is received for this attribute. An EVT_BLUE_GATT_READ_PERMIT_REQ will be issued.

Definition at line 145 of file bluenrg1_gatt_server.h.

#define GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP (0x02)

The application will be notified when a write request, a write cmd or a signed write cmd are received by the server for this attribute. An EVT_BLUE_GATT_WRITE_PERMIT_REQ will be issued.

Definition at line 140 of file bluenrg1_gatt_server.h.

#define GATT_SERVICE_UUID (0x1801)

Definition at line 47 of file bluenrg1_gatt_server.h.

#define INCLUDE_SERVICE_UUID (0x2802)

Definition at line 39 of file bluenrg1_gatt_server.h.

#define MAX_ENCRY_KEY_SIZE (0x10)

Maximum encryption key size

Definition at line 176 of file bluenrg1_gatt_server.h.

#define MIN_ENCRY_KEY_SIZE (7)

Minimum encryption key size

Definition at line 171 of file bluenrg1_gatt_server.h.

#define PRIMARY_SERVICE (0x01)

Definition at line 124 of file bluenrg1_gatt_server.h.

#define PRIMARY_SERVICE_UUID (0x2800)

Definition at line 37 of file bluenrg1_gatt_server.h.

#define SECONDARY_SERVICE (0x02)

Definition at line 125 of file bluenrg1_gatt_server.h.

#define SECONDARY_SERVICE_UUID (0x2801)

Definition at line 38 of file bluenrg1_gatt_server.h.

#define SERVICE_CHANGED_UUID (0x2A05)

Definition at line 49 of file bluenrg1_gatt_server.h.

#define UNIT_PRESSURE_BAR 0x2780

Definition at line 215 of file bluenrg1_gatt_server.h.

#define UNIT_TEMP_CELSIUS 0x272F

Definition at line 214 of file bluenrg1_gatt_server.h.

#define UNIT_UNITLESS 0x2700

Definition at line 213 of file bluenrg1_gatt_server.h.

#define UUID_TYPE_128 (0x02)

Definition at line 114 of file bluenrg1_gatt_server.h.

#define UUID_TYPE_16 (0x01)

Definition at line 113 of file bluenrg1_gatt_server.h.

## Function Documentation

typedef PACKED | ( | struct |  | ) |

Definition at line 185 of file bluenrg1_gatt_server.h.

## Variable Documentation

charactFormat

Definition at line 191 of file bluenrg1_gatt_server.h.