Microchip Technology RN-52-EK User Manual

Microchip Technology RN-52-EK User Manual

Bluetooth audio module command reference

Advertisement

Quick Links

®
Bluetooth
Audio Module
Command Reference
User's Guide
 2014 Microchip Technology Inc.
DS50002154A

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RN-52-EK and is the answer not in the manual?

Questions and answers

Summary of Contents for Microchip Technology RN-52-EK

  • Page 1 ® Bluetooth Audio Module Command Reference User’s Guide  2014 Microchip Technology Inc. DS50002154A...
  • Page 2 Total Endurance, TSHARC, UniWinDriver, WiperLock, ZENA and Z-Scale are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. GestIC and ULPP are registered trademarks of Microchip Technology Germany II GmbH &...
  • Page 3: Table Of Contents

    2.1 Command Syntax ..................25 2.2 Set Commands ..................... 25 2.3 Get Commands .................... 30 2.4 Action Commands ..................32 Appendix A. Command Quick Reference Guide Appendix B. Firmware Revision History Worldwide Sales and Service ..................40  2014 Microchip Technology Inc. DS50002154A-page 3...
  • Page 4 Bluetooth Audio Module Command Reference User’s Guide NOTES:  2014 Microchip Technology Inc. DS50002154A-page 4...
  • Page 5: Preface

    – This appendix displays tables of firmware commands and factory defaults for the Bluetooth Audio Module Command Reference. • Appendix B. “Firmware Revision History” – This appendix is a revision history of the firmware.  2014 Microchip Technology Inc. DS50002154A-page 5...
  • Page 6 Curly brackets and pipe Choice of mutually exclusive errorlevel {0|1} character: { | } arguments; an OR selection Ellipses... Replaces repeated text var_name [, var_name...] Represents code supplied by void main (void) user { ...  2014 Microchip Technology Inc. DS50002154A-page 6...
  • Page 7 RN52 Bluetooth Audio Module Data Sheet (DS70005120) This document provides the technical specifications for the RN52 module. RN52 Evaluation Kit User’s Guide (DS50002153) This document describes how to use the RN52 Evaluation Kit and provides an audio demonstration.  2014 Microchip Technology Inc. DS50002154A-page 7...
  • Page 8 MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manager and general editing and debugging features. • Programmers – The latest information on Microchip programmers. These include the MPLAB PM3 device programmer and the PICkit™ 3 development programmers.  2014 Microchip Technology Inc. DS50002154A-page 8...
  • Page 9 Technical support is available through the web site at: http://support.microchip.com DOCUMENT REVISION HISTORY Revision A (May 2014) This is the initial released version of this document.  2014 Microchip Technology Inc. DS50002154A-page 9...
  • Page 10 Bluetooth Audio Module Command Reference User’s Guide NOTES:  2014 Microchip Technology Inc. DS50002154A-page 10...
  • Page 11: Chapter 1. Overview And Getting Started

    PC (either built-in or using a USB Bluetooth dongle). You can only con- figure one device at a time. Once configured, device settings are saved (independent of power down) until they are explicitly changed or the factory defaults are restored.  2014 Microchip Technology Inc. DS50002154A-page 11...
  • Page 12: Audio And Data Bluetooth Profiles

    A2DP A2DP SPDIF SPDIF SPDIF AUDIO AUDIO AVRCP AVRCP Analog Audio Codec Codec RN52 RN52 (Speaker, MIC) Bluetooth Bluetooth Module Module UART UART UART DATA DATA GPIO GPIO GPIO Control Control Status Status  2014 Microchip Technology Inc. DS50002154A-page 12...
  • Page 13: Audio Settings

    Mac OS-X. The Bluetooth device manager displays a list of discov- erable Bluetooth devices. The module displays as RN52-XXXX, where XXXX is the last 4 digits of the module’s MAC address.  2014 Microchip Technology Inc. DS50002154A-page 13...
  • Page 14 Bluetooth adapter, forcing a new pin code exchange to occur upon subsequent connection attempts. Figure 1-3 shows examples of Bluetooth devices discovered list and pair/connect inter- faces.  2014 Microchip Technology Inc. DS50002154A-page 14...
  • Page 15: Command Mode Vs. Data Mode

    1-4. Note: While in Command mode, the module can be configured for specific fea- tures using a serial terminal emulator over UART. The terminal emulator behaves as a command console in Command mode.  2014 Microchip Technology Inc. DS50002154A-page 15...
  • Page 16 1.5.2 Configuring the Module over the UART Connect the module to your computer. For example, if you are using the RN-52-EK evaluation board, connect the UART-to-USB connector on the RN52-EK to your com- puter using a mini-B USB cable. With the Bluetooth module connected and powered on, run a terminal emulator and open the COM port to which the cable is connected.
  • Page 17 A quick check to confirm that you are in Command mode is to type the <cr> command after entering Command mode. This command shows the a summary of the module’s current settings, such as the Bluetooth name, device class, and serial port settings.  2014 Microchip Technology Inc. DS50002154A-page 17...
  • Page 18 Bluetooth Audio Module Command Reference User’s Guide Figure 1-8. To return to Data mode, drive GPIO9 high. When leaving Command mode, the module sends to the UART. FIGURE 1-8: VIEW CURRENT SETTINGS  2014 Microchip Technology Inc. DS50002154A-page 18...
  • Page 19: Gpio Pins

    GPIO PINS The Bluetooth audio module has 11 GPIO pins. Several of these pins are reserved for specific functions during bootup and runtime. As a demonstration, the RN-52-EK board uses various GPIO pins to control the board’s audio playback. Table 1-3 describes the RN-52-EK GPIO pin demo function.
  • Page 20: Connecting With A Microcontroller

    • Stream audio over the Bluetooth link For a more complex example of how to control the RN52, refer to the RN52 Evaluation Kit schematic in the “RN52 Evaluation Kit User's Guide” available online at Microchip (http://www.microchip.com) web site.  2014 Microchip Technology Inc. DS50002154A-page 20...
  • Page 21: Device Firmware Upgrade For Firmware Versions 1.10 And Lower

    DFU mode when you reboot or power it. If your board is not powered by VBUS you do not need to include the C4 and D1 to inputs on the voltage regulator. VBUS  2014 Microchip Technology Inc. DS50002154A-page 21...
  • Page 22: Status Leds

    EVALUATION BOARDS AND REFERENCE DESIGNS Microchip’s provides a variety of evaluation kits and reference designs for evaluation and prototyping. The RN-52-EK evaluation kit is a prototyping platform for the RN52 module. The board contains buttons to control audio playback (volume up/down, next/previous track, pause/play) and connections for plugging in external speakers.
  • Page 23 Overview and Getting Started FIGURE 1-14: RN-52-EK EVALUATION KIT For more information on available evaluation boards and reference designs, refer to the Microchip (http://www.microchip.com) web site.  2014 Microchip Technology Inc. DS50002154A-page 23...
  • Page 24 Bluetooth Audio Module Command Reference User’s Guide NOTES:  2014 Microchip Technology Inc. DS50002154A-page 24...
  • Page 25: Chapter 2. Command Reference

    Table 2-2. HSP/HFP voice calls are routed through analog speaker and microphone. Sets the route for audio output (AU), the audio bit resolution (W) and sam- ple rate (R). Values are: “|,<AUWR>”  2014 Microchip Technology Inc. DS50002154A-page 25...
  • Page 26 // Set module’s name to MCHIP-XXXX S-,MCHIP 2.2.3 S^,<dec> The command sets automatic shutdown on idle time in seconds. 0 – Feature disable, on forever 1-600 seconds of idle time (not-connected) Default: 0 Example: S^,30  2014 Microchip Technology Inc. DS50002154A-page 26...
  • Page 27 Note: Modes 0 and 4 are legacy modes that do not support Secure Simple Pairing (SSP) (Bluetooth version 2.0). Default: // Keyboard mode Example: // Set to pin code mode SA,4  2014 Microchip Technology Inc. DS50002154A-page 27...
  • Page 28 20 ms, send the command, and wait for the module to return . Then, drive GPIO9 high to exit Command mode. reboot Example: // Invoke factory defaults SF,1 // Reboot  2014 Microchip Technology Inc. DS50002154A-page 28...
  • Page 29 Default: 1234 Example: // Set pin code to 0123 SP,0123 2.2.13 SS,<8-bit hex value> The command sets speaker gain levels. The speaker level can be set from 00 through Default: 0A Example: SS,0A  2014 Microchip Technology Inc. DS50002154A-page 29...
  • Page 30: Get Commands

    Authen – Active authentication mode COD – Class of device DiscoveryMask – Active discovery mask ConnectionMask – Active connection mask PinCode – Assigned pin code for legacy pairing AudioRoute – Active audio route  2014 Microchip Technology Inc. DS50002154A-page 30...
  • Page 31 AGBatteryLevel = 80% 2.3.4 The help command displays a list of commands and their basic syntax. Example: // Display help 2.3.5 This command displays the firmware version. Example: // Show the firmware version  2014 Microchip Technology Inc. DS50002154A-page 31...
  • Page 32: Action Commands

    // Redial last dialed number 2.4.8 This command increases the volume. 2.4.9 This command reduces the volume. 2.4.10 This command plays the next track by sending an AVRCP volume previous track command to the host.  2014 Microchip Technology Inc. DS50002154A-page 32...
  • Page 33 This command places all active calls on hold and accepts other held or waiting calls. Example: L 2.4.19 This command adds a held call to the active conversation. Example: N 2.4.20 This command connects the two calls and disconnects the subscriber from both calls. Example: O  2014 Microchip Technology Inc. DS50002154A-page 33...
  • Page 34 The module drives GPIO2 low for 100 ms to notify attached equipment that the event/status register has been changed. See Section 1.6.1 “Using GPIO2 to Monitor the Event or Status Register” for more information.  2014 Microchip Technology Inc. DS50002154A-page 34...
  • Page 35 Active call The connected audio gateway has an active call and the audio is in the handset Audio streaming The headset is streaming A2DP audio Low battery The system has a low battery  2014 Microchip Technology Inc. DS50002154A-page 35...
  • Page 36 Use “Q” to retrieve the caller ID notification event in byte 0 (bit 4) value. Example: T 2.4.30 This command resets and clears all the previously paired devices in the Paired Device List. Example: U  2014 Microchip Technology Inc. DS50002154A-page 36...
  • Page 37: Appendix A. Command Quick Reference Guide

    Pairing Timeout STP,<dec> UART Baudrate SU,<hex8> TABLE A-2: GET (DISPLAY) COMMANDS Command Description Basic settings Displays setting for the set command indicated by <command> G<command> AG Battery Status Display help Display the firmware version  2014 Microchip Technology Inc. DS50002154A-page 37...
  • Page 38 Add held call Connect two calls and disconnect the subscriber Activate Voice Command Query the current connection status Reboot Reset Paired Device List (PDL) Retrieves caller ID information Transfer call between HF and AG X,<0,1>  2014 Microchip Technology Inc. DS50002154A-page 38...
  • Page 39: Appendix B. Firmware Revision History

    Hardened K,FF and B,a May 2013 1.16 Added support for optional decoders May 2014 Added UART DFU support. HFP wideband support. Added HFP three-way calling and caller ID support. Added audio track meta data support.  2014 Microchip Technology Inc. DS50002154A-page 39...
  • Page 40: Worldwide Sales And Service

    Tel: 86-29-8833-7252 Tel: 631-435-6000 Fax: 86-29-8833-7256 San Jose, CA China - Xiamen Tel: 408-735-9110 Tel: 86-592-2388138 Canada - Toronto Fax: 86-592-2388130 Tel: 905-673-0699 China - Zhuhai Fax: 905-673-6509 Tel: 86-756-3210040 03/25/14 Fax: 86-756-3210049  2014 Microchip Technology Inc. DS50002154A-page 40...

Table of Contents