MT2523 API Reference  LinkIt SDK v4

This section defines the ATT opcode and error codes. More...

Overview

This section defines the ATT opcode and error codes.

Macros

#define BT_ATT_DEFAULT_MTU   23
 It's defined in ATT spec. More...
 
#define BT_ATT_OPCODE_ERROR_RESPONSE   0x01
 Error response. More...
 
#define BT_ATT_OPCODE_EXCHANGE_MTU_REQUEST   0x02
 Exchange MTU request. More...
 
#define BT_ATT_OPCODE_EXCHANGE_MTU_RESPONSE   0x03
 Exchange MTU response. More...
 
#define BT_ATT_OPCODE_FIND_INFORMATION_REQUEST   0x04
 Find information request. More...
 
#define BT_ATT_OPCODE_FIND_INFORMATION_RESPONSE   0x05
 Find information response. More...
 
#define BT_ATT_OPCODE_FIND_BY_TYPE_VALUE_REQUEST   0x06
 Find by type value request. More...
 
#define BT_ATT_OPCODE_FIND_BY_TYPE_VALUE_RESPONSE   0x07
 Find by type value response. More...
 
#define BT_ATT_OPCODE_READ_BY_TYPE_REQUEST   0x08
 Read by type request. More...
 
#define BT_ATT_OPCODE_READ_BY_TYPE_RESPONSE   0x09
 Read by type response. More...
 
#define BT_ATT_OPCODE_READ_REQUEST   0x0A
 Read request. More...
 
#define BT_ATT_OPCODE_READ_RESPONSE   0x0B
 Read response. More...
 
#define BT_ATT_OPCODE_READ_BLOB_REQUEST   0x0C
 Read blob request. More...
 
#define BT_ATT_OPCODE_READ_BLOB_RESPONSE   0x0D
 Read blob response. More...
 
#define BT_ATT_OPCODE_READ_MULTIPLE_REQUEST   0x0E
 Read multiple request. More...
 
#define BT_ATT_OPCODE_READ_MULTIPLE_RESPONSE   0x0F
 Read multiple response. More...
 
#define BT_ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST   0x10
 Read by group type request. More...
 
#define BT_ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE   0x11
 Read by group type response. More...
 
#define BT_ATT_OPCODE_WRITE_REQUEST   0x12
 Write request. More...
 
#define BT_ATT_OPCODE_WRITE_RESPONSE   0x13
 Write response. More...
 
#define BT_ATT_OPCODE_PREPARE_WRITE_REQUEST   0x16
 Prepare write request. More...
 
#define BT_ATT_OPCODE_PREPARE_WRITE_RESPONSE   0x17
 Prepare write response. More...
 
#define BT_ATT_OPCODE_EXECUTE_WRITE_REQUEST   0x18
 Execute write request. More...
 
#define BT_ATT_OPCODE_EXECUTE_WRITE_RESPONSE   0x19
 Execute write response. More...
 
#define BT_ATT_OPCODE_HANDLE_VALUE_NOTIFICATION   0x1B
 Handle value notification. More...
 
#define BT_ATT_OPCODE_HANDLE_VALUE_INDICATION   0x1D
 Handle value indication. More...
 
#define BT_ATT_OPCODE_HANDLE_VALUE_CONFIRMATION   0x1E
 Handle value confirmation. More...
 
#define BT_ATT_OPCODE_WRITE_COMMAND   0x52
 Write command. More...
 
#define BT_ATT_OPCODE_SIGNED_WRITE_COMMAND   0xD2
 Signed write command. More...
 
#define BT_ATT_OPCODE_SIGNED_FLAG   0x80
 Signed flag. More...
 
#define BT_ATT_OPCODE_COMMAND_FLAG   0x40
 Command flag. More...
 
#define BT_ATT_OPCODE_METHOD_MASK   0x3F
 Method mask. More...
 
#define BT_ATT_ERRCODE_INVALID_HANDLE   0x01
 The given attribute handle was invalid on this server. More...
 
#define BT_ATT_ERRCODE_READ_NOT_PERMITTED   0x02
 The attribute cannot be read. More...
 
#define BT_ATT_ERRCODE_WRITE_NOT_PERMITTED   0x03
 The attribute cannot be written. More...
 
#define BT_ATT_ERRCODE_INVALID_PDU   0x04
 The attribute PDU is invalid. More...
 
#define BT_ATT_ERRCODE_INSUFFICIENT_AUTHENTICATION   0x05
 The attribute requires authentication before it can be read or written. More...
 
#define BT_ATT_ERRCODE_REQUEST_NOT_SUPPORTED   0x06
 The request received from the client is not supported. More...
 
#define BT_ATT_ERRCODE_INVALID_OFFSET   0x07
 The offset specified was past the end of the attribute. More...
 
#define BT_ATT_ERRCODE_INSUFFICIENT_AUTHORIZATION   0x08
 The attribute requires authorization before it can be read or written. More...
 
#define BT_ATT_ERRCODE_PREPARE_QUEUE_FULL   0x09
 Too many prepare writes have been queued. More...
 
#define BT_ATT_ERRCODE_ATTRIBUTE_NOT_FOUND   0x0A
 No attribute found within the given attribute handle range. More...
 
#define BT_ATT_ERRCODE_ATTRIBUTE_NOT_LONG   0x0B
 The attribute cannot be read or written using the Read Blob Request. More...
 
#define BT_ATT_ERRCODE_INSUFFICIENT_ENCRYPTION_KEY_SIZE   0x0C
 The Encryption Key Size used for encrypting this link is insufficient. More...
 
#define BT_ATT_ERRCODE_INVALID_ATTRIBUTE_VALUE_LENGTH   0x0D
 The attribute value length is invalid for the operation. More...
 
#define BT_ATT_ERRCODE_UNLIKELY_ERROR   0x0E
 The attribute request has encountered an error that was unlikely, and therefore could not be completed as requested. More...
 
#define BT_ATT_ERRCODE_INSUFFICIENT_ENCRYPTION   0x0F
 The attribute requires encryption before it can be read or written. More...
 
#define BT_ATT_ERRCODE_UNSUPPORTED_GROUP_TYPE   0x10
 The attribute type is not a supported grouping attribute as defined by a higher layer specification. More...
 
#define BT_ATT_ERRCODE_INSUFFICIENT_RESOURCES   0x11
 Insufficient resources to complete the request. More...
 
#define BT_ATT_ERRCODE_APPLICATION_BASE   0x80
 The base value for the application error code. More...
 
#define BT_ATT_ERRCODE_CONTINUE   0x81
 There are more data waiting to be retrieved. More...
 
#define BT_ATT_ERRCODE_APPLICATION_MAX   0x9F
 The maximum value for the application error code. More...
 
#define BT_ATT_ERRCODE_COMMON_BASE   0xE0
 The base value for the common profile and service error code. More...
 
#define BT_ATT_ERRCODE_COMMON_MAX   0xFE
 The maximum value for the common profile and service error code. More...
 
#define BT_ATT_ERRCODE_OUT_OF_MEMORY   0xFF
 Out of memory. More...
 
#define BT_ATT_EXECUTE_WRITE_CANCEL   0x00
 Execute write cancel. More...
 
#define BT_ATT_EXECUTE_WRITE_WRITE   0x01
 Execute write. More...
 
#define BT_GATT_UUID16_PRIMARY_SERVICE   0x2800
 Primary service. More...
 
#define BT_GATT_UUID16_SECONDARY_SERVICE   0x2801
 Secondary service. More...
 
#define BT_GATT_UUID16_INCLUDE   0x2802
 Include service. More...
 
#define BT_GATT_UUID16_CHARC   0x2803
 Characteristic. More...
 
#define BT_GATT_UUID16_CHARC_EXTENDED_PROPERTIES   0x2900
 Characteristic extended properties. More...
 
#define BT_GATT_UUID16_CHARC_USER_DESCRIPTION   0x2901
 Characteristic user description. More...
 
#define BT_GATT_UUID16_CLIENT_CHARC_CONFIG   0x2902
 Client characteristic configuration. More...
 
#define BT_GATT_UUID16_SERVER_CHARC_CONFIG   0x2903
 Server characteristic configuration. More...
 
#define BT_GATT_UUID16_CHARC_FORMAT   0x2904
 Characteristic format. More...
 
#define BT_GATT_UUID16_CHARC_AGGREGATE_FORMAT   0x2905
 Characteristic aggregate format. More...
 
#define BT_GATT_UUID16_GAP_SERVICE   0x1800
 GAP service. More...
 
#define BT_GATT_UUID16_GATT_SERVICE   0x1801
 GATT service. More...
 
#define BT_GATT_UUID16_HEART_RATE_SERVICE   0x180D
 Heart rate service. More...
 
#define BT_GATT_UUID16_BATTERY_SERVICE   0x180F
 Battery service. More...
 
#define BT_GATT_UUID16_ENVIRONMENTAL_SENSING   0x181A
 Environmental sensing. More...
 
#define BT_SIG_UUID16_DEVICE_NAME   0x2A00
 Device name. More...
 
#define BT_SIG_UUID16_APPEARANCE   0x2A01
 Appearance. More...
 
#define BT_SIG_UUID16_PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS   0x2A04
 Peripheral preferred connection parameters. More...
 
#define BT_SIG_UUID16_SERVICE_CHANGED   0x2A05
 Service changed. More...
 
#define BT_SIG_UUID16_BATTERY_LEVEL   0x2A19
 Battery level. More...
 
#define BT_SIG_UUID16_SERIAL_NUMBER   0x2A25
 Serial number. More...
 
#define BT_SIG_UUID16_MANUFACTURER_NAME   0x2A29
 Manufacturer name. More...
 
#define BT_SIG_UUID16_TEMPERATURE   0x2A6E
 Temperature. More...
 
#define BT_SIG_UUID16_CENTRAL_ADDRESS_RESOLUTION   0x2AA6
 Central address resolution. More...
 
#define BT_GATT_CHARC_PROP_BROADCAST   0x01
 Broadcast. More...
 
#define BT_GATT_CHARC_PROP_READ   0x02
 Read. More...
 
#define BT_GATT_CHARC_PROP_WRITE_WITHOUT_RSP   0x04
 Write without response. More...
 
#define BT_GATT_CHARC_PROP_WRITE   0x08
 Write. More...
 
#define BT_GATT_CHARC_PROP_NOTIFY   0x10
 Notify. More...
 
#define BT_GATT_CHARC_PROP_INDICATE   0x20
 Indicate. More...
 
#define BT_GATT_CHARC_PROP_AUTHENTICATED_SIGNED_WRITE   0x40
 Authenticated signed write. More...
 
#define BT_GATT_CHARC_PROP_EXTENDED_PROPERTIES   0x80
 Extended properties. More...
 
#define BT_GATT_CHARC_EXTENDED_PROP_RELIABLE_WRITE   0x0001
 Reliable write. More...
 
#define BT_GATT_CHARC_EXTENDED_PROP_WRITABLE_AUXILIARIES   0x0002
 Writable auxiliaries. More...
 

Macro Definition Documentation

#define BT_ATT_DEFAULT_MTU   23

It's defined in ATT spec.

#define BT_ATT_ERRCODE_APPLICATION_BASE   0x80

The base value for the application error code.

#define BT_ATT_ERRCODE_APPLICATION_MAX   0x9F

The maximum value for the application error code.

#define BT_ATT_ERRCODE_ATTRIBUTE_NOT_FOUND   0x0A

No attribute found within the given attribute handle range.

#define BT_ATT_ERRCODE_ATTRIBUTE_NOT_LONG   0x0B

The attribute cannot be read or written using the Read Blob Request.

#define BT_ATT_ERRCODE_COMMON_BASE   0xE0

The base value for the common profile and service error code.

#define BT_ATT_ERRCODE_COMMON_MAX   0xFE

The maximum value for the common profile and service error code.

#define BT_ATT_ERRCODE_CONTINUE   0x81

There are more data waiting to be retrieved.

#define BT_ATT_ERRCODE_INSUFFICIENT_AUTHENTICATION   0x05

The attribute requires authentication before it can be read or written.

#define BT_ATT_ERRCODE_INSUFFICIENT_AUTHORIZATION   0x08

The attribute requires authorization before it can be read or written.

#define BT_ATT_ERRCODE_INSUFFICIENT_ENCRYPTION   0x0F

The attribute requires encryption before it can be read or written.

#define BT_ATT_ERRCODE_INSUFFICIENT_ENCRYPTION_KEY_SIZE   0x0C

The Encryption Key Size used for encrypting this link is insufficient.

#define BT_ATT_ERRCODE_INSUFFICIENT_RESOURCES   0x11

Insufficient resources to complete the request.

#define BT_ATT_ERRCODE_INVALID_ATTRIBUTE_VALUE_LENGTH   0x0D

The attribute value length is invalid for the operation.

#define BT_ATT_ERRCODE_INVALID_HANDLE   0x01

The given attribute handle was invalid on this server.

#define BT_ATT_ERRCODE_INVALID_OFFSET   0x07

The offset specified was past the end of the attribute.

#define BT_ATT_ERRCODE_INVALID_PDU   0x04

The attribute PDU is invalid.

#define BT_ATT_ERRCODE_OUT_OF_MEMORY   0xFF

Out of memory.

#define BT_ATT_ERRCODE_PREPARE_QUEUE_FULL   0x09

Too many prepare writes have been queued.

#define BT_ATT_ERRCODE_READ_NOT_PERMITTED   0x02

The attribute cannot be read.

#define BT_ATT_ERRCODE_REQUEST_NOT_SUPPORTED   0x06

The request received from the client is not supported.

#define BT_ATT_ERRCODE_UNLIKELY_ERROR   0x0E

The attribute request has encountered an error that was unlikely, and therefore could not be completed as requested.

#define BT_ATT_ERRCODE_UNSUPPORTED_GROUP_TYPE   0x10

The attribute type is not a supported grouping attribute as defined by a higher layer specification.

#define BT_ATT_ERRCODE_WRITE_NOT_PERMITTED   0x03

The attribute cannot be written.

#define BT_ATT_EXECUTE_WRITE_CANCEL   0x00

Execute write cancel.

#define BT_ATT_EXECUTE_WRITE_WRITE   0x01

Execute write.

#define BT_ATT_OPCODE_COMMAND_FLAG   0x40

Command flag.

#define BT_ATT_OPCODE_ERROR_RESPONSE   0x01

Error response.

#define BT_ATT_OPCODE_EXCHANGE_MTU_REQUEST   0x02

Exchange MTU request.

#define BT_ATT_OPCODE_EXCHANGE_MTU_RESPONSE   0x03

Exchange MTU response.

#define BT_ATT_OPCODE_EXECUTE_WRITE_REQUEST   0x18

Execute write request.

#define BT_ATT_OPCODE_EXECUTE_WRITE_RESPONSE   0x19

Execute write response.

#define BT_ATT_OPCODE_FIND_BY_TYPE_VALUE_REQUEST   0x06

Find by type value request.

#define BT_ATT_OPCODE_FIND_BY_TYPE_VALUE_RESPONSE   0x07

Find by type value response.

#define BT_ATT_OPCODE_FIND_INFORMATION_REQUEST   0x04

Find information request.

#define BT_ATT_OPCODE_FIND_INFORMATION_RESPONSE   0x05

Find information response.

#define BT_ATT_OPCODE_HANDLE_VALUE_CONFIRMATION   0x1E

Handle value confirmation.

#define BT_ATT_OPCODE_HANDLE_VALUE_INDICATION   0x1D

Handle value indication.

#define BT_ATT_OPCODE_HANDLE_VALUE_NOTIFICATION   0x1B

Handle value notification.

#define BT_ATT_OPCODE_METHOD_MASK   0x3F

Method mask.

#define BT_ATT_OPCODE_PREPARE_WRITE_REQUEST   0x16

Prepare write request.

#define BT_ATT_OPCODE_PREPARE_WRITE_RESPONSE   0x17

Prepare write response.

#define BT_ATT_OPCODE_READ_BLOB_REQUEST   0x0C

Read blob request.

#define BT_ATT_OPCODE_READ_BLOB_RESPONSE   0x0D

Read blob response.

#define BT_ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST   0x10

Read by group type request.

#define BT_ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE   0x11

Read by group type response.

#define BT_ATT_OPCODE_READ_BY_TYPE_REQUEST   0x08

Read by type request.

#define BT_ATT_OPCODE_READ_BY_TYPE_RESPONSE   0x09

Read by type response.

#define BT_ATT_OPCODE_READ_MULTIPLE_REQUEST   0x0E

Read multiple request.

#define BT_ATT_OPCODE_READ_MULTIPLE_RESPONSE   0x0F

Read multiple response.

#define BT_ATT_OPCODE_READ_REQUEST   0x0A

Read request.

#define BT_ATT_OPCODE_READ_RESPONSE   0x0B

Read response.

#define BT_ATT_OPCODE_SIGNED_FLAG   0x80

Signed flag.

#define BT_ATT_OPCODE_SIGNED_WRITE_COMMAND   0xD2

Signed write command.

#define BT_ATT_OPCODE_WRITE_COMMAND   0x52

Write command.

#define BT_ATT_OPCODE_WRITE_REQUEST   0x12

Write request.

#define BT_ATT_OPCODE_WRITE_RESPONSE   0x13

Write response.

#define BT_GATT_CHARC_EXTENDED_PROP_RELIABLE_WRITE   0x0001

Reliable write.

#define BT_GATT_CHARC_EXTENDED_PROP_WRITABLE_AUXILIARIES   0x0002

Writable auxiliaries.

#define BT_GATT_CHARC_PROP_AUTHENTICATED_SIGNED_WRITE   0x40

Authenticated signed write.

#define BT_GATT_CHARC_PROP_BROADCAST   0x01

Broadcast.

#define BT_GATT_CHARC_PROP_EXTENDED_PROPERTIES   0x80

Extended properties.

#define BT_GATT_CHARC_PROP_INDICATE   0x20

Indicate.

#define BT_GATT_CHARC_PROP_NOTIFY   0x10

Notify.

#define BT_GATT_CHARC_PROP_READ   0x02

Read.

#define BT_GATT_CHARC_PROP_WRITE   0x08

Write.

#define BT_GATT_CHARC_PROP_WRITE_WITHOUT_RSP   0x04

Write without response.

#define BT_GATT_UUID16_BATTERY_SERVICE   0x180F

Battery service.

#define BT_GATT_UUID16_CHARC   0x2803

Characteristic.

#define BT_GATT_UUID16_CHARC_AGGREGATE_FORMAT   0x2905

Characteristic aggregate format.

#define BT_GATT_UUID16_CHARC_EXTENDED_PROPERTIES   0x2900

Characteristic extended properties.

#define BT_GATT_UUID16_CHARC_FORMAT   0x2904

Characteristic format.

#define BT_GATT_UUID16_CHARC_USER_DESCRIPTION   0x2901

Characteristic user description.

#define BT_GATT_UUID16_CLIENT_CHARC_CONFIG   0x2902

Client characteristic configuration.

#define BT_GATT_UUID16_ENVIRONMENTAL_SENSING   0x181A

Environmental sensing.

#define BT_GATT_UUID16_GAP_SERVICE   0x1800

GAP service.

#define BT_GATT_UUID16_GATT_SERVICE   0x1801

GATT service.

#define BT_GATT_UUID16_HEART_RATE_SERVICE   0x180D

Heart rate service.

#define BT_GATT_UUID16_INCLUDE   0x2802

Include service.

#define BT_GATT_UUID16_PRIMARY_SERVICE   0x2800

Primary service.

#define BT_GATT_UUID16_SECONDARY_SERVICE   0x2801

Secondary service.

#define BT_GATT_UUID16_SERVER_CHARC_CONFIG   0x2903

Server characteristic configuration.

#define BT_SIG_UUID16_APPEARANCE   0x2A01

Appearance.

#define BT_SIG_UUID16_BATTERY_LEVEL   0x2A19

Battery level.

#define BT_SIG_UUID16_CENTRAL_ADDRESS_RESOLUTION   0x2AA6

Central address resolution.

#define BT_SIG_UUID16_DEVICE_NAME   0x2A00

Device name.

#define BT_SIG_UUID16_MANUFACTURER_NAME   0x2A29

Manufacturer name.

#define BT_SIG_UUID16_PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS   0x2A04

Peripheral preferred connection parameters.

#define BT_SIG_UUID16_SERIAL_NUMBER   0x2A25

Serial number.

#define BT_SIG_UUID16_SERVICE_CHANGED   0x2A05

Service changed.

#define BT_SIG_UUID16_TEMPERATURE   0x2A6E

Temperature.