Licensing and Setting up Trillbit library

Step 1: 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 ESP-32 S3.

  3. On selection of the ESP-32 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 ESP-32 Pre-compiled binary https://github.com/Trillbit-Inc/TrillbitSDK-ESP32-S3/blob/master/pre_built_bins/trillbit_esp32_sdk_demo_v1.0.bin is available to download from the github repository

  4. Host source code https://github.com/Trillbit-Inc/TrillbitSDK-ESP32-S3 page would contain:

    1. Pre-compiled library for the platform ESP-32 S3.

    2. Demo application for ESP-32 S3 and corresponding source code.

    3. Python script for licensing procedure.

    4. Supporting documents and User guides.

Step 2: 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/

Step 3: Setup ESP-32 S3- Flashing from Pre-built Binary

1. For Windows

  • Browse for the downloaded pre-built binary file and select SPI flash download settings as shown below

  • Click Start. Once the download progress shows Finish status, reboot s3-box by pressing the Reboot switch (below USB connector).

2. For Mac OS and Linux:

  1. Install python3 on your system, if not already installed.

  2. Connect your development board to the computer through a USB Type-C cable.

  3. Install 'esptool' by entering the following command in Terminal (pip3 can be specified as pip): pip3 install esptool

  4. On Terminal, execute a 'git clone https://github.com/Trillbit-Inc/TrillbitSDK-ESP32-S3.git' to create a copy of the TrillbitSDK-ESP32-S3 repository on your machine.

  5. At the top directory of the cloned repository, execute the following:

python3 -m esptool --chip esp32s3 write_flash 0x0 
pre_built_bins/trillbit_sdk_demo_v1.0.bin

* Run with sudo in commands if permission is denied. 

6. Press reset button to test the firmware.

Step 4: Building your own custom Trillbit binary

  1. Visit Espressif's Quick Start Guide- https://github.com/espressif/esp-box#quick-start, and follow the instructions under Quick Start section.

  2. In Step 3, clone the respository for ESP-32 S3 box- https://github.com/Trillbit-Inc/Trillbit-esp-box .

  3. Follow rest of the steps as mentioned in the Espressif Quick Start Guide.

Step 5: Licensing your Trillbit SDK

Setup Python Environment

Ensure you have python3 installed. Plug the USB-C cable to S3-Box and your PC. On power up you will see license missing message on the display of s3-box.

  1. Run the license_device_script.py file, at the script location- TrillbitSDK-ESP32-S3/scripts/license/ .

  2. Provide the path to the credentials file downloaded.

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

For eg. At the top directory of your TrillbitSDK-ESP32-S3 clone directory, you would need to execute the following:

>cd scripts/license/
>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 success message. Your device is now licensed and ready to be integrated with the Trillbit library.

Step 6: Using the Demo

On successful licensing, you would see the following SDK demo display

  • Use the Mobile app to send data over sound.

  • Received message would be displayed on the screen. Number prefixing the message increments for each received message.

  • Tap Echo button to send back the last received message. If no last message is present then a default message would be sent.

  • Tap Stop to stop and de-initialize the SDK.

  • If stopped, tap Start to re-initialize the SDK to start receiving messages again.

  • You can also view the console messages over USB/UART. Use the monitor tool of idf

$ cd ~/trillbit
$ . esp-idf/export.sh
$ cd mtfsk-esp32-s3-box
$ idf.py -p </dev/tty?> monitor

Step 7: Sending data from TrillConnect

You may use the TrillApp - TrillIoT , as the sender configuration your mobile phone, to send messages to the ESP32-S3.

Last updated