Data Types#

Data types used in the documentation are shown in the table below. Unless otherwise noted, all multi-byte fields are in little endian format.

Name

Length

Description

td1

td2

Result code

  • 0: success

  • Non-zero: an error occurred

  • For other values refer to Error Codes

int16

2 bytes

Signed 16-bit integer

bd_addr

6 bytes

Bluetooth address

uint16

2 bytes

Unsigned 16-bit integer

int32

4 bytes

Signed 32-bit integer

uint32

4 bytes

Unsigned 32-bit integer

link_id_t

2 bytes

Link ID

int8

1 byte

Signed 8-bit integer

uint8

1 byte

Unsigned 8-bit integer

uint8array

1- 256 bytes

Variable length byte array. The first byte defines the length of the data that follows, 0 -

255 bytes.

ser_name

16 bytes

Service name, 16-byte array

dbm

1 byte

Signal strength

connection

1 byte

Connection handle

service

4 bytes

GATT service handle

This value is normally received from the gatt_service event.

characteristic

2 bytes

GATT service handle

This value is normally received from the gatt_characteristic event.

descriptor

2 bytes

GATT characteristic descriptor handle

uuid

3 or 17 bytes

uint8array containing a 2 or 16 bytes Universal Unique Identifier (UUID)

att_errorcode

1 byte

Attribute protocol code

- 0: No error

- Non-zero: See Bluetooth specification, Host volume, Attribute Protocol, Error Codes table.

att_opcode

1 byte

Attribute opcode which informs the procedure from which attribute the value was received

uuid_128

16 bytes

128-bit UUID

aes_key_128

16 bytes

128-bit AES Key