Developer Portal

Device Attribute Message Protocol

The Afero architecture uses a messaging protocol that is independent of the wireless technology used. This protocol provides a simple way for the client application to set or get attributes on the ASR module.

The format of the messages is defined below:

Message uint16_t Message length including header
Header uint8_t

Message type:

0x0B = Set

0x0C = Get

0x0D = Update


Request ID:

  0 = Transaction initiated from peripheral

>0 = Transaction initiated from authenticator

Set uint16_t Attribute ID
uint16_t Value length
n bytes Variable-length attribute value
Get uint16_t Attribute ID
Update uint16_t Attribute ID

Update state:

0x00 = Updated

0x01 = Interrupted; device-side update in progress or preempted by device-side update

0x02 = Unknown attribute ID

0x03 = Length exceeded

0x04 = Conflict; previous Set in progress

0x05 = Timeout; Set operation timed out

0xAA = Invalid state; Cloud received unrecognized state value


Update reason:

0x00 = Unknown

0x01 = Unsolicited Afero module-initiated or MCU-initiated Update; e.g., button press

0x02 = Response to Cloud-initiated Set

0x03 = Response to MCU-initiated Set

0x04 = Linking completed

0x05 = A bound attribute was changed

0x06 = Reserved

0x07 = Notify MCU that ASR rebooted; not sent to Cloud

0x08 = Response to local Set; e.g., when a scheduled event fires

0x09 = Reboot

0x0A = Cyclic redundancy check (CRC) failure; used to sync state between device and Cloud when attribute values no longer match

0xAA = Invalid reason; set when the Cloud receives an update with either no reason or an invalid reason

uint16_t Value length
n bytes Variable-length attribute value