Bluetooth Demonstrations > BM64 and BM71 Driver Demonstrations > bm64_a2dp_hfp > Running the Demonstration
MPLAB Harmony Bluetooth Help
Running the Demonstration

Do the following to run the demonstration:

  1. Using the BM64_bootloader application, if you have not done so, configure the BM64 as an I2S slave device and give it a unique device name. (If using the BTADK for this project, you will need to use either the PIC32 MZ EF Curiosity 2.0 or E70 Xplained Ultra version of the BM64_bootloader since there isn't one for the BTADK.)
  2. Connect a pair of headphones to the headphone out connector on the AK4954 Codec Daughter Board.
  3. Compile the application, program the target device, and run it. While compiling, select the appropriate MPLAB X IDE project configuration. Refer to Building the Application for details.
  4. Press and hold the Pair Button on the development board (see Table 1) to put the BM64 Module into pairing mode, indicated by the two LEDs on the BM64 Module flashing alternately.
  5. In the Bluetooth Settings of your smartphone, find the name of the BM64 which you set up in Step 1, then select and pair with it. The two LEDs on the BM64 Module should stop flashing, and instead just one should flash twice every few seconds. Meanwhile the Connection LED should be lit (see Table 2).
  6. Go into an application on the smartphone that outputs audio, such as Music. Select a song and press play. The Play LED should now be lit and you should hear audio from the headphones.
  7. Use the Volume Button to increase the volume, the Play/Pause Button to alternately pause and resume the playback, the Next and Previous Buttons to go to the next or previous song (or use a long press of Next/Previous for fast forward or rewind). Set Table 1 below. The LEDs should change state as shown in Table 2.
  8. Use a long press of the Next Button to disconnect from the smartphone, and a another long press of Next Button to reconnect. Use a long press of Volume Button and Play/Pause Button together to forget all previous pairings.
  9. Call the smartphone from another phone such as a wired desk phone. When the smartphone is answered, either automatically or manually, the audio should switch over to the BM64. Talking into the handset of the desk phone should come out of the headphones, and talking into a microphone connected to the BM64 Module should come out of the desk phone handset. During the call, the LEDs should change state as shown in Table 2. When the call is terminated, any A2DP streaming that was in progress should resume.
Control Descriptions

Table 1 -- Button Assignments

Bluetooth Audio Dev Kit 
PIC32 MZ EF Curiosity 2.0 
Description 
SW1 
SW1 
Volume, in four increments: mute, 33%, 66%, 100% (Start Pairing if held down > 1 second) 
SW3 
SW4 
Next Song (Fast Forward if held down > 1 second) 
SW4 
SW3 
Play/Pause (Disconnect if held > 1 second) 
SW5 
SW2 
Previous Song (Rewind if held down > 1 second) 

Table 2 -- LED States

Bluetooth Audio Dev Kit 
PIC32 MZ EF Curiosity 2.0 
Description 
D5 
LED1 
Lit if 8/16 KJHz (HFP mode) 
D6 
LED2 
Lit if Bluetooth module connected to host 
D7 
LED3 
Lit if 44.1/48 KHz mode (A2DP streaming) 
D8 
LED4 Blue 
Lit if Fast Forward Mode (for PIC32 MZ EF Curiosity 2.0 board, blinking if volume muted) 
D8 
LED4 Yellow 
Lit if Rewind Mode (for PIC32 MZ EF Curiosity 2.0 board, blinking if volume muted) 
D9 
LED4 Green 
Lit if Playing (blinking if volume muted) 
 
LED4 Red 
Lit if Paused/Stopped (blinking if volume muted)
For Bluetooth Audio Dev Kit, D8 and D9 are both off if paused/stopped