Zune BT Console

Introduction, Problem Statement and the Twist
The LVL1 Hackerspace in Louisville Kentucky has seen many mp3 players, cell phones and streaming services. But when I, Director of Legal Evil Emeritus, indulge in the Hack-a-Thons, I bring a Zune. And although there are many invasive hacks in wild, I thought I would attempt BT without damaging a device and adding the AVRCP functionality that the common BT fob does not add to the experience. To that end, this is my story/hack, and I am sticking to it.
The Story, Probably Apocryphal
All the cool kids know, “Zune is where its at”, but the whole Bluetooth thing is the next level. This collision of paradigms must be reconciled. My choice was to respect the integrity of the Zune ecosystem while bringing in the new hot topic. So I collected my options and evaluated them as follows:
Whys and Wherefores
There are already Zune mods/hacks for adding Bluetooth. Most are permutations on putting a commercial BT transmitter inside the Zune. These work, but I have a BT speaker with volume, play/pause and skip buttons. These functions can not “inform” the Zune to do anything through a common audio input only BT transmitter. The functions for the button do exist on the Zune and are incorporated in the IR remotes for Zune docks. This mean that a Zune in a dock, connected to a BT transmitter and in line of sight of the dock remote can perform the functions. But I don’t want to keep a remote and line of sight to perform what the speaker already has buttons for as well as headphones with similar buttons.
My spin on the build is to use a BT transmitter that can trap the button functions and relay them to the Zune, via the dock. This means that if I emulate a dock remote based on the AVCRP signals trapped by the BT transmitter then mission accomplished.
My first idea was to use the KCX_BT_Emitter and monitor the serial communications line for the signals and react appropriately. But the KCX doesn’t always show the signals on the serial line. After multiple ways of resetting the module, initializing the connection, and other strategies, it was not consistent.
Next was to use an ESP32 and look for the signal. I found a library that already did what I wanted. I needed to make adjustments for my hardware choices. When I posted about my project, the author discussed some changes and update suggestions.
Now I had the ability to send audio to BT devices and trap the signals from the buttons, I needed to supply directions to the dock. This would be done by emulating a dock remote. This method did not require any hardware changes to the Zune ecosystem hardware. It also allows functioning across the 3 generations of Zune docks and players.
I realize that without the ESP32, this is simply using a BT transmitter and an IR LED bright enough to be seen through walls. And yet, this is a solution with self imposed restraints that allowed me to delve into BT and Zunes. I guess I just had an opportunity to learn and I took it.
Add Bluetooth Function To Zune Usage

Not Invasive / No Shell Cracking
- Plug In Commercial BT Module
- Safe, Simple and Finite
Invasive / Shell Cracking
- Remove Commercial BT Module Shell
- Crack Open Zune Shell
- Solder Power and Audio Lines from Zune to Module
- Seal It Up
- Risky Operations / Finite Results
Embrace A Special Kind of Madness
- Build an External BT Sending Device
- Incorporate Zune Response to BT Speaker/ Headphone AVRCP Messages
- Don’t Crack a Single Microsoft Casing
- The Road Less Travelled Has The More Interesting Potholes
Parts

| Item | Quantity | Purpose |
|---|---|---|
| ESP32 Wrover | 1 | Bluetooth Transmitter |
| Minimal Arduino | 1 | IR Transmitter via I2C |
| PCM1808 | 1 | I2S ADC |
| SSD1306 | 1 | Info Display |
| IR LED | 1 | IR Transmission |
| IR Photo-Transistor | 1 | IR Receiver |
| Logic Level Shifter | 1 | I2C 3.3V vs 5V Translation |
| Stereo Phono Socket | 1 | Analog Audio In |
| Tactile Switches | 4 | Future Use |
| USB A to micro USB | 1 | Power / Programming |
Wiring Components
Signal Wiring

| ESP32 | PCM1808 | OLED Display | Buttons | Level Shifter |
|---|---|---|---|---|
| 0 | SCK | |||
| 14 | BCK | |||
| 15 | LRC | |||
| 32 | OUT | |||
| 21 | SCL | LV2 | ||
| 22 | SDA | LV1 | ||
| 25 | Green | |||
| 26 | Red | |||
| 27 | White | |||
| 33 | Black |
| Minimal Arduino | IR LED Unit | IR RX Unit | Level Shifter |
|---|---|---|---|
| D3 | DAT | ||
| D5 | DAT | ||
| A4 | HL1 | ||
| A5 | HL2 |
Power Wiring
- ESP32 Wrover provides 5V and 3.3V power.
- The PCM1808 requires 5V and 3.3V with the signals using 3.3V
- The SSD1306 Display requires 3.3V
- The minimal Arduino runs on 5V supplied by the ESP32 Wrover
- A jumper on the Arduino allows it to be isolated from the ESP32 5V line when programming it is necessary.
- The IR LED and IR RX require 5V
- The Level Shifter provides the bridge between the 3.3V signals of the ESP32 I2C and 3.3V I2C of the Arduino
Notes on the Build
PCM1808
When I chose this I2S ADC, I didn’t have much info. I looked at the datasheet and went forth. Most of the implementations on the web seemed to say there where problems, it was peculiar or it just worked.
My experience was complicated by a pcm1808 module that did not work. After some frustrations and verification that the timing signals into the PCM1808 with a scope were in spec, I bought another PCM1808. I plugged it in and it just worked from the standpoint of sending data down the I2S path.
Next came the 24bit output per channel and the need to make it 16bit per channel. This had an interesting twist. The 24bits would be in a left justified 32bit storage. The datasheet for the pcm1808 alluded to this along with a stray web reference. So, 16 bit right shift and storage in the proper variable type yielded success.
IR Send / Receive Library
There are several libraries out there. A couple had the effect of decoding the Zune IR Remotes, but could not duplicate the IR remote when sending. This was annoying. I simply looked for other libraries until I found one that created output that the docks recognized. This libraries and another are identified in the software portion of this write-up.