ATT Vendor Specific API

ATT Commands

All ATT commands have the following format:

Name

Size (bytes)

Description

Opcode

2

PDU operation code

Connection Handle

2

Connection handle of the link

Command PDU

Variable

Command Parameters

For the command parameters, please see the corresponding section below.

Note: The connection handle of 0xFFFE is considered as the loopback connection. All messages sent to this connection will be loop backed to the local host.

Events Generated

For each ATT command,when it is received, the host will send the CommandStatus Event with the Status parameter. If a command will return additional events, it will be noted in the description below.

ATT_ErrorRsp

Opcode

0xFD01

Command Description

The Error Response is used to state that a given request cannot be performed and to provide the reason.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

reqOpcode

The request that generated this error response

Size

1 byte(s)

Default

0x01

Range

Value

Description

0x01

ATT_ERROR_RSP

0x02

ATT_EXCHANGE_MTU_REQ

0x03

ATT_EXCHANGE_MTU_RSP

0x04

ATT_FIND_INFO_REQ

0x05

ATT_FIND_INFO_RSP

0x06

ATT_FIND_BY_TYPE_VALUE_REQ

0x07

ATT_FIND_BY_TYPE_VALUE_RSP

0x08

ATT_READ_BY_TYPE_REQ

0x09

ATT_READ_BY_TYPE_RSP

0x0A

ATT_READ_REQ

0x0B

ATT_READ_RSP

0x0C

ATT_READ_BLOB_REQ

0x0D

ATT_READ_BLOB_RSP

0x0E

ATT_READ_MULTI_REQ

0x0F

ATT_READ_MULTI_RSP

0x10

ATT_READ_BY_GRP_TYPE_REQ

0x11

ATT_READ_BY_GRP_TYPE_RSP

0x12

ATT_WRITE_REQ

0x13

ATT_WRITE_RSP

0x16

ATT_PREPARE_WRITE_REQ

0x17

ATT_PREPARE_WRITE_RSP

0x18

ATT_EXECUTE_WRITE_REQ

0x19

ATT_EXECUTE_WRITE_RSP

0x1B

ATT_HANDLE_VALUE_NOTI

0x1D

ATT_HANDLE_VALUE_IND

0x1E

ATT_HANDLE_VALUE_CFM

handle

The attribute handle that generated this error response

Size

2 byte(s)

Default

0

Range

Any 2 byte value

errorCode

The reason why the request has generated an error response

Size

1 byte(s)

Default

0x80

Range

Value

Description

0x01

INVALID_HANDLE

0x02

READ_NOT_PERMITTED

0x03

WRITE_NOT_PERMITTED

0x04

INVALID_PDU

0x05

INSUFFICIENT_AUTHEN

0x06

UNSUPPORTED_REQ

0x07

INVALID_OFFSET

0x08

INSUFFICIENT_AUTHOR

0x09

PREPARE_QUEUE_FULL

0x0a

ATTR_NOT_FOUND

0x0b

ATTR_NOT_LONG

0x0c

INSUFFICIENT_KEY_SIZE

0x0d

INVALID_VALUE_SIZE

0x0e

UNLIKELY_ERROR

0x0f

INSUFFICIENT_ENCRYPTION

0x10

UNSUPPORTED_GRP_TYPE

0x11

INSUFFICIENT_RESOURCES

0x80

INVALID_VALUE

Events Generated

This command only returns the CommandStatus event

ATT_ExchangeMTUReq

Opcode

0xFD02

Command Description

The Exchange MTU Request is used by the client to inform the server of the clients maximum receive MTU size and request the server to respond with its maximum receive MTU size is used to state that a given request cannot be performed and to provide the reason.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

clientRxMTU

Attribute client receive MTU size

Size

2 byte(s)

Default

23

Range

Any 2 byte value

Events Generated

The server will respond to this request with a ATT_ExchangeMTURsp.

ATT_ExchangeMTURsp

Opcode

0xFD03

Command Description

The Exchange MTU Response is sent in reply to a received Exchange MTU Request.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

serverRxMTU

Attribute server receive MTU size

Size

2 byte(s)

Default

23

Range

Any 2 byte value

Events Generated

This command only returns the CommandStatus event

ATT_FindInfoReq

Opcode

0xFD04

Command Description

The Find Information Request is used to obtain the mapping of attribute handles with their associated types. This allows a client to discover the list of attributes and their types on a server.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

startHandle

First requested handle number

Size

2 byte(s)

Default

0x0001

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Default

0xFFFF

Range

Any 2 byte value

Events Generated

When this request is received, the server will send the ATT_FindInfoRsp. The client will forward all the Find Information Responses to the calling application. The response with the status of bleProcedureComplete will indicate the end of the sub-procedure. If no attributes will be returned or any of the requested parameters is invalid, the server will send an ATT_ErrorRsp.

ATT_FindInfoRsp

Opcode

0xFD05

Command Description

The Find Information Response is sent in reply to a received Find Information Request and contains information about the server.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

format

The format of the information data

Size

1 byte(s)

Default

0x01

Range

Value

Description

0x01

HANDLE_BT_UUID_TYPE - handle(s) and 16-bit Bluetooth UUID(s)

0x02

HANDLE_UUID_TYPE - handle(s) and 128-bit UUID(s)

info

The information data whose format is determined by the format field

Size

input byte(s)

Default

“”

Range

4 to (ATT_MTU - 2) octets

Events Generated

This command only returns the CommandStatus event

ATT_FindByTypeValueReq

Opcode

0xFD06

Command Description

The Find By Type Value Request is used to obtain the handles of attributes that have a 16-bit UUID attribute type and attribute value. This allows the range of handles associated with a given attribute to be discovered when the attribute type determines the grouping of a set of attributes.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

startHandle

First requested handle number

Size

2 byte(s)

Default

0x0001

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Default

0xFFFF

Range

Any 2 byte value

type

2-octet UUID to find

Size

2 byte(s)

Default

“00:00”

Range

Any 2 byte value

value

Attribute value to find

Size

input byte(s)

Default

“”

Range

0 to (ATT_MTU - 7) octets

Events Generated

When this request is received, the server will send the ATT_FindByTypeValueRsp. The client will forward all the ATT_FindByTypeValueRsp events to the calling application. The response with the status of bleProcedureComplete will indicate the end of the sub-procedure. If no attributes will be returned or any of the requested parameters is invalid, the server will send an ATT_ErrorRsp.

ATT_FindByTypeValueRsp

Opcode

0xFD07

Command Description

The Find By Type Value Response is sent in reply to a received Find By Type Value Request and contains information about this server.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

handlesInfo

The Handles Information List field is a list of one or more Handle Information groups where the first 2 bytes are the attribute handle and the next two bytes are the handle end group handle.

Size

input byte(s)

Default

“”

Range

Any 2-byte value for each element.

Events Generated

This command only returns the CommandStatus event

ATT_ReadByTypeReq

Opcode

0xFD08

Command Description

The Read By Type Request is used to obtain the values of attributes where the attribute type is known but the handle is not known.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

startHandle

First requested handle number

Size

2 byte(s)

Default

0x0001

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Default

0xFFFF

Range

Any 2 byte value

type

2 or 16 octet UUID

Size

input byte(s)

Default

“00:00”

Range

Any 2 or 16 byte value

Events Generated

When this request is received, the server will send the ATT_ReadByTypeRsp. The client will forward all the ATT_ReadByTypeRsp events to the calling application. The response with the status of bleProcedureComplete will indicate the end of the sub-procedure. If no attribute with the given type exists within the handle range or the attribute value cannot be read, the server will send an ATT_ErrorRsp.

ATT_ReadByTypeRsp

Opcode

0xFD09

Command Description

The Read By Type Response is sent in reply to a received Read By Type Request and contains the handles and values of the attributes that have been read.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

length

The size of each attribute handle-value pair.

Size

1 byte(s)

Default

0

Range

Any 1 byte value

dataList

A list of Attribute Data (handle-value pairs) where the first two bytes are the attribute handle and the next two bytes are the attribute value.

Size

input byte(s)

Default

“”

Range

Any 2 byte value for each attribute handle and any (length -2) bytes for each attribute value.

Events Generated

This command only returns the CommandStatus event

ATT_ReadReq

Opcode

0xFD0A

Command Description

The Read Request is used request the server to read the value of an attribute and return its value in a Read Response.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

handle

The handle of the attribute to be read

Size

2 byte(s)

Default

0

Range

Any 2 byte value.

Events Generated

When this request is received, the server will send the ATT_ReadRsp. If the attribute handle is invalid or the attribute value cannot be read, the server will send an ATT_ErrorRsp.

ATT_ReadRsp

Opcode

0xFD0B

Command Description

The Read Response is sent in reply to a received Read Request and contains the value of the attribute that has been read.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

value

The value of the attribute with the handle given

Size

input byte(s)

Default

“”

Range

Any (0 to (ATT_MTU - 1) byte) value

Events Generated

This command only returns the CommandStatus event

ATT_ReadBlobReq

Opcode

0xFD0C

Command Description

The Read Blob Request is used request the server to read part of the value of an attribute at a given offset and return a specific part of the value in a ATT_ReadBlobRsp.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

handle

The handle of the attribute to be read

Size

2 byte(s)

Default

0

Range

Any 2 byte value

offset

The offset of the first octet to be read

Size

2 byte(s)

Default

0

Range

Any 2 byte value

Events Generated

When this request is received, the server will send the ReadBlobRsp. The client will forward all the ReadBlobRsp events to the calling application. The response with the status of bleProcedureComplete will indicate the end of the sub-procedure. If the attribute handle or offset is invalid, or the attribute value cannot be read, the server will send an ATT_ErrorRsp.

ATT_ReadBlobRsp

Opcode

0xFD0D

Command Description

The Read Blob Response is sent in reply to a received Read Blob Request and contains part of the value of the attribute that has been read.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

value

Part of the value of the attribute with the handle given

Size

input byte(s)

Default

“”

Range

Any (0 to (ATT_MTU - 1) octets) value.

Events Generated

This command only returns the CommandStatus event

ATT_ReadMultiReq

Opcode

0xFD0E

Command Description

The Read Multiple Request is used to request the server to read two or more values of a set of attributes and return their values in a ATT_ReadMultiRsp. Only values that have a known fixed size can be read, with the exception of the last value that can have a variable length.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

handles

A set of two or more two-byte attribute handles

Size

input byte(s)

Default

“”

Range

Any (4 to (ATT_MTU-1) byte) value

Events Generated

When this request is received, the server will send the ATT_ReadMultiRsp. If any of the attribute handles are invalid or any of the attribute values cannot be read, the server will send an ATT_ErrorRsp.

ATT_ReadMultiRsp

Opcode

0xFD0F

Command Description

The Read Multiple Response is sent in reply to a received ATT_ReadMultiReq and contains the values of the attributes that have been read.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

values

A set of two or more values

Size

input byte(s)

Default

“”

Range

Any (0 to (ATT_MTU - 1) byte) value.

Events Generated

This command only returns the CommandStatus event

ATT_ReadByGrpTypeReq

Opcode

0xFD10

Command Description

The Read By Group Type Request is used to obtain the values of attributes where the attribute type is known, the type of a grouping attribute as defined by a higher layer specification, but the handle is not known.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

startHandle

First requested handle number

Size

2 byte(s)

Default

0x0001

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Default

0xFFFF

Range

Any 2 byte value

groupType

2 or 16 octet UUID

Size

input byte(s)

Default

“00:00”

Range

Any 2 or 16 byte value

Events Generated

When this request is received, the server will send the ATT_ReadByGrpTypeRsp. The client will forward all the ATT_ReadByGrpTypeRsp Events to the calling application. The response with the status of bleProcedureComplete will indicate the end of the sub-procedure. If no attributes with the given type exists within the handle ranges or the Attribute Group Type is not a supported grouping attribute, the server will send an ATT_ErrorRsp

ATT_ReadByGrpTypeRsp

Opcode

0xFD11

Command Description

The Read By Group Type Response is sent in reply to a received ATT_ReadByGrpTypeReq and contains the handles and values of the attributes that have been read.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

length

The size of each Attribute Data (attribute handle, end group handle and attribute value set)

Size

1 byte(s)

Default

0

Range

Any 1 byte value.

dataList

The Attribute Data field is comprised of a list of attribute handle and value pairs where the first two bytes are the attribute handle, the next two bytes are the end group handle, and the next (length - 4) bytes are the attribute value.

Size

input byte(s)

Default

“”

Range

Any value formatted as described above.

Events Generated

This command only returns the CommandStatus event

ATT_WriteReq

Opcode

0xFD12

Command Description

The Write Request is used to request the server to write the value of an attribute and acknowledge that this has been achieved in a ATT_WriteRsp. The command field is set for the Write Command. The signature and command fields are set for the Signed Write Command.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

signature

Whether to include the Authentication Signature with the Write PDU

Size

1 byte(s)

Default

0x00

Range

Value

Description

0x00

No

0x01

Yes

command

Whether this is the Write Command

Size

1 byte(s)

Default

0x00

Range

Value

Description

0x00

No

0x01

Yes

handle

The handle of the attribute to be set

Size

2 byte(s)

Default

0

Range

Any 2 byte value

value

The value to be written to the attribute

Size

input byte(s)

Default

“”

Range

Any (0 to (ATT_MTU - 3) byte) value

Events Generated

This command only returns the CommandStatus event

ATT_WriteRsp

Opcode

0xFD13

Command Description

The Write Response is sent in reply to a valid Write Request and acknowledges that the attribute has been successfully written.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

Events Generated

This command only returns the CommandStatus event

ATT_PrepareWriteReq

Opcode

0xFD16

Command Description

The Prepare Write Request is used to request the server to prepare to write the value of an attribute. The server will respond to this request with a ATT_PrepareWriteRsp, so that the client can verify that the value was received correctly. A client may send more than one ATT_PrepareWriteReq to a server, which will queue and send a response for each handle value pair.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

handle

The handle of the attribute to be written

Size

2 byte(s)

Default

0

Range

Any 2 byte value

offset

The offset of the first octet to be written

Size

2 byte(s)

Default

0

Range

Any 2 byte value

value

Part of the value of the attribute to be written

Size

input byte(s)

Default

“”

Range

(0 to (ATT_MTU - 5) octets)

Events Generated

When this request is received, the server will send the ATT_PrepareWriteRsp. If the attribute handle is invalid or the attribute value cannot be written, the server will send an ATT_ErrorRsp.

ATT_PrepareWriteRsp

Opcode

0xFD17

Command Description

The Prepare Write Response is sent in response to a received Prepare Write Request and acknowledges that the value has been successfully received and placed in the prepare write queue.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

handle

The handle of the attribute to be written

Size

2 byte(s)

Default

0

Range

Any 2 byte value

offset

The offset of the first octet to be written

Size

2 byte(s)

Default

0

Range

Any 2 byte value

value

Part of the value of the attribute to be written

Size

input byte(s)

Default

“”

Range

Any (0 to (ATT_MTU - 5) byte) value.

Events Generated

This command only returns the CommandStatus event

ATT_ExecuteWriteReq

Opcode

0xFD18

Command Description

The Execute Write Request is used to request the server to write or cancel the write of all the prepared values currently held in the prepare queue from this client. This request shall be handled by the server as an atomic operation.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

flags

Whether to cancel or write.

Size

1 byte(s)

Default

0x01

Range

Value

Description

0x00

CANCEL_WRITES

0x01

WRITE_VALUES

Events Generated

When this request is received, the server will send the ATT_ExecuteWriteRsp. If the attribute value cannot be written, the server will send an ATT_ErrorRsp.

ATT_ExecuteWriteRsp

Opcode

0xFD19

Command Description

The Execute Write Response is sent in response to a received Execute Write Request.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

Events Generated

This command only returns the CommandStatus event

ATT_HandleValueNoti

Opcode

0xFD1B

Command Description

A server can send a notification of an attributes value at any time.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

authenticated

Whether or not an authenticated link is required

Size

1 byte(s)

Default

0x00

Range

Value

Description

0x00

No

0x01

Yes

handle

The handle of the attribute

Size

2 byte(s)

Default

0

Range

Any 2 byte value

value

The current value of the attribute

Size

input byte(s)

Default

“”

Range

Any (0 to (ATT_MTU - 3) byte) value

Events Generated

This command only returns the CommandStatus event

ATT_HandleValueInd

Opcode

0xFD1D

Command Description

A server can send an indication of an attributes value at any time.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

authenticated

Whether or not an authenticated link is required

Size

1 byte(s)

Default

0x00

Range

Value

Description

0x00

No

0x01

Yes

handle

The handle of the attribute

Size

2 byte(s)

Default

0

Range

Any 2 byte value

value

The current value of the attribute

Size

input byte(s)

Default

“”

Range

Any (0 to (ATT_MTU - 3) byte) value.

Events Generated

The client shall send a ATT_HandleValueCfm in response to a Handle Value Indication. No further indications to this client shall occur until the confirmation has been received by the server.

ATT_HandleValueCfm

Opcode

0xFD1E

Command Description

The Handle Value Confirmation is sent in response to a received ATT_HandleValueInd and confirms that the client has received an indication of the given attribute.

Command Parameters

Connection Handle

Identifies the connection.

Size

2 byte(s)

Default

0x0000

Range

0x0000 to 0xFFFD

Events Generated

This command only returns the CommandStatus event

ATT Events

All ATT events have the following format:

Name

Size (bytes)

Description

Opcode

2

PDU operation code

Status

1

Event status

Connection Handle

2

Connection handle of the link

PDU length

1

Length of event PDU

Event PDU

Variable

Event parameters

For the event parameters, please see the corresponding section below.

Note: The connection handle of 0xFFFE is considered as the loopback connection. All messages sent to this connection will be loop backed to the local host.

ATT_ErrorRsp

Opcode

0x0501

Event Description

ATT Error Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

reqOpcode

Request that generated this error response

Size

1 byte(s)

Range

Value

Description

0x01

ATT_ERROR_RSP

0x02

ATT_EXCHANGE_MTU_REQ

0x03

ATT_EXCHANGE_MTU_RSP

0x04

ATT_FIND_INFO_REQ

0x05

ATT_FIND_INFO_RSP

0x06

ATT_FIND_BY_TYPE_VALUE_REQ

0x07

ATT_FIND_BY_TYPE_VALUE_RSP

0x08

ATT_READ_BY_TYPE_REQ

0x09

ATT_READ_BY_TYPE_RSP

0x0A

ATT_READ_REQ

0x0B

ATT_READ_RSP

0x0C

ATT_READ_BLOB_REQ

0x0D

ATT_READ_BLOB_RSP

0x0E

ATT_READ_MULTI_REQ

0x0F

ATT_READ_MULTI_RSP

0x10

ATT_READ_BY_GRP_TYPE_REQ

0x11

ATT_READ_BY_GRP_TYPE_RSP

0x12

ATT_WRITE_REQ

0x13

ATT_WRITE_RSP

0x16

ATT_PREPARE_WRITE_REQ

0x17

ATT_PREPARE_WRITE_RSP

0x18

ATT_EXECUTE_WRITE_REQ

0x19

ATT_EXECUTE_WRITE_RSP

0x1B

ATT_HANDLE_VALUE_NOTI

0x1D

ATT_HANDLE_VALUE_IND

0x1E

ATT_HANDLE_VALUE_CFM

handle

Attribute handle that generated error response

Size

2 byte(s)

Range

errorCode

Reason why the request has generated error response

Size

1 byte(s)

Range

Value

Description

0x01

INVALID_HANDLE

0x02

READ_NOT_PERMITTED

0x03

WRITE_NOT_PERMITTED

0x04

INVALID_PDU

0x05

INSUFFICIENT_AUTHEN

0x06

UNSUPPORTED_REQ

0x07

INVALID_OFFSET

0x08

INSUFFICIENT_AUTHOR

0x09

PREPARE_QUEUE_FULL

0x0a

ATTR_NOT_FOUND

0x0b

ATTR_NOT_LONG

0x0c

INSUFFICIENT_KEY_SIZE

0x0d

INVALID_VALUE_SIZE

0x0e

UNLIKELY_ERROR

0x0f

INSUFFICIENT_ENCRYPTION

0x10

UNSUPPORTED_GRP_TYPE

0x11

INSUFFICIENT_RESOURCES

0x80

INVALID_VALUE

ATT_ExchangeMTUReq

Opcode

0x0502

Event Description

ATT Exchange MTU Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

clientRxMTU

Server receive MTU size

Size

2 byte(s)

Range

ATT_ExchangeMTURsp

Opcode

0x0503

Event Description

ATT Exchange MTU Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

serverRxMTU

Server receive MTU size

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

ATT_FindInfoReq

Opcode

0x0504

Event Description

ATT Find Information Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

startHandle

First requested handle number

Size

2 byte(s)

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Range

Any 2 byte value

ATT_FindInfoRsp

Opcode

0x0505

Event Description

ATT Find Information Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

format

Format of information data

Condition

( bStatus==0x00 || bStatus==0x16)

Size

1 byte(s)

Range

Value

Description

0x01

HANDLE_BT_UUID_TYPE - handle(s) and 16-bit Bluetooth UUID(s)

0x02

HANDLE_UUID_TYPE - handle(s) and 128-bit UUID(s)

An array of size “(pduLen-1)/(format==0x01 ? 4 : 18)” will be returned containing the parameters starting here:

handle

Attribute handle

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

uuid

Characteristic UUID

Condition

( bStatus==0x00 || bStatus==0x16 format==0x01)

Size

2 byte(s)

Range

uuid

Characteristic UUID

Condition

( bStatus==0x00 || bStatus==0x16 format==0x02)

Size

16 byte(s)

Range

The array of parameters ends here.

ATT_FindByTypeValueReq

Opcode

0x0506

Event Description

ATT Find By Type Value Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

startHandle

First requested handle number

Size

2 byte(s)

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Range

Any 2 byte value

type

2-octet UUID to find

Size

2 byte(s)

Range

Any 2 byte value

value

Attribute value to find

Condition

( pduLen.gt.6)

Size

pduLen-6 byte(s)

Range

Any (0 to ATT_MTU_SIZE-7) byte value

ATT_FindByTypeValueRsp

Opcode

0x0507

Event Description

ATT Find By Type Value Response

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

An array of size “pduLen/4” will be returned containing the parameters starting here:

handle

Found Attribute Handle

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

grpEndHandle

Group End Handle

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

The array of parameters ends here.

ATT_ReadByTypeReq

Opcode

0x0508

Event Description

ATT Read By Type Request

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

startHandle

First requested handle number

Size

2 byte(s)

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Range

Any 2 byte value

type

2-octet UUID to find

Condition

( pduLen.gt.4)

Size

pduLen-4 byte(s)

Range

ATT_ReadByTypeRsp

Opcode

0x0509

Event Description

ATT Read By Type Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

length

The size of each attribute handle-value pair

Condition

( bStatus==0x00 || bStatus==0x16)

Size

1 byte(s)

Range

An array of size “(pduLen-1)/length” will be returned containing the parameters starting here:

handle

Attribute handle

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

value

Attribute value

Condition

( bStatus==0x00 || bStatus==0x16 length.gt.2)

Size

length-2 byte(s)

Range

The array of parameters ends here.

ATT_ReadReq

Opcode

0x050A

Event Description

ATT Read Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

handle

The handle of the attribute that was read

Size

2 byte(s)

Range

ATT_ReadRsp

Opcode

0x050B

Event Description

ATT Read Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

value

The value of the attribute that was read

Condition

( bStatus==0x00 || bStatus==0x16)

Size

pduLen byte(s)

Range

ATT_ReadBlobReq

Opcode

0x050C

Event Description

ATT Read Blob Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

handle

The handle of the attribute that was read

Size

2 byte(s)

Range

offset

The offset of the first byte that was read

Size

2 byte(s)

Range

ATT_ReadBlobRsp

Opcode

0x050D

Event Description

ATT Read Blob Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

value

The value of the attribute that was read

Condition

( bStatus==0x00 || bStatus==0x16)

Size

pduLen byte(s)

Range

ATT_ReadMultiReq

Opcode

0x050E

Event Description

ATT Read Multiple Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

handles

A set of two or more attribute handles.

Size

pduLen byte(s)

Range

ATT_ReadMultiRsp

Opcode

0x050F

Event Description

ATT Read Multiple Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

values

A set of two or more values

Condition

( bStatus==0x00 || bStatus==0x16)

Size

pduLen byte(s)

Range

ATT_ReadByGrpTypeReq

Opcode

0x0510

Event Description

ATT Read By Group Type Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

startHandle

First requested handle number

Size

2 byte(s)

Range

Any 2 byte value

endHandle

Last requested handle number

Size

2 byte(s)

Range

Any 2 byte value

groupType

UUID of group to read

Condition

( pduLen.gt.4)

Size

pduLen-4 byte(s)

Range

ATT_ReadByGrpTypeRsp

Opcode

0x0511

Event Description

ATT Read By Group Type Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

length

The size of each attribute handle-value pair

Condition

( bStatus==0x00 || bStatus==0x16)

Size

1 byte(s)

Range

An array of size “(pduLen-1)/length” will be returned containing the parameters starting here:

handle

Attribute Handle

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

endGrpHandle

End Group Handle

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

value

Attribute Value

Condition

( bStatus==0x00 || bStatus==0x16 length.gt.4)

Size

length-4 byte(s)

Range

The array of parameters ends here.

ATT_WriteReq

Opcode

0x0512

Event Description

ATT Write Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

signature

Whether to include the authentication signature.

Condition

( bStatus==0x00)

Size

1 byte(s)

Range

Value

Description

0x00

SIG_NOT_INCLUDED

0x01

SIG_VALID

0x02

SIG_INVALID

command

Whether this is a Write Command.

Condition

( bStatus==0x00)

Size

1 byte(s)

Range

Value

Description

0x00

No

0x01

Yes

handle

The handle of the attribute to be written.

Condition

( bStatus==0x00)

Size

2 byte(s)

Range

value

The value to be written to the attribute.

Condition

( bStatus==0x00 pduLen.gt.4)

Size

pduLen-4 byte(s)

Range

ATT_WriteRsp

Opcode

0x0513

Event Description

ATT Write Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

ATT_PrepareWriteReq

Opcode

0x0516

Event Description

ATT Prepare Write Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

handle

The handle of the attribute to be written.

Size

2 byte(s)

Range

offset

The offset of the first byte to be written.

Size

2 byte(s)

Range

value

Part of the value of the attribute to be written.

Condition

( pduLen.gt.4)

Size

pduLen-4 byte(s)

Range

ATT_PrepareWriteRsp

Opcode

0x0517

Event Description

ATT Prepare Write Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

handle

The handle of the attribute to be written.

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

offset

The offset of the first octet to be Written.

Condition

( bStatus==0x00 || bStatus==0x16)

Size

2 byte(s)

Range

value

Part of the value of the attribute to be written.

Condition

( bStatus==0x00 || bStatus==0x16 pduLen.gt.4)

Size

pduLen-4 byte(s)

Range

ATT_ExecuteWriteReq

Opcode

0x0518

Event Description

ATT Execute Write Request.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

flags

What to do with pending prepared writes.

Size

1 byte(s)

Range

Value

Description

0x00

CANCEL_WRITES

0x01

WRITE_VALUES

ATT_ExecuteWriteRsp

Opcode

0x0519

Event Description

ATT Execute Write Response.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

ATT_HandleValueNoti

Opcode

0x051B

Event Description

ATT Handle Value Notification.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

handle

The handle of the attribute.

Size

2 byte(s)

Range

The current value of the attribute.
Condition

( pduLen.gt.2)

Size

pduLen-2 byte(s)

Range

ATT_HandleValueInd

Opcode

0x051D

Event Description

ATT Handle Value Indication.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

handle

The handle of the attribute.

Size

2 byte(s)

Range

value

The current value of the attribute.

Condition

( pduLen.gt.2)

Size

pduLen-2 byte(s)

Range

ATT_HandleValueCfm

Opcode

0x051E

Event Description

ATT Handle Value Confirmation.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

ATT_FlowCtrlViolatedEvt_t

Opcode

0x057E

Event Description

Sent when ATT flow control is violated on a connection.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

opcode

Opcode of message that caused flow control violation

Size

1 byte(s)

Range

pendingOpcode

Opcode of pending message

Size

1 byte(s)

Range

ATT_MtuUpdatedEvt

Opcode

0x057F

Event Description

Sent when MTU is updated for a connection.

Event Parameters

Status
Size

1 byte(s)

Range

Value

Description

0x00

SUCCESS

0x12

bleIncorrectMode

0x02

INVALIDPARAMETER

connectionHandle

Connection handle of the link

Size

2 byte(s)

Range

Any 2 byte value

pduLen

PDU length

Size

1 byte(s)

Range

Any 1 byte value

MTU

New MTU size

Size

2 byte(s)

Range