WT32i Test Board

WT32i Test Board Layout

This is a test board for the Silicon Labs WT32i Bluetooth audio module (formerly Bluegiga).

This board is designed to test the Bluetooth audio interface to the GotT but may also prove useful in future applications.

The WT32i is an audio specific Bluetooth® 3.0 Classic module incorporating a certified Bluetooth class 1 radio (~100 meters line-of-sight) and software stack.

Because the WT32i is a Bluetooth Classic module, a headset supporting Bluetooth Classic 3.0 or earlier is required.

While many headsets do have backwards compatibility with Bluetooth Classic devices a headset which does not support Bluetooth Classic 3.0 or earlier will not work with the WT32i.
The only headset currently tested with the GotT test board is the Plantronics Voyager Edge.
Other headsets may or may not work at all.

Prevailing Potential

The power source for the WT32i test board may be provided either directly or stepped down from the +5V provided by the external serial connection USB to UART adapter.

A TPS79933 fixed +3.3V LDO linear regulator is used to provide voltage regulation if power is supplied through the UART adapter.
This regulator can be bypassed, powering the board directly, by connecting a power supply capable of delivering a regulated +3.3V at at least 200mA to the 3.3V header pin near the top left of the board in the layout above.
It is not advisable to attempt to use both methods of powering the board simultaneously.

Shining Spectacle

Two LEDs are included on the WT32i test board.

One is connected to the output of the power supply and will light up when the board is powered on.
The other is connected to PIO3 (PIN 10) of the WT32i and is intended to used to indicate when a headset is connected.
This functionality is controlled through the software API of the WT32i and is covered in the Software section below.

Sound Signaling

The test board provides single-ended stereo analog audio output via a standard 3.5 mm headphone jack.

While the WT32i supports differential audio signaling, which is highly recommended for the perfect common mode noise rejection and superior 3dB higher amplitude, single-ended output was chosen instead.
The primary reasoning behind this was the use of headphones for repeated audio testing and the fact that the current amplifier design only accepts single-ended inputs.

Refined Resonance

The filtering stage of the line out was chosen based upon available reference material and numerous sources of best practices in audio design.

Great Grounding

To avoid RF noise coupling, minimization of Ground loops is critical.
All traces are kept as short as reasonably possible and return current paths are all connected directly to the solid Ground plane immediately by placing Ground vias next to all component Grounds.
A Ground plane follows the audio traces in parallel from start to end and a solid Ground plane runs under the traces wherever possible.

The audio output Ground trace from the 3.5 mm jack is isolated and routed directly back to the external Ground connection.
This was done to establish a 'Star Ground', part of the 'Star Grounding Technique' in which only a single point is considered to be at Ground potential.
Rather than thinking of currents as flowing to Ground and disappearing, all Ground currents are treated as flowing back to this point.
Any other currents can effect this potential along the way so critical Grounds are isolated from the rest of the Ground plane until the 'Star Ground' point is reached.

Audio Affiliation

I2S is a serial bus interface standard used for connecting digital audio devices together.

The I2S connections broken out on the WT32i test board are:

The WT32i is not capable of generating the master clock for I2S.

Connection Conundrum

The WT32i test board was designed to connect over UART using a USB serial adapter such as the TTL-232R-5V.

Could you use a different adapter? You sure could!

(The FTDI chipset based adapters are particularly useful if only for the ubiquitousness of the drivers across operating systems.)
Just ensure that you have access to the Ground(GND), +5V(VCC), TX, and RX signals.

NOTE: Unless you feel like bypassing the regulator on the WT32i board, +3.3V (Such as that provided by TTL-232R-3V3) is insufficient to power the board.

And don't forget to swap your TX and RX lines!

Firmware Framework

The WT32i uses the iWRAP6 Bluetooth Classic Software Stack.

The iWRAP6 API User Guide and Reference Manual documenting all of the commands referenced below can be found here. (Free registration is required)

Any terminal emulator can be used to connect to the WT32i test board.
Here are a few popular options:

The correct serial device can be typically be found in Linux with the command 'dmesg'

$ dmesg | grep "Serial Device"
[  505.844658] usbserial: USB Serial support registered for FTDI USB Serial Device
[  505.845610] ftdi_sio 9-2:1.0: FTDI USB Serial Device converter detected
[  505.848480] usb 9-2: FTDI USB Serial Device converter now attached to ttyUSB0

Serial devices should show up in the '/dev'' directory in Linux and OS X as shown in the Minicom settings below.

In Windows, serial devices typically shows up as a 'COM' port in the Device Manager.

The default serial port settings for the WT32i test board are:

115200 baud, 8 data bits, No parity, 1 stop bit, No hardware/software flow control

While the process of configuring your emulator of choice will vary, here is an example Minicom settings configuration:

    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 115200 8N1                                |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            | Exit from Minicom        |
            +--------------------------+

It is advisable to have the serial adapter connected to a host with a terminal emulator running prior to powering the WT32i test board.

When connecting the board to an external UART adapter ensure that the board is not connected to any other power source.

Upon applying power to the board by connecting the UART header, output similar to the following should be seen in the terminal emulator:

�p����WRAP THOR AI (6.0.0 build 952)
Copyright (c) 2003-2014 Bluegiga Technologies Inc.
READY.

The following commands consist of the input (in lowercase for clarity, though iWRAP is case-insensitive) followed by the output.
Commands used to configure the WT32i on the GotT board are executed in the order presented below.

The 'at' command can be used to check that iWRAP is functional and in command mode.

at
OK

The 'set' command, displays or configures different iWRAP configuration values.
The default values appear as below.
In the event that settings become unusable, the 'set reset' command can be used to restore the module to these factory defaults.

set
SET BT BDADDR 00:07:80:ce:0b:39
SET BT NAME WT32i-E
SET BT CLASS 001f00
SET BT IDENT BT:47 f000 6.0.0 Bluegiga iWRAP
SET BT LAP 9e8b33
SET BT PAGEMODE 4 2000 1
SET BT POWER 6 6 6
SET BT ROLE 0 f 2580
SET BT SNIFF 0 20 1 8
SET BT SSP 3 0
SET BT MTU 667
SET CONTROL AUDIO INTERNAL INTERNAL
SET CONTROL BAUD 115200,8n1
SET CONTROL CD 00 0
SET CONTROL CODEC SBC JOINT_STEREO 44100 0
SET CONTROL CONFIG 0000 0000 0000 1100
SET CONTROL ECHO 7
SET CONTROL ESCAPE 43 00 1
SET CONTROL GAIN 8 8
SET CONTROL MICBIAS b 0
SET CONTROL MSC DTE 00 00 00 00 00 00
SET CONTROL PIO 00 00 00
SET CONTROL PREAMP 1 1
SET CONTROL READY 00
SET CONTROL VREGEN 0 00
SET PROFILE SPP Bluetooth Serial Port
SET

The 'set profile hsp-ag on' command is used to set the Bluetooth profile of the WT32i to HSP-AG to allow the incoming connections from HSP devices.
The 'set bt class 200204' command is used to set the WT32i Bluetooth class value to 200204 which is a hexadecimal value corresponding to a Bluetooth Major Service Class of 'Audio', Major Device Class of 'Phone', and Minor Device Class of 'Cellular'.
These values can be seen here.
Setting the WT32i's profile to appear as a cellular phone will allow for easier pairing of headset devices which commonly look for this device class identifier when pairing.
The 'reset' command applies these settings and resets the device.
The 'set' command is then used to display the new device settings.

set profile hsp-ag on
set bt class 200204
reset
WRAP THOR AI (6.0.0 build 952)
Copyright (c) 2003-2014 Bluegiga Technologies Inc.
READY.
set
SET BT BDADDR 00:07:80:ce:0b:39
SET BT NAME WT32i-E
SET BT CLASS 200204
SET BT IDENT BT:47 f000 6.0.0 Bluegiga iWRAP
SET BT LAP 9e8b33
SET BT PAGEMODE 4 2000 1
SET BT POWER 6 6 6
SET BT ROLE 0 f 2580
SET BT SNIFF 0 20 1 8
SET BT SSP 3 0
SET BT MTU 667
SET CONTROL AUDIO INTERNAL INTERNAL
SET CONTROL BAUD 115200,8n1
SET CONTROL CD 00 0
SET CONTROL CODEC SBC JOINT_STEREO 44100 0
SET CONTROL CONFIG 0000 0000 0000 1100
SET CONTROL ECHO 7
SET CONTROL ESCAPE 43 00 1
SET CONTROL GAIN 8 8
SET CONTROL MICBIAS b 0
SET CONTROL MSC DTE 00 00 00 00 00 00
SET CONTROL PIO 00 00 00
SET CONTROL PREAMP 1 1
SET CONTROL READY 00
SET CONTROL VREGEN 0 00
SET PROFILE SPP Bluetooth Serial Port
SET PROFILE HSP-AG Voice Gateway
SET

The 'set bt ssp 3 0' command configures the Bluetooth 2.1 + EDR compliant SSP mode to 'None' (3) for device capabilities meaning the end device (headset) has no display, keyboard, nor yes/no button, and no (0) man-in-the-middle protection is required by the WT32i but will be attempted if the headset requires it.
The 'set bt auth * 0000' command sets the PIN code for the WT32i.
The asterisk (*) indicates that the PIN will be visible in the output of the 'set' command and the code is set to 0000 which is the default PIN for many Bluetooth headsets.
If pairing is not working you may need to check the user manual for your headset to see if it uses a different default PIN.
The device is then 'reset' to save these settings.

set bt ssp 3 0
set bt auth * 0000
reset
WRAP THOR AI (6.0.0 build 952)
Copyright (c) 2003-2014 Bluegiga Technologies Inc.
READY.

The 'set control cd 8 0' command enables or disables the carrier detect signal (CD) in iWRAP which allows the WT32i to set the state of specified pins HIGH or LOW if there is an active Bluetooth connection.
The 8 is a hexadecimal value corresponding to PIO3 (PIN 10) of the WT32i which the connection LED is attached to.
How this value is determined can be seen in this SiLabs forum post.
The 0 sets the CD signal pin to be driven HIGH if one or more connections are active.

set control cd 8 0

The 'set bt name' command configures the WT32i's 'friendly name'.
This is the name that will be broadcast by the WT32i and detectable by other Bluetooth devices.

set bt name GotT

At this step in the configuration process, the headset is turned on and placed into pair mode.
The procedure for pairing will vary by headset and is typically found in the headset's user manual.
Turning off or moving away from any other Bluetooth devices in the area will make this step significantly easier.

The 'inquiry' command s used to find other Bluetooth devices in the area and is commonly referred to as 'device discovery'.
The 5 is a timeout period (in units of 1.28 seconds) after which the WT32i will stop searching for nearby devices.
Devices found are immediately displayed with the 'INQUIRY_PARTIAL' prefix, MAC address, and the Bluetooth class identifier of the device.
After the timeout period is complete the number of devices found and their information is displayed.
In the event of a single device, this may be the same information as that seen in 'INQUIRY_PARTIAL'.

In the example below a single device is discovered with a MAC address of '0c:e0:e4:6a:01:8e' and a Bluetooth class identifier of '240404'.
Much like the 'set bt class' command above which was used to set the Bluetooth class of the WT32i, this identifier is used to discern information about other devices discovered.
In this case, a hexadecimal value of '240404' corresponds to Bluetooth Major Service Classes of 'Audio' and 'Rendering', Major Device Class of 'Audio/Video', and Minor Device Class of 'Wearable headset device'.
Since this is the class of device we are looking for, write down or copy the MAC address of your device as it will be required in the following step.

inquiry 5
INQUIRY_PARTIAL 0c:e0:e4:6a:01:8e 240404
INQUIRY 1
INQUIRY 0c:e0:e4:6a:01:8e 240404

The 'pair' command is used to pair the WT32i with other Bluetooth devices, such as the headset discovered in the above example.
With the headset still in pair mode, use the MAC address discovered with the 'inquiry' command to pair the WT32i with the headset.
If the pairing is successful, an 'OK' message will be displayed.

pair 0c:e0:e4:6a:01:8e
PAIR 0c:e0:e4:6a:01:8e OK

The 'ring 0 {bluetooth-address} HSP-AG' command is used to establish a call or audio connection to the headset.

ring 0 0c:e0:e4:6a:01:8e 5 HSP-AG 
HSP-AG 0 VOLUME 8
HSP-AG 0 MIC 15

All of the above commands need only be run once for proper configuration of the WT32i and pairing of a headset.
Power-cycling the WT32i and/or headset will often result in automatic pairing and connection establishment of the devices.
Occasionally, the headset may need to be power-cycled for this process to automatically complete successfully.

Subsequent connections should not require any UART access to the WT32i and the device may be externally powered after removing the serial adapter.
The only step necessary to creating an audio connection to the WT32i once the devices are automatically paired is to press the call button on the headset.

Pressing the call button on the Bluetooth headset will result in the following output indicating that a 'call' or voice connection has started.
While viewing this output is not critical to the functionality of the audio connection, it is useful for debugging purposes.

HSP-AG 0 BUTTON
CONNECT 1 SCO

Design Dossier

All of the design files and BOM for this board can be found on the GotT-Translation-Circuit GitHub page and PCBs may be ordered here:

Order from OSH Park

© 2016 Noctivore