Gumstix Chatterbox User manual

Gumstix Chatterbox for Colibri iMX7
Quickstart Guide
Revised March 7, 2018
3rd party copyright nods

1 Introduction
The Gumstix Chatterbox for ToradexrColibri™ iMX7 is a development expansion board for Amazonr’s Alexa™ Voice
Services (AVS). Its features include:
• 2.5-Watt speaker driver
• on-board microphone
• headphone and line-in jacks
• microSD card slot, Ethernet port
• WiFi/Bluetooth 4.0 + BLE module
• 4 programmable pushbuttons
• 4 programmable LEDs
• USB port
This guide provides the instructions for getting an example AVS application running on the Chatterbox for Colibri iMX7
using a custom disk image provided by Gumstix. The instructions assume you will initially be using the Ethernet connection
on the Chatterbox to configure Alexa. In order to configure WiFi, follow the instructions at the following page:
https://www.gumstix.com/support/faq/yocto-wifi/
2 Materials
You will require the following tools to set up your Chatterbox device:
• Chatterbox for Colibri iMX7 development board
https://store.gumstix.com/colibri-imx7-chatterbox
• Colibri iMX7 System on Module (SOM) from Toradex:
https://www.toradex.com/products/nxprfreescale-imx-7
• 5V AC/DC power adapter
Eg. https://store.gumstix.com/5v35a-us-power-adapter.html
• External speaker or headphones
• Ethernet cable
• 4+Gigabyte MicroSD card
• USB Type-A to micro-B cable
• Ethernet cable with Internet connection
It is recommended that you flash your Colibri iMX7’s FLASH memory or eMMC with the latest bootloader from Toradex.
Instructions for the flashing process can be found at:
https://developer.toradex.com/knowledge-base/build-u-boot-and-linux-kernel-from-source-code
1

3 Step 1: Creating MicroSD Card
Follow these instructions on your PC:
1. Download the disk image from the following link:
https://gumstix-misc.s3.amazonaws.com/uploads/wo59420b.img.xz
2. Decompress the image. Windows users may have to download third-party software such as 7-Zip in order to extract
the disk image.
3. Insert the microSD card into a reader connected to your PC.
4. Write the disk image to the SD card
• Linux users: Use the following command at the terminal
# sudo dd if=path-to/wo59420b.img of=/dev/sdb bs=4M
/dev/sdb may change depending on your PC’s configuration
• MacOS X users: you may also use ‘dd’ to flash your microSD card. Detailed instructions are avaialble here:
https://www.cyberciti.biz/faq/how-to-create-disk-image-on-mac-os-x-with-dd-command/
• Windows users: use a tool such as Win32DiskImager (https://sourceforge.net/projects/win32diskimager/)
to write the image to the SD card
4 Step 2: Setting Up AVS
Follow these instructions to sign up for Amazon’s Alexa Voice Service for developers:
1. in your browser, go to https://developer.amazon.com/alexa-voice-service and click Sign In.
2. login or register a new account with Amazon Developer.
3. Hover over Your Alexa Consoles and click on Products.
4. On the next screen, click on Get Started
5. Fill in the details for your device. When asked how end users will interact with the product, you may select
touch-initiated and/or hands-free. The Chatterbox development board does not support far-field voice detection by
default.
6. Select or create an LWA security profile for your device.
7. Read and agree to the AVS agreement and program requirements and click ‘Finish’
5 Step 3: Connecting the Board
The next step in setting up AVS on the Chatterbox is to connect the board’s peripheral components. Use Figure 1to help
locate the board connections described below.
1. Connect the USB cable’s micro-B end to the port labeled ‘console’ and the Type-A end to a USB port on your PC.
2

Figure 1: Board Layout Guide
2. Connect the Ethernet cable to the RJ-45 port.
3. If you are using an external speaker, connect its lead wires to the spring terminal points - red wire to ‘SPKR+’, and
black to ‘SPKR-’. Alternatively, there is also a 3.5mm headphone jack for audio output. You can attach a wired
headset or powered speaker to this port.
4. If you would like to use an external microphone in stead of the on-board mic, there is a line-in jack to which you
can connect it.
5. Insert the gold edge of the Colibri iMX7 SOM into the Chatterbox’s SO-DIMM slot at a 45° angle with the notch
on the left-hand side and press the upper edge toward the board until the connector’s retaining arms lock the SOM
into place.
6. Insert the microSD card to which you wrote the disk image into the Chatterbox’s microSD slot found next to the
Ethernet port.
3

6 Step 4: Configuring Chatterbox for Colibri iMX7
This step will set your development board up to connect to the Alexa Voice Service with the basic functionality provided
by the example application included with the disk image provided.
1. Connect to the Colibri’s serial port by way of your PC.
• Linux and Mac users: use the screen command from the terminal:
# sudo screen /dev/ttyUSBx 115200
Replace ‘ttyUSBx’ with the name of the file that appears in the /dev directory when the board is connected.
• Windows users: Terminal emulators such as PuTTY can be used to connect to the Colibri’s serial port.
PuTTY can be downloaded from:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Use the app’s setup wizard to connect to the device’s COM port with a baud of 115200.
2. FIRST BOOT ONLY:
(a) Connect the power adapter to the Chatterbox and hit any key in the terminal window when the following text
appears:
U-Boot 2016.11-2.7.2+g60021a4 (Apr 10 2017 - 03:49:01 +0200)
CPU: Freescale i.MX7D rev1.2 996 MHz (running at 792 MHz)
CPU: Extended Commercial temperature grade (-20C to 105C) at 30C
DRAM: 512 MiB
PMIC: RN5T567 LSIVER=0x01 OTPVER=0x0d
NAND: 512 MiB
MMC: FSL_SDHC: 0
Video: 640x480x18
In: serial
Out: serial
Err: serial
Model: Toradex Colibri iMX7 Dual 512MB V1.1C, Serial# 0***14**
Net: FEC0
Hit any key to stop autoboot: 2
(b) You are now in the U-Boot environment. You may need to edit a portion of the sdboot script in order to boot
the device. Type:
# printenv sdboot
(c) If the string ‘${soc}-colibri-emmc-${fdt_board}.dtb’ appears in the text display, you will have to change
it by following these steps:
• Type:
4

# editenv sdboot
• Change ‘${soc}-colibri-emmc-${fdt_board}.dtb’ to ‘${soc}-colibri-${fdt_board}.dtb.’
• Hit enter.
(d) Type:
# setenv fdt_board gumstix
# setenv bootcmd sdboot
# saveenva
# run sdboot
aIf U-Boot reports that ‘saveenv’ does not exist, please update the U-Boot image on the Colibri’s on-board memory.
3. Once the login prompt appears, type root and hit enter.
4. IMPORTANT: This disk image is configured to be accessed without passwords initially. It is strongly recommended
that you add a password to the admin (root) account. type ‘passwd root’ and enter a password twice. You will
now be prompted for this password whenever you access the device’s terminal.
5. You will need the device’s IP address to continue. Type ‘ifconfig’ and copy the IP address for eth0.
6. Go back to your web browser and your ‘AVS Products’ dashboard, and click the ’Manage’ link for your product.
7. Click on the ‘Security Profile tab and add the following line to the ‘Allowed Return URLs’ field:
http://<device-ip-address>:3000/authresponse
8. Click the update button.
9. Open tbe Alexa configuration file at the Colibri’s console:
# vi /etc/alexa/AlexaClientSDKConfig.json
10. Copy the client secret, client ID and product ID from the AVS dashboard into the "authDelegate" properties of the
config file.
11. Run the server authorization script in the Colibri’s console:
# python /etc/alexa/AuthServer.py
12. The script will display a URL. Enter this URL into your web browser and login to your Amazon Developer account
as prompted.
13. Restart the Chatterbox. The Alexa voice service is now running on your Gumstix Chatterbox for Colibri iMX7
5

External Links
https://developer.amazon.com/alexa-voice-service, 2
https://developer.toradex.com/knowledge-base/build-u-boot-and-linux-kernel-from-source-code,
1
https://gumstix-misc.s3.amazonaws.com/uploads/wo59420b.img.xz, 2
https://sourceforge.net/projects/win32diskimager/, 2
https://store.gumstix.com/5v35a-us-power-adapter.html, 1
https://store.gumstix.com/colibri-imx7-chatterbox, 1
https://www.chiark.greenend.org.uk/\protect\unhbox\voidb@x\penalty\@M\{}sgtatham/putty/latest.
html, 4
https://www.cyberciti.biz/faq/how-to-create-disk-image-on-mac-os-x-with-dd-command/, 2
https://www.gumstix.com/support/faq/yocto-wifi/, 1
https://www.toradex.com/products/nxprfreescale-imx-7, 1
6
Table of contents