Wireless Audio Bluetooth Adapter w/ BC127

Pages
Contributors: bboyho
Favorited Favorite 13

Configuring the BC127 as Sink

Before I started building the project, I needed to understand the commands to configure the audio Bluetooth. The user manual was a little confusing at first so I decided to test the commands using a USB-to-serial converter and a serial terminal. Through testing, I found that the BC127 would somehow re-configure itself as a source Bluetooth and it would not accept any new connections. I also did not like having HFP profile turned on when there was an incoming call. I decided to use a microcontroller to automate the commands as soon as I was able to configure these settings:

  • Setting the Bluetooth's Name
  • Setting as a Sink Bluetooth
  • Become Discoverable
  • Autoconnect with a Previous Paired Device
  • Turning off the HFP

Configuring the BC127 with an FTDI

To configure, a USB-to-serial converter was needed to send serial commands. A 1x6 row of the right angle header was broken off and soldered to the pins to the BC127's FTDI port.

Configuring BC127 with an FTDI

Once the FTDI was connected to a computer using a mini-B USB cable and the drivers were installed, the commands were tested through a serial terminal set at 9600 baud, 8-data bits, no parity, 1-stop bits, and no flow control.

Restoring the BC127

Just in case, the BC127 was restored to its default state with the commands listed below. In order to send a command, a carriage return was required. Make sure to press "Enter" on a keyboard when typing the commands and the serial terminal was not sending additional characters. The BC127 should respond with an "OK" after each command:

restore
write
reset

Naming the BC127

Next up was setting up the audio Bluetooth's name to make it easier to recognize. I decided to name the Bluetooth "BlueTank1750". To set the name of the BC127 from the default BlueCreation-XXXXXX to a custom name, the manual indicated that a set command needed to be issued with the configuration parameter equal to the new value. The following commands were issued:

set name=BlueTank1750
write
reset

To view if the name has been saved after reset, the following command was issued:

get name

As a result, the BC127 responded with the configuration parameter and value:

name=BlueTank1750

Setting the BC127 as Sink Bluetooth

To ensure that the BC127 was set to sink, the following commands were issued:

set classic_role=0
write
reset

Setting the BC127 as Discoverable

To test the BC127 with a smartphone's audio Bluetooth, the BC127 needed to be set to discoverable by issuing the following command:

DISCOVERABLE ON

Connecting a Source to a Sink Bluetooth

To connect, I found it easier to turn on a smartphone's source Bluetooth and have it scan for Bluetooths in range. The BC127 (in this case it was called BlueTank1750) was selected from the list of available Bluetooths to pair and connect. Once selected, a 3.5mm audio cable and speaker were connected to the audio jack labeled "Headphone / Line Out". Using the smartphone's music player, a track was played. After successfully playing music, I continued on to the next configuration setting.

Setting the BC127 for Auto Connect

To make the Bluetooth auto connect everytime it was powered up, the following commands were issued:

set autoconn=1
write
reset

After sending the commands, any smartphone with a "source" audio Bluetooth enabled was able connect to the BC127 as a "sink" as long as it was connected previously. The device will remember the Bluetooth address and connect to the first audio Bluetooth in its vicinity that it remembers.

Since the reset command was issued, the BC127 restarted and automatically searched for the next available Bluetooth that it was able to remember. In this case, it was the same smartphone that was used in the previous test.

Turning Off the HFP

The last feature to implement was the configuration of the HFP. To turn off the HFP the following commands were issued:

set enable_hfp=off
write
reset