Licensing and Setting up Trillbit Host library

Access your TrillBit developer account

  1. Create or login to your TrillBit Developer account at: https://developers.trillbit.com/

  2. On the home page, you will see platforms supported with 15 evaluation licenses for platforms- Android, iOS, Embedded and Knowles SmartMic host boards.

  3. On selection of Knowles platform, you will see:

    1. Section to download Credentials file-credentials.json for licensing the Trillbit SDK for your application.

    2. Section with a link to Github page for Trillbit SDK for Knowles. Pre-compiled binary IA611-SAMD21-DEMO1.bin is available to download from the github repository- https://github.com/Trillbit-Inc/TrillbitSDK-knowles/tree/main/IA611-SAMD21-DEMO/Binfiles

  4. Host source code github page would contain:

    1. Pre-compiled host-library for the platform SAMD21.

    2. Demo application for SAMD21 and corresponding source code.

    3. Python script for licensing procedure.

    4. Supporting documents and User guides.

Get your credentials file

This credentials file is required for the authentication and licensing of your Trillbit SDK.

Please access your credentials file and download here-https://developers.trillbit.com/

Setup the host-board

Connect the IA611 Xplained Pro extension board to EXT2 connector of SAMD21 Xplained Pro board as shown below.

Setup Serial Terminal Program

You can use any serial terminal program to view the output from Demo application. This document will use Tera Term.

Demo application uses EDBG UART to communicate with PC/User.

Connect the DEBUG USB port of the board to PC with a micro USB cable and open Tera Term. EDBG COM Port number on your PC may be different.

Demo application configures EDBG UART as 115200 8-n-1.

To set this settings in Tera Term, select Menu Setup -> Serial Port and enter values as shown below, then click button New Settings.

To correctly display Demo output in Tera Term, select Menu Setup -> Terminal and enter values as shown below, then click button OK. Ignore the locale, output will be only ASCII.

Flash the Demo Binary

The demo binary is located on the Trillbit repository-at Binfiles/IA611-SAMD21-DEMO.bin

Connect the DEBUG USB port of the board to PC with a micro USB cable. On Windows OS, File explorer will open up showing the XPLAINED drive contents.

Copy-Paste the demo binary to this XPLAINED drive. Copying process may take some time as on-chip debugger flashes the binary. NOTE: You will not see the binary file in the XPLAINED drive once copying is done. Check serial terminal output after copying is done.

Alternatively- Create your own binary

You may also compile the host-library at https://github.com/Trillbit-Inc/TrillbitSDK-knowles, to create your own binary for the SAMD21 host board.

To do so, use- https://www.microchip.com/en-us/tools-resources/develop/microchip-studio.

Note: This use of this tool is only be supported on Windows.

Getting Trillbit Host SDK License

If this is the first time board was flashed or reflashed after chip erase then you will see a license not found message on serial terminal.

Setup Python Environment

Ensure you have python3 installed on your PC. Open command prompt shell (Not Power Shell) and run the following commands in the scripts folder.

> python -m venv py_env
> py_env\Scripts\activate.bat
> pip install pyserial requests

* Run with sudo in commands if permission is denied. 

Before running the license program disconnect Tera Term from Menu File -> Disconnect, otherwise license program will report permission or busy error.

Once python setup is complete run the license program in the scripts folder.

Follow the instructions the from the license program. If successful you will see LED0 on SAMD21 board blink once when IA61x is configured. And blink 4 times when Trillbit algorithm accepts authentication and is ready for data detection.

License your SDK

  1. Run the license_device_script.py file and provide the path to the credentials file downloaded.

If not downloaded already, please download the credentials.json file from the TrillBit dev-portal.

>python3 license_device_script.py <path-to-thecredentials-file>

3. The license_device_script.py file will proceed to license your board.

4. You will now see the message:

 "Trillbit IA61x Algorithm is ready. Listening for data over sound…." 

Your device is now licensed and ready to be integrated with the Trillbit library.

You may now disconnect the host board from your computer.

Using the Demo

After License was downloaded in the previous step, SAMD21 was ready to detect data however since the Tera Term was disconnected you won't see any messages.

Connect Tera Term again and press the RESET switch on SAMD21 board. You will see messages as below on the terminal. When you see the message indicating algorithm is ready for data detection, play some data sound on the TrillPlay app. Point the phone/speaker towards IA611 board. Currently only SSI0 is supported.

The number before Data Detected event indicates how many events were detected till now. The number in the Payload parentheses indicates payload length.

Sending data from TrillPlay

You may use the TrillApp - https://play.google.com/store/apps/details?id=com.trill.play , as the sender configuration your mobile phone, to send messages to the SmartMic IA61x.

Last updated