Build the AVS Device SDK

Download the SDK Configuration Scripts

Next, get the AVS Device SDK configuration scripts from the AVS SDK Github repo. These scripts contain all the logic to build the SDK with single command. When you run them, they download the AVS Device SDK and install any required dependencies. These scripts get updated with each SDK release and automatically download the latest SDK for you.

Open your terminal to the /home/pi directory. Enter the following command as single block statement.

wget \
wget \

Run the Install Script

The script builds the SDK and installs dependencies that allow your device to the following.

  • Maintain an HTTP/2 connection with AVS.
  • Play Alexa TTS and music.
  • Record audio from the microphone.
  • Store records in a database (persistent storage).

To run the install script, open a terminal and run using your config.json file and a device serial number (DSN) as arguments. If you get an error, make sure your config.json file is in the same folder as the script.

cd /home/pi/
sudo bash config.json [-s 1234]

The field in brackets is the Device Serial Number which is unique to each instance of the SDK. In the example, it's pre-populated with 1234. If you don't supply a DSN, the SDK generates of default value of 123456.


Agree to the Terms and Conditions

Third-party Libraries

When prompted with the licensing terms from our third-party libraries, enter "AGREE" — Unless, of course, you disagree! Agreeing to the conditions starts the installation process which might take over 20 minutes.

Sensory Wake Word

At some point, the SDK installation pauses and asks you to accept Sensory Wake Word's terms and conditions — you must type yes to accept. The Wake Word Engine (WWE) from Sensory compares incoming audio to an onboard model of a wake word ("Alexa"), and initiates the transmission of audio to the cloud when triggered.

The WWE is for prototyping devices only. If you intend to ship a commercial device, you must get a WWE license.

Once you've finished compiling, a success message appears — [100%] Built Target SampleApp. If your device freezes - don't worry, restart it by unplugging your Pi's power cord. When you get back to your desktop, re-run the above command to finish your install.


Next, launch the sample app and get a refresh token from AVS. A refresh token allows your device to authenticate with the cloud via Login With Amazon (LWA).