Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get started
Connect with Matter
Alexa Connect Kit
Add-ons
Certify
Resources
Skip to main content
This page provides an overview of how to support ACK device interactions in your host microcontroller unit (HMCU) application logic by using the Alexa Connect Kit (ACK) Device SDK.

Support device states

As you transition through the module lifecycle, your device takes on various device states. These states dictate what your device can and can’t do at a given moment in time. The ACK Device SDK uses the ACKUser_OnLifecycleStateChange callback in your application to indicate the transition between the states. For more details about designing your device to handle the following ACK_LifecycleState variables, see Device States.
Device state SDK variableDescription
ACK_LIFECYCLE_UNAVAILABLEACK module isn’t available.
ACK_LIFECYCLE_BOOTEDACK module is booted.
ACK_LIFECYCLE_FACTORY_RESET_IN_PROGRESSACK module is processing a factory reset.
ACK_LIFECYCLE_NOT_REGISTEREDACK device isn’t registered to Alexa and isn’t available for device setup.
ACK_LIFECYCLE_IN_SETUP_MODEACK device isn’t registered to Alexa and is available for device setup.
ACK_LIFECYCLE_CONNECTED_TO_ALEXAACK device is registered with Alexa and established a connection to the Alexa services.
ACK_LIFECYCLE_NOT_CONNECTED_TO_ALEXAACK device is registered with Alexa but hasn’t established a connection to the Alexa services.
The following example shows a sample implementation of the ACKUser_OnLifecycleStateChange callback that prints out the current state of a device.

Support user-initiated triggers

A user-initiated trigger is an action that occurs on your ACK-based device, after a user completes a pre-programmed pattern, such as pressing a unique button combination. You typically use these triggers to transition devices into a specific device state. For more details about designing your device to handle these triggers, see User-Initiated Triggers.
User-initiated trigger SDK variableDescriptionAction
ACKUser_DoesUserWantFactoryResetInitiate a factory reset.Application must return true to start the factory reset.
ACKUser_DoesUserWantUserGuidedSetupInitiate User-Guided Setup (UGS) mode.Application must return true to start UGS.
ACKUser_DoesUserWantToSubmitLogsInitiate log upload.Application must return true to start uploading the logs.
ACKUser_EraseUserSettingsErase user settings stored on the device (not a factory reset).Application must to erase on-device user preferences (if any) and return to the factory defaults.
ACKUser_IsDeviceInUseChecks if the device is currently operating. For example, when a microwave is cooking. Use this mode to prevent potentially disruptive operations, such as sending an over-the-air (OTA) update.Application should return true when the device is in-use.
ACKUser_GetFirmwareVersionRetrieve firmware version of a device.Application must to return the current device firmware version as a 64-bit integer. Report the device firmware versions in ascending order.
The ACK Device SDK defines several application callbacks that should be used to change the state of the ACK module in response to the user interactions. The following code example shows how you could program your user-initiated triggers to respond to device states.
Last modified on November 27, 2023