Developer Portal

Device Attribute Registry

Each Afero device will have a number of attributes associated with it. Attributes are identified by a 2-byte ID and can contain a variable amount of information based on the type of attribute. Attributes can come in many types and have specific ID ranges.

ID Description Data Type Usage Notes
1-1023 Afero Cloud, Device MCU An attribute residing on an external MCU defined by the third-party developer. The size and meaning of these attributes are defined by the developer using the Afero Profile Editor. To get the default value of one of these attributes, the MCU must call af_lib_get_attribute.
1024 I/O 0 Value Attribute Modulo LED:
  • 0 = On
  • 1 = Off
1026 I/O 1 Value Attribute Configurable
1028 I/O 2 Value Attribute Configurable
1030 I/O 3 Value Attribute Modulo button
2001 Bootloader Version SINT64 The bootloader is always the first thing to be upgraded as it is responsible for installing firmware images. This firmware type is used for the Afero Secure Hub and Afero Secure Radios.
2002 BLE Stack Version SINT64 This is the Bluetooth stack for the radio module. This will likely never be updated, but is included here for completeness. If the stack is updated, the application must always be updated at the same time, before the device is rebooted.
2003 FW Application Version SINT64 This is the radio module application responsible for reading the device description and handling attributes. This firmware type is used for the Afero Secure Hub and Afero Secure Radios.
2004 Device Description SINT64 The description of the attributes for a particular Afero application.
2006 Wi-Fi SINT64 This is the version for the Wi-Fi chip (e.g., WINC3400).
65001 UTC offset data BYTES Contains the current UTC offset in minutes, the next timestamp to change the UTC offset, and the new UTC offset to apply at the previous timestamp, in that order (2-bytes signed short, 4-bytes int, 2-bytes signed short).
65004 Configured SSID UTF8S The SSID the Afero Secure Hub is currently configured to use.
65005 Wi-Fi Bars SINT8 Integer, read-only attribute for Wi-Fi signal strength, for UI purposes.
65006 Wi-Fi Steady State SINT8 Wi-Fi steady state:
  • 0 = Not Connected
  • 1 = Pending
  • 2 = Connected
  • 3 = Unknown Failure
  • 4 = Association Failed
  • 5 = Handshake Failed
  • 6 = Echo Failed
  • 7 = SSID (Network Name) Not Found
  • 8 = NTP (Network Time Protocol) Failed

This value is used to communicate the Wi-Fi state to the apps outside the Wi-Fi setup.

65012 Command BYTES

This value will have a one-byte command followed by parameters, if any. The format of the last three bytes are dictated by the first byte. The device will return a two-byte array indicating the result of the command to the server. The first byte will be the command and the second byte will be the result:

  • NO_ERROR = 0

Current commands are:

  • 1 = Reboot - Last three bytes are ignored.
  • 2 = Clear user data - Factory reset; last three bytes are ignored.
  • 3 = Enter factory test mode (i.e., softAP).
  • 4 = Enter factory mode (i.e., profiprogo).
65013 ASR State SINT8 This byte will hold ASR state information, including:
  • 0 = Rebooted
  • 1 = Linked
  • 2 = Updating
  • 3 = Update ready to apply (reboot requested)
65014 Low Battery Warning SINT8

Applies to ASR-1 Only

This value will be updated by ASR-1 when the battery gets low. It will track the battery level as:

  • Clench Factor 0: voltage >2.7V
  • Clench Factor 1: 2.5V <voltage> 2.7V
  • Clench Factor 2: 2.3V <voltage> 2.5V
  • Clench Factor 3: 2.3V <voltage> 2.1V

At 2.1 volts, the ASR-1 will power down to avoid problems such as flash corruption.

65015 Linked Timestamp SINT32 The timestamp when the peripheral linked with the Cloud (as set by the Cloud upon successful linking). This is a Unix Epoch timestamp, which is the number of seconds since 1/1/1970.
65018 Attribute ACK SINT16 Reserved
65019 Reboot Reason

A variable-length string of bytes in which the first two bytes represent a specific reason for the most recent boot by ASR, and the remainder provides context-dependent data used internally. The data is provided as ASCII. The reasons represented are shown below.

For ASR-1:

  • 01 = Reset pin asserted
  • 02 = Watchdog reset
  • 04 = Software reset
  • 08 = CPU lockup

For ASR-2:

  • 00 = First powerup reset
  • 03 = Software reset
  • 04 = Watchdog reset
  • 07 = 32.768 kHz crystal failure detection fault occurred
65020 BLE Comms BYTES Reserved
65021 MCU Interface SINT8 This attribute is required in the profile. The default value for this attribute is set by the Afero Profile Editor and any changes to the value at runtime are ignored. The following values are valid:
  • 0 = No MCU
  • 1 = SPI SLAVE
  • 2 = UART