# Authentication of the Trillbit IA61x algorithm

Every time that your application with Trillbit Host library is run, the following steps are to be followed:&#x20;

1. Start by preparing the board drivers.&#x20;
   1. &#x20;Driver initialisation and functioning must be handled by the customer application.
2. Initialize the Host SDK Method Call: trill\_host\_init()
   1. Returns integer: 0 if License is correct and init was successful, else negative error code if init was unsuccessful.&#x20;
   2. This prepares the SDK to interact with the IA61x firmware. Download Trillbit IA61x firmware over UART. Start of external clock through UART.&#x20;
3. Start of Voicewake mode (Refer to Knowles IA61x documentation). This waits for a keyword to be received.&#x20;
4. The keyword that can be detected is defined at- < src/include/trill\_host.h >
5. Depending on the type of keyword received, the following steps are to be executed:&#x20;
   1. Authentication Needed: Authentication is pending. Data received from the SmartMic is to be read through UART and is to be passed to trill\_host\_handle\_auth() method.
   2. Authentication Passed: The SDK is in continuous listening mode and is in data receive state. To safely deallocate the memory allocated, trill\_hos&#x74;*\_*&#x64;einit must be called.&#x20;
   3. If data is detected: Payload is read through RDB.

**Note: Refer to Knowles documentation for more information on how RDB and VoiceWake Mode works.**
