Ezurio BT700 Class 1 Bluetooth Data Module User Manual BT730 series
Laird Technologies Class 1 Bluetooth Data Module BT730 series
Ezurio >
Contents
- 1. user manual (BT730 series)
- 2. user manual (BT740 series)
user manual (BT730 series)
Smart Technology. Delivered. Class 1 Bluetooth v2.0 Module USER’S GUIDE VERSION 0.9 Part # BT730-SA, BT730-SC Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth Class 1 Bluetooth v2.0 Module User’s Guide REVISION HISTORY Revision Revision Date Description Version 0.7 07/03/13 Prelim for KP Version 0.8 10/04/13 Updated Mechanical Drawing – Pad Definitions Version 0.9 01/05/13 Clean Up and DW Regulatory Updates Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide TABLE OF CONTENTS Revision History............................................................................................................................................. 2 Table of Contents .......................................................................................................................................... 3 1. Overview and Key Features.................................................................................................................... 5 Features & Benefits ...................................................................................................................................................5 2. Specifications .......................................................................................................................................... 6 2.1 Detailed Specifications ............................................................................................................................6 3. Hardware Specifications ......................................................................................................................... 8 3.1 Pin Definitions .........................................................................................................................................8 3.2 Electrical Specifications .........................................................................................................................11 4. IO CHARACTERISTICS ....................................................................................................................... 14 4.1 Power Consumption ..............................................................................................................................14 4.2 Typical Current Consumption in mA .....................................................................................................14 5. Functional Description .......................................................................................................................... 15 5.1 UART Interface ......................................................................................................................................15 5.2 SPI Bus ...................................................................................................................................................16 5.3 PCM Interface ........................................................................................................................................16 5.4 General Purpose I/O and ADC ...............................................................................................................17 6. AT Command Set Reference ................................................................................................................ 17 6.1 Introduction...........................................................................................................................................17 6.2 Assumptions ..........................................................................................................................................18 6.3 Commands ............................................................................................................................................18 6.4 Unsolicited Responses ...........................................................................................................................50 6.5 Incoming Connections ...........................................................................................................................51 6.6 Dropping Connections ...........................................................................................................................51 6.7 Pairing and Trusted Devices ..................................................................................................................52 6.8 Error Responses.....................................................................................................................................53 6.9 Factory Default Mode ...........................................................................................................................54 6.10 Miscellaneous Features .........................................................................................................................54 6.11 Disclaimers ............................................................................................................................................55 6.12 Data Sheet Status ..................................................................................................................................56 6.13 Changes between release .....................................................................................................................56 7. PCM CODEC Interface ......................................................................................................................... 56 7.1 Compatible Codec Chips ........................................................................................................................56 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 8. FTP Client Profile Commands .............................................................................................................. 57 8.1 Generic Notes and Guidance .................................................................................................................57 8.2 FTP related AT Commands ....................................................................................................................58 8.3 FTP related Subcommands ....................................................................................................................58 8.4 FTP-Related Subresponses ....................................................................................................................61 8.5 FTP line multiplexing commands...........................................................................................................64 8.6 Message Sequence Charts .....................................................................................................................64 9. OBEX Profile Commands ..................................................................................................................... 78 9.1 Generic Notes and Guidance .................................................................................................................78 9.2 OBEX Push related AT Commands.........................................................................................................79 9.3 OBEX Push related Subcommands ........................................................................................................79 9.4 OBEX Push Related Subresponses .........................................................................................................80 9.5 OBEX Push Line Multiplexing Commands..............................................................................................82 9.6 Message Sequence Charts .....................................................................................................................83 10. Application Note for Surface Mount Modules ....................................................................................... 87 10.1 Introduction...........................................................................................................................................87 10.2 Shipping .................................................................................................................................................87 10.3 Reflow Parameters ................................................................................................................................88 11. FCC Regulatory Statements ................................................................................................................. 89 11.1 Power Exposure Information ................................................................................................................89 11.2 OEM Responsibilities .............................................................................................................................90 12. EU DECLARATIONS OF CONFORMITY ............................................................................................. 93 12.1 BT730-SA ...............................................................................................................................................93 12.2 BT730-SC ...............................................................................................................................................94 13. Mechanical Details ................................................................................................................................ 96 BT730-SC Mechanical Details ................................................................................................ 錯誤! 尚未定義書籤。 BT730-SA Mechanical Details..................................................................................................................................96 BT730 Pad Definitions – Mechanical Drawing ........................................................................................................97 14. ORDERING INFORMATION ................................................................................................................ 97 14.1 General Comments................................................................................................................................97 15. Bluetooth SIG Approvals ....................................................................................................................... 98 15.1 Additional Assistance ............................................................................................................................98 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 1. OVERVIEW AND KEY FEATURES ® Every BT730 series Bluetooth module from Laird Technologies is designed to add robust, long-range Bluetooth data connectivity to any device. Based on the market-leading Cambridge Silicon Radio (CSR) BC04 chipset, BT730 modules provide exceptionally low power consumption with outstanding Class 1 range via 18 dBm of transmit power. A broad range of Bluetooth profiles and other vital features make BT730 modules superior to other Bluetooth modules. With a compact footprint of 15.29 x 28.71 mm, the modules deliver maximum range with minimum size. Another integration advantage is the inclusion of a complete Bluetooth v2.0 protocol stack with support for multi-point connections and numerous Bluetooth profiles including Serial Port Profile (SPP), Dial Up Networking (DUN), OBEX Client, FTP Client plus partial support for Headset (HSP) and HandsFree (HFP). BT730 modules are fully qualified as Bluetooth end products, enabling designers to integrate the modules in devices without the need for further Bluetooth qualification. An integrated AT command processor interfaces to the host system over a serial port using an extensive range of AT commands. The AT command set abstracts the Bluetooth protocol from the host application, saving many months of programming and integration time. It provides extremely short integration times for data oriented Bluetooth applications. The included firmware provides programming support for multi-point applications that use up to three simultaneous data connections to and from the robust BT730 module. A low-cost developer’s kit makes it easy for an OEM to integrate the module and guarantees the fastest route to prototype and then mass production. Features & Benefits Application Areas Bluetooth v2.0 + EDR Medical devices External or internal antennas ePOS terminals Comprehensive AT command set Automotive diagnostic equipment Bluetooth EPL Barcode scanners Compact footprint Industrial cable replacement Class 1 output - 18dBm UART interface with GPIO, PCM, and ADC lines Industrial temperature range Field proven firmware used on BTM40x and BISM II product ranges Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 2. SPECIFICATIONS 2.1 Detailed Specifications Table 2-1: Detailed specifications Categories Wireless Specification Host Interface Feature Bluetooth® Frequency Max Transmit Power Implementation V2.0 + EDR 2.402 - 2.480 GHz Class 1 18 dBm from integrated antenna 18 dBm at UFL antenna connector Better than -87 dBm (at 25°C) >1000m Up to 2.1 Mbps (over the air) Circa 300 kbps TX, RX, DCD, RI, DTR, DSR, CTS, RTS Default 9600, n,8, 1 From 1,200 to 921,600 bps Receive Sensitivity Range Data Rates UART Data Transfer Rate UART GPIO ADC PCM SPP DUN OBEX Client & FTP Client HFP & HSP (Audio Gateway) Operation Modes 8 configurable lines 2 lines, 8 bit resolution 4 lines – see Audio section Serial Port Profile Dial Up Networking Object Exchange & File Transfer Client Profiles Hands Free & Headset Firmware Upgrade Firmware Upgrade over UART Audio Support SCO Channels PCM Interface Supply Voltage Supply 3 x PCM Channels @ 64 kpbs SCO and eSCO Configurable as master or slave 8 bit A-law 8 bit µ-law 13 bit linear PCM Clock available when in slave mode 3.0 – 5.0 V On-board regulators and brown-out detection Profiles Command Interfaces Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth AT Command Set Multi-Point API - 3 simultaneous connections CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Categories Power Consumption Feature Various Modes – Typical values Antenna Options Internal External Dimensions Weight Operating Storage Lead Free Warranty Development Kit Bluetooth® Physical Environmental Miscellaneous Development Tools Approvals Implementation Idle Mode – TBC Discoverable –TBC Inquiry Mode – TBC Connecting Mode – TBC Connected Mode (No Data Transfer) – TBC Connected Mode (Max Data Transfer) – TBC Sniff Mode – TBC Multilayer ceramic - BT730-SA Connection via u.FL - BT730-SC 15.29 mm x 28.71 mm x 2.5 mm 1.5 g -40°C to +85°C -40°C to +85°C Lead-free and RoHS compliant 1 Year Development kit DVK-BT730 and software tools End Product Listing (EPL) (to be completed) All BT730 Series (to be completed) FCC / IC / CE 1. DSR, DTR, RI and DCD are configurable either as GPIO or as modem control lines. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 3. HARDWARE SPECIFICATIONS Ceramic Chip Antenna Figure 1: Functional Block Diagram 3.1 Pin Definitions Table 3-1: Pin definitions Pin Signal Description Comment GND SPI_MOSI SPI bus serial I/P See Note 2 GPIO6 I/O for host GPIO7 I/O for host RESET Module reset I/P See Note 4 SPI_CLK SPI bus clock I/P See Note 2 PCM_CLK PCM clock I/P PCM_SYNC PCM sync I/P PCM_IN PCM data I/P 10 PCM_OUT PCM Data O/P 11 VCC_5VIN 3.0 V < VIN < 5.0 V 12 GND 13 VCC_3V3 3.3 V Monitor 14 Analogue 1 1.8 V max 15 GND 16 UART_DSR Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth See Note 5 UART_DSR I/P CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Pin Signal Description Comment 17 UART_DCD UART_DCD I/P or O/ P 18 GPIO_9 I/O for host 19 GPIO_8 I/O for host 20 GND 21 Analogue 00 1.8 V max 22 UART_RX Receive data I/P 23 UART_TX Transmit data O/P 24 UART_RTS Request to Send O/P 25 UART_CTS Clear to Send I/P 26 USB_D+ Not used for AT module variants 27 USB_D- Not used for AT module variants 28 UART_RI Ring Input or Output 29 GPIO_3/UART_DTR I/O for host/UART_DTR 30 GPIO_5 I/O for host 31 GPIO_4 I/O for host 32 SPI_CSB SPI bus chip select I/P See Note 2 33 SPI_MISO SPI bus serial O/P See Note 2 34 GND Only on uFL version See Note 3 35 RF_OUT Only on uFL version See Note 3 36 GND Only on uFL version See Note 3 Notes: 1. Unused pins may have internal connections and must not be connected. 2. Pins 2, 6, 32, and 33 (SPI related) are only for Laird internal production purposes. 3. Pins 34 - 36 are only for uFL connector version of module – BT730-SC 4. Power-on-reset (power cycling and brown out consideration) – The reset circuitry within the BT730 module incorporates a brown-out detector; this may simplify power supply design. The BT730 reset line is an active low. Input debounced so must be low for more than 5 ms to cause a reset. Upon the application of power, the Power On Reset circuit built into the module ensures that the unit starts correctly. There is no need for an external power reset monitor. 5. Power Supply Consideration – The power supply for the module should be a single voltage source of VCC within the VCC_IN range of 3.0 V to 5.0 V. It must be able to provide sufficient current in a transmit burst. This can rise to 200 mA. To limit dissipation it is recommended that you use a voltage at the lower end of the range. 6. The module includes regulators to provide local 3.3 V. This rail is accessible on pin 13 for monitoring purposes only. Under no circumstances should this pin be used to source current. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide COMPATIBILITY NOTE FOR LEGACY DEVICES If Reset compatibility is required with BTM402 and BTM404: Reset logic must be inverted (on the host PCB), by using suitable BJT (MMBT3904) with collector connected to Reset pin BT730 module pin 5. A fixed 10k Ohm pull down resistor to ground (BJT input) then ensures that the BT730 module is out of reset for the condition when host has yet to control the reset line. Add a 10k pull-up to the host PCB on the UART_RX, otherwise the module will remain in deep sleep if not driven to high. Add a 10k pull-down to the host PCB on the UART_CTS that if it is not connected (which we do not recommend) then the default state for UART_CTS input will be asserted which means can send data out of UART_TX line. PIO lines can be configured through software to be either inputs or outputs with weak or strong pull-ups or pull-downs. At reset, all PIO lines are configured as inputs with weak pull-downs. UART_RX, UART_TX, UART_CTS, UART_RTS, UART_RI, UART_DCD, and UART_DSR are all 3.3 V level logic. For example, when RX and TX are idle they will be sitting at 3.3 V. Conversely, for handshaking pins CTS, RTS, RI, DCD, and DSR, a 0 V is treated as an assertion. Pin 28 (UART_RI) is active low. It is normally 3.3 V. When a remote device initiates a connection, this pin goes low. This means that when this pin is converted to RS232 voltage levels it will have the correct voltage level for assertion. Pin 17 (UART_DCD) is active low. It is normally 3.3 V. When a connection is live, this pin is low. This means that when this pin is converted to RS232 voltage levels it will have the correct voltage level for assertion. Pin 16 (UART_DSR) is an input, with active low logic. It should be connected to the DTR output of the host. When the BTM730 module is in high speed mode (see definition for S Register 507), this pin should be asserted by the host to ensure that the connection is maintained. A deassertion means that the connection should be dropped or an online command mode is being requested. Pin 13 (VCC_3V3 monitor) may only be used for monitoring purposes. It must not be used as a current source. The GPIO pins can be accessed using S Registers 623 to 629. GPIO3 is also used for DTR output (active low).See S Register 552 and553. Analogue 0 and 1 should not exceed 1.8 V and S Registers 701 and 702 are used to access them. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 10 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 3.2 Electrical Specifications 3.2.1 Absolute Maximum ratings Absolute maximum ratings for supply voltage and voltages on digital and analogue pins of the module are listed below; exceeding these values will cause permanent damage. Parameter Min Max Unit Peak current of power supply 200 mA Voltage at digital pins -0.4 3.7 Voltage at POWER pin 2.9 * 6.0 3.2.2 Recommended Operating Parameters 3.2.2.1 Power Supply Signal Name VCC_VIN GND VCC_3V3 Pin No I/O Voltage level 11 3.0 V to 5.0 V * Typ 3.3 V 1, 12, 15, 20, 34, 36 13 Comments Ityp = TBC mA? 6 Ground terminals to be attached in parallel 3.3 V typical For monitoring only. No current source Note: VCC_3V3 refers to internal voltage generated by the LDO inside the module which is typically 3.3V. Internal LDO drop is 0.2V. So to achieve 3.3V for VCC_3V3 requires VCC_IN of 3.5V. IO voltage levels follows VCC_3V3. 3.2.2.2 Signal Levels for Interface, PCM, SPI and GPIO Signal Type Signal level Input VILmin= -0.4V VILmax=0.8V VIHmin=2.3V VIHmax=3.7V Output Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth Signal level @ 0mA load VOLmax=0.2V VOHmin=3.1V 11 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 3.2.2.3 RS-232 Interface Signal Name UART_TX UART_RX UART_CTS UART_RTS UART_DSR UART_DTR UART_RI UART_DCD Pin No 23 22 25 24 16 29 28 17 I/O I or O I or O Comments Pin No 33 32 I/O Comments I/O I or O I or O Comments Shared with GPIO3 Direction may be programmed. Direction may be programmed. SPI Bus Signal Name SPI_MOSI SPI_MISO SPI_CSB SPI_CLK INTERNAL USE ONLY - Used to reprogram Flash in Laird production. 3.2.2.4 PCM Interface Signal Name PCM_CLK PCM_IN PCM_SYNC PCM_OUT Pin No 10 If unused keep pins open. PCM output signals are tri-stated when there is not an active SCO or eSCO connection. 3.2.2.5 General Purpose I/O and ADC Signal Name GPIO_3 - 9 Analogue0, Analogue1 Pin No 3, 4, 16, 17, 18, 19, 29, 30, 31 14, 21 I/O I or O Signal level See 3.2.2.2 Comments Range 0 – 1.8 V 8 bit 3.2.2.6 Miscellaneous Signal Name USB D- Pin No 27 I/O USB D+ 26 RESET Signal level VILmax =0.3vdd_usb VIHmin =0.7vdd_usb VILmax =0.3vdd_usb VIHmin =0.7vdd_usb Comments Normally inactive. Pull to GND through 10kΩ. VILmax=1.0V Active LOW. The Reset input contains a 10kΩ pull-up resistor (internal to module). VIHmin=2.3V Normally inactive. Pull to GND through 10kΩ. Terminology: Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 12 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide USB Signal Levels.vdd_usb refers to the internal voltage generated by the LDO regulator on the module, which is typically 3.3 V. Hence 0.3vdd_usb and 0.7vdd_usb correspond to 1.0 V to 2.3 V. To achieve 3.3V for vdd_usb requires VCC_IN of 3.5V. USB IO voltage levels follows VCC_3V3. For correct USB operation, would require vdd_usb on 3.1V which requires of VCC_IN of ~3.3V (0.2V LDO drop). Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 13 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 4. IO CHARACTERISTICS 4.1 Power Consumption The current drain from the VCC power input line is dependent on various factors. The three most significant factors are the voltage level at VCC, UART baud rate, and the operating mode. The hardware specification for the module allows for a voltage range of 3.0 to 5.0 at VCC. The unit includes a linear regulator and tests have shown that there is no significant difference in current draw when VCC changes within the operating limits. Tests have shown that where power dissipation is an issue, it is best to keep VCC at the lower end of the range. The UART baud rate has a bearing on power dissipation because as is normal for digital electronics, the power requirements increase linearly with increasing clocking frequencies. Because of this, higher baud rates result in a higher current drain. Finally, the significant operating modes are: idle, waiting for a connection, inquiring, initiating a connection, sniff, and connected. With connected mode, it is also relevant to differentiate between no data being transferred and when data is being transferred at the maximum rate possible. The AT command set document describes how to configure the module for optimal power performance. 4.2 Typical Current Consumption in mA Table 4-2: Current Consumption VCC = 3.8V, Baudrate = 9600bps Typical Current (mA) Range = >1 meters Idle Mode, S512=1 TBC Wait for Connection Or Discoverable Mode, TBC AT+BTP S508=S510=640, S509=S511=320 Wait for Connection Or Discoverable Mode, TBC AT+BTP S508=S510=1000, S509=S511=11 Inquiry Mode, AT+BTIN TBC Connecting Mode (ATDxxx) TBC Connected Mode (No Data Transfer) TBC Connected Mode (Max Data Transfer) TBC Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 14 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 5. FUNCTIONAL DESCRIPTION The BT730 Bluetooth module is a self-contained Bluetooth product and requires only power to implement full Bluetooth communication. The integrated, high performance antenna, together with the RF and baseband circuitry provides the Bluetooth wireless link and the UART interface provides a connection to the host system. The variety of interfaces and the AT command set allow the BT730 module to be used for a wide number of long range wireless applications, from simple cable replacement to complex multipoint applications, where multiple radio links are active at the same time. The complexity and flexibility of configuration are made simple for the design engineer by the integration of an extremely comprehensive set of AT commands, supplemented with a range of “S” registers which are used for non-volatile storage of system parameters. To provide the widest scope for integration a range of different physical host interfaces are provided. 5.1 UART Interface UART_TX, UART_RX, UART_RTS, and UART_CTS form a conventional asynchronous serial data port with handshaking. The interface is designed to operate correctly when connected to other UART devices such as the 16550A. The signalling levels are nominal 0 V and 3.3 V and are inverted with respect to the signalling on an RS232 cable. The interface is programmable over a variety of bitrates; no, even, or odd parity; stop bit and hardware flow control. The default condition on power-up is pre-assigned in the external flash. Two-way hardware flow control is implemented by UART_RTS and UART_CTS. UART_RTS is an output and is active low. UART_CTS is an input and is active low. These signals operate according to normal industry convention. UART_RX, UART_TX, UART_CTS, UART_RTS, UART_RI, UART_DCD, and UART_DSR are all 3.3 V level logic. For example, when RX and TX are idle they sit at 3.3 V. Conversely for handshaking pins CTS, RTS, RI, DCD, and DSR, a 0 V is treated as an assertion. By writing different values to the relevant S register the UART_RI can be continuously polled to detect incoming communication. The UART_RI signal serves to indicate incoming calls. UART_DSR is an active low input. It should be connected to DTR output of the host. When the module is running in high speed mode (see definition for S Reg 507), this pin should be asserted by the host to ensure connection is maintained. A de-assertion means that the connection should be dropped or an online command mode is being requested. The module communicates with the customer application using the following signals: Port /TXD of the application sends data to the module’s UART_RX signal line Port /RXD of the application receives data from the module’s UART_TX signal line Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 15 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide BT730 Application - Host UART_TX /RXD UART_RX /TXD UART_CTS /RTS UART_RTS /CTS UART_DSR /DTR UART_DTR /DSR UART_RI /RING UART_DCD /DCD Note: The serial module output is at 3.3 V CMOS logic levels. Level conversion must be added to interface with an RS-232 level compliant interface. Some serial implementations link CTS and RTS to remove the need for handshaking. Laird does not recommend linking CTS and RTS other than for testing and prototyping. If these pins are linked and the host sends data at the point that the BT740 deasserts its RTS signal, then there is a significant risk that internal receive buffers will overflow; this could lead to an internal processor crash. This also leads to a drop in connection and may require a power cycle to reset the module. Laird recommends that the correct CTS/RTS handshaking protocol be followed for proper operation. 5.2 SPI Bus The module is a slave device that uses terminals SPI_MOSI, SPI_MISO, SPI_CLK, and SPI_CSB. This interface is used for program firmware updates at the factory. Laird supplies a PC-based utility to allow a firmware upgrade over the UART port. It is highly recommended that customers use this method for updating firmware. Note: The designer should be aware that no security protection is built into the hardware or firmware associated with this port, so the terminals should not be permanently connected in a PC application. 5.3 PCM Interface PCM_OUT, PCM_IN, PCM_CLK, and PCM_SYNC carry up to three bi-directional channels of voice data, each at 8 k samples/s. The format of the PCM samples can be 8-bit A-law, 8-bit μ-law, 13-bit linear, or16bit linear. The PCM_CLK and PCM_SYNC terminals can be configured as inputs or outputs, depending on whether the module is the master or slave of the PCM interface. Please contact a Laird FAE for further details. The module is compatible with the Motorola SSI TM interface and interfaces directly to PCM audio devices including the following: 5.3.1 Compatible Codec Chips OKI 7702 single channel A-law and μ-law CODEC Winbond W681360 13 bit linear CODEC Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 16 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 5.4 General Purpose I/O and ADC 5.4.1 GPIO Seven lines of programmable bi-directional input/outputs (I/O) are provided that can be accessed either via the UART port, or Over The Air (OTA) from a second Bluetooth unit. These can be used as data inputs or to control external equipment. By using these in OTA mode, a BT730 module can be used for control and data acquisition without the need for any additional host processor. Each of the GPIO[3:9] ports can be independently configured to be either an input or output. A selection of ports can be accessed synchronously. The ports are powered from VCC. The mode of these lines can be configured and the lines are accessed via S Registers 623 to 629. 5.4.2 ADC The BT730 provides access to two 8-bit ADCs (Analogue 0 and 1). These provide an input range of 0 mV to 1,800 mV, which can be read using the S registers 701 and 702. Suitable external scaling and over-voltage protection should be incorporated in your design. The module provides five samples per second at the UART with a baud rate of 115,200 or above. 6. AT COMMAND SET REFERENCE 6.1 Introduction This document describes the protocol used to control and configure the following Laird Technologies Bluetooth devices: BT730-SA BT730-SC The protocol is similar to the industry standard Hayes AT protocol used in telephony modems which is appropriate for cable replacement scenarios, as both types of devices are connection oriented. The telephony commands have been extended to make the Laird device perform the two core actions of a Bluetooth device, which is make/break a connection and Inquiry. Other AT commands are also provided to perform ancillary functions, such as pairing, trusted device database management, and S register maintenance. Similar to telephony modems, the Laird device powers up in an unconnected state and only responds via the serial interface. In this state, the Laird device does not respond to Bluetooth inquiries. Then, just like controlling a modem, the host can issue AT commands which map to various Bluetooth activities. The command set is extensive enough to allow a host to make connections which are authenticated and/or encrypted or not authenticated and/or encrypted or any combination of these. Commands can be saved, so that on a subsequent power-up the device is discoverable or automatically connects. The device has a serial interface which can be configured for baud rates from 1200 up to 921600 and an RF communications end point. The latter has a concept of connected and unconnected modes and the former has a concept of command and data modes. This leads to the matrix of states shown in Table 6-1. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 17 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Table 6-1: Matrix of mode states RF Unconnected RF Connected Local Command Mode OK OK Remote Command Mode ILLEGAL OK Data Mode ILLEGAL OK The following combinations do not make sense and are ignored: Data and RF Unconnected Mode Remote Command and RF Unconnected Mode Navigation between these states occurs using the AT commands which are described in detail in subsequent sections. 6.2 Assumptions The CSR (Cambridge Silicon Radio) BC04 chipset in Laird devices is memory resource limited. Therefore it is not proposed that there be full implementation of the AT protocol as seen in modems. The claim made for this device is that it has a protocol similar to an AT modem. In fact, the protocol is so similar that existing source code written for modems can be used with very little modification with a Laird device. The following assumptions are made: 6.3 All commands are terminated by the carriage return character 0x0D, which is represented by the stringin descriptions below this cannot be changed. All responses from the Laird device have carriage return and linefeed characters preceding and appending the response. These dual character sequences have the values 0x0D and 0x0A respectively and shall be represented by the string . All Bluetooth addresses are represented by a fixed 12 digit hexadecimal string, case insensitive. All Bluetooth Device Class codes are represented by a fixed six digit hexadecimal string, case insensitive. All new Bluetooth specific commands are identified by the string +BTx, where x is generally a mnemonic of the intended functionality. Commands This section describes all available AT commands. Many commands require mandatory parameters and some take optional parameters. These parameters are integer values, strings, Bluetooth addresses, or device classes. The following convention is used when describing the various AT commands. A 12 character Bluetooth address consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’. A 6 character Bluetooth device class consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’. A positive integer value. An integer value (positive or negative) which can be entered as a decimal value or in hexadecimal if preceded by the ‘$’ character. E.g. the value 1234 can also be entered as $4D2 A string delimited by double quotes. E.g. "Hello World". The " character MUST be supplied as delimiters. A 4 character UUID number consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 18 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 6.3.1 ^^^{Enter Local Command Mode} When in data and connected mode, the host can force the device into a command and connected mode so that AT commands can be issued to the device. The character in this escape sequence is specified in the S2 register, therefore it can be changed. In addition, the escape sequence guard time is specified by S Register 12. By default the guard time is set to 100 milliseconds. Refer to Section 6.6: Dropping Connections for more information. In modems this escape sequence is usually “+++”. “^^^” is specified to avoid confusion when the module is providing access to a modem. Response: OK 6.3.1 !!!{Enter Remote Command Mode} When in data and connected mode, the host can force the remote device into a command and connected mode so that AT commands can be issued to the device remotely. The escape sequence guard time is specified by S Register 12 and is the same as per the ^^^ escape sequence. By default the guard time is set to 100 milliseconds. The remote device issues ATO as normal to return to data mode. (Refer to 2.2.12) For this command to be effective, S Register 536 must be set to 1. Response: OK 6.3.2 AT Used to check the module is available. Response: OK 6.3.3 ATA{Answer Call} Accept an incoming connection, which is indicated by the unsolicited string RING 123456789012 every second. 123456789012 is the Bluetooth address of the connecting device. Response: CONNECT 123456789012 6.3.4 ATD , {Make Outgoing Connection} Make a connection to a device with Bluetooth address and profile . The is an optional parameter which specifies the UUID of the profile server to attach to; if not supplied, then the default UUID from S Register 101 is used. Because this is a Laird device which utilises the RFCOMM layer as described in the Bluetooth specification, it implies that only profiles based on RFCOMM can be accessed. If is not specified, then authentication is as per register 500, otherwise the connection will be authenticated. If is not specified, then encryption is as per register 501, otherwise the connection will have encryption enabled. The timeout is specified by S register 505. Response: CONNECT 123456789012 Or NO CARRIER Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 19 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Due to a known issue in the Bluetooth RFCOMM stack, it is not possible to make more than 65525 outgoing connections. Therefore if that number is exceeded, then the connection attempt fails with the following response: Response: CALL LIMIT Or NO CARRIER In that case, issuing an ATZ to reset the device resets the count to zero and allows more connections. The following RFCOMM based UUIDs are defined in the Bluetooth specification: Profile Name UUID Serial Port 1101 LAN Access Using PPP 1102 Dialup Networking 1103 IrMC Sync 1104 OBEX Object Push 1105 OBEX File Transfer 1106 IrMC Sync Command 1107 Headset 1108 Cordless Telephony 1109 Intercom 1110 Fax 1111 Audio Gateway 1112 WAP 1113 WAP_CLIENT 1114 6.3.5 ATD , {Make Connection} Make a connection to device with Bluetooth address and profile specified via S Reg 101 AND which has a service name starting with the string . The service name parameter is a string delimited by “. If is not specified, then authentication is as per register 500, otherwise the connection is authenticated. If is not specified, then encryption is as per register 501, otherwise the connection has encryption enabled. The timeout is specified by S register 505. Response: CONNECT 123456789012 Or NO CARRIER 6.3.6 ATD L{Remake Connection} Make a connection with the same device and service as that specified in the most recent ATD command. The modifiers are optional. An error is returned if the ‘L’ modifier is specified as well as a Bluetooth address. If both ‘L’ and ‘R’ modifiers are specified then an error is returned. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 20 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Response: CONNECT 123456789012 AE Or NO CARRIER 6.3.7 ATD R{Make Connection to peer specified in AT+BTR} Make a connection with the device address specified in the most recent AT+BTR command. The service is as specified in S Register 101. The modifiers are optional. An error is returned if the ‘R’ modifier is specified as well as a Bluetooth address. If both ‘R’ and ‘L’ modifiers are specified then an error is returned. Response: CONNECT 123456789012 AE Or NO CARRIER 6.3.8 ATEn{Enable/Disable Echo} This command enables or disables the echo of characters to the screen. A valid parameter value is written to S Register 506. E0 Disable echo. E1 Enable echo. All other values of n generate an error. Response: OK Or ERROR nn 6.3.9 ATH{Drop Connection} Drop an existing connection or reject an incoming connection indicated by unsolicited RING messages. Response: NO CARRIER 6.3.10 ATIn{Information} This returns the following information about the Laird device. I0 The product name/variant. I1 The CSR firmware build number. I2 The Laird firmware build number. For internal use only. I3 The Laird firmware revision. I4 A 12 digit hexadecimal number corresponding to the Bluetooth address of the Laird device. I5 The manufacturer of this device. I6 The maximum size of trusted device database. I7 The manufacturer of the Bluetooth chipset. I8 The chipset format. I9 0 if not in a connect state and 1 if in a connect state. I11 The reason why a “NO CARRIER” resulted in the most recent attempt at making an outgoing connection. Where the response values are as follows: 0 = No prior connection Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 21 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 1 = Connection timeout 2 = Connection attempt cancelled 3 = Normal disconnection 4 = Peer device has refused connection 5 = Service profile requested not available on remote device 6 = Connection has failed 32 = ATH was entered 33 = Incoming connection aborted because too many rings 34 = Unexpected incoming connection 35 = Invalid address 36 = DSR is not asserted 37 = Call limit of 65531 connections has been reached 38 = Pairing in progress 39 = No link key 40 = Invalid link key 255 = Unknown reason I12 The last ERROR response number. I13 The Sniff status is returned as follows: Response: a:b,c,d,e OK Where ‘a’ = 0 when not online and 1 when online and Sniff has been enabled, ‘b’ is the Sniff Attempt parameter, ‘c’ is the Sniff timeout parameter, ‘d’ is the minimum sniff interval and ‘e’ is the maximum sniff interval. All parameters ‘b’, ’c’, ’d’ and ‘e’ are given as Bluetooth slots which are 625 microseconds long converted from values of S Registers 561, 562, 563, and 564 respectively. I14 The current boot mode (only for firmware 1.18.0 and newer) I15 The maximum length of an AT command, including the terminating carriage return (only for firmware 1.6.10 and newer). I16 The size of AT command input buffer. I20 Returns the number of bytes pending to be sent in the RF buffer when a connection is up. I33 Version number of Multipoint application Note: ATI is provided for compatibility in multipoint mode; other AT commands are not available. I42 State information. Where the response values are as follows: 13 = Not Open 14 = Open Idle 15 = Ringing 16 = Online Command 172 to 177 = waiting for connectable and/or discoverable where the lowest significant digit equates to the value stored in S Register 512 or 555. Note: When n=16, ATI9 returns 1. I101 The RSSI value in dBm. If a connection does NOT exist then a value of -32786 is returned. A value of 0 means the RSSI is within the golden range; because this is a very large band, RSSI is not always a useful indicator. Use ATI111 instead which returns the bit error rate. I111 Returns LinkQual which in the CSR chipset is defined as BER (bit error rate). This returns a value which is the number of bits in error out of 1 million. Hence a value of 0 is best, and larger values are worse. A value approaching 1000 (BER = 0.1%) is an indication that the Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 22 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide link is bad and a large number of Bluetooth packets are being lost. I333 Returns extended firmware version number. For recognised values of n. All other values of n generate an error. Response: As Appropriate OK Or ERRORnn 6.3.11 ATO{Enter Data Mode}(letter ‘o’) Return to data mode. Assume that the module is in data mode after OK is received. Responds with an error if there is no Bluetooth connection. Response: CONNECT 123456789012 Or ERRORnn 6.3.12 ATSn=m{Set S Register} As with modems, the Laird Bluetooth module employs a concept of registers which are used to store parameters (such as escape sequence character and inquiry delay time) as listed in detail below. The value part ‘m’ can be entered as decimal or hexadecimal. A hexadecimal value is specified via a ‘$’ leading character. For example, $1234 is a hexadecimal number. When S register values are changed, the changes are not stored in non-volatile memory until the AT&W command is used. Note: AT&W does not affect S registers 520 to 525 or 1000 to 1010 as they are updated in nonvolatile memory when the command is received. Table 6-2: S Registers Reg. Defaul Range Comment S0 -1..15 Number of RING indication before automatically answering an incoming connection. A value of 0 disables autoanswer. If -1, then autoanswer on one RING and do NOT send RING/CONNECT response to the host. This emulates a serial cable replacement situation. Setting values >/= 0, resets S Register 504 to 0 and <0 forces 504 to 1. If S0 <> 0 and S100 <> 0 then S0 must be < S100. If a value is entered which violates this rule, then ERROR 29 is sent in response. If S504 =1 then this register will return -1, regardless of the actual value stored in non-volatile memory. S2 0x5E 0x20..0x7E Escape sequence character. It is not ‘+’ by default as a Bluetooth serial link can be used to connect to a mobile phone which exposes an AT command set, which in turn uses ‘+’ as default. So if both used ‘+’ there is confusion. 0x5e is the character ‘^’. S12 100 40..5000 Escape sequence guard time in milliseconds, with a granularity of 20 ms. New values are rounded down to the nearest multiple of 20 ms. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 23 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S100 15 0..15 Number of RING indications before an auto disconnection is initiated. A value of 0 disables this feature. If S0 <> 0 and S100 <> 0 then S0 must be < S100. If a value is entered which violates this rule, then ERROR 29 is sent in response. S101 $1101 0..$ffff UUID of default SPP based profile when not specified explicitly in the ATD command. S102 1..$7F Defines a set of bits masks for enabling profile servers. Values can be ORed. 1 is Serial Port Profile 2 is Headset ( S Reg 580 allows remote volume control bit to be adjusted) 4 is DUN 8 is Audio Gateway (Headset) 16 is Handsfree (S Reg 581 allows supported feature field to be adjusted) 32 is OBEX FTP 64 is Audio Gateway (Handsfree) It is recommended that, due to memory resource issues, no more than two profiles are activated at the same time. S103 1..7 Boot mode on cold boot. S126 0 .. 0xFFFF Primer for changing to Multipoint mode S127 0 .. 0xFFFF 0x100 for AT mode 0x200 for Multipoint mode Other values are reserved S400 0..1 Piodeamon. 1 = Hostless Audio gateway Operation S401 1000 100..5000 In Hostless Audio Gateway Operation – GPIO4 flash period while inquiring S402 0..100 In Hostless Audio Gateway Operation – GPIO4 flash duty cycle while inquiring S403 1000 100..5000 In Hostless Audio Gateway Operation – GPIO4 flash period when there is an ACL connection only to the headset S404 0..100 In Hostless Audio Gateway Operation – GPIO4 flash duty cycle when there is an ACL connection only to the headset S405 1000 100..5000 In Hostless Audio Gateway Operation – GPIO4 flash period when there is an ACL and SCO connection to the headset S406 0..100 In Hostless Audio Gateway Operation – GPIO4 flash duty cycle when there is an ACL and SCO connection to the headset S407 0..1 In Hostless Audio Gateway Operation – ‘Lift-Hook’ output follows SCO state S408 0..1 In Hostless Audio Gateway Operation – if set to 1 then delete trusted device database when inquiry is initiated to look for headsets Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 24 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S409 0..1 In Hostless Audio Gateway Operation – when inquiring and pairing, use the device class code of the response to classify which UUID to connect to the headset when initiating a Bluetooth connection from the gateway S410 0..1 In AudioGatewayHostless mode, if set to 1, AG”” async responses will be forced out from the UART – good for debugging S411 500 4000 In AudioGatewayHostless mode, Short press duration in milliseconds. 500 msec granularity S412 500 4000 In AudioGatewayHostless mode, component of medium press duration in milliseconds. 500 msec granularity. Actual duration is this value plus S411 S413 500 4000 In AudioGatewayHostless mode, component of long press duration in milliseconds. 500 msec granularity. Actual duration is this value plus S412 plus S411 S414 30 240 In AudioGatewayHostless mode, the inquiry to search for headsets is aborted after this amount of time, in seconds. The granularity is 30 seconds. S420 If this is set, then the module maintains a seconds counter. Use ATI420 to read the count value. It is basically the time the module has been powered up in seconds. S500 0..1 Authentication for outgoing connections. Set to 1 to enable authentication. S501 0..1 Encryption for outgoing connections. Set to 1 to enable encryption. S502 0..1 Authentication for incoming connections. Set to 1 to enable authentication. S503 0..1 Encryption for incoming connections. Set to 1 to enable encryption. S504 0..1 Setting to 1 forces S0 to -1 and suppresses messages arising from connections or pairing. E.g. CONNECT, NO CARRIER, RING, PAIR etc. Suppressing connection-based messaged allows the Laird device to be configured in cable replacement mode. S505 10 2..120 Minimum delay before abandoning connection attempt as a master. Referenced by ATD. In units of seconds. See S Registers 530 and 543. Please note that as disconnection time can vary, this register only guarantees the minimum delay. Note that for invalid addresses specified in the ATD command, the “NO CARRIER” response is immediate. See S register 560 for specifying disconnect max timeout. S506 0..1 Enable/Disable echoes. The ATEn command also affects this. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 25 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S507 0..2 When set to 0, a connection can be dropped using ^^^ escape sequence only and the state of DSR line is ignored. When set to 1, a connection can be dropped using EITHER the ^^^ escape sequence OR the DSR handshaking line. When set to 2, a connection can only dropped using a deassertion of DSR. Mode 2 provides for the highest data transfer rate. If the status of the DSR line is to be conveyed to the remote device as a low bandwidth signal then this register MUST be set to 0, otherwise a deassertion of DSR will be seen as a request to drop the Bluetooth connection. This register affects S Register 536 – see details of 536. For the Go blue Activator variant this can only be set to 0. S508 640 10..2550 Page Scan Interval in milliseconds. Minimum is 11.25 ms so 10/11 ms gives 11.25ms. S509 320 10..2550 Page Scan Window in milliseconds. Minimum is 11.25 ms so 10/11 ms gives 11.25 ms. S510 640 10..2550 Inquiry Scan Interval in milliseconds. Minimum is 11.25 ms so 10/11 ms gives 11.25ms. S511 320 10..2550 Inquiry Scan Window in milliseconds. Minimum is 11.25 ms so 10/11 ms gives 11.25 ms. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 26 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S512 0..7 Specify power up state. When set to 0, AT+BTO is required to open the device for Bluetooth activity. When set to 1, it proceeds to a state as if AT+BTO was entered. When set to 2, it is discoverable only, similar to issuing AT+BTQ. When set to 3, it is connectable but not discoverable e.g. AT+BTG When set to 4, it is connectable and discoverable e.g. AT+BTP. When set to 5, it is like 2, but all UART RX traffic is discarded in absence of a connection while DSR is asserted. If DSR is not asserted, then it behaves exactly as per mode 2. When set to 6, it is like 3, but all UART RX traffic is discarded in absence of a connection while DSR is asserted. If DSR is not asserted, then it behaves exactly as per mode 3. When set to 7, it is like 4, but all UART RX traffic is discarded in absence of a connection while DSR is asserted. If DSR is not asserted, then it behaves exactly as per mode 4. Note: By implication, a change to this can only be seen after a power cycle AND if AT&W is actioned prior to the power cycle. If S Reg 554 is non-zero and this register is between 2 and 7 inclusive, then the value of S554 specifies the time in seconds that the device will remain in the specified mode after power up. On timeout, the device falls back to the mode specified in S Register 555. In modes 5, 6, and 7, when all RX activity is ignored, only the special command (capitalised) AT+BT&BISM& terminated by a forces the module temporarily back into modes 2,3 and 4 respectively. In some firmware builds, S Registers 565 to 569 inclusive are visible, which allows the start-up mode to depend on the state of RI line (Setting S Reg 565 forces the RI pin to be configured as an input). For this feature to be active, S Reg 565 should be set to 1. In that case, on start-up, if RI is asserted, then the start-up mode is defined by S Reg 566 and if deasserted then S Reg 567. S513 0..1 Pairing Authentication, 1 = Enable S514 10 1..60 Pairing Timeout in seconds. This includes the time a host takes to supply the PIN number when PIN? messages are indicated. S515 0x001 F00 0.. 0xFFFFFF Default Device Class Code to be used with AT+BTO when it is not explicitly specified. When queried, the value is always printed as a hexadecimal number. To change the device class of the module, after AT+BTO, use the command AT+BTC. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 27 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S516 0x000 000 0..0x2FFFF FF Default Device Class filter to be used with AT+BTI when it is not explicitly specified. When queried the value is always printed as a hex number. The seventh most significant digit, can be 0, 1, or 2, and is used to specify the type of device class filter. When 0, it specifies no filtering. When 1, it specifies an AND mask and all 24 bits are relevant When 2, it specifies a filter to look for devices with matching major device class which occupies a 5 bit field from bits 8 to 12 inclusive (assuming numbering starts at bit 0). All other 19 bits MUST be set to 0. S517 20 2..61 Inquiry Length in units of seconds. This parameter is referenced by the AT+BTI command S518 0..255 Maximum number of responses from an inquiry request. This parameter is reference by the AT+BTI command. If this number is set too high, then AT+BTI will return ERROR 27. For a particular firmware revision, determine the effective maximum value by trial and error. That is, set to a high value, send AT+BTI and if ERROR 27 is returned, then retry with a smaller value. This effective max value remains unchanged for that particular firmware build. S519 500 100..3000 When S507>0, and in a connection, DSR can be used to change from data to command state by deasserting the DSR line for less than the time specified in this register. This value is rounded down to the nearest 100 ms. S520 TBC 1200..1152 00 Change to a standard baud rate. The effect is immediate and the OK is sent at the new baud rate. Only one of the following baud rates are accepted: 1200, 2400, 4800, 9600, 19200, 28800, 38400, 57600, 115200. If S register 525=1, then the maximum baud rate is limited to 115200. See S Register 526 for further information. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 28 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S521 TBC 1200..9216 00 Change baud rate to non-standard value. Laird modules support any baud rate. The only limitation is the integer arithmetic involved, which may adjust the applied rate slightly. If the internally computed baud rate is more than 2% offset from the desired input value, then an ERROR is returned and the old baud rate prevails. To inspect the actual baud rate, do ATS521? S521 should only be used for non-standard baud rates. For standard baud rates use S520. The effect is immediate and the OK is sent at the new baud rate. If S Register 525=1, then the max baud rate is limited to 115200 In the event that a non-standard baud rate is requested, it is entirely possible that the host is not capable of generating such a baud rate. In this case the Laird Technologies device cannot be communicated with. If this happens, there is a procedure to recover from this situation which is described in section titled “Factory Default Mode” The default is 9600 for the Laird module and 115200 for other Laird devices. See S Register 526for further information. S522 1 = CTS/RTS hardware handshaking enabled For the Go blue Activator variant of the module this register is read only. See S Register 526 for further information. S523 1..2 Number of Stop bits For the Go blue Activator variant of the module this register is read only. See S Register 526 for further information. S524 0..2 Parity. 0=None, 1=Odd, 2=Even For the Go blue Activator variant of the module this register is read only. See S Register 526 for further information. S525 0..1 Apply multiplier of 8 to baud rate internally. This is set to 0 (disabled) by default for the Laird Technologies Module/RS-232 Adaptor/Universal RS-232 Adaptor, and set to 1 (enabled) by default for the Laird Technologies PC Card. It is required in the PC Card because the UART chip on the PC Card is driven by a 14.7456MHZ crystal instead of 1.8432MHz. This means that when a host asks for a baud rate, in reality it gets a baud rate which is 8 times faster. If S Register 521 > 115200 then this register cannot be set to 1. For the Go blue Activator variant of the module this register is read only. See S Register 526 for further information. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 29 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S526 1..3 This register specifies a two bit mask used to qualify how S Registers 520 to 525 are actioned. When bit 0 is 1, the new comms parameter affects the UART immediately. When bit 1 is 1, the new comms parameter is stored in non-volatile memory. For example, to change comms parameters but have them come into effect only after subsequent power cycles, set this register to 2. Likewise, for an immediate effect that does not persist over a power cycle, set the value to 1. This must be set before the baud rate change. S530 1000 100..15000 Reconnect delay when configured as master in pure-cablereplacement mode. This value is rounded down to the nearest 100 ms. See S Register 505 and 543. S531 0..5 Specifies the mode on connection establishment. 0 = Normal. Data is exchanged between UART and RF 1 = LOCAL_COMMAND. UART input is parsed by the AT interpreter and RF data is discarded 2 = REMOTE_COMMAND. RF input is parsed by the AT interpreter and UART data is discarded. If S Reg 536 is not 1 then this register cannot be set to 2 and an ERROR is returned 3=LOCAL_COMMAND. UART input is parsed by the AT interpreter and incoming RF data is sent to the host using the RX asynchronous response. 4=LOCAL_COMMAND and on the RF side, the GPIO is automatically sent when there is a change in input. See Section 9.5 for more details. 5=DEAMON mode S532 0..7 If non zero, then on every connection, a SCO channel (audio) is initiated. Bit 0 for HV1, Bit1 for HV2, and Bit2 for HV3. When the connection is lost, the SCO channel also disappears. S533 0..2 If set to 1, then GPIO5 follows RI state; if set to 2, it follows the state of DSR and if 0 it is not driven and GPIO5 is available as a user I/O. This register may not be effective immediately after changing the value. It must be saved to non-volatile memory using AT&W and will operate as expected after an ATZ or a power cycle. S534 0..2 When set to 0, GPIO4 is available as user I/O If set to 1 then right LED follows DCD state. If set to 2 then the LED behaves as per setting 1; but in addition, when not in a connection, if the device is connectable or discoverable, then the LED blinks. This register may not be effective immediately after changing the value. It must be saved to non-volatile store using AT&W and will operate as expected after an ATZ or a power cycle. S535 20 0..41 Link Supervision Timeout. If units go out of range, then a NO CARRIER message is sent to the host after the time specified here Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 30 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S536 0..1 When set to 1, a remote device can capture the AT parser of this unit by it sending this module an escape “!!!” sequence. The inter character timing is set via S Register 12. If S Register 507 is >/= 2, then reading this register always returns 0 and writing 1 results in ERROR 33. S537 X..X This register is no longer available – See 551,552, and 553 instead. It only exists in firmware version 1.1.12 to 1.1.47 The functionality it controlled is now defined by registers 551,552, and 553 S538 0..1 If 1, then when a successful pairing occurs, it is automatically saved in the trusted device database, if the database has room to store it. S539 0..1 When set to 1, in idle mode (S512=1), UART Rx characters are discarded if DSR is deasserted. S540 0 48..127 Sets the MTU in L2CAP configuration negotiations. The value of 0 is a special value which means that the current value should remain. S541 TBC TBC This sets the power level in dBm when inquiring or paging. Reading this register returns the value stored in non-volatile memory. S542 TBC TBC As per S541, however reading this register returns the current power level as set in the base band. The read can be different from S541because the actual power is set using a lookup table and the base band rounds down to the nearest value in the table. S543 0..1 If this is set to 1, then incoming pairing attempts are accepted (if a pin code has been pre-entered using AT+BTK) while in the wait phase of auto connect cycle initiated by the AT+BTR command. In addition to accepting pairing attempts, if the pairing is successful, then the new device is automatically set as the peer address for automatic connections (as if an explicit AT+BTR command was entered). See S Register 505 and 530. S544 0..1 Configure the UART for either low latency or maximum throughput. A setting of 1 gives maximum throughput. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 31 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S551 0x321 0xFFFF This register specifies in each 4 bit nibble, how the outgoing modem status bits to the remote peer gets its value. Bluetooth allows for RTR, RTC, DV, and IC bits to be exchanged over an RFCOMM connection. Nibble 0..3 specifies the source for RTC 4..7 specifies the source for RTR 8..11 specifies the source for DV (i.e. DCD) 12..15 specifies the source for IC (i.e. RI) Each nibble can take the following value: 0 – Always set to 0 1 – Always set to 1 2 – If DCD (pin 8 on module connector) is output then always 1 If DCD is input then 1 if DCD is asserted otherwise 0 3 – If RI (pin 6) is output then always 0 If RI is input then 1 if RI is asserted otherwise 0 If DSR (pin 10) is asserted then 1 otherwise 0 In the event that a nibble specifies DSR as the source of its state, be aware that if S Register 507 is anything other than 0, a de-assertion of DSR causes the Bluetooth connection to be dropped. If bits 0..3 and 4..7 are set to 0, then some Bluetooth devices will use that as a signal to stop sending any data back. For example, Nokia 6310 stops responding. If this register is changed while in command and connected mode, then on going back online using the ATO command, a fresh signal is sent to the peer to update the bits. S552 0x012 0x0FFF This register specifies in each 4 bit nibble, how the DTR, DCD, RI output pins are controlled when in a Bluetooth connection Nibble 0..3 specifies the source for DTR 4..7 specifies the source for DCD 8..11 specifies the source for RI Each nibble can take the following value: 0 – Do NOT touch the I/O 1 – Always deassert 2 – Always assert 3 – If RTC bit in CONTROL_IND is 1 then assert otherwise deassert 4 – If RTR bit in CONTROL_IND is 1 then assert otherwise deassert 5 – If DV bit in CONTROL_IND is 1 then assert otherwise deassert 6 – If IC bit in CONTROL_IND is 1 then assert otherwise deassert If this register is changed while in command and connected mode, then on going back online using the ATO command, the modem output lines are refreshed. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 32 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S553 0x020 0x0FFF This register specifies in each 4 bit nibble, how the DTR,DCD,RI output pins are controlled when NOT in a Bluetooth connection Nibble 0..3 specifies the source for DTR 4..7 specifies the source for DCD 8..11 specifies the source for RI In addition it also refers to S Register 552 to see if the relevant pin is an input or not to be touched. If the nibble in 552 is 0, then the relevant pin is an input. Each nibble can take the following value: 0 – Always deassert 1 – Always assert 2 – Assert if RING is being sent to the host The default for the Universal RS-232 Adaptor is $0200. S554 0..900 If S Register 512 >/=2 and =7 then this register specifies a time in seconds for which the device stays in the S512 mode after power up or reset. On timeout, it aborts the discoverable and/or connectable and falls back into S512=1 mode, when it is deaf and dumb. Note: If AT+BTR has been used to specify a peer device, then on reverting to mode 1, it attempts to make a connection to that peer device. A power cycle, reset via BREAK or ATZ is required to see the effects of change. S555 1..7 If S Register 554 is nonzero, then after the post reset window expires, the mode reverts to the mode specified in this register. This allows, for example, the device to be discoverable and connectable on power up (mode 4 or 7) and on window timer expiry to revert to connectable only (mode 3 or 6). A power cycle, reset via BREAK or ATZ is required to see effects of a change. In some firmware builds, S Registers 565 to 569 (inclusive) are visible, which allows the start-up mode to depend on the state of RI line (Setting S Reg 565 forces the RI pin to be configured as an input). For this feature to be active, S Reg 565 should be set to 1. In that case, on start-up, if RI is asserted, then the start-up mode is defined by S Reg 568 and if deasserted then S Reg 569. S556 0..3 Allows GPIO or ADC values to be read via the minor class field in an inquiry response. When this value is non-zero, bits2 to 7 contain information as follow: 1 – ADC1 2 – ADC2 3 – GPIO1 to GPIO6 Set to 0 to disable this feature. This allows i/o information to be conveyed without a connection. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 33 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S557 32 4..900 Specified in seconds, the update interval for the feature enabled via S Reg 556 S558 0..1 When 1, the following responses; “RING”, “NO CARRIER”, and “CONNECT” are replaced by “BTIN”, “BTDOWN”, and “BTUP” respectively. This eliminates ambiguity when the module has a Bluetooth connection to an AT modem which also gives these responses. S559 0..3 This specifies a mask. When Bit 0 is 1, the response word “ERROR“ is replaced by “BTERR” and “OK” is replaced by “ok”. When Bit 1 is 1, then error responses do not include the error number; instead the error number can be retrieved using ATI12. S560 15 15..120 Disconnect timeout in seconds. This timer specifies how long to wait for confirmation (from the peer device and/or the underlying stack) that the connection has been successfully torn down. There can be instances where a confirmation does not arrive; in this case this timer is used to ‘close off’ the procedure and put the state machine back into a proper mode for new operations. Time is specified with 15 seconds intervals. S561 0..1000 Sniff Attempt Time in units of milliseconds. 0 means disable. See section “Power Consumption and Reset” in the user guide for more details. S562 0..1000 Sniff timeout Time in units of milliseconds. 0 means disable. See section “Power Consumption and Reset” in the user guide for more details. S563 0..1000 Sniff Minimum Interval in units of milliseconds. 0 means disable. See section “Power Consumption and Reset” in the user guide for more details. S564 0..1000 Sniff Maximum Interval in units of milliseconds. See section “Power Consumption and Reset” in the user guide for more details. S565 If set to 1, RI (Ring Indicate) line is configured as an input and forces the start-up mode (S Reg 512)and post-timeout on Start-up mode (S Reg 555) to be dependent on the state of RI. The RI conditional modes are defined by S Regs 566 to 569 inclusive. S566 If S565=1 and RI is asserted then this is the mode in which the device starts up. S567 If S565=1 and RI is deasserted then this is the mode in which the device starts. S568 If S565=1 and RI is asserted then this is the mode the device assumes after the post-start-up timeout defined in S Reg 554 instead of the mode defined in S Reg 555. S569 If S565=1 and RI is deasserted then this is the mode the device assumes after the post-start-up timeout defined in S Reg 554 instead of the mode defined in S Reg 555. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 34 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S580 0..1 Remote volume control feature for Headset profile when ATS102 enables headset profile. S581 0..63 Lowest 6 bits of the supported features field for Handsfree profile when ATS102 enables handsfree profile. See also S Reg 594 which allows the HandsFree profile version number to be selected. S582 0..1 FTP Related: 0 = BodyLen in PUT obex packet = 0 1 = BodyLen in PUT obex packet = 1 S583 0xB 0 .. 0x1F This specifies the initial state of the following modem control lines sent to the peer Bit 0 – RTC (DTR/DSR) Bit 1 – RTR (RTS/CTS) Bit 2 – IC (Ring Indicate RI) Bit 3 – DV (DCD) Bit 4 – FC (Reserved) S584 0..1 Enable/Disable eSCO When changing the unit returns ERROR 14, it implies the device is either in a connection or waiting for a connection and the new value cannot be accepted. For the former, drop the connection, issue the command AT+BTX, and then set the new value and issue (for the latter) the command AT+BTX prior to setting the register. S585 0..9 GPIO pin set to 0 to disable the feature. S586 1000 100..5000 Pulse period in milliseconds (rounded down to nearest multiple of 50). S587 0..100 Duty cycle in percentage (rounded to the nearest multiple of four). S588 0..1 After a disconnection, there is a cold reset. S589 0..F Codec output gain. S590 0..3 Codec input gain. S591 0..1FF Default GPIO output states when not in a connection. This is used when virtual digital I/O cable replacement mode is in operation. S592 0..1 Set this to 1 to reduce the trusted device database to one record when autosaving of pairing is enabled via S Reg 538. S593 0..1 Automatically append last six digits of local Bluetooth address to the friendly name which was set via AT+BTN or AT+BTF. S594 0..1 Set handsfree profile version in sdp record. Set to 0 for 1.1 and to 1 for 1.5. S595 0..1 Set handsfree gateway profile version in sdp record. Set to 0 for 1.1 and to 1 for 1.5. S596 1..1FF Audio Gateway features to be advertised in SDP record. See handsfree profile specification for exact bit mapping. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 35 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S597 0..2 Audio Gateway mode: 0 – SDP record advert only 1 – Hosted operation 3 – Hostless operation See Audio Gateway specific documentation for more details. S598 0..1 In hostless audio gateway serviced mode, if this is 1, then incoming voice calls are reflected to bonded headset. S599 0..2 SCO control for hostless gateway operation. 0 – Normal 1 – As early as possible 2 – Leave SCO to be controlled by headset S600 0..65535 Number of times this module has gone through a reset cycle. This feature is enabled by S Reg 601. Writing any value to this register initialises it to a certain value. S601 0..1 If this is 1, then on reset S Reg 600 value is incremented. S610 0..7FFF Set direction of digital I/O lines. This is a mask made up of 5 bits. Setting a bit to 1 makes that I/O line an output. GPIO1 is bit 0, GPIO2 is bit 1, up to bit 8 for GPIO9. S611 Set to 1 to invert the logic of GPIO outputs. For example, ATS621=1 sets the output pin to low and vice versa. S620 n/a 0..31 Read/Write to all eight digital lines in one atomic step. The value is returned as a four digit hexadecimal value with trailing 0s. S621 n/a 0..1 Read/Write to GPIO1. S622 n/a 0..1 Read/Write to GPIO2. S623 n/a 0..1 Read/Write to GPIO3. S624 n/a 0..1 Read/Write to GPIO4. S625 n/a 0..1 Read/Write to GPIO5. S626 n/a 0..1 Read/Write to GPIO6. S627 n/a 0..1 Read/Write to GPIO7. S628 n/a 0..1 Read/Write to GPIO8. S629 n/a 0..1 Read/Write to GPIO9. S631 n/a 0..65535 When GPIO1 is configured as an input, low to high transitions are counted. There is no software debouncing. External RC circuit may be required. The counter wraps to 0 when it overflows beyond 65535. S632 n/a 0..65535 When GPIO2 is configured as an input, low to high transitions are counted. There is no software debouncing. External RC circuit may be required. The counter wraps to 0 when it overflows beyond 65535. S641 n/a 0..65535 As per 631, but the action of reading the value resets the count to 0. S642 n/a 0..65535 As per 632, but the action of reading the value resets the count to 0. S701 n/a 0..65535 Read to Analogue Line 0, when reading value is returned in decimal. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 36 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Reg. Defaul Range Comment S702 n/a 0..65535 Read to Analogue Line 1, when reading value is returned in decimal. S711 n/a 0000..FFFF Read to Analogue Line 0, when reading value is returned in hexadecimal. S712 n/a 0000..FFFF Read to Analogue Line 1, when reading value is returned in hexadecimal. S721 Set direction of Analogue Line 0. S722 Set direction of Analogue Line 1. 0.. 2^32 Ten General Purpose 32 bit Registers for use by host. These are stored in non-volatile memory. S1001 to S1010 6.3.13 ATSn?{Read S Register Value} This returns the current value of register n. For recognised values of n: Response: As Appropriate OK For unrecognised values of n: Response: ERROR nn 6.3.14 ATSn=?{Read S Register – Valid Range} This returns the valid range of values for register n. For recognised values of n: Response: Sn:(nnnn..mmmm) OK For unrecognised values of n: Response: ERRORnn 6.3.15 ATX {Send Data in Local Command and Connected Mode} This command is used to send data to the remote device when in local command and connected mode. The parameter is any string not more than 24 characters long. If a non-visual character is to be sent, then insert the escape sequence \hh where hh are two hexadecimal digits. The 3 character sequence \hh is converted into a single byte before transmission to the peer. Response: OK 6.3.16 ATY {Send Data in Local Command and Connected Mode} This command is similar to ATX in syntax and functionality, except that the string is only copied to the output RF buffer. Only when an empty string is presented are all pending data in the output RF buffer flushed out. The parameter is any string not more than 24 characters long. If a non-visual character is to be sent then insert the escape sequence \hh where hh are two hexadecimal digits. The three character sequence \hh is converted into a single byte before transmission to the peer. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 37 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Response: OK 6.3.17 ATZ {Hardware Reset and emerge into mode ‘n’} Forces the device through a hardware reset which means it eventually comes alive in the local command and unconnected mode. This allows changes to the PS store to take effect. Prior to version 2.7.0, allow for approximately two seconds for the device to once again start responding to AT commands. The best way to determine if the device is alive is to keep sending it AT until it responds with an OK response. After version 2.7.0, it is safe to communicate after receiving an OK. The optional parameter is only available for firmware 2.7.0 and newer and is a value in the range 0 to 7 (up to version 7.18.0). After version 9.18.6, valid values are 0 to 4 (inclusive). ATZ and ATZ0 signify reset and emerge into the current mode (see command ATI14 TBC). ATZ1 to ATZ4 instructs the module to reset and then emerge into the appropriate boot mode. Note: S Reg 103 specifies the boot mode from cold. For firmware prior to v2.7.0: Response: OK Note: OK is returned before the RESET. For firmware v2.7.0 and newer: Response: OK Note: OK is returned after the RESET. 6.3.18 AT&Fn{Set S Register Defaults} This command only works when the device is in local command and unconnected mode. Depending on the value of ‘n’, it installs S Register values appropriate for various power modes, ranging from minimum power consumption to maximum. See Table 6-3 for the legal values of ‘n’. All other values of n generate a syntax error response. If ‘n’ is not specified, then a default value of 0 is assumed where the baud rate is NOT changed. Table 6-3: Legal values of 'n" &F0 (Default) Medium power consumption, UART baud rate unchanged, Left LED off, Right LED = DCD &F1 Minimum power consumption, UART baud rate set to 9600, Left and Right LED off &F2 Minimum power consumption, UART baud rate set to 38400, Left and Right LED off &F3 Minimum power consumption, UART baud rate set to 115200, Left and Right LED off &F4 Medium power consumption, UART baud rate set to 115200, Left LED off, Right LED = DCD &F5 Maximum power consumption, UART baud rate set to 115200, Left LED=DSR, Right LED = DCD &F6 Maximum power consumption, UART baud rate set to 115200, Left LED=DSR, Right LED = DCD Explicitly set higher baud rates using ATS521=n Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 38 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Refer to the “Power Consumption” chapter in the relevant Laird device user guide for more detailed information of power usage. The new values are NOT updated in non-volatile memory until the AT&W command is sent to the Laird device. Response: OK Or Response: ERROR nn Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 39 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 6.3.19 AT&F*{Clear Non-volatile Memory} The AT&F* variant of the command installs values in S registers as per command AT&F4 and then all other user parameters in non-volatile memory are erased. This means that the trusted device database is cleared, as well as parameters related to the following commands: AT+BTR, AT+BTN, AT+BTS. Response: OK Or Response: ERROR nn 6.3.20 AT&F+{Clear Non-volatile Memory} This command erases all user parameters in non-volatile memory except S Registers 520 to 525. This means that the trusted device database is cleared, and so are parameters related to the following commands:- AT+BTR, AT+BTN, AT+BTS. Response: OK Or Response: ERROR nn 6.3.21 AT&W{Write S Registers to Non-volatile Memory} Writes current S Register values to non-volatile memory so that they are retained over a power cycle. Response: OK Or Response: ERROR nn 6.3.22 AT+BTAn{Control Audio Channel} Once a Bluetooth connection is active, and assuming the peer device is a Laird device, this command is used to start/stop a SCO channel which connects the PCM interfaces of the two peer devices. If a codec is attached to the PCM pins, then 2-way audio can be established. +BTA0 +BTA1 Switch off the channel. Switch on the channel. On receipt of the command, the following response immediately follows. Response: OK The lower layers then go through the process of setting up the SCO channel. Once a SCO link is established, the following response is asynchronously sent to the host. Response: AUDIO ON Or if the SCO failed to be established. Response: AUDIO FAIL On the peer device, the host will asynchronously get …. Response: AUDIO ON Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 40 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 6.3.23 AT+BTC {Set Device Class Code} This command is used to set the device class code which is sent in subsequent inquiry responses. It can be read back using the AT+BTC? command as described below. is a six digit hexadecimal number derived as per section “1.2 The Class of Device/Service Field” of the Bluetooth specification “Bluetooth Assigned Numbers”. The 24 bits are made of the following four fields (bit 0 corresponds to the least significant bit): Bits 0-1: Format Type. This field currently only has a value of 00 (i.e. format type 1). Bits 2-7: These 6 bits define the Minor Device Class and the value is interpreted differently based on the Major Device class stored in the next 5 bits. Bits 8-12: These 5 bits define the Major Device Class as per Table 1.3 in “Bluetooth Assigned Numbers”. Bits 13-23: This is an 11 bit field used as a mask to define the Major Service Class, as per Table 1.2 in “Bluetooth Assigned Number”. Laird devices do not map to any predefined Major Service Class or Major Device Class. The default devclass as shipped is 001F00 which means no Major Service Class and “Unclassified” Major Device class. Table 6-4 shows examples of device class codes. Table 6-4: Device class codes Code (Hex) Name Major Service Major Device Minor Device 001F00 Unclassified None Unclassified n/a 200404 Headset Audio Audio Headset Response: OK Or for an invalid value (usually a value which is not six hexadecimal characters long). Response: ERROR 08 6.3.24 AT+BTC?{Read Device Class Code} This command is used to read the current device class code. Response: 123456 OK 6.3.25 AT+BTD {Remove Trusted Device} This command is used to remove the specified device from the list of trusted devices in the non-volatile database. If the device is not in the database, the response is still OK. Response: OK Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 41 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 6.3.26 AT+BTD*{Remove All Trusted Devices} WARNING: This command is used to remove all devices from the list of trusted devices in the nonvolatile database. The software does not ask for confirmation. WARNING: If you make an authenticated connection, the link key gets cached in the underlying stack. If you subsequently delete the key using AT+BTD* and immediately request an authenticated connection to the same device, then the connection will be established. To ensure this does not happen, either send ATZ after the AT+BTD* OR send AT+BTD for each item in the trusted device database. Response: OK 6.3.27 AT+BTF= {Set Friendly Name} This sets the friendly name of this device as seen by other devices. Response: OK 6.3.28 AT+BTF {Get Remote Friendly Name} This command gets the remote friendly name of the specified peer. Response: ,”Friendly Name” OK 6.3.29 AT+BTG {Enable Cautious Page Scanning ONLY} Enable page scanning and wait for a connection from device with Bluetooth address . If the specified address is 000000000000 then incoming connections are accepted from any device (like AT+BTP without an address). Inquiry Scans are disabled. This command also has variants which allow authentication and encryption to be explicitly specified. For example: AT+BTGU123456789012 AT+BTGY123456789012 AT+BTGUY123456789012 AT+BTGYU123456789012 Response: OK 6.3.30 AT+BTG{Enable Promiscuous Page Scanning ONLY} Enable page scanning only and wait for a connection from any device. Inquiry scans are disabled. Authentication and encryption is as per S registers 502 and 503. Response: OK 6.3.31 AT+BTGU{Enable Promiscuous Page Scanning ONLY} Enable page scanning only and wait for a connection from any device. Inquiry scans are disabled. Authentication is enabled and encryption is disabled. Response: OK Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 42 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 6.3.32 AT+BTGY{Enable Promiscuous Page Scanning ONLY} Enable page scanning only and wait for a connection from any device. Inquiry scans disabled. Authentication is disabled and encryption is enabled. Response: OK 6.3.33 AT+BTGUY{Enable Promiscuous Page Scanning ONLY} Enable page scanning only and wait for a connection from any device. Inquiry scans are disabled. Authentication and encryption are both enabled. The order of U and Y is not significant. Response: OK 6.3.34 AT+BTI {Inquire} This makes the device perform an inquiry for device class code for delay milliseconds and max number of unique responses, where delay is specified by S register 517 and max is specified by S register 518. The is an optional parameter where the value specifies either a six digit device class code or a two digit major device class. If it is not specified, the value is taken from S register 516. When is six hexadecimal characters long, it specifies an AND mask which is used to filter inquiry responses. When is two hexadecimal characters long, it forces the inquiry to filter responses to devices that match their major device class code to this value (can only be in the range 00 to 1F). Response: 12346789012 12345678914 OK If the module is waiting for an incoming connection, (entered via AT+BTP, AT+BTG, AT+BTQ), then it responds with ERROR 14. To perform the inquiry, send AT+BTX to put the module back into idle mode. Response: ERROR 14 6.3.35 ERROR RESPONSE For a single inquiry request with the Bluetooth inquiry process, a device could respond many times. To ensure that an address is sent to the host only once for a particular AT+BTI, an array of addresses is created at the start of each AT+BTI and is filled as responses come in. This array of addresses is stored in dynamic memory and, if the memory allocation fails, the inquiry procedure is aborted. If that occurs, an error response is sent to the host. To clarify, a single AT+BTI never returns the same Bluetooth address more than once, but as long as the responding device is active, all AT+BTI commands always return it. Response: ERROR 27 6.3.36 AT+BTIV {Inquire} As per AT+BTI but the response includes the device class code for all inquiry responses. Refer to the ‘ERROR RESPONSE’ note in the description for AT+BTI . Response: 12346789012,123456 12345678914,123456 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 43 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide OK 6.3.37 AT+BTIN {Inquire} As per AT+BTI but the response includes the device class code and friendly name for all inquiry responses. Please refer to the ‘ERROR ESPONSE’ note in the description for AT+BTI . The friendly name strings are in UTF-8 format as per the Bluetooth specification. Response: 12346789012,123456,"TDK SYSTEMS AT DONGLE 1" 12345678914,123456, “TDK SYSTEMS RS232" OK Note: Many releases of firmware return the product name as LAIRD TECHNOLOGIES, e.g. Response: 12346789012,123456,"TDK SYSTEMS AT DONGLE 1" 12345678914,123456, "TDK SYSTEMS RS232" OK Note: We strongly recommend that any software implementation that uses this command should check for any of Laird, EZURIO, and TDK SYSTEMS to ensure backward and forward compatibility. 6.3.38 AT+BTK= {Set Passkey} This command is used to provide a passkey when PIN? 12345678 indications are received asynchronously. If a pairing is not in progress then the pin is written to non-volatile memory for future use. Specifying an empty string deletes the key from the non-volatile memory. The string length must be in the range 0 to 8, otherwise an error is returned. Response: OK 6.3.39 AT+BTM {Set Incoming Peer Address} This command is used to store a peer address for incoming connections in non-volatile memory. A value of 000000000000 has the special meaning of invalid peer address. When S register 512 = 3, 4, 6, or 7 it waits for an incoming connection from the peer address specified. If the peer address is not 000000000000, then it waits for a connection from the specified master, otherwise it connects to anyone. Response: OK 6.3.40 AT+BTM{Delete Incoming Peer Address} This command is used to delete the peer address previously stored using AT+BTR . Response: OK 6.3.41 AT+BTM?{Read Incoming Peer Address} This command is used to display the peer address stored in non-volatile memory, used to put the module in pure cable replacement mode. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 44 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide Response: 12346789012 OK If the location is empty the response is as follows. Response: 00000000000 OK 6.3.42 AT+BTN= {Set Friendly Name in Non-volatile Memory} This sets the default friendly name of this device as seen by other devices. It is stored in non-volatile memory. Use AT+BTF to make the name visible to other devices. Use AT+BTN? To read it back. An empty string (“”) deletes the string from non-volatile memory which forces use of the default name. Response: OK 6.3.43 AT+BTN?{Read Friendly Name from Non-volatile Memory} Read the default friendly name from non-volatile memory. Response: "My FriendlyName" OK 6.3.44 AT+BTO {Open and make Unit Detectable} After power up and ATZ, this command is sent to ensure that the RFCOMM is initialised and opened and the service name as specified in AT+BTN is exposed via the SDP registry. The value specifies an optional fixed length hexadecimal device class code. If it is not specified, then the device class code is taken from S Register 515. For this command to be effective, S Register 512 must be set to zero. Response: OK 6.3.45 AT+BTP {Enable Cautious Page/Inquiry Scanning} Enable page scanning and wait for a connection from device with Bluetooth address . If the specified address is 000000000000 then incoming connections are accepted from any device, is as per AT+BTP without an address. Inquiry scanning is also enabled. This command also has variants which allow authentication and encryption to be explicitly specified. For example: AT+BTPU123456789012 AT+BTPY123456789012 AT+BTPUY123456789012 AT+BTPYU123456789012 Response: OK 6.3.46 AT+BTP{Enable Promiscuous Page/Inquiry Scanning} Enable page scanning and wait for a connection from any device. Inquiry scanning is also enabled. Authentication and encryption is as per S registers 502 and 503. Response: OK Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 45 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 6.3.47 AT+BTPU{Enable Promiscuous Page/Inquiry Scanning} Enable page scanning and wait for a connection from any device. Inquiry scanning is also enabled. Authentication is enabled and encryption is disabled. Response: OK 6.3.48 AT+BTPY{Enable Promiscuous Page/Inquiry Scanning} Enable page scanning and wait for a connection from any device. Inquiry scanning is also enabled. Authentication is disabled and encryption is enabled. Response: OK 6.3.49 AT+BTPUY{Enable Promiscuous Page/Inquiry Scanning} Enable page scanning and wait for a connection from any device. Inquiry scanning is also enabled. Authentication and encryption are both enabled. The order of U and Y is not significant. Response: OK 6.3.50 AT+BTQ{Enable Inquiry Scans ONLY} When inquiry scan is enabled, it implies that this device responds to inquiries from other devices. Use AT+BTX to disable inquiries. Response: OK 6.3.51 AT+BTR {Set Outgoing Peer Address} This command is used to store a peer address for outbound connections in non-volatile memory. A value of 000000000000 has the special meaning of invalid peer address. This command is used to set up a module in pure cable replacement mode. If S register 512 = 1 and the peer address is not 000000000000, then it periodically (time specified via S register 505) attempts to connect to the peer address specified. In this circumstance, all commands from the host are buffered in the receive buffer until a Bluetooth connection is established with the peer device and it then sends 0 the buffer across. This means that if the peer device is not in the vicinity and will never be there, the device effectively becomes useless, as in this circumstance a host would want to get attention of the AT parser to send it new commands – probably one to delete the peer device. In this circumstance, a recovery is possible by one of two methods. The first method assumes that the DTR from the host is connected to the DSR line of the module and the second method assumes that this connection is absent. In the first method it is enough to deassert the DTR line from the host and that will abort the autoconnect cycle. The second method is initiated by resetting the device and then ensuring that the text string “AT+BT&BISM& ” is sent (where is the carriage return character). There is special code which looks out for this magic command and terminates the autoconnect cycle if it sees it and confirms to the host of that fact by sending an “OK” response. Response: OK Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 46 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module User’s Guide 6.3.52 AT+BTR{Delete Outgoing Peer Address} This command is used to delete the peer address previously stored using AT+BTR . Response: OK 6.3.53 AT+BTR?{Read Outgoing Peer Address} This command is used to display the peer address stored in non-volatile memory, used to put the Laird device in pure cable replacement mode. Response: 12346789012 OK If the location is empty the response is as follows. Response: 00000000000 OK 6.3.54 AT+BTS= {Set Service Name} This writes the name to non-volatile memory. It is used after ATZ, power cycle, or AT+BTO if it has not yet been issued. Use AT+BTS? to read it back from non-volatile memory. An empty string (“”) deletes the string from non-volatile memory which forces the default service to be used. Response: OK If the service name cannot be set for any reason then an error response ERROR 11 is returned. 6.3.55 AT+BTS?{Read Service Name from Non-volatile Memory} Reads the default service name from non-volatile memory. Response: "My ServiceName"