all | frequencies |
|
|
|
|
exhibits | applications |
---|---|---|---|---|---|---|---|
manuals | photos |
app s | submitted / available | |||||||
---|---|---|---|---|---|---|---|---|
1 2 |
|
user manual (BT730 series) | Users Manual | 3.41 MiB | / January 10 2013 | |||
1 2 |
|
user manual (BT740 series) | Users Manual | 3.94 MiB | / January 10 2013 | |||
1 2 |
|
Internal Photos | Internal Photos | 1.28 MiB | November 23 2021 / May 23 2022 | delayed release | ||
1 2 |
|
External Photos | External Photos | 1.80 MiB | November 23 2021 / May 23 2022 | delayed release | ||
1 2 |
|
C2PC | Cover Letter(s) | 1.51 MiB | November 23 2021 | |||
1 2 |
|
Power of Attorney Letter | Cover Letter(s) | 432.88 KiB | November 23 2021 | |||
1 2 |
|
RF Exp | RF Exposure Info | 411.98 KiB | November 23 2021 | |||
1 2 | Cover Letter(s) | 433.58 KiB | November 23 2021 | |||||
1 2 |
|
STC revised | Cover Letter(s) | 265.89 KiB | November 26 2021 / November 23 2021 | |||
1 2 |
|
Test Report | Test Report | 3.84 MiB | November 23 2021 | |||
1 2 |
|
Test Setup Photos-1 | Test Setup Photos | 3.87 MiB | November 23 2021 / May 23 2022 | delayed release | ||
1 2 |
|
Test Setup Photos-2 | Test Setup Photos | 3.39 MiB | November 23 2021 / May 23 2022 | delayed release | ||
1 2 | Cover Letter(s) | |||||||
1 2 | ID Label/Location Info | |||||||
1 2 | ID Label/Location Info | |||||||
1 2 | Cover Letter(s) | |||||||
1 2 | RF Exposure Info | |||||||
1 2 | Cover Letter(s) | |||||||
1 2 | Cover Letter(s) | |||||||
1 2 | External Photos | / January 10 2013 | ||||||
1 2 | Internal Photos | / January 10 2013 | ||||||
1 2 | Test Setup Photos | / January 10 2013 |
1 2 | user manual (BT730 series) | Users Manual | 3.41 MiB | / January 10 2013 |
Smart Technology. Delivered. Class 1 Bluetooth v2.0 Module USERS 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 Users 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 2 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users 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 3.2 Pin Definitions ......................................................................................................................................... 8 Electrical Specifications ......................................................................................................................... 11 4. IO CHARACTERISTICS ....................................................................................................................... 14 4.1 4.2 Power Consumption .............................................................................................................................. 14 Typical Current Consumption in mA ..................................................................................................... 14 5. Functional Description .......................................................................................................................... 15 5.1 5.2 5.3 5.4 UART Interface ...................................................................................................................................... 15 SPI Bus ................................................................................................................................................... 16 PCM Interface ........................................................................................................................................ 16 General Purpose I/O and ADC ............................................................................................................... 17 6. AT Command Set Reference ................................................................................................................ 17 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 Introduction........................................................................................................................................... 17 Assumptions .......................................................................................................................................... 18 Commands ............................................................................................................................................ 18 Unsolicited Responses ........................................................................................................................... 50 Incoming Connections ........................................................................................................................... 51 Dropping Connections ........................................................................................................................... 51 Pairing and Trusted Devices .................................................................................................................. 52 Error Responses ..................................................................................................................................... 53 Factory Default Mode ........................................................................................................................... 54 Miscellaneous Features ......................................................................................................................... 54 Disclaimers ............................................................................................................................................ 55 Data Sheet Status .................................................................................................................................. 56 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 3 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8. FTP Client Profile Commands .............................................................................................................. 57 8.1 8.2 8.3 8.4 8.5 8.6 Generic Notes and Guidance ................................................................................................................. 57 FTP related AT Commands .................................................................................................................... 58 FTP related Subcommands .................................................................................................................... 58 FTP-Related Subresponses .................................................................................................................... 61 FTP line multiplexing commands ........................................................................................................... 64 Message Sequence Charts ..................................................................................................................... 64 9. OBEX Profile Commands ..................................................................................................................... 78 9.1 9.2 9.3 9.4 9.5 9.6 Generic Notes and Guidance ................................................................................................................. 78 OBEX Push related AT Commands ......................................................................................................... 79 OBEX Push related Subcommands ........................................................................................................ 79 OBEX Push Related Subresponses ......................................................................................................... 80 OBEX Push Line Multiplexing Commands.............................................................................................. 82 Message Sequence Charts ..................................................................................................................... 83 10. Application Note for Surface Mount Modules ....................................................................................... 87 10.1 10.2 10.3 Introduction........................................................................................................................................... 87 Shipping ................................................................................................................................................. 87 Reflow Parameters ................................................................................................................................ 88 11. FCC Regulatory Statements ................................................................................................................. 89 11.1 11.2 Power Exposure Information ................................................................................................................ 89 OEM Responsibilities ............................................................................................................................. 90 12. EU DECLARATIONS OF CONFORMITY ............................................................................................. 93 12.1 12.2 BT730-SA ............................................................................................................................................... 93 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 4 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users 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 developers 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 5 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 2. SPECIFICATIONS 2.1 Detailed Specifications Table 2-1: Detailed specifications Categories Wireless Specification 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 Receive Sensitivity Better than -87 dBm (at 25C) Range
>1000m Data Rates UART Data Transfer Rate Host Interface UART DUN OBEX Client & FTP Client Dial Up Networking Object Exchange & File Transfer Client Profiles Up to 2.1 Mbps (over the air) Circa 300 kbps TX, RX, DCD, RI, DTR, DSR, CTS, RTS1 Default 9600, n,8, 1 From 1,200 to 921,600 bps 8 configurable lines 2 lines, 8 bit resolution 4 lines see Audio section Serial Port Profile Hands Free & Headset AT Command Set Multi-Point API - 3 simultaneous connections Firmware Upgrade over UART 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 6 CONN-GUIDE-BT730_v0.9 Profiles Command Interfaces Audio GPIO ADC PCM SPP HFP & HSP (Audio Gateway) Operation Modes Firmware Upgrade Support SCO Channels PCM Interface Supply Voltage Supply 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 Users Guide Categories Power Consumption Various Modes Feature Typical values Internal External Dimensions Weight Operating Storage Lead Free Warranty Antenna Options Physical Environmental Miscellaneous 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
-40C to +85C
-40C to +85C Lead-free and RoHS compliant 1 Year Development Tools Development Kit Approvals Bluetooth FCC / IC / CE Development kit DVK-BT730 and software tools End Product Listing (EPL)
(to be completed) All BT730 Series (to be completed) 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 7 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 3. HARDWARE SPECIFICATIONS Figure 1: Functional Block Diagram 3.1 Pin Definitions Table 3-1: Pin definitions Pin Signal Description 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 GND SPI_MOSI GPIO6 GPIO7 RESET SPI_CLK PCM_CLK PCM_SYNC PCM_IN PCM_OUT VCC_5VIN GND VCC_3V3 Analogue 1 GND SPI bus serial I/P I/O for host I/O for host Module reset I/P SPI bus clock I/P PCM clock I/P PCM sync I/P PCM data I/P PCM Data O/P 3.0 V < VIN < 5.0 V 3.3 V Monitor 1.8 V max UART_DSR UART_DSR I/P Ceramic Chip Antenna Comment See Note 2 See Note 4 See Note 2 See Note 5 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 8 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide Pin Signal Description Comment UART_DCD UART_DCD I/P or O/ P GPIO_9 GPIO_8 GND I/O for host I/O for host Analogue 00 1.8 V max UART_RX UART_TX UART_RTS UART_CTS USB_D+
USB_D-
UART_RI Receive data I/P Transmit data O/P Request to Send O/P Clear to Send I/P Not used for AT module variants Not used for AT module variants Ring Input or Output GPIO_3/UART_DTR I/O for host/UART_DTR GPIO_5 GPIO_4 SPI_CSB SPI_MISO GND RF_OUT GND I/O for host I/O for host SPI bus chip select I/P SPI bus serial O/P Only on uFL version Only on uFL version Only on uFL version 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 Notes:
See Note 2 See Note 2 See Note 3 See Note 3 See Note 3 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 9 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users 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 Users 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 Peak current of power supply Voltage at digital pins Voltage at POWER pin Min 0
-0.4 2.9 *
Max 200 3.7 6.0 Unit mA V V 3.2.2 Recommended Operating Parameters 3.2.2.1 Power Supply Signal Name Pin No I/O Voltage level Comments VCC_VIN 11 GND 1, 12, 15, 20, 34, 36 I 3.0 V to 5.0 V *
Typ 3.3 V Ityp = TBC mA?
6 Ground terminals to be attached in parallel VCC_3V3 13 O 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 Signal level @ 0mA load VILmin= -0.4V VILmax=0.8V VIHmin=2.3V VIHmax=3.7V VOLmax=0.2V VOHmin=3.1V Input Output Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 11 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 3.2.2.3 RS-232 Interface Signal Name Pin No UART_TX UART_RX UART_CTS UART_RTS UART_DSR UART_DTR UART_RI UART_DCD SPI Bus 23 22 25 24 16 29 28 17 I/O O I I O I O Comments Shared with GPIO3 I or O I or O Direction may be programmed. Direction may be programmed. Signal Name Pin No I/O Comments SPI_MOSI SPI_MISO SPI_CSB SPI_CLK 2 33 32 6 I O I I INTERNAL USE ONLY - Used to reprogram Flash in Laird production. 3.2.2.4 PCM Interface Signal Name Pin No I/O Comments PCM_CLK PCM_IN PCM_SYNC PCM_OUT 7 9 8 10 I or O I I or O O 3.2.2.5 General Purpose I/O and ADC If unused keep pins open. PCM output signals are tri-stated when there is not an active SCO or eSCO connection. Signal Name GPIO_3 - 9 Pin No I/O Signal level Comments I or O See 3.2.2.2 3, 4, 16, 17, 18, 19, 29, 30, 31 Analogue0, Analogue1 14, 21 I Range 0 1.8 V 8 bit 3.2.2.6 Miscellaneous Signal Name USB D-
Pin No 27 I/O I USB D+
RESET 26 5 I I Terminology:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth Signal level VILmax =0.3vdd_usb VIHmin =0.7vdd_usb VILmax =0.3vdd_usb VIHmin =0.7vdd_usb VILmax=1.0V VIHmin=2.3V Comments Normally inactive. Pull to GND through 10k. Normally inactive. Pull to GND through 10k. Active LOW. The Reset input contains a 10k pull-up resistor
(internal to module). 12 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users 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 Users 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 Wait for Connection Or Discoverable Mode, AT+BTP S508=S510=640, S509=S511=320 TBC TBC Wait for Connection Or Discoverable Mode, TBC AT+BTP S508=S510=1000, S509=S511=11 Inquiry Mode, AT+BTIN Connecting Mode (ATDxxx) Connected Mode (No Data Transfer) Connected Mode (Max Data Transfer) TBC TBC TBC 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 Users 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 base-
band 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 modules UART_RX signal line Port /RXD of the application receives data from the modules 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 Users Guide BT730 Application - Host UART_TX UART_RX UART_CTS UART_RTS UART_DSR UART_DTR UART_RI UART_DCD
/RXD
/TXD
/RTS
/CTS
/DTR
/DSR
/RING
/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, or16-
bit 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 Users 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 Users Guide Table 6-1: Matrix of mode states RF Unconnected RF Connected Local Command Mode OK Remote Command Mode Data Mode ILLEGAL ILLEGAL OK OK 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:
All commands are terminated by the carriage return character 0x0D, which is represented by the string <cr> in 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 <cr,lf>. 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. 6.3 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.
<bd_addr> A 12 character Bluetooth address consisting of ASCII characters 0 to 9, A to F and a to f.
<devclass> A 6 character Bluetooth device class consisting of ASCII characters 0 to 9, A to F and a to f. n m 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
<string>
A string delimited by double quotes. E.g. "Hello World". The " character MUST be supplied as delimiters.
<uuid>
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 Users 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:<cr,lf>OK<cr,lf>
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:<cr,lf>OK<cr,lf>
6.3.2 AT Used to check the module is available. Response:<cr,lf>OK<cr,lf>
6.3.3 ATA{Answer Call}
Accept an incoming connection, which is indicated by the unsolicited string
<cr,lf>RING 123456789012<cr,lf> every second. 123456789012 is the Bluetooth address of the connecting device. Response: <cr,lf>CONNECT 123456789012<cr,lf>
6.3.4 ATD<U><Y><bd_addr>,<uuid> {Make Outgoing Connection}
Make a connection to a device with Bluetooth address <bd_addr> and profile <uuid>. The <uuid> 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 <U> is not specified, then authentication is as per register 500, otherwise the connection will be authenticated. If <Y> 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: <cr,lf>CONNECT 123456789012<cr,lf>
Or
<cr,lf>NO CARRIER<cr,lf>
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 Users 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: <cr,lf>CALL LIMIT<cr,lf>
Or
<cr,lf>NO CARRIER<cr,lf>
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 Serial Port LAN Access Using PPP Dialup Networking IrMC Sync OBEX Object Push OBEX File Transfer IrMC Sync Command Headset Cordless Telephony Intercom Fax Audio Gateway WAP WAP_CLIENT UUID 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 6.3.5 ATD<U><Y><bd_addr>,<ServiceName>{Make Connection}
Make a connection to device with Bluetooth address <bd_addr> and profile specified via S Reg 101 AND which has a service name starting with the string <ServiceName>. The service name parameter is a string delimited by . If <U> is not specified, then authentication is as per register 500, otherwise the connection is authenticated. If <Y> 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:
<cr,lf>CONNECT 123456789012<cr,lf>
Or
<cr,lf>NO CARRIER<cr,lf>
6.3.6 ATD<U><Y>L{Remake Connection}
Make a connection with the same device and service as that specified in the most recent ATD command. The <UY> 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 Users Guide Response:
<cr,lf>CONNECT 123456789012 AE<cr,lf>
Or
<cr,lf>NO CARRIER<cr,lf>
6.3.7 ATD<U><Y>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 <UY> 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:
<cr,lf>CONNECT 123456789012 AE<cr,lf>
Or
<cr,lf>NO CARRIER<cr,lf>
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:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
6.3.9 ATH{Drop Connection}
Drop an existing connection or reject an incoming connection indicated by unsolicited RING messages. Response:
<cr,lf>NO CARRIER<cr,lf>
6.3.10 ATIn{Information}
This returns the following information about the Laird device. I0 I1 I2 I3 I4 I5 I6 I7 I8 I9 The product name/variant. The CSR firmware build number. The Laird firmware build number. For internal use only. The Laird firmware revision. A 12 digit hexadecimal number corresponding to the Bluetooth address of the Laird device. The manufacturer of this device. The maximum size of trusted device database. The manufacturer of the Bluetooth chipset. The chipset format. 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 Users Guide 1 = Connection timeout 2 = Connection attempt cancelled 3 = Normal disconnection 4 = Peer device has refused connection 5 = Service profile <uuid> 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 I13 I14 I15 I16 I20 I33 I42 The last ERROR response number. The Sniff status is returned as follows:
Response:<cr,lf>a:b,c,d,e<cr,lf>OK<cr,lf>
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. The current boot mode (only for firmware 1.18.0 and newer) The maximum length of an AT command, including the terminating carriage return (only for firmware 1.6.10 and newer). The size of AT command input buffer. Returns the number of bytes pending to be sent in the RF buffer when a connection is up. Version number of Multipoint application Note: ATI is provided for compatibility in multipoint mode; other AT commands are not available. 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 Users 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:
<cr,lf>As Appropriate<cr,lf>OK<cr,lf>
Or
<cr,lf>ERRORnn<cr,lf>
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:
<cr,lf>CONNECT 123456789012<cr,lf>
Or
<cr,lf>ERRORnn<cr,lf>
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 non-
volatile memory when the command is received. Table 6-2: S Registers Reg.
Defaul t Range Comment S0 1
-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 Users Guide Reg.
Defaul t Range Comment S100 15 0..15 S101
$1101 0..$ffff 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. UUID of default SPP based profile when not specified explicitly in the ATD command. S102 1 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 S126 S127 1
1..7 Boot mode on cold boot. 0 .. 0xFFFF Primer for changing to Multipoint mode 0 .. 0xFFFF 0x100 for AT mode S400 0 0..1 0x200 for Multipoint mode Other values are reserved Piodeamon. 1 = Hostless Audio gateway Operation S401 1000 100..5000 In Hostless Audio Gateway Operation GPIO4 flash period while inquiring S402 0 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 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 0..100 In Hostless Audio Gateway Operation GPIO4 flash duty cycle when there is an ACL and SCO connection to the headset S407 0 0..1 S408 0 0..1 In Hostless Audio Gateway Operation Lift-Hook output follows SCO state 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 Users Guide Reg.
Defaul t Range Comment S409 0 0..1 S410 0 0..1 S411 500 4000 S412 500 4000 S413 500 4000 S414 30 240 S420 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 In AudioGatewayHostless mode, if set to 1, AG async responses will be forced out from the UART good for debugging In AudioGatewayHostless mode, Short press duration in milliseconds. 500 msec granularity In AudioGatewayHostless mode, component of medium press duration in milliseconds. 500 msec granularity. Actual duration is this value plus S411 In AudioGatewayHostless mode, component of long press duration in milliseconds. 500 msec granularity. Actual duration is this value plus S412 plus S411 In AudioGatewayHostless mode, the inquiry to search for headsets is aborted after this amount of time, in seconds. The granularity is 30 seconds. 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 0..1 Authentication for outgoing connections. Set to 1 to enable authentication. S501 S502 S503 S504 0 0 0 0 0..1 0..1 0..1 0..1 S505 10 2..120 Encryption for outgoing connections. Set to 1 to enable encryption. Authentication for incoming connections. Set to 1 to enable authentication. Encryption for incoming connections. Set to 1 to enable encryption. 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. 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 1 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 Users Guide Reg.
Defaul t Range Comment S507 0 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 Users Guide Reg.
Defaul t Range Comment S512 1 0..7 S513 1 S514 10 0..1 1..60 S515 0x001 F00 0.. 0xFFFFFF 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 <cr> 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. Pairing Authentication, 1 = Enable Pairing Timeout in seconds. This includes the time a host takes to supply the PIN number when PIN? messages are indicated. 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 Users Guide Reg.
S516 Defaul t 0x000 000 Range Comment 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 8 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 S520 TBC 1200..1152 00 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. 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 Users Guide Range Comment Reg.
Defaul t S521 TBC 1200..9216 00 S522 1 1 S523 1 1..2 S524 0 0..2 S525 0 0..1 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. 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. 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. 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. 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 Users Guide Reg.
Defaul t Range Comment S526 3 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-cable-
S531 0 0..5 S532 0 0..7 S533 1 0..2 S534 1 0..2 replacement mode. This value is rounded down to the nearest 100 ms. See S Register 505 and 543. 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<string>
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 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. 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. 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 Users Guide Reg.
Defaul t Range Comment S536 0 0..1 S537 X X..X S538 0 0..1 S539 0 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. 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 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. When set to 1, in idle mode (S512=1), UART Rx characters are discarded if DSR is deasserted. S540 0 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 S542 TBC TBC S543 0 0..1 S544 1 0..1 This sets the power level in dBm when inquiring or paging. Reading this register returns the value stored in non-volatile memory. 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. 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. 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 Users Guide Range Comment Reg.
S551 Defaul t 0x321 1 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. 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. 32 CONN-GUIDE-BT730_v0.9 S552 0x012 2 0x0FFF 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 Users Guide Range Comment Reg.
S553 Defaul t 0x020 1 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. 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. 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. 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. 33 CONN-GUIDE-BT730_v0.9 S554 0 0..900 S555 1 1..7 S556 0 0..3 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 Users Guide Reg.
Defaul t Range Comment S557 32 4..900 Specified in seconds, the update interval for the feature enabled via S Reg 556 S558 0 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 0..3 This specifies a mask. S560 15 15..120 S561 0 0..1000 S562 0 0..1000 S563 0 0..1000 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. 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. Sniff Attempt Time in units of milliseconds. 0 means disable. See section Power Consumption and Reset in the user guide for more details. Sniff timeout Time in units of milliseconds. 0 means disable. See section Power Consumption and Reset in the user guide for more details. 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 0..1000 Sniff Maximum Interval in units of milliseconds. See section Power Consumption and Reset in the user guide for more details. S565 0 1 S566 1 S567 1 S568 1 S569 1 7 7 7 7 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 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. If S565=1 and RI is asserted then this is the mode in which the device starts up. If S565=1 and RI is deasserted then this is the mode in which the device starts. 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. 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. 34 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide Reg.
Defaul t Range Comment S580 0 0..1 S581 0 0..63 S582 0 0..1 S583 0xB 0 .. 0x1F S584 0 0..1 Remote volume control feature for Headset profile when ATS102 enables headset profile. 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. FTP Related:
0 = BodyLen in PUT obex packet = 0 1 = BodyLen in PUT obex packet = 1 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) 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 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). 0..100 Duty cycle in percentage (rounded to the nearest multiple of four). S587 S588 S589 S590 S591 0 0 8 1 0 0..1 0..F 0..3 0..1FF S592 0 0..1 S593 0 0..1 S594 0 0..1 S595 1 0..1 After a disconnection, there is a cold reset. Codec output gain. Codec input gain. Default GPIO output states when not in a connection. This is used when virtual digital I/O cable replacement mode is in operation. Set this to 1 to reduce the trusted device database to one record when autosaving of pairing is enabled via S Reg 538. Automatically append last six digits of local Bluetooth address to the friendly name which was set via AT+BTN or AT+BTF. Set handsfree profile version in sdp record. Set to 0 for 1.1 and to 1 for 1.5. Set handsfree gateway profile version in sdp record. Set to 0 for 1.1 and to 1 for 1.5. S596 0 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 Users Guide Reg.
Defaul t Range Comment S597 0 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 0..1 In hostless audio gateway serviced mode, if this is 1, then incoming voice calls are reflected to bonded headset. S599 0 0..2 SCO control for hostless gateway operation. S600
0..65535 S601 S610 0 0 0..1 0..7FFF S611 0 1 S620 n/a 0..31 S621 S622 S623 S624 S625 S626 S627 S628 S629 S631 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..65535 S632 n/a 0..65535 0 Normal 1 As early as possible 2 Leave SCO to be controlled by headset 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. If this is 1, then on reset S Reg 600 value is incremented. 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. Set to 1 to invert the logic of GPIO outputs. For example, ATS621=1 sets the output pin to low and vice versa. Read/Write to all eight digital lines in one atomic step. The value is returned as a four digit hexadecimal value with trailing 0s. Read/Write to GPIO1. Read/Write to GPIO2. Read/Write to GPIO3. Read/Write to GPIO4. Read/Write to GPIO5. Read/Write to GPIO6. Read/Write to GPIO7. Read/Write to GPIO8. Read/Write to GPIO9. 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. 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 S642 S701 n/a n/a n/a 0..65535 As per 631, but the action of reading the value resets the count to 0. 0..65535 As per 632, but the action of reading the value resets the count to 0. 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 Users Guide Reg.
S702 S711 Defaul t n/a n/a Range Comment 0..65535 Read to Analogue Line 1, when reading value is returned in decimal. 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 0 0 S721 S722 S1001 to S1010 0 0 0.. 2^32 hexadecimal. Set direction of Analogue Line 0. Set direction of Analogue Line 1. Ten General Purpose 32 bit Registers for use by host. These are stored in non-volatile memory. 6.3.13 ATSn?{Read S Register Value}
This returns the current value of register n. For recognised values of n:
Response:
<cr,lf>As Appropriate<cr,lf>OK<cr,lf>
For unrecognised values of n:
Response:
<cr,lf>ERROR nn<cr,lf>
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:
<cr,lf>Sn:(nnnn..mmmm)<cr,lf>OK<cr,lf>
For unrecognised values of n:
Response:
<cr,lf>ERRORnn<cr,lf>
6.3.15 ATX<string>{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 <string> 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:
<cr,lf>OK<cr,lf>
6.3.16 ATY<string>{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 <string> 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 Users Guide Response:
<cr,lf>OK<cr,lf>
6.3.17 ATZ<n>{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<cr> until it responds with an OK response. After version 2.7.0, it is safe to communicate after receiving an OK. The optional parameter <n> 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:
<cr,lf>OK<cr,lf>
Note: OK is returned before the RESET. For firmware v2.7.0 and newer:
Response:
<cr,lf>OK<cr,lf>
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
&F2
&F3
&F4
&F5
&F6 Minimum power consumption, UART baud rate set to 9600, Left and Right LED off Minimum power consumption, UART baud rate set to 38400, Left and Right LED off Minimum power consumption, UART baud rate set to 115200, Left and Right LED off Medium power consumption, UART baud rate set to 115200, Left LED off, Right LED =
DCD Maximum power consumption, UART baud rate set to 115200, Left LED=DSR, Right LED = DCD 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 Users 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:
<cr,lf>OK<cr,lf>
Or Response:
<cr,lf>ERROR nn<cr,lf>
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 Users 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:
<cr,lf>OK<cr,lf>
Or Response:
<cr,lf>ERROR nn<cr,lf>
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:
<cr,lf>OK<cr,lf>
Or Response:
<cr,lf>ERROR nn<cr,lf>
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:
<cr,lf>OK<cr,lf>
Or Response:
<cr,lf>ERROR nn<cr,lf>
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 Switch off the channel.
+BTA1 Switch on the channel. On receipt of the command, the following response immediately follows. Response:
<cr,lf>OK<cr,lf>
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:
<cr,lf>AUDIO ON<cr,lf>
Or if the SCO failed to be established. Response:
<cr,lf>AUDIO FAIL<cr,lf>
On the peer device, the host will asynchronously get . Response:
<cr,lf>AUDIO ON<cr,lf>
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 Users Guide 6.3.23 AT+BTC<devclass>{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.
<devclass> 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:
Bits 2-7:
Format Type. This field currently only has a value of 00 (i.e. format type 1). 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 200404 Unclassified Headset None Audio Unclassified n/a Audio Headset Response:
<cr,lf>OK<cr,lf>
Or for an invalid <devclass> value (usually a value which is not six hexadecimal characters long). Response:
<cr,lf>ERROR 08<cr,lf>
6.3.24 AT+BTC?{Read Device Class Code}
This command is used to read the current device class code. Response:
<cr,lf>123456<cr,lf>OK<cr,lf>
6.3.25 AT+BTD<bd_addr>{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:
<cr,lf>OK<cr,lf>
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 Users 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 non-
volatile 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<bd_addr> for each item in the trusted device database. Response:
<cr,lf>OK<cr,lf>
6.3.27 AT+BTF=<string>{Set Friendly Name}
This sets the friendly name of this device as seen by other devices. Response:
<cr,lf>OK<cr,lf>
6.3.28 AT+BTF<bd_addr>{Get Remote Friendly Name}
This command gets the remote friendly name of the specified peer. Response:
<cr,lf>OK<cr,lf>
<cr,lf><bd_addr>,Friendly Name 6.3.29 AT+BTG<bd_addr>{Enable Cautious Page Scanning ONLY}
Enable page scanning and wait for a connection from device with Bluetooth address <bd_addr>. 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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>OK<cr,lf>
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 Users 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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>OK<cr,lf>
6.3.34 AT+BTI<devclass>{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 <devclass> 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 <devclass> is six hexadecimal characters long, it specifies an AND mask which is used to filter inquiry responses. When <devclass> 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:
<cr,lf>12346789012
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
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:
<cr,lf>ERROR 14<cr,lf>
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:
<cr,lf>ERROR 27<cr,lf>
6.3.36 AT+BTIV<devclass>{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<devclass>. Response:
<cr,lf>12346789012,123456
<cr,lf>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 Users Guide
<cr,lf>OK<cr,lf>
6.3.37 AT+BTIN<devclass>{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<devclass>. The friendly name strings are in UTF-8 format as per the Bluetooth specification. Response:
<cr,lf>12346789012,123456,"TDK SYSTEMS AT DONGLE 1"
<cr,lf>12345678914,123456, TDK SYSTEMS RS232"
<cr,lf>OK<cr,lf>
Note: Many releases of firmware return the product name as LAIRD TECHNOLOGIES, e.g. Response:
<cr,lf>12346789012,123456,"TDK SYSTEMS AT DONGLE 1"
<cr,lf>12345678914,123456, "TDK SYSTEMS RS232"
<cr,lf>OK<cr,lf>
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=<string>{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:
<cr,lf>OK<cr,lf>
6.3.39 AT+BTM<bd_addr>{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:
<cr,lf>OK<cr,lf>
6.3.40 AT+BTM{Delete Incoming Peer Address}
This command is used to delete the peer address previously stored using AT+BTR<bd_addr>. Response:
<cr,lf>OK<cr,lf>
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 Users Guide Response:
<cr,lf>12346789012
<cr,lf>OK<cr,lf>
If the location is empty the response is as follows. Response:
<cr,lf>00000000000
<cr,lf>OK<cr,lf>
6.3.42 AT+BTN=<string>{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:
<cr,lf>OK<cr,lf>
6.3.43 AT+BTN?{Read Friendly Name from Non-volatile Memory}
Read the default friendly name from non-volatile memory. Response:
<cr,lf>"My FriendlyName"<cr,lf>
<cr,lf>OK<cr,lf>
6.3.44 AT+BTO<devclass>{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 <devclass> 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:
<cr,lf>OK<cr,lf>
6.3.45 AT+BTP<bd_addr>{Enable Cautious Page/Inquiry Scanning}
Enable page scanning and wait for a connection from device with Bluetooth address <bd_addr>. 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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>OK<cr,lf>
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 Users 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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>OK<cr,lf>
6.3.51 AT+BTR<bd_addr>{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&<cr> is sent (where <cr> 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:
<cr,lf>OK<cr,lf>
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 Users Guide 6.3.52 AT+BTR{Delete Outgoing Peer Address}
This command is used to delete the peer address previously stored using AT+BTR<bd_addr>. Response:
<cr,lf>OK<cr,lf>
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:
<cr,lf>12346789012
<cr,lf>OK<cr,lf>
If the location is empty the response is as follows. Response:
<cr,lf>00000000000
<cr,lf>OK<cr,lf>
6.3.54 AT+BTS=<string>{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:
<cr,lf>OK<cr,lf>
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:
<cr,lf>"My ServiceName"<cr,lf>
<cr,lf>OK<cr,lf>
6.3.56 AT+BTT{Add Trusted Device}
This command is used to store the cached link key in the non-volatile database. If the database is full it responds with an ERROR. If the device is already in the database, then the key is replaced. If the link key cache is empty (a pairing has not been performed since the device was powered) then the response is an ERROR. Response:
<cr,lf>OK<cr,lf>
Or Response:
<cr,lf>ERROR<cr,lf>
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 47 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 6.3.57 AT+BTT?{List Trusted Device}
This command is used to list the contents of the trusted device database. The link key is not displayed so the response is as shown below. If the list is empty then just the OK response is sent otherwise an OK is used to terminate the list. Use the command ATI6 to read the maximum size of the trusted device database. Response:
<cr,lf>12346789012
<cr,lf>12345678913
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
6.3.58 AT+BTV<U><Y><bd_addr>,<uuid>{SDP Query for Service }
This command is used to interrogate the SDP database of the peer device <bd_addr> for the service
<uuid>. It results in an ACL connection and then a SDP transaction. If the <uuid> service is present then Response: <cr,lf>0
<cr,lf>OK<cr,lf>
If the <uuid> service is not present then Response: <cr,lf>1
<cr,lf>OK<cr,lf>
If the device <bd_addr> cannot be reached, or is in non-connectable mode then Response:
<cr,lf>2
<cr,lf>OK<cr,lf>
If the SDP database is corrupt or invalid then Response:
<cr,lf>3
<cr,lf>OK<cr,lf>
If the device is not in idle mode then Response:
<cr,lf>4
<cr,lf>OK<cr,lf>
and in this case, the command AT+BTX may put the device into the correct idle mode. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 48 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 6.3.59 AT+BTW<bd_addr>{Initiate Pairing}
This initiates pairing with a device whose Bluetooth address is <bd_addr>. An OK response is sent and when the PIN is required, asynchronous indications are sent to the host in the form PIN? <bd_addr>
where the address confirms the device with which the pairing is to be performed. To supply a PIN, use the AT+BTK command. For a successful pairing, the link key is stored in a volatile cache which is overwritten each time a new pairing is initiated using this command. The link key can be stored in a non-volatile database within the device. The list of trusted devices is managed using commands AT+BTT?, AT+BTT, and AT+BTD. The AT+BTT? command produces a list of trusted Bluetooth addresses (link key is never displayed) and AT+BTT is used to store the cached link key. The command AT+BTD123456789012 is used to remove the specified device from the database. The OK response is sent immediately upon receipt of the AT+BTW command. On pairing completion, an unsolicited message is sent to the host which is in the form PAIR n <bd_addr>. See section 3.7 TBC for more details. If AT+BTI, AT+BTP, AT+BTG, AT+BTQ, or ATD is issued between the AT+BTW command and the subsequence PAIR asynchronous response, then an ERROR response is sent to those commands as the device is not in a mode from where such commands can be actioned. Response:
<cr,lf>OK<cr,lf>
6.3.60 AT+BTW?{List Cached Trusted Device}
This command is used to list the cached trusted device. Response:
<cr,lf>12346789012
<cr,lf>OK<cr,lf>
If the cache is empty the response is as follows. Response:
<cr,lf>OK<cr,lf>
6.3.61 AT+BTX{Disable Page/Inquiry Scanning}
Disable page/inquiry scanning. This means it is accept incoming connections or inquiry requests. In fact, this negates the effect of AT+BTQ, AT+BTG and AT+BTP commands. Response:
<cr,lf>OK<cr,lf>
6.3.62 AT+AG<command><parm>{Audio gateway Control}
See audio gateway specific specification for more details. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 49 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 6.4 Unsolicited Responses The AT Protocol is a command/response type of protocol. This means that the Laird device will normally only respond to AT commands. Under special circumstances, unsolicited responses are sent to the host. They are described in the following subsections. 6.4.1 RING This string is sent to the host when a remote device is initiating a serial port connection. The fully qualified string is in the form RING 012345678901 where 012345678901 is a 12 digit hexadecimal number which corresponds to the remote devices Bluetooth address. This response is sent to the host every two seconds until the host either accepts the connection using the ATA command or rejects it using the ATH command. 6.4.2 PIN?
This response is sent to the host during a pairing negotiation. The fully qualified string is PIN? 012345678901 where 012345678901 is the Bluetooth address of the peer device. In response, the host must supply a pin code which is entered using the AT+BTK command. If the peer address does not supply the address in the message exchange, then the address is specified as 000000000000 and the paring will proceed as normal. 6.4.3 AUDIO ON This response is sent to the host when a SCO channel has been established. 6.4.4 AUDIO OFF This response is sent to the host when an existing SCO channel has been closed. 6.4.5 AUDIO FAIL This response is sent to the host when a SCO channel setup fails. 6.4.6 ERROR 27 This response is sent to the host on power up if the firmware is unlicensed. 6.4.7 PAIR n <bd_addr>
This response is sent to the host on termination of a pairing process. If pairing was successful then n = 0, if a timeout occurred then n=1 and for all other unsuccessful outcomes the value is 2. The parameter <bd_addr> is the address of the peer device if available. 6.4.8 PAIR 0 <bd_addr> MM This response is sent to the host on termination of a successful pairing process. The optional MM is sent only if S Register 538 is set to 1 to automatically save the link key. The value MM indicates the result of the save operation and a value of 00 implies success, otherwise the value corresponds to an error code. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 50 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 6.4.9 RX<string>
This response is sent to the host when the unit is in online-command mode and S Register 531 is set to 3 and data arrives from a peer. If the data from the string contains non-visual characters (for example ASCII 0 to 31 and ASCII 128 to 255), then those characters are translated into a three character escape sequence starting with \. For example the embedded <cr><lf> sequence would be sent as the six character string \0D\0A. If the data contains the character " then it is sent as \22. If the data contains the character \ then it is sent as \5C 6.4.10 AG<string>
This response is sent to the host when a serviced audio gateway connection is in progress and the profile requires some action from the host. 6.5 Incoming Connections The Laird device can be configured using the AT+BTP or AT+BTG command so that it scans for incoming connections from other Bluetooth devices. It can also be configured via S Register 512 to be in this mode by default on power up. When the lower layers detect an incoming call, a RING 123456789012 string is sent to the host every second. The command ATA is used to accept the connection and ATH to reject it. On connection, if the S0 Register is >=0 then confirmation to the host is in the form:
CONNECT 123456789012 CONNECT 123456789012 A CONNECT 123456789012 E CONNECT 123456789012 AE
(A = Authenticated connection; E = Encryption enabled) When S0 register is -1, neither RING nor CONNECT is sent to the host and the connection is silently accepted. If the S 100 register is non-zero, then after the ring indications specified by this register have been sent to the host, and the host has failed to accept or reject the incoming connection, then an automatic hangup is initiated. 6.6 Dropping Connections In a conventional telephony modem, a call is normally terminated by first sending a +++ character sequence enveloped by an escape sequence guard time (of the order of 100 to 1000 milliseconds) to enter local command and connected mode and then the ATH command. Laird Bluetooth modules provide a variety of ways of dropping a connection. One method is similar to the above, but instead a ^^^ character sequence is used; this eliminates ambiguity when a data call is in progress via a mobile phone which was established using the mobile phones Bluetooth AT modem. The second method involves the host dropping the DTR (DSR from the modules viewpoint) handshaking line. Being able to drop a connection using the escape sequence ^^^ has a severe penalty on data throughput. In fact, the data rate is of the order of 85 kbps instead of about 200 kbps. To cater for this performance hit, the devices connection drop capability is configurable to be in one of two modes. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 51 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide One mode allows for a connection to be dropped using either method; the other mode allows for a connection drop using the DTR method only. By default, the device is in the former mode. This mode is selected using the S507 register. See ! for more information on S Registers. To reiterate, the escape sequence is as follows:
<Guard time><Esc Chr><Guard time><Esc Chr><Guard time><Esc Chr><Guard time>
Even when a file transfer is occurring and it happens to be full of <Esc Chr> characters, it is not going to drop into command mode because, when transferring a file, it is going to occur as fast as possible; this means that the inter character gap is going to be significantly shorter than the <Guard time>. The <Esc Chr> character can be changed via the S2 register and the <Guard time> interval can be specified via the S12 register. 6.7 Pairing and Trusted Devices When authentication is enabled via S register 500 or when using the u modifier in the ATD and AT+BTP commands, a connection attempt requires a link key for the peer device. The link key can be obtained prior to connection by invoking the AT+BTW and AT+BTK commands. A new link key can be obtained as often as required and is stored in a volatile cache. At any time, this cached link key can be added to the trusted devices database using the AT+BTT command. A trusted device can be deleted using the AT+BTD command. To view a list of trusted device, issue the command AT+BTT?. In addition, if S Register 538 is set to 1, then on a successful pairing, the link key is automatically saved to the trusted device database. In that case, the asynchronous message PAIR 0 <bd_addr>
has an error code appended at the end to convey the result of the save operation. When a connection attempt requires a link key, the trusted device database is searched automatically and if one exists, it is provided without host interaction. If the link key is not present, then the connection attempt is terminated and a NO CARRIER response is given to the ATD command. A typical session to pair an Ericsson T68i (for example) to a serial module would be:
1. Make the T68i discoverable and send AT+BTI to the serial module. This results in inquiry responses from all devices. Make a note of the Bluetooth address of the phone e.g. 123456789012. 2. On the T68i start pairing procedure by selecting Phone accepts in the relevant Bluetooth menu. 3. Send command AT+BTW123456789012 to the serial module. 4. Confirm that you get an OK response and then PIN? responds on a two second interval. 5. Enter a pin code on the phone (such as 12345768). 6. Enter the command AT+BTK=12345678. The phone confirms success and likewise the serial module responds with OK. 7. On success, the serial module sends an unsolicited message in the form of PAIR 0 <bd_addr>. 8. Send AT+BTT to the serial module so that the pairing information is stored in the non-volatile database. 9. Confirm that the link key has been stored by sending the command AT+BTT?. This results in a list of all devices paired with the module. If two Laird devices need to be paired, then it can be accomplished as follows:
To device 1 send ATI4, it responds with the local Bluetooth address (e.g., 123456789001). To device 1 send AT+BTP. It becomes discoverable and connectable. To device 2 send AT+BTW123456789001 and it responds with OK. Both devices display PIN? asynchronous responses. To both modules. send AT+BTK=12345678. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 52 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide On success, the serial module sends an unsolicited message in the form of PAIR 0
<bd_addr>
The pairing link key is now in volatile memory; send AT+BTT to both. The two units now have pairing information which will survive a power cycle. 6.8 Error Responses All error responses from the Laird device are in the form <cr,lf>ERROR nn<cr,lf>, where nn is a number in the range 00 to 99. Error Description 01 02 03 04 05 06 06 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Register not recognised Value for register is out of range Incoming call not pending No call to connect to. This error code has meaning for ATO only Syntax error Empty string Device class could not be stored Invalid Device Class code Invalid Bluetooth address Could not set Service or Friendly name PS Store Write PS Store Read Not Idle Incorrect mode Already scanning Pairing is already in progress Not USED Not USED Not USED Not safe to write to Non-volatile Store - Ongoing Bluetooth Connection Link Key Cache is empty Link Key Database is full Malloc returned NULL - Resource Issue Remote Address same as Local Address Connection Setup Fail, DSR Not asserted Unauthenticated licence Max Responses (See S Register 518) too high. Memory allocation error The length of Pin in AT+BTK is too long Invalid Ring count specified for S Register 0 or 100. If S0<>0 and S100<>0 then S0 must be < S100 ADC Error Analogue Value cannot be read as it is set for output Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 53 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide Error Description 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Analogue Value cannot be written as it is set for input S Register value is invalid Both L and R modifier cannot be specified in ATD command Invalid Major Device class valid value in range 0x00 to 0x1F inclusive Pairing in progress Command cannot be actioned try again later Invalid Sniff parameter specified. E.g. new Attempt value greater than MinInterval. Solution is to first increase MinInterval and re-enter the Attempt value. Get Remote Friendly name Failed Failed to change mode to Multipoint 7 Bit mode requires parity to be even or odd Stream error Stream pending Unknown AG command Busy try later Not allowed call waiting has not been enabled by peer or in hostless mode GPIO line cant be set as it has not been configured as an output 6.9 Factory Default Mode Laird devices are capable of operating at a wide range of baud rates. S Registers 520 and 521 allow the baud rate to be easily set. The baud rate clock generator in the Laird device is more versatile than one available in a standard 16550 UART commonly available in PCs. In fact, as long as the equation BAUDRATE * 0.004096 produces an integer value, there is 0% error in clocking for that baud rate. Because of this, it is possible to set a baud rate that a PC cannot cope with and, in that circumstance, it is virtually impossible to communicate with it. For this type of circumstance, the Laird device comes out of reset using 9600,N,8,1 comms settings for exactly 750 milliseconds and then reverts to the comms parameters as per the S Registers. If the host sends the string !<BISM>!<cr> where <cr> is the carriage return character within that 750 ms period, then the module remains at 9600,N,8,1 and configures itself using factory default S Register values. 6.10 Miscellaneous Features This chapter describes various features which cannot be categorized appropriately. 6.10.1 RI dependent Start-up Mode The UART_RI line can be configured as an input and on power its state can be used to force the device into one of two modes. See description for S Registers 565 to 569 inclusive for more details. For example, the feature could allow a device to make an outgoing connection if RI is in one state, and be ready for an incoming connection in the other. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 54 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 6.10.2 Pulse a GPIO pin To flash a GPIO pin, set it as an output using S reg 610 and then use S reg 585 to 587 inclusive to set the pin, period, and duty cycle respectively. 6.10.3 Flash LED on Connectable Mode S reg 534 now takes a value up to two. A value of two configures it so that it blinks when the module is in connectable mode. 6.10.4 Reset via BREAK The module can be reset by sending a BREAK signal. A BREAK signal exists when the modules UART_RX input is in a non-idle state (0v) for more than 125 milliseconds. 6.10.5 Digital I/O Cable Replacement The module has a number of general purpose digital I/O pins. The direction of these is specified via S Reg 610. When S Reg 531 is set to four at both ends of the connection, on connection, any changes in the states of the inputs at one end are transmitted to the peer, which then reflects those states on the appropriate I/O pins if they have been configured as outputs. It is recommended that the value of S Reg 610 at one end be the complement of the other end. That way, inputs at one end are mirrored at the other end and vice versa. In addition S Reg 506 must be set to zero, which disables echoes. Note: Due to inherent latency of Bluetooth transmission, expect the change of state to be delayed. This value is typically 100 ms and can be much more if the quality of the link is bad which results in many retries. It is assumed that an audio channel is not active at any time. 6.10.6 Append Bluetooth Address to Friendly name If S Reg 593 is set to one, then the last six hex digits of the Bluetooth address are automatically appended to the friendly name. This allows multiple devices with the same name in a neighbourhood to be differentiated. 6.11 Disclaimers LAIRD WIRELESS PRODUCTS ARE NOT AUTHORISED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE MANAGING DIRECTOR OF LAIRD TECHNOLOGIES LTD. The definitions used herein are:
a) Life support devices or systems are devices which (1) are intended for surgical implant into the body, or (2) support or sustain life and whose failure to perform when properly used in accordance with the instructions for use provided in the labelling can reasonably be expected to result in a significant injury to the user. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 55 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide b) A critical component is any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness. Laird Technologies does not assume responsibility for use of any of the circuitry described, no circuit patent licenses are implied and Laird Technologies reserves the right at any time to change without notice said circuitry and specifications. 6.12 Data Sheet Status Laird reserves the right to change the specification without prior notice in order to improve the design and supply the best possible product. 6.13 Changes between release Although every effort is made to ensure compatibility, the functionality of some features has changed due to the evolution of the Bluetooth chips and stack implementations. Users migrating between firmware variants should check the following differences:
ATZ AT+BTIN Please check with Laird Technologies Ltd for the most recent data before initiating or completing a design. 7. PCM CODEC INTERFACE PCM_OUT, PCM_IN, PCM_CLK, and PCM_SYNC carry up to three bi-directional channels of voice data, each at 8ksamples/s. The format of the PCM samples can be 8-bit A-law, 8-bit -law, 13-bit linear, or 16-
bit 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. 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:
7.1 Compatible Codec Chips Winbond W61360 13-bit linear CODEC (Motorola MC145483 compatible) OKI MSM7702 single channel A-law and -law CODEC The default codec support is for the Winbond W61360. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 56 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8. FTP CLIENT PROFILE COMMANDS The FTP profile provides a capability allowing a host to act as an ftp client to a peer device providing an ftp server profile as shown in the diagram below. Figure 2: FTP client and server An FTP client capability implies the ability to send and receive files and also to manipulate file objects in the remote device. The Bluetooth FTP server profile specification describes the profile as one built on Obex Exchange (OBEX) which is in turn built on SPP. The FTP implementation allows a host attached to the module to send and receive files and in addition to manipulate files and folders. The format used for describing this protocol is a series of message sequence charts with accompanying notes as appropriate, which unambiguously convey how a host and the module shall interact to perform the task. 8.1 Generic Notes and Guidance In the message sequence charts the following abbreviations apply:
nnn shall be a decimal number with at least one digit.
<filename> shall mean a string delimited by the character. For example, hello.txt.
<foldername> shall mean a string delimited by the character. The backspace character is not supported. All FTP commands are case sensitive. FTP commands shall not exceed 32 characters in total. While an FTP session is open, the host shall not deassert the modules UART_CTS line and conversely the host MUST always be ready to accept data. When Unicode data is transmitted, it shall be assumed that the most significant byte is transmitted first. If an FTP command is expecting a Unicode string as a parameter and the host has an ASCII string, the string shall be expanded with a 0 byte in the most significant position. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 57 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.2 FTP related AT Commands 8.2.1 AT+FTP<bd_addr>
This command is used to establish a connection to an FTP server profile in a peer device with Bluetooth address <bd_addr>. When a connection is successfully established, the host assumes that the current folder is the root folder. This root folder is always relative to the host. It is not necessarily the absolute root folder of the host machine. 8.2.2 AT+OFT<bd_addr>
This command is used to establish a connection to an FTP server profile in a peer device with Bluetooth address <bd_addr> and functions similarly to AT+FTP, but instead of the response being \r\nNNN FTP\r\n it is \r\nNNN OBX\r\n, where NNN is a decimal number. This capability of choosing the response type is to allow a host to cater generically a connection which is either FTP or ObexPush. 8.2.3 ATSn=m The following values of n are relevant to FTP operation: 582. A description of these values is given on page 18 TBC. 8.3 FTP related Subcommands This section describes FTP-related subcommands that the host can use to control the FTP session. 8.3.1 PUT <filename><length> (Send file) This FTP subcommand is used to send a file to the FTP server. The length of <filename> shall not exceed 24 characters. The optional <length> value is inserted into the OBEX length header field. This is optional for FTP. There is some ambiguity as to how the first OBEX PUT packet is formed with respect to the Body header. The OBEX specification does not prohibit the first Body header to be empty; neither does it say that it must not be empty. If the first body is not empty when sending a file to a Nokia 6820 phone then it seems to confuse it. Because of this, Laird sends out an empty Body header by default which is also what the Windows PC based Widcomm Bluetooth stack sends. To cater for future devices which require the first Body header to be non-empty, a new S Register 582 has been added to allow a host to have control over how the first body header is constructed. The new S register 582 takes values in the range 0 to 1. The default value is 0 which implies that the first Body header in the PUT OBEX packet is empty. A value of 1 forces that Body header to have one byte of data and in this case, when the module prompts the host for a length value it shall respond accordingly. Laird hopes that the default value of zero suffices for all occasions, but provides the control to modify the packet as required. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 58 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.3.2 PUT nnn<length>(Send file) This FTP subcommand is used to send a file to the FTP server where the filename is in UNICODE text and the filename is nnn bytes long. The optional <length> value is inserted into the OBEX length header field. This is optional for FTP. See comment above TBC with regards to S Reg 582. 8.3.3 GET <filename>(Retrieve a file) This FTP subcommand is used to retrieve a file from the FTP server. The length of <filename> shall not exceed 24 characters. 8.3.4 GET -nnn(Retrieve a file) This FTP subcommand is used to retrieve a file from the FTP server where the filename is in UNICODE and the filename is nnn bytes long. 8.3.5 DIR(Get folder listing) This FTP subcommand is used to retrieve the folder listing. The Bluetooth FTP specification requires a server to transmit a folder listing as a properly formed XML document. In a properly formed document, the character & is supposed to be escaped into a five character string &. Testing shows that the Widcomm Bluetooth stack and the Microsoft Windows CE Bluetooth stack do not comply with that requirement; they send the & unescaped. This means that if a folder contains filenames with & characters, this results in a failed parsing of the XML document and this command fails with the response 090 FTP. In this circumstance, the only way for the host to extract the folder listing from the server is to request the folder listing in raw XML form. This is expedited using the DIR -RAW(Get folder listing, XML document) command. 8.3.6 DIR -RAW(Get folder listing, XML document) This FTP subcommand is used to retrieve the folder listing. In this variant, the OBEX response packet, which is in ASCII XML format, is sent to the host verbatim. WARNING: The Widcomm stack seems to append two null characters at the end of the XML document. This means extra care if the host stores data as null terminated strings, because the final 200 FTP prompt appears corrupted when it is not. 8.3.7 MD <foldername>(Create a folder) This FTP subcommand is used to create a subfolder. The length of <foldername> shall not exceed 24 characters. 8.3.8 MD -nnn(Create a folder) This FTP subcommand is used to create a subfolder which is specified in Unicode. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 59 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.3.9 CD <foldername>(Change folder) This FTP subcommand is used to navigate to the subfolder specified. The length of <foldername> shall not exceed 24 characters. 8.3.10 CD -nnn(Change folder) This FTP subcommand is used to navigate to the subfolder specified in Unicode. 8.3.11 CD \(Change folder to root) This FTP subcommand is used to navigate to the root folder. 8.3.12 CD ..(Change folder to parent) This FTP subcommand is used to navigate to the parent folder. 8.3.13 RD <foldername>(Delete a folder) This FTP subcommand is used to delete the folder specified. Some FTP servers do not allow non-empty folders to be deleted. In that case, an appropriate error response shall be returned to the host. The length of <foldername> shall not exceed 24 characters. 8.3.14 RD -nnn(Delete a folder) This FTP subcommand is used to delete the folder specified where the foldername is specified in Unicode. 8.3.15 DEL <filename>(Delete a file) This FTP subcommand is used to delete the file specified. 8.3.16 DEL -nnn(Delete a file) This FTP subcommand is used to delete the file specified where the filename is specified in Unicode. 8.3.17 ABORT(Abort current ftp command) This FTP subcommand is used to abort a file transfer where appropriate. To abort a PUT session, send 0 when the module prompts for a length value. 8.3.18 QUIT (Terminate the FTP session) This FTP subcommand is used to terminate the FTP session and also results in the Bluetooth connection being terminated. 8.3.19 MAX(Max outgoing obex packet size) This FTP subcommand is used to get the maximum OBEX packet size tolerated by server and can be used by the host to optimize the data throughput. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 60 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.4 FTP-Related Subresponses All FTP-related sub responses sent from the module to the host SHALL be 11 characters long in the format:
<cr><lf>nnn AAA<cr><lf>
The characters nnn shall be decimal digits 0 to 9, then there is a space character and finally a three character word followed by <cr><lf>. The <cr><lf> envelope plus the fixed length will hopefully make the parsing task in the host much simpler. Values for nnn are as specified for HTTP status codes, and reproduced from the OBEX specification as follows:
OBEX Response Code HTTP Status Code Definition 0x00to 0x0F None 0x10(0x90) 0x20(0xA0) 0x21(0xA1) 0x22(0xA2) 0x23(0xA3) 0x24(0xA4) 0x25(0xA5) 0x26(0xA6) 0x30(0xB0) 0x31(0xB1) 0x32(0xB2) 0x33(0xB3) 0x34(0xB4) 0x35(0xB5) 0x40(0xC0) 0x41(0xC1) 0x42(0xC2) 0x43(0xC3) 0x44(0xC4) 0x45(0xC5) 0x46(0xC6) 0x47(0xC7) 0x48(0xC8) 0x49(0xC9) 0x4A(0xCA) 0x4B(0xCB) 0x4C(0xCC) 0x4D(0xCD) 100 200 201 202 203 204 205 206 300 301 302 303 304 305 400 401 402 403 404 405 406 407 408 409 410 411 412 413 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth Reserved Continue OK, Success Created Accepted Non-Authoritative Information No Content Reset Content Partial Content Multiple Choices Moved Permanently Moved temporarily See Other Not modified Use Proxy Bad Request - server couldnt understand request Unauthorized Payment required Forbidden - operation is understood but refused Not Found Method not allowed Not Acceptable Proxy Authentication required Request Time Out Conflict Gone Length Required Precondition failed Requested entity too large 61 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide OBEX Response Code HTTP Status Code Definition 0x4E(0xCE) 0x4F(0xCF) 0x50(0xD0) 0x51(0xD1) 0x52(0xD2) 0x53(0xD3) 0x54(0xD4) 0x55(0xD5) 0x60 (0xE0) 0x61 (0xE1) 414 415 500 501 502 503 504 505
Request URL too large Unsupported media type Internal Server Error Not Implemented Bad Gateway Service Unavailable Gateway Timeout HTTP version not supported Database Full Database Locked For more details of these values, refer to the irDA specification which can be freely downloaded from www.irda.org. In addition, values in the range 050 to 099 and 250 to 299 inclusive are specific to this Laird application and are defined in Table 8-1. Table 8-1: nnn Codes Response Code nnn
(Laird Technologies Specific) Definition 050 051 052 053 055 056 090 099 250 Syntax Error / Command Unrecognized Server sent unexpected information in obex packet Obex connection fail, because it is unauthorized Memory allocation failure (Please contact Laird Technologies with details) Unicode File/Folder name length cannot be an odd value Command not recognized An XML parsing error occurred (while processing response to DIR command) The Bluetooth connection has unexpected been dropped. (I.e., remote out of range etc.) GET procedure was aborted 8.4.1 nnn FTP This FTP response is used, when the connection was opened using AT+FTP, to convey the outcome of a subcommand to the host where nnn is a fixed three digit decimal number as defined in the irDAspecification and map to HTTP status codes. For example, a value of n=200 implies successful operation, any other value usually conveys an error as described in the irDA specification (except the range 050 to 099 inclusive and 250 to299 inclusive). Note: When a Bluetooth OBEX session is established, we will be specifying v1.0 in the header packets by default as that is what the Widcomm stack seems to be using and the FTP specifies. 8.4.2 nnn OBX Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 62 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide This has the same meaning as nnn FTP and is used when AT+OFT command was used to open an FTP connection. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 63 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.4.3 nnn GET This FTP response is used during a GET file operation. See appropriate message sequence charts for more details. See Table 8-1 for nnn values. 8.5 FTP line multiplexing commands When transferring a file, the single serial interface between the host and the module is used to send and receive data and commands. In other words, a scheme is required to unambiguously determine when a byte on the line corresponds to a command or data belonging to a file. The module uses negotiated multiplexing to achieve this and commands are used to toggle the line between command and data mode. This scheme is symmetrical and the commands for toggling the state of the line are relevant for both direction. The only difference being that the terminator is <cr> in the host to module direction and<crlf> in the reverse direction. The commands are described in the following sub sections. 8.5.1 #
This command is used to ask the other end how many bytes of a filename or foldername it will send next. 8.5.2 >
This command is used to inform the other end that it is safe to send the number of bytes belonging to a filename or foldername as indicated in the most recent # command. 8.5.3 !
This command is used to ask the module/host how many bytes of data it will send next. If the module/host sends a length value that is too large to handle, it can be rejected by sending the ! command again. This is because accepting a value implies this end should send a ? prompt to trigger the data phase (See Section 8.5.4). 8.5.4 ?
This command is used to inform the other end that it is safe to send the number of bytes belonging to data phase indicated in the most recent ! command. 8.6 Message Sequence Charts In the following sections, the color scheme uses RED text as commands from a host to the module and BLUE text as responses and prompts from the module to the host. Command/responses shown in BLACK are associated with non-FTP related states. Apart from FTP connection and disconnection scenarios, to avoid repetition, all message sequence charts assume that the module is in a FTP-connected state. It also assumes that where nnn FTP occurs, it can be read as nnn OBX if the command AT+OFT was used to initiate the command. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 64 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.1 Usage: Make FTP connection (No Authentication) Figure 3: Make FTP connection (no authentication) 8.6.2 Usage: FTP Disconnection Figure 4: FTP disconnection Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 65 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.3 Usage: Folder Listing Note: If a number follows a name then that implies a file. Figure 5: Folder listing 8.6.4 Usage: Folder Listing (Raw Output) Note: The raw output is ASCII text and is in XML format. Figure 6: Folder listing (raw output) 8.6.5 Usage: Create Folder (Short Folder name) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 66 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide Figure 7: Create folder (short folder name) 8.6.6 Usage: Create Folder (Long Folder name - UNICODE) Note: nn is the size of folder name in bytes. The folder name is supplied in Unicode. Figure 8: Create folder (long name - UNICODE) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 67 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.7 Usage: Create Folder (Unsuccessful) Figure 9: Create folder (unsuccessful) 8.6.8 Usage: Change Folder (Short Folder name) Figure 10: Change folder (short folder name) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 68 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.9 Usage: Change Folder (Long Folder name - UNICODE) Note: nn is the size of folder name in bytes. The folder name is supplied in Unicode. Figure 11: Change folder (long folder name - UNICODE) 8.6.10 Usage: Remove Folder (Short Folder name) Figure 12: Remove folder (short folder name) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 69 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.11 Usage: Remove Folder (Long Folder name UNICODE) Note: nn is the size of folder name in bytes. The folder name is supplied in unicode. Figure 13: Remove folder (long folder name - UNICODE) 8.6.12 Usage: Delete File (Short Filename) Figure 14: Delete file (short filename) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 70 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.13 Usage: Delete File (Long Filename UNICODE) Figure 15: Delete file (long filename - UNICODE) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 71 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.14 Usage: Put File (Short Filename) Note: The first NN from the host shall specify a value of 1. Subsequent NN values shall be less than the value returned to command MAX Figure 16: Put file (short filename) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 72 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.15 Usage: Put File (Long Filename - UNICODE) Figure 17: Put file (long filename - UNICODE) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 73 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.16 Usage: Get File (Short Filename) Note: After each !command, if a +NN response is not received after 2 seconds, the host can repeat that command. The response to ! is +NN instead of just NN to make easier for the host to predict the command, since on completion the standard response is 200 FTP which also happens to start with a number. The + shall be early warning to the host that the procedure is not complete. Figure 18: Get file (short filename) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 74 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.17 Usage: Get File (Empty file in server) Note: If the file size is 0, then the host shall receive 200 FTP instead of 200 GET. The latter is invitation to the host that data needs to be marshalled across. Figure 19: Get file (empty file in server) 8.6.18 Usage: Get File (Long Filename - UNICODE) Figure 20: Get file (long filename - UNICODE) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 75 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.19 Usage: Get File ABORT Note: If 200 FTP is received after submitting an ABORT command then it implies that the entire file was transferred before the abort had been received. Figure 21: Get file - ABORT 8.6.20 Usage: Unsuccessful FTP connection Note: Reason for connection failure could be:
Device is not in range Device is not connectable Device does not support FTP server profile. Figure 22: Unsuccessful FTP connection Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 76 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 8.6.21 Usage: ABORT a DIR request Note: The host may get more file/folder names after submitting an ABORT request because the device could have received a folder data OBEX packet at the same time but slightly earlier so it may have started processing it. Hence the host must look out for a 200 FTP<crlf> to be sure that the DIR operation has terminated. Some ftp servers (like widcomm stack) will return a 500 response code. Figure 23: ABORT a DIR request Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 77 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 9. OBEX PROFILE COMMANDS This section describes the OBEX implementation on BTM430/431 which allows performing the role of Obex Push Client as illustrated in the diagram below. Figure 24: OBEX Push client and server The Obex Push profile implementation provides the capability to a host to act as an Obex Push client to a peer device providing an obex push server profile. An Obex Push client capability implies the ability to send and optionally receive a default file. The Bluetooth Obex Push server profile specification describes the profile as one built on Obex Exchange
(OBEX) which is in turn built on SPP. The Object Push Profile [3] describes the profile as having the three following features:
Object Push Mandatory Business Card Pull Optional Business Card Exchange Optional This implementation only offers the Mandatory Object Push feature. The implementation on BTM430/431 allows a host attached to the module to send and receive files and to manipulate files and folders. The format used in this document for describing this protocol is a series of message sequence charts with accompanying notes as appropriate, which unambiguously convey how a host and the module shall interact to perform the task. 9.1 Generic Notes and Guidance In the message sequence charts the following abbreviations apply:
<crlf> shall mean a two character sequence made up of the ASCII characters 0x0D (carriage return) and 0x0A (line feed).
<cr> shall mean a one character sequence made up of the ASCII character 0x0D.
<lf> shall mean a one character sequence made up of the ASCII character 0x0A.
<bd_addr> shall mean a 12 digit string consisting of only hexadecimal digits 0-9, A-F, and a-f.
<filename> shall mean a string delimited by the character. For example, hello.txt.
<foldername> shall mean a string delimited by the character. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 78 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide nnn shall be a decimal number with at least one digit. The backspace character is not supported. All OBEX commands are case sensitive. OBEX Commands shall not exceed 32 characters in total. While an OBEX session is open, the host shall not deassert the modules UART_CTS line and conversely the host MUST always be ready to accept data. When Unicode data is transmitted, it shall be assumed that the most significant byte is transmitted first. If an OBEX command is expecting a Unicode string as a parameter and the host has an ASCII string, the string shall be expanded with a 0 byte in the most significant position. 9.2 OBEX Push related AT Commands 9.2.1 AT+OPS<bd_addr>
This command is used to establish a connection to an Obex Push server profile in a peer device with Bluetooth address <bd_addr>. 9.2.2 ATSn=m The following values of n are relevant to OBEX operation: 582. A description of these values is given on page 18 TBC. 9.3 OBEX Push related Subcommands This section describes Obex Push-related subcommands that the host can use to control the OBEX Push session. 9.3.1 PUT <filename> length(Send file) This OBEX subcommand is used to send a file to the obex server. The length of <filename> shall not exceed 24 characters. The length value is inserted into the OBEX length header field. There is some ambiguity as to how the first obex PUT packet is formed with respect to the Bodyheader. The OBEX specification does not prohibit the first Body header to be empty, neither does it say that it must NOT be empty. If the first body is NOT empty when sending a file to a Nokia6820 phone then it seems to confuse it. Hence Laird sends out an empty Body header by default as does the Windows PC based Widcomm Bluetoothstack. To cater for future devices which NEED the first Body header to be non-empty, a new S Register582 has been added to allow a host to have control over how the first body header is constructed. The new S register 582 takes values in the range 0 to 1. The default value is 0 which implies that the first Body header in the PUT obex packet is empty. A value of 1 forces that Body header to have one byte of data and in this case when the module prompts the host for a length value it shall respond accordingly. Hopefully the default value of zero suffices for all occasions but, in case it does not, we provide the control to modify the packet as required. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 79 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 9.3.2 PUT nnnlength(Send file) This OBEX subcommand is used to send a file to the OBEX push server where the filename is in UNICODE text and the filename is nnn bytes long. The length value is inserted into the OBEX length header field. See comment above with regards to S Reg 582 TBC. 9.3.3 ABORT(Abort current OBEX command) This OBEX subcommand is used to abort a file transfer where appropriate. To abort a PUT session, please send 0 when the module prompts for a length value. 9.3.4 QUIT ( Terminate the OBEX Push session) This OBEX subcommand is used to terminate the OBEX push session and also results in the Bluetooth connection being terminated. 9.3.5 MAX(Max outgoing OBEX packet size) This OBEX subcommand is used to get the maximum obex packet size tolerated by server and can be used by the host to optimize the data throughput. 9.3.6 WHO(Identify current profile) This OBEX subcommand is used to identify the current profile. 0 means Obex Push and 1 means FTP. 9.4 OBEX Push Related Subresponses All Obex Push-related sub responses sent from the module to the host are 11 characters long in the following format:
<cr><lf>nnn AAA<cr><lf>. The characters nnn shall be decimal digits 0 to 9, then there is a space character and finally a 3 character word followed by <cr><lf>. The <cr><lf> envelope plus the fixed length hopefully makes the parsing task in the host much simpler. Values for nnn are as specified for HTTP status codes and reproduced from the OBEX specification as indicated in Table 9-1. Table 9-1: OBEX response and HTTP status codes OBEX Response Code HTTP Status Code 0x00to 0x0F None 0x10(0x90) 0x20(0xA0) 0x21(0xA1) 0x22(0xA2) 0x23(0xA3) 100 200 201 202 203 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth Definition Reserved Continue OK, Success Created Accepted Non-Authoritative Information 80 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide OBEX Response Code HTTP Status Code 0x24(0xA4) 0x25(0xA5) 0x26(0xA6) 0x30(0xB0) 0x31(0xB1) 0x32(0xB2) 0x33(0xB3) 0x34(0xB4) 0x35(0xB5) 0x40(0xC0) 0x41(0xC1) 0x42(0xC2) 0x43(0xC3) 0x44(0xC4) 0x45(0xC5) 0x46(0xC6) 0x47(0xC7) 0x48(0xC8) 0x49(0xC9) 0x4A(0xCA) 0x4B(0xCB) 0x4C(0xCC) 0x4D(0xCD) 0x4E(0xCE) 0x4F(0xCF) 0x50(0xD0) 0x51(0xD1) 0x52(0xD2) 0x53(0xD3) 0x54(0xD4) 0x55(0xD5) 0x60 (0xE0) 0x61 (0xE1) 204 205 206 300 301 302 303 304 305 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 500 501 502 503 504 505
Definition No Content Reset Content Partial Content Multiple Choices Moved Permanently Moved temporarily See Other Not modified Use Proxy Bad Request - server couldnt understand request Unauthorized Payment required Forbidden - operation is understood but refused Not Found Method not allowed Not Acceptable Proxy Authentication required Request Time Out Conflict Gone Length Required Precondition failed Requested entity too large Request URL too large Unsupported media type Internal Server Error Not Implemented Bad Gateway Service Unavailable Gateway Timeout HTTP version not supported Database Full Database Locked For more details of these values, Refer to the irDA specification which can be freely downloaded from www.irda.org. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 81 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide In addition, values in the range 050 to 099 and 250 to 299 inclusive are specific to this Laird application and are defined as per the table below.
(Laird Technologies Specific) Definition Response Code nnn 050 051 052 053 055 056 090 099 250 Syntax Error / Command Unrecognized Server sent unexpected information in OBEX packet OBEX connection fail, because it is unauthorized Memory allocation failure (Please contact Ezurio with details) Unicode File/Folder name length cannot be an odd value Command not recognized An XML parsing error occurred (while processing response to DIR command) The Bluetooth connection has unexpected been dropped (i.e., remote out of range etc.) GET procedure was aborted 9.4.1 nnn OBX This OBEX response is used to convey the outcome of a subcommand to the host where nnn is a fixed three digit decimal number as defined in the irDA specification and map to HTTP status codes. For example, a value of n=200 implies successful operation, any other value usually conveys an error as described in the irDA specification (except the range 050 to 099 inclusive and 250 to 299 inclusive). Note: When a Bluetooth OBEX session is established, we will be specifying v1.0 in the header packets by default. 9.5 OBEX Push Line Multiplexing Commands When transferring an object, the single serial interface between the host and the module is used to send and receive data and commands. This means a scheme is required to unambiguously determine when a byte on the line corresponds to a command or data belonging to a file. The module uses negotiated multiplexing to achieve this, and commands are used to toggle the line between command and data mode. This scheme is symmetrical and the commands for toggling the state of the line are relevant for both direction. The only difference being that the terminator is <cr> in the host to module direction and <crlf> in the reverse direction. The commands are described in the following sub sections. 9.5.1 #
This command is used to ask the other end how many bytes of a filename or object it will send next. 9.5.2 >
This command is used to inform the other end that it is safe to send the number of bytes belonging to a filename or object as indicated in the most recent # command. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 82 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 9.5.3 !
This command is used to ask the module/host how many bytes of data it will send next. If the module/host sends a length value that is too large to hanlde, then it can be rejected by resending the !command. This is because accepting a value implies this end should send a ? prompt to trigger the data phase (see Section 9.5.4). 9.5.4 ?
This command is used to inform the other end that it is safe to send the number of bytes belonging to data phase indicated in the most recent ! command. 9.6 Message Sequence Charts The color scheme uses RED text as commands from a host to the module and BLUE text as responses and prompts from the module to the host. Command/responses shown in BLACK are associated with non-obex related states. Apart from OBEX connection and disconnection scenarios, to avoid repetition, all message sequence charts shall assume that the module is in an Obex connected state. 9.6.1 Usage: Make OBEX PUSH connection (No Authentication) Figure 25: Make OBEX PUSH connection (no authentication) 9.6.2 Usage: OBEX Push Disconnection Figure 26: OBEX Push disconnection Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 83 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 9.6.3 Usage: Put File (Short Filename) Note: The first NN from the host shall specify a value of 1. Subsequent NN values shall be less than the value returned to command MAX Figure 27: Put file (short filename) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 84 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 9.6.4 Usage: Put File (Long Filename - UNICODE) Figure 28: Put file (long filename - UNICODE) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 85 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 9.6.5 Usage: Unsuccessful OBEX Push connection Note: Reason for connection failure could be:
Device is not in range, Device is not connectable, Device does not support OBEX Push server profile. Figure 29: Unsuccessful OBEX Push connection Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 86 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 10. APPLICATION NOTE FOR SURFACE MOUNT MODULES 10.1 Introduction Laird surface mount modules are designed to conform to all major manufacturing guidelines. This application note is intended to provide additional guidance beyond the information that is presented in the User Manual. This Application Note is considered a living document and will be updated as new information is presented. The modules are designed to meet the needs of a number of commercial and industrial applications. The modules are designed to be easily manufactured and conform to current automated manufacturing processes. 10.2 Shipping Modules are shipped in ESD (Electrostatic Discharge) safe trays that can be loaded into most manufacturers pick and place machines. Layouts of the trays are provided in Figure 10-1.. Figure 10-1: BT730 Shipping Tray Details Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 87 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 10.3 Reflow Parameters Laird surface mount modules are designed to be easily manufactured including reflow soldering to a PCB. Ultimately it is the responsibility of the customer to choose the appropriate solder paste and to ensure oven temperatures during reflow meet the requirements of the solder paste. Laird Technologies surface mount modules conform to J-STD-020D1 standards for reflow temperatures. Important: During reflow, modules should not be above 260 and not for more than 30 seconds. Figure 10-2: Recommended Reflow Temperature Temperatures should not exceed the minimums or maximums presented in Table 10-1. Table 10-1: Recommended Maximum and minimum temperatures Specification Temperature Inc./Dec. Rate (max) Temperature Decrease rate (goal) Soak Temp Increase rate (goal) Flux Soak Period (Min) Flux Soak Period (Max) Flux Soak Temp (Min) Flux Soak Temp (max) Time Above Liquidous (max) Time Above Liquidous (min) Time In Target Reflow Range (goal) Time At Absolute Peak (max) Liquidous Temperature (SAC305) Lower Target Reflow Temperature Upper Target Reflow Temperature Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth Value 1~3 2-4
.5 - 1 70 120 150 190 70 50 30 5 218 240 250 Unit C / Sec C / Sec C / Sec Sec Sec C C Sec Sec Sec Sec C C C 88 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide Absolute Peak Temperature 260 C 11. FCC REGULATORY STATEMENTS Family BT7x0 US/FCC SQGBT700 CANADA/IC 3147A-BT700 PART #
FORM FACTOR TX OUTPUT ANTENNA BT730-SA-XX Surface Mount 18dBm Chip BT730-SC-XX
*Last two slots "XX" in Part # are used for production firmware release changes. Can be values 01-99, Surface Mount 18dBm U.FL aa-zz The BT730 family has been designed to operate with the antennas listed below with a maximum gain of 2dBi. The required antenna impedance is 50 ohms. Item 1 2 3 Part Number Mfg. AT3216-B2R7HAAT ACX Laird MAF94045 ACC-008 EZURIO 4 5 6 WRR2400- IP04-
B(MAF94019) WTC2450-IP04-
K(MAF94006) S181FL-L-RMM-
2450S Laird Laird Nearson
(Laird) Type Chip PCB Ceramic Patch Dipole Dipole Dipole Gain (dBi) 0.5 2 2 1.5 2 2 Note: The OEM is free to choose another vendors antenna of like type and equal or lesser gain as an antenna appearing in the table and still maintain compliance. Reference FCC Part 15.204(c)(4) for further information on this topic. To reduce potential radio interference to other users, the antenna type and gain should be chosen so that the equivalent isotropic radiated power (EIRP) is not more than that permitted for successful communication. 11.1 Power Exposure Information In general, there are two agency classifications for RF radiation exposure in wireless applications;
portable and mobile. Mobile A mobile device is defined as a transmitting device designed to be used in such a way that a separation distance of at least 20 centimeters is normally maintained between the transmitter's radiating structures and the body of the user or nearby persons. The BT730 is fully modular approved for mobile and fixed applications. Reference FCC Part 2.1091 for further details on mobile devices. This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. Portable Portable is a classification of equipment where the user, in general, will be within 20 cm of the transmitting antenna. Portable equipment is further broken down into two classes; within 2.5 cm of human contact and beyond 2.5 cm. The BT730 does not hold a portable approval classification due to its peak output power and modular approval restrictions. Further RF evaluation is required by customers who want to use the BT730 in portable applications. Contact a qualified test house or a Laird Technologies Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 89 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide representative for further information on this topic. Reference FCC Part 2.1093 for further details on portable devices. Maximum Permissible Exposure report has been created which shows the minimum distances for Public and Occupational use of the BT730. Note: Occupational Limit Minimum Distance = 1.5cm Public Limit Minimum Distance = 3cm Note: This equipment was tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference does not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to correct the interference by one or more of the following measures:
is connected. nna lp CAUTION: THIS DEVICE COMPLIES WITH PART 15 OF THE FCC RULES AND INDUSTRY CANADA LICENSE-EXEMPT RSS STANDARD(S). OPERATION IS SUBJECT TO THE FOLLOWING TWO CONDITIONS: (1) THIS DEVICE MAY NOT CAUSE HARMFUL INTERFERENCE, AND (2) THIS DEVICE MUST ACCEPT ANY INTERFERENCE RECEIVED, INCLUDING INTERFERENCE THAT MAY CAUSE UNDESIRED OPERATION. CAUTION: The OEM should have the device incorporating with the BT730 tested by a qualified test house to verify compliance with FCC Part 15 Subpart B limits for unintentional radiators. CAUTION: Any changes or modifications not expressly approved by Laird could void the users authority to operate the equipment. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 90 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide OEM Responsibilities This device is intended only for OEM integrators under the following conditions:
1) The antenna must be installed such that 20 cm is maintained between the antenna and users. 2) The transmitter module may not be co-located with any other transmitter or antenna As long as 2 conditions above are met, further transmitter test will not be required. However, the OEM integrator is still responsible for testing their end-product for any additional compliance requirements required with this module installed IMPORTANT NOTE:
In the event that these conditions can not be met (for example certain laptop configurations or co-location with another transmitter), then the FCC authorization is no longer considered valid and the FCC ID can not be used on the final product. In these circumstances, the OEM integrator will be responsible for re-
evaluating the end product (including the transmitter) and obtaining a separate FCC authorization. End Product Labeling This transmitter module is authorized only for use in device where the antenna may be installed such that 20 cm may be maintained between the antenna and users. The final end product must be labeled in a visible area with the following: Contains FCC ID: SQGBT700. Manual Information To the End User The OEM integrator has to be aware not to provide information to the end user regarding how to install or remove this RF module in the users manual of the end product which integrates this module. The end user manual shall include all required regulatory information/warning as show in this manual. Industry Canada (IC) Warning:
Radiation Exposure Statement:
This equipment complies with IC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator & your body. Dclaration d'exposition aux radiations:
Cet quipement est conforme aux limites d'exposition aux rayonnements IC tablies pour un environnement non contrl. Cet quipement doit tre install et utilis avec un minimum de 20 cm de distance entre la source de rayonnement et votre corps. This device is intended only for OEM integrators under the following conditions: (For module device use) 1) The antenna must be installed such that 20 cm is maintained between the antenna and users. 2) The transmitter module may not be co-located with any other transmitter or antenna. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 91 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide As long as 2 conditions above are met, further transmitter test will not be required. However, the OEM integrator is still responsible for testing their end-product for any additional compliance requirements required with this module installed. Cet appareil est conu uniquement pour les intgrateurs OEM dans les conditions suivantes:
(Pour utilisation de dispositif module) 1) L'antenne doit tre installe de telle sorte qu'une distance de 20 cm est respecte entre l'antenne et les utilisateurs. 2) Le module metteur peut ne pas tre complant avec un autre metteur ou antenne. Tant que les 2 conditions ci-dessus sont remplies, des essais supplmentaires sur l'metteur ne seront pas ncessaires. Toutefois, l'intgrateur OEM est toujours responsable des essais sur son produit final pour toutes exigences de conformit supplmentaires requis pour ce module install. IMPORTANT NOTE:
In the event that these conditions can not be met (for example certain laptop configurations or co-location with another transmitter), then the Canada authorization is no longer considered valid and the IC ID can not be used on the final product. In these circumstances, the OEM integrator will be responsible for re-
evaluating the end product (including the transmitter) and obtaining a separate Canada authorization. NOTE IMPORTANTE:
Dans le cas o ces conditions ne peuvent tre satisfaites (par exemple pour certaines configurations d'ordinateur portable ou de certaines co-localisation avec un autre metteur), l'autorisation du Canada n'est plus considr comme valide et l'ID IC ne peut pas tre utilis sur le produit final. Dans ces circonstances, l'intgrateur OEM sera charg de rvaluer le produit final (y compris l'metteur) et l'obtention d'une autorisation distincte au Canada. End Product Labeling This transmitter module is authorized only for use in device where the antenna may be installed such that 20 cm may be maintained between the antenna and users. The final end product must be labeled in a visible area with the following: Contains IC: . Plaque signaltique du produit final Ce module metteur est autoris uniquement pour une utilisation dans un dispositif o l'antenne peut tre installe de telle sorte qu'une distance de 20cm peut tre maintenue entre l'antenne et les utilisateurs. Le produit final doit tre tiquet dans un endroit visible avec l'inscription suivante: "Contient des IC: ". Manual Information To the End User The OEM integrator has to be aware not to provide information to the end user regarding how to install or remove this RF module in the users manual of the end product which integrates this module. The end user manual shall include all required regulatory information/warning as show in this manual. Manuel d'information l'utilisateur final L'intgrateur OEM doit tre conscient de ne pas fournir des informations l'utilisateur final quant la faon d'installer ou de supprimer ce module RF dans le manuel de l'utilisateur du produit final qui intgre ce module. Le manuel de l'utilisateur final doit inclure toutes les informations rglementaires requises et avertissements comme indiqu dans ce manuel. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 92 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 12. CE REGULATORY The BT730 has been tested for compliance with relevant standards for the EU market. The OEM should consult with a qualified test house before entering their device into an EU member country to make sure all regulatory requirements have been met for their complete device. The BT730 was tested with a 2dBi dipole antenna. The OEM is free to use any manufacturers antenna and type of antenna but it must be <2dBi to remain in compliance with the Laird reports. Reference the Declaration of Conformities listed below for a full list of the standards that the modules were tested to. Test reports are available upon request. 13. EU DECLARATIONS OF CONFORMITY 13.1 BT730-SA Manufacturer:
Product:
EU Directive:
Laird Technologies BT730-SA RTTE 1995/5/EC Conformity Assessment:
Annex IV Reference standards used for presumption of conformity:
Article Number:
3.1a 3.1b Requirement Reference standard(s):
Health and Safety EN 60950-1:2006 Protection requirements with respect to electromagnetic compatibility EN 301 489-1 V1.8.1 EN 301 489-17 V2.1.1 Emissions:
EN55022:2006/A1:2000/A2:2006(Cla ssB) Immunity:
EN61000-4-2:1995/A1:1998/A2:2001 EN61000-4-3:2002/A1:2002 3.2 Means of the efficient use of EN 300 328 V1.7.1 (2006-10) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 93 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide the radio frequency spectrum Declaration:
We, Laird Technologies, declare under our sole responsibility that the essential radio test suites have been carried out and that the above product to which this declaration relates is in conformity with all the applicable essential requirements of Article 3 of the EU Directive 1995/5/EC, when used for its intended purpose. Place of Issue:
Laird Technologies Saturn House, Mercury Park Wooburn Green HP100HH, United Kingdom tel:+44 (0)1628 858 940 fax: +44 (0)1628 528 382 Date of Issue:
June 2013 Name of Authorized Person:
Andrew Dobbing, Engineering Manager Signature:
13.2 BT730-SC Manufacturer:
Product:
EU Directive:
Laird Technologies BT730-SC RTTE 1995/5/EC Conformity Assessment:
Annex IV Reference standards used for presumption of conformity:
Article Number:
3.1a 3.1b Requirement Reference standard(s):
Health and Safety EN 60950-1:2006 Protection requirements with respect to electromagnetic compatibility EN 301 489-1 V1.8.1 EN 301 489-17 V2.1.1 Emissions:
EN55022:2006/A1:2000/A2:2006(ClassB) Immunity:
EN61000-4-2:1995/A1:1998/A2:2001 EN61000-4-3:2002/A1:2002 3.2 Means of the efficient use of the radio frequency spectrum EN 300 328 V1.7.1 (2006-10) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 94 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide Declaration:
We, Laird Technologies, declare under our sole responsibility that the essential radio test suites have been carried out and that the above product to which this declaration relates is in conformity with all the applicable essential requirements of Article 3 of the EU Directive 1995/5/EC, when used for its intended purpose. Place of Issue:
Laird Technologies Saturn House, Mercury Park Wooburn Green HP100HH, United Kingdom tel:+44 (0)1628 858 940 fax: +44 (0)1628 528 382 Date of Issue:
June 2013 Name of Authorized Person:
Andrew Dobbing, Engineering Manager Signature:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 95 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 14. MECHANICAL DETAILS BT730-SC Mechanical Details Module Keep-Out Area: An area of 1.5mm around the module should be reserved as a keep-out area .No other components should be placed in this area. BT730-SA Mechanical Details Module Keep-Out Area: An area of 1.5mm around the module should be reserved as a keep-out area. No other components should be placed in this area. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 96 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide BT730 Pad Definitions Mechanical Drawing 15. ORDERING INFORMATION Part Number Description BT730-SA BT730-SC Class 1 Bluetooth V2.0Module (internal antenna) Class 1 Bluetooth v2.0 Module (uFL for external antenna) DVK BT730-SA Development board with BT730-SA module soldered in place DVK BT730-SC Development board with BT730-SC module soldered in place 15.1 General Comments This is a preliminary datasheet. Please check with Laird Technologies for the latest information before commencing a design. If in doubt, ask. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 97 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide 16. BLUETOOTH SIG APPROVALS The BT730-SA and BT730-SC modules are fully Bluetooth SIG qualified as END products. DesignName Owner QDID number Link to listing on the SIG website BT730-SA BT730-SC EZURiO (a unit of Laird Technologies) TBC It is a mandatory requirement of the Bluetooth Special Interest Group (SIG) that every product implementing Bluetooth technology is listed on the Bluetooth SIG End Product Listing (EPL). The EPL process is simple and free of charge but does require registration of your company at the Bluetooth SIG website www.bluetooth.org The following link provides an overview of the EPL system the user will be required to register / login first:
https://www.bluetooth.org/login/register/
https://www.bluetooth.org/technical/qualification/eploverview.htm For a detailed procedure of how to make an EPL entry, please refer to the following SIG document;
https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=71880 Additionally there is on EPL online training guide at the following link:-
https://www.bluetooth.org/events/training/epltraining.htm In the case of LairdsBT730-SA / BT730-SC, please search for QDID TBC in step 4 and then Create New EPL as per step 5. 16.1 Additional Assistance Please contact your local sales representative for further assistance:
Laird Technologies wirelessinfo@lairdtech.com Americas :
+1-800-492-2320 Option 2 Europe:
+44-1628-858-940 Hong Kong: +852-2923-0610 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 98 CONN-GUIDE-BT730_v0.9 Class 1 Bluetooth v2.0 Module Users Guide Smart Technology. Delivered. Laird Technologies is the world leader in the design and manufacture of customized, performance-critical products for wireless and other advanced electronics applications. Laird Technologies partners with its customers to find solutions for applications in various industries such as:
Network Equipment Telecommunications Data Communications Automotive Electronics Computers Aerospace Military Medical Equipment Consumer Electronics Laird Technologies offers its customers unique product solutions, dedication to research and development, as well as a seamless network of manufacturing and customer support facilities across the globe. globalsolutions: local support USA: +1.800.492.2320 Europe: +44.1628.858.940 Asia: +852.2923-0610 wirelessinfo@lairdtech.com www.lairdtech.com/wireless CONN-UM-BT730_v0.9 Copyright 2013 Laird Technologies, Inc. All rights reserved. The information contained in this manual and the accompanying software programs are copyrighted and all rights are reserved by Laird Technologies, Inc. Laird Technologies, Inc. reserves the right to make periodic modifications of this product without obligation to notify any person or entity of such revision. Copying, duplicating, selling, or otherwise distributing any part of this product or accompanying documentation/software without the prior consent of an authorized representative of Laird Technologies, Inc. is strictly prohibited. All brands and product names in this publication are registered trademarks or trademarks of their respective holders. This material is preliminary Information furnished by Laird Technologies in this specification is believed to be accurate. Devices sold by Laird Technologies are covered by the warranty and patent indemnification provisions appearing in its Terms of Sale only. Laird Technologies makes no warranty, express, statutory, and implied or by description, regarding the information set forth herein. Laird Technologies reserves the right to change specifications at any time and without notice. Laird Technologies products are intended for use in normal commercial and industrial applications. Applications requiring unusual environmental requirements such as military, medical life-support or life-sustaining equipment are specifically not recommended without additional testing for such application. Limited Warranty, Disclaimer, Limitation of Liability Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth 99 CONN-GUIDE-BT730_v0.9
1 2 | user manual (BT740 series) | Users Manual | 3.94 MiB | / January 10 2013 |
Smart Technology. Delivered. Enhanced Class 1 Bluetooth v2.1 Module USERS GUIDE VERSION 0.2 Part # BT740-SA, BT740-SC Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/bluetooth Enhanced Class 1 Bluetooth v2.1 Module Users Guide REVISION HISTORY Revision Revision Date Description Version 0.1 12/0413 Initial release to CA Version -.2 01/05/13 JK updates and DW regulatory Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 2 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Table of Contents 1 Overview and Key Features .................................................................................................. 4 2 Specifications ....................................................................................................................... 5 3 I/O Characteristics .............................................................................................................. 11 4 Functional Description ........................................................................................................ 12 5 AT Command Set ............................................................................................................... 15 6 S Registers ......................................................................................................................... 35 7 Error Codes ........................................................................................................................ 50 8 Multipoint Protocol .............................................................................................................. 53 9 Module Events .................................................................................................................. 118 10 HDP Profile Related Events .............................................................................................. 127 11 Debug Events ................................................................................................................... 128 12 Data Channels .................................................................................................................. 129 13 Multipoint Application Examples ....................................................................................... 134 14 AT Application Examples .................................................................................................. 152 15 Surface Mount Modules .................................................................................................... 182 16 FCC Regulatory Statements ............................................................................................. 184 17 EU Declarations of Conformity .......................................................................................... 190 18 Mechanical Details ............................................................................................................ 192 19 Ordering Information ......................................................................................................... 194 20 Bluetooth SIG Approvals ................................................................................................... 195 21 Glossary of Terms ............................................................................................................ 197 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 3 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 1 OVERVIEW AND KEY FEATURES Every BT740 series Bluetooth module from Laird is designed to add robust, long-range Bluetooth data connectivity to any device. Based on the market-leading Cambridge Silicon Radio (CSR) BC04 chipset, BT740 modules provide exceptionally low power consumption with outstanding Class 1 range via 18 dBm of transmit power. The modules support the latest Bluetooth Version 2.1 specification, including Secure Simple Pairing (SSP), which improves security and enhances the ease of use for end customers. A broad range of Bluetooth profiles such as Serial Port Profile (SPP) and other vital features make BT740 modules superior to other Bluetooth modules. With a compact footprint of 15.29 x 28.71 mm, the modules deliver maximum range with a minimum size. To ease integration, the modules are designed to support a separate power supply for I/O. Another integration advantage is the inclusion of a complete Bluetooth protocol stack with support for multi-point connections and numerous Bluetooth profiles, including SPP, Human Interface Device (HID) profile, and Health Device Profile (HDP). BT740 modules fully qualify as a 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. Included firmware provides programming support for multi-point applications that use up to seven simultaneous data connections to and from the robust BT740 module. A low-cost developers 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.1 + EDR External or internal antennas Comprehensive AT interface for simple programming Alternate packet based interface for complex programming and up to seven simultaneous connections Bluetooth EPL Compact footprint Class 1 output 18 dBm UART interface with GPIO, PCM, and ADC lines Industrial temperature range Field proven firmware used on BTM44x series of modules Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Medical devices ePOS terminals Automotive diagnostic equipment Barcode scanners Industrial cable replacement Bluetooth Profiles Supported Serial Port Profile (SPP) Human Interface Device (HID) profile host and device supported Health Device Profile (HDP): Agent supported IEEE Device Specialization 11073-10415 (Weight Scale) IEEE Device Specialization 11073 - 10408 (Thermometer) IEEE Device Specialization 11073 10417 (Glucose) CONN-GUIDE-BT740_v0.2 4 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 2 SPECIFICATIONS 2.1 Detailed Specifications Table 2-1: Detailed specifications Categories Wireless Specification Feature Bluetooth Frequency Max Transmit Power Implementation V2.1 + EDR 2.402 - 2.480 GHz Class 1 18 dBm from integrated antenna 18 dBm at UFL antenna connector Receive Sensitivity Better than -87 dBm (at 25 C) Range Data Rates UART Data Transfer Rate Host Interface UART Operation Modes AT Command Set Multi-Point API seven simultaneous connections Firmware Upgrade Firmware Upgrade over UART
>1000m Up to 2.1 Mbps (over the air) Circa 350 kbps TX, RX, DCD, RI, DTR, DSR, CTS, RTS1 Default 9600, n, 8, 1 From 1,200 to 921,600 bps 8 configurable lines 2 lines, 8 bit resolution 4 lines see Audio section Serial Port Profile Human Interface Device Health Device Profile 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 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 5 CONN-GUIDE-BT740_v0.2 Profiles Command Interfaces Audio GPIO ADC PCM SPP HID HDP Support SCO Channels PCM Interface Supply Voltage Supply Power Consumption Various Modes Typical values Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Categories Antenna Options Feature Internal External Implementation Multilayer ceramic - BT740-SA-xx Connection via u.FL - BT740-SC-xx Physical Dimensions 15.29 mm x 28.71 mm x 2.5 mm Environmental Miscellaneous Weight Operating Storage Lead Free Warranty 1.5 g
-40C to +85C
-40C to +85C Lead-free and RoHS compliant 1 Year Development Tools Development Kit Development kit DVK-BT740 and software tools Approvals Bluetooth FCC / IC / CE End Product Listing (EPL) All BT740 Series (to be completed) 1. DSR, DTR, RI and DCD are configurable either as GPIO or as modem control lines. 2.2 Hardware Specifications Ceramic Chip Antenna Figure 2-1: Functional Block Diagram Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 6 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 2.3 Pin Definitions Table 2-2: Pin definitions Pin Signal Description 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 GND SPI_MOSI SPI bus serial I/P GPIO6 GPIO7 RESET SPI_CLK PCM_CLK PCM_SYNC PCM_IN PCM_OUT VCC_5VIN GND VCC_3V3 Analogue 1 GND UART_DSR UART_DCD GPIO_9 GPIO_8 GND I/O for host I/O for host Module reset I/P SPI bus clock I/P PCM clock I/P PCM sync I/P PCM data I/P PCM Data O/P 3.0 V < VIN < 5.0 V 3.3 V Monitor 1.8 V max UART_DSR I/P UART_DCD I/P or O/ P I/O for host I/O for host Analogue 00 1.8 V max UART_RX UART_TX UART_RTS UART_CTS USB_D+
USB_D-
UART_RI Receive data I/P Transmit data O/P Request to Send O/P Clear to Send I/P Not used for AT module variants Not used for AT module variants Ring Input or Output GPIO_3/UART_DTR I/O for host/UART_DTR GPIO_5 GPIO_4 SPI_CSB SPI_MISO GND RF_OUT GND I/O for host I/O for host SPI bus chip select I/P SPI bus serial O/P Only on uFL version Only on uFL version Only on uFL version Comment See Note 0 See Note 0 See Note 0 See Note 0 See Note 0 See Note 0 See Note 0 See Note 0 See Note 0 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 7 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Notes:
Unused pins may have internal connections and must not be connected. Note 1: Pins 2, 6, 32, and 33 (SPI related) are only for Laird internal production purposes. Note 2: Pins 34 - 36 are only for uFL connector version of module BT740-SC Note 3: Power-on-reset (power cycling and brown out consideration) The reset circuitry within the BT740 module incorporates a brown-out detector; this may simplify power supply design. The BT740 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. Note 4: 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. Note 5: 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. Compatibility Note for Legacy Devices If Reset compatibility is required with BTM402 and BTM404:
Reset logic must invert (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) ensures that the BT730 module is out of reset for the condition when host has yet to control the reset line. Add a 10 k pull-up to the host PCB on the UART_RX, otherwise the module remains in deep sleep if not driven to high. Add a 10 k pull-down to the host PCB on the UART_CTS. If it is not connected (which we do not recommend) then the default state for UART_CTS input asserts, meaning that it 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 configure 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 sit 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 converts to RS232 voltage levels it has 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 converts to RS232 voltage levels it has 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 BTM740 module is in high speed mode (see definition for S Register 507), the host should assert this pin to ensure that the connection maintains. 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. Access the GPIO pins by using S Registers 623 to 629. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 8 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide GPIO3 is also used for DTR output (active low). See S Registers 552 and 553. Analogue 0 and 1 should not exceed 1.8 V and are accessible through S Registers 701 and 702. 2.4 Electrical Specifications 2.4.1 Absolute Maximum ratings Absolute maximum ratings for supply voltage and voltages on digital and analogue pins of the module are listed below. WARNING: Exceeding the following values causes permanent damage to the device. Parameter Peak current of power supply Voltage at digital pins Voltage at POWER pin Min 0
-0.4 2.9 *
Max 200 3.7 6.0 Unit mA V V 2.4.2 Recommended Operating Parameters 2.4.2.1 Power Supply Signal Name Pin No I/O Voltage level Comments VCC_VIN 11 GND 1, 12, 15, 20, 34, 36 VCC_3V3 13 I O 3.0 V to 5.0 V *
Typ 3.3 V 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 (typically 3.3 V). Internal LDO drop is 0.2 V. To achieve 3.3 V for VCC_3V3 requires VCC_IN of 3.5V. IO voltage levels follow VCC_3V3. 2.4.2.2 Signal Levels for Interface, PCM, SPI, and GPIO Signal Type Signal level Signal level at 0 mA load Input Output VILmin= -0.4V VILmax=0.8V VIHmin=2.3V VIHmax=3.7V VOLmax=0.2V VOHmin=3.1V 2.4.2.3 RS-232 Interface Signal Name Pin No UART_TX 23 I/O O Comments Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 9 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Signal Name Pin No I/O Comments UART_RX UART_CTS UART_RTS UART_DSR UART_DTR UART_RI UART_DCD 2.4.2.4 SPI Bus 22 25 24 16 29 28 17 I I O I O Shared with GPIO3 I or O I or O Direction may be programmed. Direction may be programmed. Signal Name Pin No I/O Comments SPI_MOSI SPI_MISO SPI_CSB SPI_CLK 2 33 32 6 2.4.2.5 PCM Interface I O I I INTERNAL USE ONLY - Used to reprogram Flash in Laird production. Signal Name Pin No I/O Comments PCM_CLK PCM_IN PCM_SYNC PCM_OUT 7 9 8 10 I or O I I or O O 2.4.2.6 General Purpose I/O and ADC If unused, keep pins open. PCM output signals are tri-stated when there is not an active SCO or eSCO connection. Signal Name GPIO_3 - 9 Pin No I/O Signal level Comments I or O See Recommended Operating Parameters 3, 4, 16, 17, 18, 19, 29, 30, 31 Analogue0, Analogue1 14, 21 I Range 0 1.8 V 8 bit 2.4.2.7 Miscellaneous Signal Name USB D-
Pin No 27 I/O I USB D+
RESET 26 5 I I Signal level VILmax =0.3vdd_usb VIHmin =0.7vdd_usb VILmax =0.3vdd_usb VIHmin =0.7vdd_usb VILmax=1.0V VIHmin=2.3V Comments Normally inactive. Pull to GND through 10 k. Normally inactive. Pull to GND through 10 k. Active LOW. The Reset input contains a 10 k pull-up resistor
(internal to module). Terminology:
USB Signal Levels: vdd_usb refers to the internal voltage generated by the LDO regulator on the module, typically 3.3 V. Hence 0.3vdd_usb and 0.7vdd_usb correspond to 1.0 V to 2.3 V. Achieving 3.3V for vdd_usb requires VCC_IN of 3.5V. USB IO voltage levels follow VCC_3V3. Correct USB operation requires vdd_usb on 3.1 V, 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/wireless 10 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 3 I/O Characteristics 3.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. The significant operating modes are:
Idle Waiting for a connection Sniff Connected Inquiring Initiating a connection 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. 3.2 Typical Current Consumption in mA Table 3-1: Current Consumption VCC = 3.8V, Baudrate = 9600bps Typical Current (mA) Range = >1 meters Idle Mode, S512=1 Wait for Connection Or Discoverable Mode, AT+BTP S508=S510=640, S509=S511=320 TBC TBC Wait for Connection Or Discoverable Mode, TBC AT+BTP S508=S510=1000, S509=S511=11 Inquiry Mode, AT+BTIN Connecting Mode (ATDxxx) Connected Mode (No Data Transfer) Connected Mode (Max Data Transfer) TBC TBC TBC TBC Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 11 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 4 FUNCTIONAL DESCRIPTION The BT740 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 base-
band 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 BT740 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. 4.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. UART_RTS and UART_CTS implement two-way hardware flow control. 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 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 continuously poll to detect incoming communication. The UART_RI signal serves to indicate incoming calls. UART_DSR is an active low input. It should connect to the DTR output of the host. When the module runs in high speed mode (see definition for S Reg 507), this pin should assert by the host to ensure a connection maintains. 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 modules UART_RX signal line Port /RXD of the application receives data from the modules UART_TX signal line Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 12 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide BT740 UART_TX UART_RX UART_CTS UART_RTS UART_DSR UART_DTR UART_RI UART_DCD Application -
Host
/RXD
/TXD
/RTS
/CTS
/DTR
/DSR
/RING
/DCD Note: The serial module output is at 3.3 V CMOS logic levels. Level conversion must be added to interface with an RS232 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 link 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, leading 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 to follow the correct CTS/RTS handshaking protocol for proper operation. 4.2 SPI Bus The module is a slave device that uses terminals SPI_MOSI, SPI_MISO, SPI_CLK, and SPI_CSB. This interface programs firmware updates at the factory. Laird supplies a PC-based utility to allow a firmware upgrade over the UART port. Laird highly recommends 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 permanently connect in a PC application. 4.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, or16-
bit linear. The PCM_CLK and PCM_SYNC terminals can configure 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:
4.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/wireless 13 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 4.4 General Purpose I/O and ADC 4.4.1 GPIO Laird provides seven lines of programmable bi-directional input/outputs (I/O) 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 independently configure to be either an input or output. A selection of ports can be accessed synchronously. The ports power from VCC. The mode of these lines can be configured and the lines are accessed via S Registers 623 to 629. 4.4.2 ADC The BT740 provides access to two 8-bit ADCs (Analogue 0 and 1). These provide an input range of 0 mV to 1,800 mV, which are 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. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 14 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5 AT COMMAND SET 5.1 Introduction to AT Commands This chapter describes the AT protocol used to control and configure the BT740-Sx Bluetooth modules after it is configured to present an AT protocol instead of the alternate multipoint packet-based interface. The Multipoint Protocol is also described in this document. The protocol is similar to the industry standard Hayes AT protocol used in telephony modems, as both types of devices are connection oriented. The extended AT command set makes the Laird device performs the three core actions of a Bluetooth device: establish Bluetooth connections, pair, and inquire. Many other provided AT commands perform ancillary functions, such as trusted device database management and S Register maintenance. Just like telephony modems, the Laird device powers up in an unconnected state and only responds via the serial interface. In this state the Laird device can respond to Bluetooth Inquiries. Then, just like controlling a modem, the host issues AT commands which map to various Bluetooth activities. These AT commands have appropriate counterparts in the alternate multipoint packet based protocol which also achieve the same goal. The nature of AT protocol allows it to control and manage only one connection at a time; this is in contrast to the multipoint packet protocol which can simultaneously control many connections. The main advantage AT protocol offers is simplicity. The module has a serial interface through which the AT protocol channels, which can be configured for baud rates from 1200 up to 921600 and has an RF communications end point. The default baud rate for AT command mode modules is 9600 bps. The RF communications endpoint has a concept of connected and unconnected modes and the AT protocol at the serial interface has a concept of command and data modes. This leads to the matrix of states shown below. Command Mode Data Mode RF Unconnected Allowed Illegal RF Connected Allowed Allowed The combination Data + RF Unconnected Mode does not make sense and is ignored. Navigation between these states uses the AT command/responses, described in detail in subsequent sections. There are many references to the term S Register in the rest of this document. These are an array of integer values stored in non-volatile memory which are used to configure the module so that it behaves in a certain way after powering. These S Registers have two attributes; a value and an ID. The ID is a positive integer number used in appropriate commands to read/write the values. 5.2 AT Protocol Mode 5.2.1 AT Protocol Assumptions The CSR (Cambridge Silicon Radio) Bluetooth chipset in Laird devices has limited memory resources. Therefore it is NOT proposed that there be full implementation of the AT protocol as seen in modems. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 15 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide The claim made for this device is that it has a protocol similar to an AT modem. In fact, the protocol is similar enough so that existing source code written for modems can be used with very little modification with a Laird device. Therefore the following assumptions are made:
All commands terminate by the carriage return character 0x0D, represented by the string <cr> in subsequent sections. It cannot be changed at runtime. 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 are represented by the string <cr,lf>. All Bluetooth addresses are represented by a fixed 12 digit case insensitive hexadecimal string. All Bluetooth Device Class codes are represented by a fixed 6 digit case insensitive hexadecimal string. Most new Bluetooth specific commands are identified by the string +BTx, where x is generally a mnemonic of the intended functionality. 5.2.2 Protocol Activation Depending on the variant of the module, the AT protocol needs to activate so that on power up it presents this protocol interface instead of the alternate multipoint protocol. The method that is always available and works is activation via S Register 255 in multipoint mode (and mapped to 9255 in AT mode), where setting a value of 1 selects multipoint packet protocol and a value of 2 selects AT protocol. Note: Changes to this S register store in non-volatile memory at time of change and does not require the AT&W command (or the equivalent in multipoint mode CMD_STORE_REG) to commit to non-volatile memory. Optionally, some firmware variants allow a value of 0 in this S Register and in this case on power up the protocol selection depends on the state of one of the GPIO pins (user settable) so that one state forces AT and the other forces multipoint. 5.3 AT Commands and Responses 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, and the response to a command is also stated.
<bd_addr>
<devclass>
N M 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 which could be 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
<string>
A string delimited by double quotes. E.g. "Hello World". The " character MUST be supplied as delimiters. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 16 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide
<uuid>
A 4 character UUID number consisting of ASCII characters 0 to 9, A to F and a to f. 5.3.1 Enter Local Command Mode Command:
Response:
<cr,lf>OK<cr,lf>
Description:
When in data + connected mode, the host can force the device into a command +
connected mode so that AT Commands can issue to the device while a connection establishes. The S2 register specifies the character in this escape sequence, so it can change. The escape sequence guard time sets at compile time to 100 milliseconds. Please refer to the Dropping Connections section for more related information. In modems this escape sequence is typically {delay}+{delay}+{delay}+{delay}, and configures by default to avoid confusion when the module is providing access to a modem. 5.3.2 Command Mode Status Check Command:
AT Response:
<cr,lf>OK<cr,lf>
Description:
<cr,lf>OK<cr,lf>
5.3.3 Accept Incoming Connection (Answer Call) Command:
ATA Response:
Description:
<cr,lf>CONNECT 123456789012,<uuid>,<<cr,lf>
Where <uuid> is the profile with the established connection. Accept an incoming connection, which is indicated by the unsolicited string
<cr,lf>RING 123456789012<cr,lf>, where 123456789012 is the Bluetooth address of the connecting device. 5.3.4 Make Outgoing Connection Command:
ATD<bd_addr>,<uuid>
Response:
Description:
<cr,lf>CONNECT 123456789012,<uuid>,><cr,lf>
Or
<cr,lf>NO CARRIER<cr,lf>
Make a connection to device with Bluetooth address <bd_addr> and profile <uuid>. The <uuid> is an optional parameter which specifies the UUID of the profile server to attach to, and if not supplied then uses the default UUID for SPP (1101). The UUIDs in the following table are allowed:
Profile Name UUID Serial Port HID HDP 1101 1124 Use appropriate canned HDP commands instead Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 17 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.5 Enable/Disable Echo Command:
ATEn Response:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command enables or disables the echo of characters to the host. The default echo condition sets via S Register 506. This command does not affect the S Register 506. 0 1 Disable echo. Enable echo. All other values of n generate an error. 5.3.6 Drop Connection Command:
ATH Response:
<cr,lf>NO CARRIER<cr,lf>
Or
<cr,lf>OK<cr,lf>
Description:
Drop an existing connection or reject an incoming connection indicated by the unsolicited RING message. If a connection does not exist then the response is OK. 5.3.7 Information Command:
ATIn Response:
For recognized values of n.
<cr,lf>As Appropriate<cr,lf>OK<cr,lf>
All other values of n generate
<cr,lf> Laird Technologies Inc (c)2010 <cr,lf> OK<cr,lf>
Description:
This returns the information in the following table about the Laird device. The list is not exhaustive as there are some values of n which generate information for use by Laird Support. Table 5-1: Laird device information Index Description 0 1 3 333 The product name/variant. The underlying CCL Stack version information. The Laird firmware revision Format A.B.C.F.G
(See 333 for further details) The full Laird firmware revision Format A.B.C.D.E.F.G, where A = Hardware Platform B = Major Stack Version Number (Changes when CCL stack changes :
see ATi1) C = Major App Version Number (Changes when number of profiles change) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 18 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Index Description D = Developer ID E = Branch ID F = Build Number (divisible by 10 for production releases and Odd for Engineering) G = Twig Number (will normally be 0, but minor releases on sub-
branches is non-zero) A 12 digit hexadecimal number corresponding to the Bluetooth address of the Laird device. The maximum size of trusted device database. 0 if not in a connect state and 1 if in a connect state. The reason why a NO CARRIER results in the most recent attempt at making an outgoing connection. Where the response values are as follows:
3 = Normal disconnection Current Sniff parameters in two lines as follows A,B,C,D A,B,C,D Where first line is in units of milliseconds and the second in baseband slots. A = Attempt (see S Reg 73, 561 in AT Mode) B = Timeout (see S Reg 74, 562 in AT Mode)) C = Minimum Interval (see S Reg 75, 563 in AT Mode) D = Maximum Interval (see S reg 76, 564 in AT Mode) Current discoverable mode:
0 = Not Discoverable 1 = Generic Discoverable mode 2 = Limited Discoverable mode Current connectable mode:
0 = Not Connectable 1 = Connectable Same as (9) above. 0 if not in a connect state and 1 if in a connect state. Current state of the module 14 = Not discoverable and not connectable and not in connection 18 = Connected mode 174 = Connectable and Discoverable 173 = Connectable only 172 = Discoverable only 4 6 9 11 13 21 22 23 42 56 100 201 The number of devices in the trusted device database in format a,b where a is the number of devices in the rolling database and b in the persistant database. Returns the hardware ID (100 for BTM4xx platform) UART receive buffer and hardware handshaking information in the format:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 19 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Index Description A,B,C Where A = UART receive buffer size B = Threshold at which the RTS output line deasserts C = Threhsold at which the RTS output line re-asserts again. 202 The number of times the UART_DSR input line has been detected to toggle since the module was powered or reset via appropriate commands in AT and MP mode. 224-239 Memory Diagnostics information in the format A,B where A is the size of pmalloc block and B is the number that are free. Low B values imply trhe module is operating at the limits of its heap resource. 5.3.8 Enter Data Mode When Connected and in Command Mode Command:
ATO Response:
<cr,lf>CONNECT<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
Return to data mode. Assume that the module is in data mode after it receives an OK. Responds with an error if there is no Bluetooth connection. 5.3.9 Set S Register Command:
ATSn=m Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
As with modems, the Laird Bluetooth module employs a concept of registers used to store parameters, such as escape sequence character, inquiry delay time, etc. The value part m can enter as decimal or hexadecimal. A hexadecimal value is specified via a $ leading character. For example, $1234 is a hexadecimal number. When S register values change, the changes are not normally stored in non-volatile memory UNTIL the AT&W command is used (unless specifically stated otherwise). Note that AT&W does not affect some S registers; for example 520 to 525, or 9240 to 9255, as they are updated in non-volatile memory when the command processes. 5.3.10 Read S Register Value in Decimal or Hex Command:
ATSn?<$>
Response:
For recognised values of n:
<cr,lf>As Appropriate<cr,lf>OK<cr,lf>
For unrecognised values of n:
<cr,lf>ERROR nn<cr,lf>
Description:
This returns the current value of register n. If the optional $
character supplies after the ?, then the returned value is hexadecimal with a leading $. For example, the value 1000 returns Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 20 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide as $3E8 5.3.11 Read S Registers Valid Range Command:
ATSn=?
Response:
For recognised values of n:
<cr,lf>nnnn..mmmm<cr,lf>OK<cr,lf>
For unrecognised values of n:
<cr,lf>ERROR nn<cr,lf>
Description:
This returns the valid range of values for register n. 5.3.12 Send Data to Peer When In Command Mode Command:
ATX<string>
Response:
Description:
<cr,lf>OK<cr,lf>
Or if a connection does not exist
<cr,lf>ERROR 56<cr,lf>
This command sends data to the remote device when in local command and connected mode. If a non-printable ASCII character needs sent, then insert the escape sequence \hh where hh are two hexadecimal digits. The three character sequence \hh converts into a single byte before transmission to the peer. Note: For HID connections, the entire <string> is deemed to be a single HID report. 5.3.13 Factory Default (Full) Command:
AT&F*
Response:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command erases all user parameters in non-volatile memory. The new settings become active after a reset. 5.3.14 Factory Default (Preserve Uart Settings) Command:
AT&F+
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command erases all user parameters in non-volatile memory except S Registers 520 to 525, and 9240 to 9255. This means that the trusted device database clears, but AT protocol moderetains and UART config (baudrate, stopbits etc) is preserved. The new protocol and settings become active after a reset. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 21 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.15 Factory Default (Preserve Protocol Setting) Command:
AT&F*AT*
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command erases all user parameters in non-volatile memory except S Register 9255. This means that the trusted device database clears, but AT protocol mode retains and UART parameters reset to factory default settings. The new protocol and settings become active after a reset. 5.3.16 Factory default (Full, then change into MP mode) Command:
AT&F*MP*
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command erases all user parameters in non-volatile memory including S Register 9255 and S Reg 9255 is set to 1 for MP mode. This means that the trusted device database clears, and protocol sets to MP mode and all UART parameters are reset to factory default settings. The new protocol and settings become active after a reset. 5.3.17 Write S Registers To Non-Volatile Memory Command:
AT&W Response:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
Writes current S Register values to non-volatile memory so that they retain over a power cycle. 5.3.18 Write <String> To Blob(0) Command:
AT+BTB=<string>
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command clears BLOB(0) first and then <string> appended to that BLOB after the string de-escapes. This allows binary data to load into the BLOB buffer for subsequent processing using the AT+BTBnnnn command syntax. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 22 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.19 Append <String> To Blob(0) Command:
AT+BTB+<string>
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command appends <string> BLOB(0) after the string de-escapes. This allows binary data to load into the BLOB buffer for subsequent processing using the AT+BTBnnnn command syntax. 5.3.20 Action And Process Data In Blob(0) Command:
AT+BTBnnnn Response:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command processes BLOB(0) as per the action specified by nnnn. The actions are described briefly as per the table below (more details in the MP protocol section):
Index Action 0 1 2 3 4 5 6 7 8 9 Clear Blob(0) Get byte count in Blob(0) Destructively read Blob(0). Data sends so that non-printable data bytes are escaped with \hh. Save Blob(0) as Hid Descriptor(0) in non-volatile memory Load Blob(0) as Hid Descriptor(0) from non-volatile memory Save Blob(0) as Hid Service Name in non-volatile memory Load Blob(0) as Hid Service name from non-volatile memory Commit Blob(0) as Enhanced Inquiry Data Save Blob(0) as Enhanced Inquiry Data in non-volatile memory, to be used automatically after subsequent resets Load Blob(0) from the Enhanced Inquiry Data from non-volatile memory. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 23 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.21 Remove Trusted Device Command:
AT+BTD<bd_addr>
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command removes the specified device from the list of trusted devices in the non-
volatile database. If the device is not in the database then the response is still an OK. Error response is for when the address is not a 12 character hex string. 5.3.22 Remove All Trusted Devices Command:
AT+BTD*
Response:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command removes all devices from the list of trusted devices in the non-volatile database. The device does not ask for confirmation. WARNING: If you make a connection, the link key caches in the underlying stack. So if you subsequently delete the key using AT+BTD* and immediately request an authenticated connection to the same device, then the connection may be established. To ensure this does not happen, send ATZ after the AT+BTD*. 5.3.23 Get the Remote Friendly Name Command:
AT+BTF<bd_addr>
Response:
<cr,lf>Friendly Name
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command gets the remote friendly name of the specific address. If the friendly name has non printable characters (including the character ) then those characters escape into a 3 character \hh sequence. 5.3.24 Enable Connectable Mode Command:
AT+BTG Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Enable page scanning only and wait for a connection from any device. Inquiry scans are disabled. The page scan window and interval timing derives from S Reg 9009 and 9010. Use ATi21 and ATi22 to determine the discoverable and connectable modes at any time. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 24 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.25 Inquire Command:
AT+BTI Response:
Description:
<cr,lf>12346789012
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
This makes the device perform an inquiry for duration milliseconds and max number of unique responses, where S register 517 specifies duration and S register 518 specifies max. Only the Bluetooth address of responding devices is listed. 5.3.26 Inquire And Display Devclass Too Command:
AT+BTIV Response:
<cr,lf>12346789012,123456
<cr,lf>12345678914,123456
<cr,lf>OK<cr,lf>
Description:
As per AT+BTI but the response includes the device class code for all inquiry responses. 5.3.27 Inquire and Get Friendly Names Too Command:
AT+BTIN Response:
Description:
<cr,lf>12346789012,123456,"Laird BT Module"
<cr,lf>12345678914,123456, Nokia N70"
<cr,lf>OK<cr,lf>
As per AT+BTI but the response includes the device class code and friendly name for all inquiry responses. The friendly name strings are in UTF-8 format as per the Bluetooth specification. 5.3.28 Inquire with Enhanced Inq Resp Command:
AT+BTIE Response:
Description:
<cr,lf>12346789012,123456,,-45,"\0A\08Laird FEF"
<cr,lf>12345678914,123456,",-75,
<cr,lf>OK<cr,lf>
As per AT+BTI but the response includes the device class code, RSSI, and the enhanced inquiry information. The friendly name is not acquired, as it is a time-
expensive procedure and therefore an empty string sends as a placeholder. 5.3.29 Set Pincode or Passcode Command:
AT+BTK=<string>
Response:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command provides a passkey when PIN? 12345678 or PASSKEY? 12345678 indications receive asynchronously. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 25 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide The string length must be in the range 1 to 16, for PIN? otherwise an error returns. The string length must be exactly 6 characters, for PASSKEY? otherwise an error returns and each character MUST be a decimal digit in the range 0 to 9. If there is no ongoing pairing in progress, then the <string> stores in non-volatile memory and may be used in subsequent legacy pairing attempts. To delete the pincode stored in non-volatile memory, submit the command with an empty string. A stored value is not used for a PASSKEY? Event. 5.3.30 Reject Yes/No Simple Secure Pairing Command:
AT+BTKN Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
When the module configures for Display with Yes/No security via S Register 9006, this command conveys a NO for the simple pairing procedure. This command sends as a result of receiving a PASSKEY? 2 <bd_addr> asynchronous response. 5.3.31 Accept Yes/No Simple Secure Pairing Command:
AT+BTKY Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
When the module configures for Display with Yes/No security via S Register 9006 then this command conveys a YES for the simple pairing procedure. This command sends as a result of receiving a PASSKEY? 2 <bd_addr> asynchronous response. 5.3.32 Set Friendly Name in Non-Vol Memory Command:
AT+BTN=<string>
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This sets the default friendly name of this device as seen by other devices. It stores in non-volatile memory. Use AT+BTN? To read it back. An empty string () deletes the string from non-volatile memory which forces the use of the default friendly name. 5.3.33 Read Friendly Name From Non-Vol Memory Command:
AT+BTN?
Response:
<cr,lf>My FriendlyName<cr,lf>
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
Read the friendly name from non-volatile memory. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 26 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.34 Enable Connectable+Discoverable Mode Command:
AT+BTP Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Enable page and inquiry scanning and wait for a connection from any device. The page scan window and interval timing derives from S Reg 9009 and 9010. The inquiry scan window and interval timing derives from S Reg 9007 and 9008. 5.3.35 Enable Discoverable Mode Only Command:
AT+BTQ Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Set discoverable mode only by enabling inquiry scanning. The inquiry scan window and interval timing derives from S Reg 9007 and 9008. Use ATi21 and ATi22 to determine the discoverable and connectable modes at any time. 5.3.36 List Trusted Device Command:
AT+BTT?
Response:
<cr,lf>12346789012
<cr,lf>12345678913
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command lists the contents of both the rolling and the persist trusted device database. The link key does NOT display so the response is as shown above. If the list is empty, only the OK response sends; otherwise an OK terminates the list. Use the command ATI6 to read the maximum size of the trusted device database. Note: All new successful pairings automatically store in the rolling database. If the database is full, then the oldest is deleted to make room for the new one. To ensure a link key is never deleted, transfer it to the persist database using the command AT+BTT<bd_addr> described in detail later. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 27 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.37 List Trusted Device Command:
AT+BTTn?
Response:
Description:
<cr,lf>12346789012
<cr,lf>12345678913
<cr,lf>12345678914
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command lists the contents of either the rolling or the persist trusted device database, where n=0 for the rolling database and 1 for the persist database. The link key does NOT display so the response is as shown below. If the list is empty then just the OK response sends; otherwise an OK terminates the list. Use the command ATI6 to read the maximum size of the trusted device database. 5.3.38 Transfer Device To Persist List Command:
AT+BTT<bd_addr>
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
When a successful pairing occurs, the new link key automatically stores in the rolling database where if the database is full, the oldest device is deleted. This poses a risk of a trusted device automatically deleting, especially when the module is in just works simple pairing mode and so pairings can occur without the host being involved and so there is a definite risk of link key deletion. This command transfers a device specified via the address supplied to the persist database so that a trusted device is never deleted automatically. 5.3.39 Initiate a Pairing Command:
AT+BTW<bd_addr>
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This initiates pairing with a device whose Bluetooth address is <bd_addr>. An OK response sends immediately and when the PIN or PASSCODE is required. Asynchronous indications send to the host in the form PIN? <bd_addr> or PASSKEY?
<bd_addr> or PAIR ? <bd_addr> where the address confirms the device with which the pairing is to be performed. To supply a PIN or passcode, use the AT+BTK command. To respond with a YES or NO, use the command AT+BTKY or AT+BTKN respectively. For a successful pairing, the link key automatically stores in the rolling database which can be queried using the AT+BTT0? Command. Note: The OK response sends immediately on receipt of the AT+BTW command. On pairing completion, an unsolicited message sends to the host in the form PAIR n
<bd_addr>, where n is 0 for a successful pairing. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 28 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.40 Disable Connectable And Discoverable Mode Command:
AT+BTX Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Disable page/inquiry scanning. This means it does not accept incoming connections or inquiry requests. More specifically it negates the effect of AT+BTQ, AT+BTG and AT+BTP commands. Use ATi21 and ATi22 to determine the discoverable and connectable modes at any time. 5.3.41 HDP: Associate The Agent With Manager Command:
AT+HAAhhhh Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. hhhh is obtained as a response to the AT+HAB command. 5.3.42 HDP: Bind Manager to Agent Command:
AT+HAB<bd_addr>,iiii Response:
Description:
<cr,lf>hhhh<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. iiii is the nominal code for the data specialization. 5.3.43 HDP: Disassociate The Agent From Manager Command:
AT+HADhhhh Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 29 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.44 HDP: Endpoint Definition In SDP Record Command:
AT+HAE,iiii,endpointname Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. It inserts details in the SDP record. 5.3.45 HDP: Read Attribute Value In Agent Command:
AT+HAGhhhh,aaaa,ssss Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. 5.3.46 HDP: Activate SDP Record For Agent Command:
AT+HAL Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. 5.3.47 HDP: Trigger Agent Scan Report Command:
AT+HARhhhh,pppp[,aaaa[,aaaa[]]]
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 30 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.48 HDP: Write Attribute Value To Agent Command:
AT+HAShhhh,aaaa,ssss,ddddd Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Agent related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 0. 5.3.49 HDP: Endpoint Definition in SDP Record (Manager) Command:
AT+HME,iiii,endpointname Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Manager related command. Refer to Application Examples for details. Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 1. 5.3.50 HDP: Endpoint Definition in SDP Record (Manager) Command:
AT+HME,iiii,endpointname Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Manager related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 1. 5.3.51 HDP: Activate SDP Record For Agent (Manager) Command:
AT+HML Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Manager related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 1. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 31 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.52 HDP: Read Attribute Value (Manager) Command:
AT+HMGhhhh,oooo,aaaa Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Manager related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 1. 5.3.53 HDP: Send Time to Agent (Manager) Command:
AT+HMThhhh,ttttttt Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This is a Health Device Profile (HDP Manager related command. Refer to Application Examples for details). Please note ERROR 59 implies that the profile has not been activated which means bit 2 in S Reg 9003 is not set AND S Reg 9070 is not 1. 5.3.54 Add To Trusted Device Database (Rolling) Command:
AT+KY<addr>,<link_key>
Response:
Description:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command adds (or replaces) the <addr> and<link_key> pair to the rolling trusted device database. <addr> is a 12 hex digit Bluetooth address and <link_key> is a 32 hex digit random number. For more details, see the multipoint command CMD_TRUSTED_DB_ADD. 5.3.55 Read The Link Key For Address Specified Command:
AT+KY<addr>?
Response:
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
nn is 49 if the device is not in the trusted device database nn is 45 is S Reg 47 is not set to 1 Description:
This command reads the link key from the trusted device database for device with address <addr>. The link key information sends only if S Reg 47 ( 9047) is set to 1. This command is gated through S Reg 47 (9047) to get confirmation from the user that they acknowledge that security is compromised by allowing link keys to be read. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 32 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5.3.56 Unsolicited/Async Responses The AT Protocol is a command/response type of protocol. This means that the Laird device normally only responds to AT commands and in addition only responds to one AT command at a time. Under special circumstances, unsolicited responses send to the host. They are described in the following subsections. Each unsolicited response is prefixed and postfixed by a cr,lf two character sequence. Command:
No Command. This is a status message. Response:
RING Description:
This string sends to the host every second repeatedly when a remote device initiates a serial port connection. The fully qualified string is in the form RING 012345678901, where 012345678901 is a 12 digit hexadecimal number which corresponds to the remote devices Bluetooth address. The host responds with the ATA command to accept the connection or reject it using the ATH command. If S Register 0 is set to a non-zero value then the incoming SPP connection automatically accepts after the number of RINGS specified in S Register 0 sends to the host. Only incoming SPP connections invoke a RING response. Connections on other profiles automatically accepts. Command:
No Command. This is a status message. Response:
PIN ? <bd_addr>
Description:
This response sends to the host during a legacy pairing negotiation (pre BT version 2.1 compliant devices). The fully qualified string is PIN? 012345678901, where 012345678901is the Bluetooth address of the peer device. In response, the host must supply a pin code using the AT+BTK command. Command:
No Command. This is a status message. Response:
PASSKEY ? N <bd_addr>[,passcode]
Description:
This response sends to the host during a simple secure pairing (SSP) negotiation and when the module is configured appropriately via S Register 9006. Where N is 1 for the host to display the passkey supplied, 2 for the host to respond with either the command AT+BTKY or AT+BTKN and 3 for the host to respond with AT+BTK=nnnnnn. The fully qualified string is :
PASSKEY? 1 012345678901,123456 where 012345678901 is the Bluetooth address of the peer device and 123456 is the passcode to display to the user. PASSKEY? 2 012345678901,123456 where 012345678901 is the Bluetooth address of the peer device and 123456 is the passcode to display to the user. PASSKEY? 3 012345678901 where 012345678901 is the Bluetooth address of the peer device and the user echoes the passcode displayed on the peer device, or agree with the other user to enter the same random 6 digit passcode at both ends. Command:
No Command. This is a status message. Response:
PAIR N <bd_addr>
Description:
This response sends to the host on completion (success or otherwise) of a pairing process. If pairing succeeds then n = 0; if a timeout occurs then n=1; and for all other unsuccessful outcomes the value is 2. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 33 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide The parameter <bd_addr> is the address of the peer device if available. Command:
No Command. This is a status message. Response:
RX<string>
Description:
This response sends to the host when the unit is in online-command mode, S Register 531 is set to 3, and data arrives from a peer. For profiles other than SPP
(1101), use S Register 531 as a flag. If it is 0, then the profile is serviced in canned mode and in that case RX responses do not send and neither does the ATX<string> command needed to send data. If the data from the string contains non-printable characters (for example ASCII 0 to 31 and ASCII 128 to 255), then those characters translate into a 3 character escape sequence starting with \. For example, the embedded <cr><lf> sequence sends as the 6 character string \0D\0A. If the data contains the character " then it sends as \22. If the data contains the character \ then it sends as \5C Command:
No Command. This is a status message. Response:
HDA:ASSOCIATED hhhh,iiii,cccc,sssssss Description:
This is a Health Device Profile (HDP Agent) related asynchronous response. Refer to Application Examples for details. Command:
No Command. This is a status message. Response:
HDA:DISASSOCIATED hhhh Description:
This is a Health Device Profile (HDP Agent) related asynchronous response. Refer to Application Examples for details. Command:
No Command. This is a status message. Response:
HDA:TIME hhhh,ttttttt Description:
This is a Health Device Profile (HDP Agent) related asynchronous response. Refer to Application Examples for details. Command:
No Command. This is a status message. Response:
HDM:ASSOCIATED hhhh,iiii,cccc,sssssss Description:
This is a Health Device Profile (HDP Manager) related asynchronous response. Refer to Application Examples for details. Command:
No Command. This is a status message. Response:
HDM:DISASSOCIATED hhhh Description:
This is a Health Device Profile (HDP Manager) related asynchronous response. Refer to Application Examples for details. Command:
No Command. This is a status message. Response:
HDM:ASSOCIATED hhhh,iiii,cccc,sssssss Description:
This is a Health Device Profile (HDP Agent) related asynchronous response. Refer to Application Examples for details. Command:
No Command. This is a status message. Response:
HDM:SCANREPORT hhhh:pppp ..<more>
Description:
This is a Health Device Profile (HDP Agent) related asynchronous response. Refer to Application Examples for details. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 34 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 6 S REGISTERS All S registers are accessible when operating in AT protocol mode, but in MP protocol mode the only visible S Registers are listed as Standard and Special. Standard and AT S Registers share the same numbers in some cases. For this reason, the Standard and Special registers access from AT mode by offsetting 9000. For example, the standard S register 3 for profiles is read by using the command ATS9003? and set using ATS9003=n. 6.1 Standard S Registers This section details all the standard configuration S registers. Minimum and Maximum values are given in decimal, unless the value is prefixed by 0x, in that case the value is in hexadecimal. Table 6-1: Standard configuration S registers Min Max Category Description RegNo Dec
(Hex) 3 (03) 0 3 Profiles 4 (04) 0 1 GAP 5 (05) 0 2 GAP Server Profile record Mask Bit 0 = SPP Bit 1 = HID Bit 2 = HDP If HID enables, see S Reg 39 for further configuration options in terms of device or host implementation. If HDP enables, see S Reg 70 for further configuration options in terms of Agent or Manager services. Note: Depending on the firmware build, some profiles are not available; in that case setting or clearing the appropriate bit in this register has no effect as that bit is ignored. Default Connectable Mode on power up/reset 0: Disable 1: Enable Default Discoverable Mode on power up/reset 0 : Disable 1 : Enable General Discoverable mode (uses GIAC =
0x9E8B33) 2 : Enable Limited Discoverable mode (used LIAC =
0x9E8B00)) 6 (06) 12 15 GAP Security IO Capability Default Security Mode on power up/reset 12 = SSP + IO_CAP_NO_INPUT_NO_OUTPUT 13 = SSP + IO_CAP_DISPLAY_YES_NO 14 = SSP + IO_CAP_KEYBOARD_ONLY 15 = SSP + IO_CAP_DISPLAY_ONLY 7 (07) 12 2560 GAP Inquiry Scan Interval in units of msec Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 35 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) 8 (08) 12 2560 GAP Inquiry Scan Window in units of msec 9 (09) 12 2560 GAP Page Scan Interval in units of msec 10 (0A) 11 (0B) 12 23 2560 GAP Page Scan Window in units of msec 4096 SPP RFCOMM frame size for all RFCOMM based profiles. 23-512 range has a granularity of 1; 512 to 4096 range has a granularity of 4. For example: Setting 4095 sets a value of 4092 (round down new values). Note: Testing and calculations by our stack vendor show that the incremental benefit above 990 is not worth the downside of handling larger payloads. 12 (0C) 1 30 General / GAP Link supervision Timeout in seconds. 14 (0E) 0 1 SSP 32 (20) 0 4 SPP 33 (21) 0 4 SPP This value only reads on power up when the profiles are registers. After changing the value it needs committed to non-volatile memory using AT&W or CMD_SREG_STORE and then the module needs a power cycle. Auto Accept Channel Setup. If this is 1, incoming connections automatically accept. If this is 1, EVT_CONNECTION_SETUP events do not send to the host when an incoming connection arrives. Master/Slave role preference for SPP incoming connections. 0 = Dont Care 1 = Prefer Master 2 = Prefer Slave 3 = Must be Master 4 = Must be Slave Master/Slave role preference for SPP outgoing connections. 0 = Dont Care 1 = Prefer Master 2 = Prefer Slave 3 = Must be Master 4 = Must be Slave 34 (22) 0 7 SPP If Profiles Reg 3 bit 0 is set and this is not 0, then incoming SPP connections are allowed up to the number specified in this register. 35 (23) 0 7 SPP If Profiles Reg 3 bit 0 is set and this is not 0, then outgoing Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 36 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) SPP connections are allowed up to the number specified in this register 36 (24) 0 1 Profiles Enable DeviceID SDP record, and use the vid/pid as per registers 37 and 38. 37 (25) 0 38 (26) 0 0xFFF F 0xFFF F Profiles USB Vendor ID to use in the DeviceID record Profiles USB Product ID to use in the DeviceID record 39 (27)
-2 2 HID 40 (28) 0 0x1F SPP 41 (29) 0 0xFF HID Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Significant if the HID profile enables via Register 3. Negative values imply that HID HOST Profile is registered. Value 0 and above imply HID DEVICE Profile is registered and 0 = standard KEYBOARD device (104 keys). All other positive values are associated with custom HID Device Descriptors which are preloaded using the CMD_BLOBMANAGE or AT+BTB command into non-
volatile memory. There is MIMIMAL validation of the HID Descriptor that a user uploads. It is extremely important that a properly constructed descriptor is uploaded for storage in nonvolatile memory Note: If HID functionality is not included in the firmware build, then this register is not available. On SPP connection, this specifies the initial state of the following modem control lines sent to the peer. Bit 0 := RTR (RTS/CTS) Bit 1 := RTC (DTR/DSR) Bit 2 := DV (DCD) Bit 3 := IC (Ring Indicate RI) Bit 4 := FC (Reserved Future use) HID Device options: Bit MASK Values. When the module configures as an HID device
(Sreg39>=0) and Sreg3 has right value, then this and S Reg 42 modify optional flags that are exposed in the service record that tell the host what capabilities are built into the device. The capabilities expose as bit masks. If a bit is set in this register, then the corresponding bit in SReg42 is the value used for that capability. The flag masks are :
HID_SIF_BATTERYPOWER 0x01 37 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) HID_SIF_BOOTDEVICE 0x02 HID_SIF_NORMALLYCONNECTABLE 0x04 HID_SIF_RECONNECTINITIATE 0x08 HID_SIF_REMOTEWAKE 0x10 HID_SIF_SDPDISABLE 0x20 HID_SIF_VIRTUALCABLE 0x40 HID_SIF_SUPERVISIONTIMEOUT 0x80 For more details about what these flags do and mean, see the HID profile specification available on the BT SIG website. Note: If HID functionality is not included in the firmware build, then this register is not available. HID Device options: bit values. See description for SReg 41. Note: If HID functionality is not included in the firmware build, then this register is not available. 42 (2A) 0 0xFF HID 43 (2B) 0 63 HID Country Code exposed in HID Device Descriptor which have the following values:
Not Supported Arabic Belgian Canadian_Bilingua Canadian_French Czech Republic Danish Finnish French German Greek Hebrew Hungary International_ISO Italian Japan_ Katakana Korean 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Netherlands_Dutch Norwegian Persian_Farsi Poland Portuguese Russia Slovakia Spanish Swedish Swiss_French Swiss_German Switzerland Taiwan Turkish_Q UK US Yugoslavia Latin American 17 Turkish_F 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Note: If HID functionality is not included in the firmware build, then this register is not available. Language Code exposed in the HID Device Descriptor which have the following values. Each value contains ASCII values of two lower case characters. For example en== 0x656E 38 CONN-GUIDE-BT740_v0.2 44 (2C) 0x6 161 0x7A7 A HID Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) Note: If HID functionality is not included in the firmware build, then this register is not available. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Afar Abkhazian Afrikaans Amharic Arabic Assamese Aymara Azerbaijani Bashkir Byelorussia n Bulgarian Bihari Bislama Bengali Tibetan Breton Catalan Corsican Czech Welsh Danish German Bhutani Greek English Esperanto Spanish Estonian Basque Persian Finnish Fiji Faeroese French Frisian Irish Gaelic Galician Guarani Gujarati Hausa Hindi Croatian Hungarian Armenian Zulu aa ab
'af am ar as ay az ba be bg bh bi bn bo br ca co cs cy da de dz el en eo es et eu fa fi fj fo fr fy ga gd gl gn gu ha hi hr hu
'hy'
zu Interlingua Interlingue Inupiak Indonesian Icelandic Italian Hebrew Japanese Yiddish Javanese Georgian Kazakh Greenlandic Cambodian Kannada Korean Kashmiri Kurdish Kirghiz Latin Lingala Laothian Lithuanian Latvian Malagasy Maori Macedonian Malayalam Mongolian Moldavian Marathi Malay Maltese Burmese Nauru Nepali Dutch Norwegian Occitan Oromo Oriya Punjabi Polish Pashto Portuguese ia ie ik in is it iW ja ji jw ka kk kl km kn ko ks ku ky la ln lo lt lv mg mi mk ml mn mo mr ms mt my na ne nl no oc om or pa pl ps pt Quechua Rhaeto_Romanc e Kirundi Romanian Russian Kinyarwanda Sanskrit Sindhi Sangro Serbo_Croatian Singhalese Slovak Slovenian Samoan Shona Somali Albanian Serbian Siswati Sesotho Sudanese Swedish Swahili Tamil Tegulu Tajik Thai Tigrinya Turkmen Tigrinya Turkmen Tagalog Setswana Tonga Tatar Twi Ukrainian Urdu Uzbek Vietnamese Volapuk Wolof Xhosa Yoruba Chinese qu rm rn ro ru rw sa sd sg sh si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw uk ur uz vi vo wo xh yo zh 39 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) 45 (2D) 0 0x3F F HID Primary Language exposed in the HID Device Descriptor and the value is specified as follows ( where the values are in hexadecimal), refer to the HID specification for a complete list:
NEUTRAL ARABIC BULGARIAN CATALAN CHINESE CZECH DANISH GERMAN GREEK ENGLISH SPANISH FINNISH FRENCH HEBREW HUNGARIAN ICELANDIC ITALIAN JAPANESE KOREAN DUTCH NORWEGIAN POLISH PORTUGUESE ROMANIAN RUSSIAN SERBIAN CROATIAN SLOVAK ALBANIAN SWEDISH THAI TURKISH URDU INDONESIAN UKRAINIAN BELARUSIAN SLOVENIAN ESTONIAN LATVIAN LITHUANIAN FARSI ARMENIAN AZERI BASQUE MACEDONIAN VIETNAMESE AFRIKAANS GEORGIAN FAEROESE HINDI MALAY KAZAK SWAHILI UZBEK TATAR BENGALI PUNJABI GUJARATI ORIYA TAMIL TELUGU KANNADA MALAYALAM ASSAMESE MARATHI SANSKRIT KONKANI MANIPURI SINDHI KASHMIRI NEPALI 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 18 19 1a 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 29 2b 2c 2d 2f 2a 36 37 38 39 3e 3f 41 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 57 58 59 60 61 Note: If HID functionality is not included in the firmware build, then this register is not available. 40 CONN-GUIDE-BT740_v0.2 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) 46 (2E) 0 0x3F HID Sub Language exposed in the HID Device Descriptor and the value is specified as follows for English ( where the values are in hexadecimal); refer to the HID specification for a complete list:
ENGLISH_US ENGLISH_UK ENGLISH_AUSTRALIAN ENGLISH_CANADIAN ENGLISH_NEWZEALAND ENGLISH_IRELAND ENGLISH_SOUTHAFRIC A ENGLISH_JAMAICA ENGLISH_CARIBBEAN ENGLISH_BELIZE ENGLISH_TRINIDAD ENGLISH_ZIMBABWE ENGLISH_PHILIPPINES 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D Note: If HID functionality is not included in the firmware build, then this register is not available. When this register is 1, in MP Mode it enables the EVT_LINK_KEY_EX event to send to the host when the module receives the CMD_TRUSTED_DB_IS_TRUSTED command and in AT mode it enables the AT+KY?
command so that the link key information sends to the host in the response. By default this key is 0. By setting this to 1, the customer acknowledges that security can be compromised. This specifies the functionality attached to GPIO 0 to 15 appropriately. 50 for GPIO_0 onwards to 65 for GPIO_15. Depending on the platform, if the GPIO does not physically exist then the max value is 0. The functionality is specified as follows:
0 : None (the pio hardware is not touched) 1 : Input 2 : Output (0 on reset) 3 : Output (1 on reset) 4 : Input Inverted 5 : Output Inverted (0 on reset) 6 : Output Inverted (1 on reset) 41 CONN-GUIDE-BT740_v0.2 47 0 1 Pairing 50..65
(32..41) 0 0 or 15 GPIO Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) 7 : UART RI Input (DTE) (Ring Indicate) 8 : UART DCD Input (DTE) 9 : UART DSR Input 10 : UART RI Output (DCE) 11 : UART DCD Output (DCE) 12 : UART DTR Output 13 : UART TX Buffer NOT Empty Output 14 : Input pin Select Protocol 0=AT,1=MP 15 : Output pin 0 for AT, 1 for MP For all UART input/outputs (except 13, 14, & 15) there is an implied inversion. A logical 1 applies to assert the output, but by the time it hits the output pin or after it is read, there is automatic inversion. When writing to this location(s), validation prevents a write if the new value is a UART functionality and the same value already exists in another register. The best approach to writing to this group of registers is to first write 0 to all 16 registers and then write new values to all. New values for these registers only come into effect after a reset/power cycle. For details of functionality 13, see section UART Host Power Saving Facility which describes how this output can be used to wake a UART host. Contact the manufacturer for specific mapping and functionality allocations. If set to 0 then an HDP AGENT profile implements;
otherwise with 1, a HDP MANAGER implements. In addition, bit 2 of Profiles S Reg3 has to be set. Note: If HDP functionality is not included in the firmware build, then this register is not available. HDP AGENT profile related. This is the default time in milliseconds an HDP Agent remains in associated state while there is no activity with the HDP Manger. If the value is 0, that is taken as infinite time. This time is referenced when performing a new HDP agent IEEE specialization binding with an HDP manager Bluetooth. In AT mode see command AT+HAB, and in MP mode see CMD_HDP_BIND Note: If HDP functionality is not included in the firmware build, then this register is not available. 42 CONN-GUIDE-BT740_v0.2 70 (46) 0 1 HDP 71 (47) 0 6500 0 HDP Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) 72 (48) 48 1024 HDP 73 (49) 0 2000 0 Sniff Mode /
Power Saving 74 (4A) 1 4000 0 Sniff Mode /
Power Saving 75 (4B) 1 4000 0 Sniff Mode /
Power Saving 76 (4C) 1 4000 0 Sniff Mode /
Power Saving HDP Profile related. This is the max TX pdu size and computes to the nearest multiple of 16. Note: If HDP functionality is not included in the firmware build, then this register is not available. Sniff Attempt Time in units of milliseconds. 0 means disable. This value must be less than half the Sniff Minimum Interval (SReg 75). The value stores in an 8 bit number and so a non-linear algorithm converts between the value to the 8 bit number. This means writing and reading may yield different values. See section Sniff Mode Explained. Sniff Timeout Time in units of milliseconds. 0 means disable. The value stores in an 8 bit number and so a non-linear algorithm converts between the value to the 8 bit number. This means writing and reading may yield different values. See section Sniff Mode Explained. Sniff Minimum Interval in units of milliseconds. The value stores in an 8 bit number and so a non-linear algorithm converts between the value to the 8 bit number. This means writing and reading may yield differing values. See section Sniff Mode Explained. Sniff Maximum Interval in units of milliseconds. The value stores in an 8 bit number and so a non-linear algorithm converts between the value to the 8 bit number. This means writing and reading may yield differing values. See section Sniff Mode Explained. 80 (50) 100 0 7500 0 UART Comms UART latency time in microseconds. In a connection, the data pump waits for X bytes
(specified by SReg 11) before transferring the data to the air-side. In the event that the host sends fewer than X bytes this has the potential of those bytes never being transmitted. Therefore, to cater for that scenario a timer detects how long they sat in the buffer and if too long, send those bytes air-side anyway. How long to wait is specified by this S register. The timer starts once when a byte arrives in an empty buffer, not every time a byte arrives in the buffer. 43 CONN-GUIDE-BT740_v0.2 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) 81 10 80 UART Comms Memory usage in percent for MP mode UART RX processing. Leave to default value. Only change on advice from manufacturer. New values round up to the nearest 10. This register controls how many memory blocks are reserved when the module receives a flood of UART data packets with small payloads. The UART interface in the module uses hardware RTS/CTS handshaking to ensure that the low level receive buffer does not overflow. This register specifies at what fill percentage the RTS output line deasserts. This value validates to ensure it is always more than register 83. In AT mode, use the command ATi201 to return a response in the format X,Y,Z, where X is the actual size of the UART receive buffer, Y is the RTS deassert threshold, and Z is the RTS re-assert threshold. The UART interface in the module uses hardware RTS/CTS handshaking to ensure that the low level receive buffer does not overflow. This register specifies at what fill percentage the RTS output line reasserts. This value validates to ensure it is always less than register 83. In AT mode, use the command ATi201 to return a response in the format X,Y,Z, where X is the actual size of the UART receive buffer, Y is the RTS deassert threshold, and Z is the RTS re-assert threshold. Configure UART Latency. The default value of 0 configures the module for maximum throughput at the expense of latency. Select 1 for HIGH latency ( 25 ms polling of UART RX buffer) Select 2 for MEDIUM latency (8 ms polling of UART RX buffer) Select 3 for BEST latency (1 ms polling of UART RX buffer) Selecting 3 has a severe detrimental impact on throughput. Note: Polling times are correct as of this document. Contact Laird for updates. Modules Class of Device. If Profiles SReg3=2 (that is only HID Profile) and SReg39 sets for 0 (I.E. built in keyboard HID descriptor), then this 44 CONN-GUIDE-BT740_v0.2 82 2 99 UART Comms 83 1 98 UART Comms 84 0 3 UART Comms 128 (80) 0 0xFF FFFF GAP Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Min Max Category Description RegNo Dec
(Hex) class of device is overridden with a value which specifies a HID keyboard device. Note: Most registers read by the firmware at reset. Hence the radio requires a reset after setting a register for it to be effective. This means the relevant S Register set MUST commit to non-
volatile memory before initiating a reset. The S Registers store to non-volatile memory using the command [CMD_STORE_SREG]. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 45 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 6.2 Special S Registers (240 to 255) Registers 240 to 255 inclusive are special in the sense that when written, the value automatically commits to non-volatile memory. Table 6-2: Special S registers Min Max Category Description RegNo Dec
(Hex) 240
(F0) 0 921600 UART Comms UART Baudrate Writing 0 implies default baudrate which may be different for all the different protocols as follows:
MP mode = 115200 AT mode = 9600 Automatically saves to non-volatile memory on write. 241
(F1) 242
(F2) 243
(F3) 1 1 UART Comms UART Handshaking. 1=CTS/RTS Automatically saves to non- volatile memory on write. 1 2 0 2 UART Comms UART Stopbits Automatically saves to non- volatile memory on write. UART Comms UART Parity 0=None 1=Odd 2=Even Automatically saved to non- volatile memory on write 255
(FF) 0 2 Protocol Mode Host Communications Protocol 0 = Select protocol based on the state of GPIO input pin. 1 = Multipoint Packet Protocol 2 = AT Protocol If this register contains 0, then at least one S register in the range 50 to 65 should be set to the value (14 =
PROTOCOL_MODE_IN) so that the GPIO pin corresponding to that S Register automatically configures as an input and if on power up, the state of that pin is 0, then AT protocol activates, oitherwise MP. If no GPIO pin is configured to specify protocol and the value in this register is 0, then MP Protocol is selected. Automatically saves to non-volatile memory on write. All these S Registers, unless specifically mentioned, become effective after a power cycle or reset. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 46 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 6.3 AT S Registers These registers are specific to AT protocol operation only and are not accessible from MP protocol mode. Any S Register marked remapped is detailed with the descriptions of the mapped-to S Registers. Table 6-3: 'AT' S registers RegNo Min Max Category Description 0 15 SPP Rings before auto answering an incoming SPP connection. Setting 0 means a connection is not auto answered. 0 2 0x21 0x7E SPP 504 0 1 General 506 0 1 General 507 0 1 SPP Escape character used to change from data mode to command parsing mode when in a data connection. Three of these character enveloped by delays result in a transition from data into command mode This register controls what debug shows on the terminal program during the connection process. 0 All debug shown. 1 - Inhibits the printing of connection debug on the terminal screen. If this is set to 1, then AT commands echo back to the host. This becomes effective after a power cycle. To make immediate effect on echoes, use the command ATE0 or ATE1. Note: This register only specifies the initial state of echoes on power up. When set to 1, which is the default, the DSR modem status input line enters command mode and/or drop a connection. When set to 0 the DSR line is not checked for connection related functionality. This is so that the input can convey a digital status to the peer using S Registers 651/654 and 661/664 inclusive. 508 Remapped GAP To S Reg 9009 (9 in MP Mode see section Standard S Registers ) 509 Remapped GAP To S Reg 9010 (10 in MP Mode. See section Standard S Registers ). 510 Remapped GAP To S Reg 9007 (7 in MP Mode. See section Standard S Registers) 511 Remapped GAP To S Reg 9009 (8 in MP Mode. See section Standard S Registers). 514 517 518 2 2 1 60 Pairing Minimum time in seconds to wait for the conclusion of a pairing operation. 60 Inquiry Maximum time in seconds to perform an inquiry. 255 Inquiry Maximum number of inquiry responses in an inquiry. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 47 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide RegNo Min Max Category Description 520 Remapped 521 Remapped 522 Remapped 523 Remapped 524 Remapped UART Comms UART Comms UART Comms UART Comms UART Comms To S Reg 9240 (240 in MP Mode. See section Standard S Registers). To S Reg 9240 (240 in MP Mode. See section Standard S Registers). To S Reg 9241 (241 in MP Mode. See section Standard S Registers). To S Reg 9242 (242 in MP Mode. See section Standard S Registers). To S Reg 9243 (243 in MP Mode. See section Standard S Registers). 530 531 1 0 60 SPP Reconnect delay when configured as master in auto connection mode. 3 SPP/
AT Parser Specifies the AT Parser mode on connection establishment. 0 = Normal, that data exchanges between UART and RF. 1 = LOCAL_COMMAND. The AT interpreter parses UART input and RF data is discarded. 2 = REMOTE_COMMAND. The AT interpreter parses RF input and UART data is discarded. If S Reg 536 is not 1 then this register cannot be set to 2 and an ERROR returns. 3= LOCAL_COMMAND. The AT interpreter parses UART input and incoming RF data sends to the host using the RX<string> asynchronous response. To S Reg 9073 (73 in MP Mode. See section Standard S Registers). To S Reg 9074 (74 in MP Mode. See section Standard S Registers). To S Reg 9075 (75 in MP Mode see section Standard S Registers). To S Reg 9076 (76 in MP Mode. See section Standard S Registers) 561 Remapped 562 Remapped 563 Remapped 564 Remapped Sniff Mode Sniff Mode Sniff Mode Sniff Mode 619 620 621 622 0 0 0 0 0xFFFF GPIO This specifies a write mask when ATS620=X sets multiple GPIO states. 0xFFFF GPIO ATS620? reads all the GPIO states at once. ATS620=X writes new GPIO states using the mask in S Register 619. 0xFF AIO Reads and digitises the voltage on AIO0 and outputs it as an 8 bit number on the terminal program. 0xFF AIO Reads and digitises the voltage on AIO1 and outputs it as Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 48 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide RegNo Min Max Category Description 651
-1 8 GPIO 652
-1 8 GPIO 653
-1 8 GPIO 654
-1 8 GPIO 661
-1 8 GPIO 662
-1 8 GPIO 663
-1 8 GPIO 664
-1 8 GPIO an 8 bit number on the terminal program.
-1 means no GPIO pin allocation. See Note 1 and 3 below. Requires firmware build 185 or newer.
-1 means no GPIO pin allocation. See Note 1 and 3 below. Requires firmware build 185 or newer.
-1 means no GPIO pin allocation. See Note 1 and 3 below. Requires firmware build 185 or newer.
-1 means no GPIO pin allocation. See Note 1 and 3 below. Requires firmware build 185 or newer.
-1 means no GPIO pin allocation. See Note 2 and 3 below. Requires firmware build 185 or newer.
-1 means no GPIO pin allocation. See Note 2 and 3 below. Requires firmware build 185 or newer.
-1 means no GPIO pin allocation. See Note 2 and 3 below. Requires firmware build 185 or newer.
-1 means no GPIO pin allocation. See Note 2 and 3 below. Requires firmware build 185 or newer. 717 2 15 GAP Maximum time to wait for a remote friendly name to read
(AT+BTI command). All these S Registers, unless specifically mentioned, become effective after a power cycle or reset. Note 1: S Reg 651 to 654 take a GPIO pin number in the range 1 to 8 inclusive (or as per the full range for the specific module) which maps from the RTR, RTC,DV,IC bits in the RFCOMM Modem Control signal which exchanges for serial port profile. When a fresh Modem Control Sig message arrives from the peer, if the corresponding S register is NOT -1 and the specific GPIO pin is configured as an output (using S Reg 50 to 65 inclusive), then the state of the bit outputs to that pin. Note 2: S Reg 661 to 664 take a GPIO pin number in the range 1 to 8 inclusive (or as per the full range for the specific module) which maps to the RTR, RTC,DV,IC bits in the RFCOMM Modem Control signal which exchanges for serial port profile. If a GPIO pin specifies in one of these S Registers and it changes state AND there is an SPP connection, then the state of that input pin copies into an RFCOMM modem control message and sent to the peer. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 49 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Note 3: This capability enables the state of between 2 and 4 (depends on the direction of the connection) digital pins to exchange between peers without any host intervention. 7 ERROR CODES 7.1 Error Responses All error responses from the device are in the form <cr,lf>ERROR nn<cr,lf>, where nn is a number in the range 00 to 99 as follows:
Table 7-1: BTM Error Responses in AT Mode Error Description 01 02 03 04 05 06 06 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Register not recognized Value for register is out of range Incoming call NOT pending No call to connect to. This error code has meaning for ATO only Syntax Error Empty String Device Class could not be stored Invalid Device Class Code Invalid Bluetooth Address Could not set Service or Friendly name PS Store Write PS Store Read Not Idle Incorrect Mode Already Scanning Pairing is already in progress NOT USED NOT USED NOT USED Not safe to write to Non-volatile Store - Ongoing Bluetooth Connection Link Key Cache is Empty Link Key Database is Full Malloc returned NULL - Resource Issue Remote Address same as Local Address Connection Setup Fail, DSR Not asserted Unauthenticated licence Max Responses (See S Register 518) too high. Memory allocation error The length of Pin in AT+BTK is too long Invalid Ring count specified for S Register 0 or 100. If S0<>0 and S100<>0 then S0 must be < S100 ADC Error Analogue Value cannot be read as it is set for output Analogue Value cannot be written as it is set for input S Register Value is invalid Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 50 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Error Description 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 Both L and R modifier cannot be specified in ATD command Invalid Major Device Class valid value in range 0x00 to 0x1F inclusive Pairing in progress Command cannot be actioned try again later Invalid Sniff parameter specified. E.g. new Attempt value greater than MinInterval. Solution is to first increase Get Remote Friendly name Failed MinInterval and re-enter the Attempt value. Failed to change mode to Multipoint 7 Bit mode requires parity to be even or odd Stream Error Stream Pending Unknown AG command Busy Try Later Not Allowed Invalid String Generic Error Inquiry in progress Link Key Missing String De-escape Error Invalid Passcode (must be 6 decimal digits) Invalid Pincode Invalid UUID (must be 4 hex digits) Connection in progress Profile unsupported No SPP Connection I/O Mask is Zero (see SReg 619) Invalid Friendly Name Profile is not active HDP : Invalid Handle HDP : Unknown IEEE Nominal Code (Data Specialisation) HDP : Report Error HDP : Invalid IEEE Code HDP : Invalid Parameter HDP : Attribute not found HDP : Invalid Number of Arguments HDP : Object Closed HDP : Association Failed HDP : Too many Agents HDP : Object Incomplete HDP : PHDC Failed HDP : PHDC Insufficient Resource HDP : PHDC Invalid Parameter HDP : PHDC Invalid State HDP : PHDC Unknown Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 51 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Error Description 99 Functionality yet to be coded (please report to manufacturer) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 52 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8 MULTIPOINT PROTOCOL 8.1 Introduction to Multipoint Protocol This chapter describes a packet based messaging interface which a host uses to send commands, receive responses, receive asynchronous events and exchange multiplexed data with the Bluetooth serial module, henceforth described as the module. The module consists of a Bluetooth chipset with an approved Bluetooth stack which allows simultaneous connections to a minimum of one slave and, depending on hardware build and conditions, up to seven slaves. It also allows connections to multiple profiles to one or more slaves. Hence this document adopts a concept of channels instead of slave connections. You can also view these channels as logical data pipes. The term host in this document refers to any entity which is a source of command messages, sink for response/event messages, and both source and sink for multiplexed data packets. To further eliminate any confusion, when the terms command message and confirm message are used, it implies a message from the host to the module. Likewise the terms response message and event message imply a message from the module to the host. There is an implied client/server model in the protocol described in this document and the host should ensure that no new commands issue to the module until after a response is received for that command or an appropriate timeout. If multiple commands are sent, they queue and process only after the oldest command processes. Confirm messages do not have the same restrictions. Data packets do not follow that model. It is likely that asynchronous event messages are sent before response messages but that should not be taken as a signal to issue new commands. The only exception to this is when an unknown command receives; in this case the transaction terminates by an UNKNOWN_COMMAND event. This document does not describe how the packets are physically exchanged between the host and the module. The transport medium could be either UART or USB. It also does not describe the format of any envelope that may be required to reliably and quickly transfer the message packet between the host and module. This implies that when the packets proposed in this document are processed, they are assumed not to contain any errors by either peer entities. 8.2 Flow control & Data Integrity The transport mechanism streams in nature. If the transport medium is USB, then flow control and data integrity is inherently provided by the USB protocol. If the medium is UART, then it is assumed that there is a minimum of a five wire interface: RX, TX, CTS, RTS, and GND. Any host attached to the UART of the module strictly observes CTS/RTS hardware handshaking. Packet data integrity may or may not be provided depending on the build. For a UART transport media, guaranteeing data integrity is at the severe expense of data throughput. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 53 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.3 Packet Format This section describes the general format of incoming and outgoing packets. The term incoming henceforth implies packets sent by the host to the module and outgoing in the reverse direction. That is, the direction terminology is module (server) centric. All packets have octet granularity. When an octet is described as containing bit fields, it shall be taken that bit 0 is the least significant bit and bit 7 is the most significant bit. Subfields in the packet which require multiple octets shall be ordered so that the lowest significant octet transmits LAST over the transport media, unless specifically described otherwise this is also referred to as Big Endien format. For example, a 16-bit word value requires two octets within the packet and the first transmitted octet corresponds to the upper byte. Similarly, a 6-byte Bluetooth address transports the most significant byte first. If the order is reversed then it is specifically highlighted in the description of appropriate packets. Subfields which are data arrays shall be described with the [ ] operator in descriptions which come in subsequent chapters. Apart from data packets, all command, confirm, respond and event packets are of fixed size. If there isnt enough data to fill a packet, then the packet fills with 0s. The protocol and fixed packet format is optimized to ensure maximum data throughput over the air. Subsequent sections describe the packets in detail. 8.4 Host to Module Packets These are packets used to convey commands and confirms to the module or raw data to be sent over an open Bluetooth connection. 8.5 Command & Confirm Packets The format for command and confirm packets is displayed in Table 8-1. Table 8-1: Command and confirm packets Octet Field Description LENGTH CHANNEL Total length of this packet, including this octet Always zero CMD_ID/CNF_ID Described in the subsequent chapters and have CMD_ or CNF_ prefixes Bit 0 to 6 specify a mask. A clear bit means the module should NOT send any more packets to that corresponding SPP data channel. Bit 7 is always zero and is used as an extension bit in the future. It is assumed that the host is always able to receive a response or status packet. Data as required and has meaning specific to CMD_ID or CNF_ID. For example, if the command is to make a connection to a peer device, then it is at least a six octet array specifying the Bluetooth address of the peer. 0 1 2 3 FLOW_IN 4..N DATA[]
The value of CMD_ID is in the range of 0 to 63 and commands are queued until a previous command is completed by sending a response packet to the host. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 54 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide The value of CNF_ID is in the range of 64 to 127 inclusive. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 55 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Unknown command values result in an EVT_UNKNOWN_COMMAND event, with the command value reflected in the data field. If the octet value is specified in the range 128 to 255 (0x80 to 0xFF), then reflecting that value in the data field of an EVT_UNKNOWN_COMMAND instead of the COMMAND field of a response packet guarantees that the packet is NOT mistakenly processed as an event. Confirm packets are not queued by the UART packet processor in the module and are processed as soon they are received. As an example, this allows passkeys and pincodes to submit to the module while a response is awaited by the CMD_CONNECTION_MAKE command. In other words, confirm packets always go to the head of the packet queue. 8.6 Data Packets The format for data packets is displayed in Table 8-2 and can arrive at any time; that is, they do not adhere to a client/server model. The only method by which the host can be stopped from sending this message is by sending a zero value in the FLOW_OUT field of a response or status message. The module is prepared to receive at least one data packet after deasserting the appropriate flow control bit. Table 8-2: Data packet format Octe Field Description t 0 1 LENGTH Total length of this packet, including this octet CHANNEL 0 is an invalid value as this marks the packet as command/response or event. 1 to 7 are dedicated serial port profile connections. 128 is dedicated as Hid Device data channel. All other channels are reserved for future use. 2..N DATA[]
For channels 1 to 7, this data array unconditionally sends over the air in the appropriate. For channel 128 data is interpreted before appropriate HIT reports transmit. 8.7 Packet Processing Logic Data and Confirm packets process as soon as they are received. A command packet processes in a transaction, meaning it processes as soon as it is received if and only if there is no previous command processing and waiting for completion. Completion happens when an appropriate response packet is sent to the host. If a command transaction is currently in progress, then the packet inserts in a first-in, first-out queue. When an on-going command transaction completes, the queue is inspected and, if non-empty, the oldest queued command is processed. 8.7.1 Module to Host Packets These packets convey responses or events from the module and raw data received over an open Bluetooth connection or internal data source. Response packets are always a result of a command packet and event packets asynchronously send to the host as and when required. The host shall ensure that it is always ready to accept response and event packets, especially event packets as they can be sent at any time including where there is an incomplete transaction in progress. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 56 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.7.2 Response Packets The format for response packets is displayed in Table 8-3. Table 8-3: Response packet format Octet Field Description 0 1 2 3 LENGTH Total length of this packet, including this octet CHANNEL Always zero CMD_ID Echoed from the command packet (Shall be > 0 and < 128) FLOW_OUT Bit 0 to 6 specify a mask. A clear bit means the host should NOT send any more packets to that corresponding data channel. Bit 7 is always 0 and is an extension bit in the future. 4 STATUS Zero means success, otherwise see section STATUS values N..M DATA[]
Data as required and has meaning specific to the response for CMD_ID 8.7.3 Event Packets The format for event packets is displayed in Table 8-4. Table 8-4: Event packet format Octet Field Description 0 1 2 3 LENGTH Total length of this packet, including this octet CHANNEL Always zero EVT_ID Described in subsequent chapters, but bit 7 is always set, hence >= 128 FLOW_OUT Bit 0 to 6 specify a mask. A clear bit means the host should NOT send any more packets to that corresponding data channel. Bit 7 is always zero and is an extension bit in the future. N..M DATA[]
Data as required and has meaning specific to the response for EVT_ID The only difference between a response and an event packet is that octet 2 is defined as CMD_ID in the former and EVT_ID in the latter; in addition, the STATUS field is missing in the event packet. The value of CMD_ID will be in the range 0 to 0x3F and EVT_ID will take values in the range 0x80 to 0xFF. This allows bit 7 of that octet to be decoded whether the packet is a response packet or an event packet. The value of STATUS is in the range of 0 to 255. A value of zero means SUCCESS and any other value is a failure, where the value gives more details of the failure type. The values of STATUS are defined in a C header file which can be obtained on request from Laird. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 57 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.7.4 Data Packets The format for data packets is displayed in Table 8-5. The only method by which the host can stop the module from sending this message is by sending a zero value in the FLOW_IN field of command message, and even that is only for channels 1 to 7 inclusive. Table 8-5: Data packet format Octet Field Description 0 1 LENGTH Total length of this packet, including this octet CHANNEL 0 is an invalid value as this marks the packet as command/response or event. The channel number is allocated as follows:
1 to 7 are dedicated serial port profile connections. 0x20, 0x80, 0x90..0x97,0xA0 are dedicated as HID data channels. 0x98..0x9F are dedicated for BLOB sending and receiving data from BLOBs. 0xB0 conveys HDP data and 0xB1 is a HDP continuation data channel. 0xF0 conveys Enhanced Inquiry Response Data to the host. All other channels are reserved for future use. 2..N DATA[]
Data to be processed for channel CHANNEL. Data packets are symmetrical in format in both directions. Note: Only data channels 1 to 7 inclusive have flow control via the FLOW_IN and FLOW_OUT fields of command /confirm and response/event packets. 8.7.5 Data Channel Numbers Table 8-6 summarizes channel ID allocation for various connections and profiles. Table 8-6: Channel ID allocation Channel Number Profile Comments 0x0
SPP 0x1
.. 0x7 All traffic routed to/from the protocol parser this is a command, confirm, or response packet Serial Port profile data channels See Note 1 below 0x20 HID DEVICE Hid Device Channel only one device allowed at a time See Note 2 below 0xA0 HID DEVICE Hid Device Channel only one device allowed at a time 0x90 HID HOST See Note 3 below Hid Host Channels multiple connections to devices is possible See Note 4 below
.. 0x97 0x98
.. 0x9F 0xA0 BLOB MANAGER Blob Manager Channels See Note 5 below HID DEVICE Hid Device Channel for sending and receiving raw HID reports. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 58 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Channel Number 0xB0
.. 0xB1 0xF0 Profile Comments HDP DATA Enhance Inq Response HDP Data Channels See HDP Data Channels for further details of the logical channel conveyed in these data channel Enhanced Inquiry Response Data Note 1: In MP mode this module can support connections to up to seven other modules. This channel differentiates between the various connections. Note 2: This channel is used for canned HID Keyboard Device reports. Data in this channel is interpreted as ASCII and for each ASCII character two INPUT reports send to the host the first being the press event and the second the unpress event. If the ASCII value is in the range 0x7F to 0xFF then it is silently discarded. Note 3: This channel is used for raw HID device INPUT reports. For example, if the built-in keyboard HID descriptor is active then the INPUT report is eight bytes long. If a host sends an OUTPUT report it appears in this channel as a single data packet. It is essential that all INPUT or OUTPUT reports maintain the packet boundaries. Note 4: These channels are used to receive INPUT reports from HIDs and send OUTPUT reports when the module configures as an HID host. The size and format of the reports shall be as per the HID descriptor that is active on that channel. Note 5: These channels are used to send and receive data from BLOBs (Binary Long Objects) which are arbitrary length data buffers. If a BLOB does not exist, then the data sent on that channel is silently discarded. The BLOBs are identified by a 0-based index number; to send data to BLOB 0, channel 0x98 is used and 0x99 for BLOB 1. Once data uploads into a BLOB, then CMD_BLOBMANAGE manipulates that data. For example, the BLOB mechanism uploads new HID Device Descriptors into the module. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 59 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.7.6 Host Packet Receive Flowchart As optimal data throughput is the design goal, the format and detail of packets have been constructed appropriately. It is recommended that the host implement the following flowchart, for rapid servicing and flow control of packets. Figure 8-1: Host packet receive flowchart Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 60 CONN-GUIDE-BT740_v0.2 On Packet ReceivePkt[2] & 0x80 ==0Pkt[1] ==0 Yes (Command) No (Data) Yes (Response) No (Event)Len >= 5Len >= 4ProcessDATALen > 2 Yes Yes Yes ProcessRESPONSEProcessEVENTEVT ==UNKNOWN_CMDEnd Yes Module willbe ready to recieve newcommandModule willbe ready to recieve newcommand Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.8 Host Command/Responses This section describes all host commands and confirms in detail what is specified via the CMD_ID/CNF_ID field of all command and confirm packets. The description for each command/confirm below is in the form of a command or confirm packet table and a corresponding response packet table when appropriate. Each command has a unique CMD_ID value in the range 1 to 63 (0x01 to 0x3F). 0 is reserved and confirms a CNF_ID in the range 64 to 127 (0x40 to 0x7F). The actual value of CMD_ID in the Value column is described as [Descriptive_Name] where Descriptive_Name can be found in a C header file which can be obtained on request from Laird. The value of STATUS is similarly defined in a header file which can also be obtained from Laird. The commands are grouped as:
Informational Configuration Connection Inquiry Pairing Miscellaneous They are described in subsequent sub chapters. 8.9 Information Commands This group of commands obtain information about the module. 8.9.1 No Operation This command results in no action other than to convey new FLOW_IN status to the module and get a response packet with the latest status for the FLOW_OUT bits. It is expected that a host uses this packet to poll for a change in the flow bits. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 4 0 Fixed Fixed COMMAND
[CMD_NO_OPERATION]
FLOW_IN
Runtime value Response Packet Offset Field Value Comments 0 LENGTH 5 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 61 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value Comments 1 2 3 4 CHANNEL 0 COMMAND
[CMD_NO_OPERATION]
FLOW_OUT ??
Runtime value STATUS
[OK]
Or [INVALID_LICENSE]
8.9.2 Get Connectable, Discoverable, Security Modes This command gets the current connectable, discoverable, and security modes. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 4 0 Fixed Fixed COMMAND
[CMD_GET_MODES]
FLOW_IN
Runtime value Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 8 0 COMMAND
[CMD_GET_MODES]
FLOW_OUT
Runtime value STATUS OK or INVALID_LICENSE DISCMODE 0..3 Bit 0: 1 for discoverable mode Bit 1: 0 for generic, 1 for limited discovery mode. Bits 4..7: Future use specifying which limited inquiry access code to use. Bit 0: 1 for connectable mode Bit 1: 1 for Auto Accept Channel 62 CONN-GUIDE-BT740_v0.2 6 CONNMODE 0..3 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value Comments 7 SECMODE 12..15 12 = SSP +
IO_CAP_NO_INPUT_NO_OUTPUT 13 = SSP + IO_CAP_DISPLAY_YES_NO 14 = SSP + IO_CAP_KEYBOARD_ONLY 15 = SSP + IO_CAP_DISPLAY_ONLY Note 1: SECMODE is now driven by the Simple Secure Pairing procedure included in and after v.2.1 of the BT specification. Note 2: For SECMODE, the No I/O Capability option is equivalent to the Just Works scenario in SSP. Note 3: When this module interacts with a pre-2.1 device, it is unconditionally forced into legacy pairing mode. Note 4: Laird recommends that the reader become familiar with the SSP concept introduced in all subsequent version of BT (post v2.1). The best introduction is to Google the phrase Bluetooth Simple Secure Pairing. Note 5: Contact Laird for an informal discussion if necessary. 8.9.3 Read Local Bluetooth Address This command reads the Bluetooth address of the module. Command Packet Offset Field Value LENGTH CHANNEL 4 0 COMMAND
[CMD_READ_BLUETOOTH_ADDRESS]
FLOW_IN
Runtime value Comments Fixed Fixed Comments Fixed Fixed Response Packet Offset Field Value LENGTH 11 CHANNEL 0 0 1 2 3 0 1 2 3 4 COMMAND
[CMD_READ_BLUETOOTH_ADDRE SS]
FLOW_OU T
STATUS
[OK]
Runtime value Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 63 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 5..10 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 64 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.9.4 Information This command extracts information from the module, for example version number. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 Fixed Fixed COMMAND
[CMD_INFORMATION]
FLOW_IN
Runtime value INFOTYPE 0..255 Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH 14 CHANNEL 0 Fixed Fixed COMMAND
[CMD_INFORMATION]
FLOW_OUT ??
Runtime value STATUS
[OK]
INFOTYPE 0..255 Echoed from command 6.13 DATA[8]
As per the table below The type of information requested is specified by the INFOTYPE parameter, as per the table below. INFOTYPE = GET_VERSION (0) Offset Field Name Range Comments 0 1 2 3 Format/Firmware/Platform ID 0..255 Bit 7: 1 Bit654: Spare Bit3210: Firmware/Platform ID STACK_MAJOR 0..255 CCL Version number index APP_MAJOR 0..255 Laird Application Version number index DEVELOPER/BRANCH ID 0..255 Bit7654: Developer ID Bit3210: Branch ID 4..5 MSB/LSB of BUILD NUBMER 0..65535 Odd number == engineering Even Number == production 6 Reserved 0..255 Laird private use Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 65 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide INFOTYPE = GET_VERSION (0) Offset Field Name Range Comments 7 TWIG number/SDK ID 0..255 B7654321 : Twig number B1 : Laird private use INFOTYPE = GET_MANUFACTURER (1) Offset Field Name Range Comments 0..7 Manufacturer/Stack information E.g. CSR/CCL Chip manufacturer, null terminated string INFOTYPE = GET_CHIP_INFO (2) Offset Field Name Range Comments 0..7 Chip Designation E.g. BC4-EXT Chip designation, null terminated string INFOTYPE = GET_PHYSICAL_MEDIUM (3) Offset Field Name Range Comments 0 Physical Medium 0 0=Bluetooth 1..7 Reserved 0 INFOTYPE = GET_HARDWARE_PLATFORMID (100, 0x64) Offset Field Name Range Comments 0 1 Hardware ID (msb) 0..255 Hardware ID (lsb) 0..255 2..7 Unused, set to 0s Hardware ID is 0x0100 for the BTM4xx series module. INFOTYPE = MEMORY POOLS (224..239 0xE0..0xEF) Offset Field Name Range Comments 0..1 Pool Block Size E.g. 0004 Size of block 2..3 Available Blocks E.g. 1234 Available and free to use INFOTYPE = CCL STACK TRUNK VERSION (240 0xF0) Offset Field Name Range Comments 6..7 Stack Trunk Version E.g. 1234 Trunk Version of CCL stack Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 66 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide INFOTYPE = CCL STACK BRANCH VERSION (241 0xF1) Offset Field Name Range Comments 6..7 Stack Branch Version E.g. 1234 Branch Version of CCL stack INFOTYPE = CCL STACK VENA VERSION (248 0xF8) Offset Field Name Range Comments 6..7 Stack VENA Version E.g. 1234 VENA Version of CCL stack 8.10 Configuration Commands This group of commands configures the module. 8.10.1 Read S Register Configure the module using 32 bit integer values, which can be stored in non-volatile memory. Valid register numbers are in the range 0 to 255. See the S Registers section for a full list of all registers. The following command reads the current value of the S register REGNO. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 COMMAND
[CMD_READ_SREG]
Fixed Fixed FLOW_IN
Runtime value REGNO 0 to 255 Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH 10 CHANNEL 0 COMMAND
[CMD_READ_SREG]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate REGNO 0 to 255 Echoed from Command Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 67 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value Comments 6..9 REGVAL[]
Register Value REGVAL[0] is the most significant octet. 8.10.2 Write S Register This command writes a new value to the S register REGNO. See the S Registers section for a full list of all registers. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 9 0 Fixed Fixed COMMAND
[CMD_WRITE_SREG]
FLOW_IN
Runtime value REGNO 0 to 255 5..8 REGVAL[]
New Register Value REGVAL[0] is the most significant octet. Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH 10 CHANNEL 0 COMMAND
[CMD_WRITE_SREG]
FLOW_OUT ??
Runtime value STATUS As appropriate REGNO 0 to 255 Echoed from Command 6..9 REGVAL[]
Register Value REGVAL[0] is the most significant octet. 8.10.3 Store S Registers This command saves the current S register values in cache into the non-volatile memory so that they survive a power cycle. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 4 0 Fixed Fixed COMMAND
[CMD_STORE_SREG]
FLOW_IN
Runtime value Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 68 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 Fixed Fixed COMMAND
[CMD_STORE_SREG_]
FLOW_OUT ??
Runtime value STATUS As appropriate 8.10.4 Default S Registers This command forces all S register values in cache to factory defaults. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 4 0 COMMAND
[CMD_ DEFAULT_SREG]
Fixed Fixed FLOW_IN
Runtime value Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 Fixed Fixed COMMAND
[CMD_ DEFAULT_SREG_]
FLOW_OUT ??
Runtime value STATUS As appropriate 8.11 Connection Commands This group of commands manages connections. 8.11.1 Set Connectable Mode This command enables/disables connectable mode and specifies auto accept parameters for channels and muxs. Command Packet Offset Field Value Comments 0 1 2 LENGTH CHANNEL 6 0 COMMAND
[CMD_ CONNECTABLE_MODE]
Fixed Fixed Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 69 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command Packet Offset Field Value 3 4 5 FLOW_IN
ENABLE 0..1, 0xFF ACCEPT Bit mask Response Packet Offset Field Value Comments Runtime value 0 = Disable, 1=Enable 0xFF = Read current mode Bit 0: Set to auto accept channel setup Bit 1..7: Reserved for future use If bit 0 is set then it overrides SReg Comments 14 otherwise that S Register is Fixed consulted Fixed or incoming connections. Runtime value LENGTH CHANNEL 6 0 COMMAND FLOW_OUT ??
[CMD_ CONNECTABLE_MODE]
0 1 2 3 4 5 STATUS As appropriate CURMODE 0..1 0 = Not connectable 1 = Connectable 8.11.2 Service Incoming Connection When the module is in connectable mode, incoming connection requests pass to the host via an EVT_CONNECTION_SETUP message if and only if autoaccept is not enabled (via command or S register 14). The host accepts or rejects the remote connection request using this message. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH 12 CHANNEL 0 COMMAND FLOW_IN
[CMD_ CONNECTION_SETUP]
Fixed Fixed Runtime value 4..9 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr 10 11 HANDLE ACCEPT 0..255 Can be any value the host 0..1 wants to set. This value is echoed by the module in the response. 0 = reject. 1..255 = accept Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 6 0 COMMAND FLOW_OUT ??
[CMD_ CONNECTION_SETUP]
Fixed Fixed Runtime value STATUS As appropriate HANDLE 0..255 Echoed from the command Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 70 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Receipt of the response is not an indication that the connection has established. If the connection is to be accepted, the module sends EVT_INCOMING_CONNECTION when the connection is fully established, as shown in the message sequence chart below. Figure 8-2: Service Incoming Connection sequence diagram Note:
If auto accept was specified when the module was put into connectable mode, then for incoming connections there is only an EVT_INCOMING_CONNECTION message. Figure 8-3: Service Incoming Connection with auto accept specified 8.11.3 Make Outgoing Connection This command makes an outgoing connection to a profile in the remote peer. Command Packet Offset Field Value Comments 0 1 2 3 4 5..10 13 LENGTH 13 CHANNEL 0 Fixed Fixed COMMAND
[CMD_ MAKE_CONNECTION]
FLOW_IN
Runtime value HANDLE 0..255 Can be any value the host BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5]
wants to set. 0x1101(SPP) 0x1124(HID) 0 RFU 11..12 UUID[]
This value is echoed by the module in the response. Bluetooth address Uuid of the profile to connect to. Offset 11 is the MSB. Always set to zero 71 CONN-GUIDE-BT740_v0.2 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless HOSTMODULERSP_CONNECTION_SETUP (handle)CMD_CONNECTION_SETUP (bdaddr,accept,handle)EVT_CONNECTION_SETUP (bdaddr)Connection EstablishedIncoming connectionEVT_INCOMING_CONNECTION(channelid, bdaddr, uuid)Connection EstablishedEVT_INCOMING_CONNECTION(channelid, bdaddr, uuid)Incoming connectionHOSTMODULE Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value Comments 0 1 2 3 4 5 6 LENGTH CHANNEL 7 0 COMMAND FLOW_OUT ??
[CMD_ MAKE_CONNECTION]
Fixed Fixed Runtime value STATUS As appropriate HANDLE 0..255 Echoed from the command CHANNEL 1..7 (SPP) 0x20,0x9x,0xA0 (HID DEVICE) Channel ID to be used for subsequent SPP data packets, and also when dropping the connection If the STATUS field in the response is MPSTATUS_OK, then a connection successfully established. Any other value is a failure. The content of S register 11 specifies the max frame size to be used by the lower layers. Figure 8-4: Make Outgoing Connection sequence diagram When at least one connection is active (regardless of profile), the DCD output pin asserts. 8.11.4 Drop Connection This command destroys an existing channel. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 6 0 COMMAND
[CMD_ DROP_CONNECTION]
Fixed Fixed FLOW_IN
Runtime value HANDLE 0..255 Can be any value the host wants to set. This value is echoed by the module in the response. 5 CHANNEL 1..7, As appropriate for other profiles As was specified in either RSP_MAKE_CONNECTION or Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 72 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command Packet Offset Field Value Comments EVT_INCOMMING_CONNECTION Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 0 COMMAND
[CMD_ DROP_CONNECTION]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate HANDLE 0..255 Echoed from the command If the STATUS field in the response is MPSTATUS_OK, then the request to drop the channel successfully submitted to the lower layers of the stack. When the channel drops, an EVT_DISCONNECT event sends to the host. When at least one connection is active (regardless of profile) the DCD output pin remains asserted. Figure 8-5: Drop Connection sequence diagram 8.12 Set Modem Lines Bluetooth Serial Port Profile is capable of exchanging modem signals DTR, DSR, RTS, CTS, DCD, and RI over air. From a hosts perspective, it can have DTR, RTS, DCD and RI as output lines. Note: DCD and RI are outputs for modems and host in this context can mean either a PC or a peripheral like a modem. Additionally UARTs are capable of sending BREAK signals. BREAK output signals are non-idle state TX pins for a period much greater than the character width at the current baud rate setting. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 73 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide This command sends DTR, RTS, DCD, and RI states to the peer device and also to specify a BREAK Future Feature. Command Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 7 0 COMMAND
[CMD_ CONTROLMODEMLINES]
Fixed Fixed FLOW_IN
CHANNEL 1..7 MODEM Bit Mask Runtime value Channel ID of an open channel Bit 0: DTR state Bit 1: RTS state Bit 2: DCD state Bit 3: RI state Bits 4 .. 7 : Ignored Not Available 6 BREAK 0 Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 6 0 COMMAND
[CMD_ CONTROLMODEMLINES]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate CHANNEL 1..7 Echoed from command The STATUS value is MPSTATUS_OK if the message succeeded. Modem signals sent by the peer device present to the host in the message EVT_MODEM_STATUS defined in subsequent chapters. Note: BREAK signal capability is currently not provided by the lower stack, and so it is mentioned in the context of this command message for future implementation. 8.12.1 RSSI and Link Quality This command obtains the RSSI and Link Quality values for a given open connection. This is a parameter associated with the ACL connection to a peer device and does not have any meaning with channel IDs. Command Packet Offset Field Value 0 1 LENGTH 10 CHANNEL 0 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Comments Fixed Fixed 74 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command Packet Offset Field Value Comments 2 3 COMMAND
[CMD_RSSI_LINKQUAL]
FLOW_IN
Runtime value 4..9 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 0 Fixed Fixed COMMAND
[CMD_RSSI_LINKQUAL]
FLOW_OUT ??
Runtime value STATUS As appropriate 5..10 BDADDR[]
Nap[0,1]:Uap[2]:Lap[3,4,5] Bluetooth addr 11 RSSI
-128 to 127 RSSI value. Is zero if the signal is within the golden range 12 LINKQUAL 0 255 The definitions of RSSI and LINKQUAL are paraphrased from the Bluetooth specification as follows:
8.12.1.1 RSSI This value is the difference between the measured Received Signal Strength Indication (RSSI) and the limits of the Golden Receive Power Range (see Golden Receive Power Range). Any positive RSSI value returned by the Host Controller indicates how many dB the RSSI is above the upper limit; any negative value indicates how many dB the RSSI is below the lower limit. A value of zero indicates that the RSSI is inside the Golden Receive Power Range. Note: How accurate the dB values are depends on the Bluetooth hardware. The only requirements for the hardware are that the Bluetooth device is able to tell whether the RSSI is inside, above or below the Golden Device Power Range. 8.12.1.2 Golden Receive Power Range The lower threshold level of the golden receive power range corresponds to a received power between -
56 dBm and 6 dB above the actual sensitivity of the receiver. The upper threshold level is 20 dB above the lower threshold level to an accuracy of +/- 6 dB. 8.12.1.3 Link Quality Link_Quality is a value from 0-255, which represents the quality of the link between two Bluetooth devices. The higher the value, the better the link quality. Each Bluetooth module vendor determines how to measure the link quality. In the case of CSR, this value is a measure of BER (Bit Error Rate). Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 75 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.13 Get Open Channel List This command obtains a list of channel IDs corresponding to connections which are open. It is a good method of querying the module to see how many Bluetooth connections are established and their corresponding channel ID numbers. A host should not need to use this command as it should be keeping track of the following two events and responses: EVT_DISCONNECT, EVT_CONNECTION_SETUP, RSP_MAKE_CONNECTION. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL COMMAND 10 0 Fixed Fixed
[CMD_CHANNEL_LIST
FLOW_IN
Runtime value Response Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 22 0 Fixed Fixed COMMAND
[CMD_CHANNEL_LIST]
FLOW_OUT
Runtime value STATUS Count 0..N As appropriate 6..21 Channel ID Array of 16 bytes List[16]
Number of connections which have been established A nonzero value implies a connection exists and the array element value identifies the channel ID 8.14 Inquiry Commands This group of commands performs inquiries and puts the module into discoverable mode. 8.14.1 Inquiry Request This command performs a Bluetooth inquiry. Command Packet Offset Field Value Comments 0 1 2 LENGTH CHANNEL 6 0 Fixed Fixed COMMAND
[CMD_INQUIRY_REQ]
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 76 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command Packet Offset Field Value 3 4 5 6 FLOW_IN
MAXRESP 1..255 TIMEOUT 1..120 FLAGS 0..1 Response Packet Comments Runtime value Maximum number of responses before aborting the inquiry procedure Time in seconds, before aborting the inquiry procedure. Bit 0 : 1 To allow repeat addresses. Bits 1..6 Reserved for future Bit 7 : Get Enhanced Inquiry responses Offset Field Value Comments 0 1 2 3 4 5 6 LENGTH CHANNEL 7 0 Fixed Fixed COMMAND
[CMD_INQUIRY_REQ]
FLOW_OUT ??
Runtime value STATUS As appropriate TOTAL DUMP
The total number of inquiry responses that were received from peers. The total number of inquiry result events that were not sent because the transmit buffer of the module was full. This is a result of the host deasserting its RTS line. As a result of this command, as and when peer devices respond with inquiry responses, for each inquiry response, if bit 7 of the FLAGS field is zero then an event EVT_INQUIRY_RESULT sends to the host. If bit 7 of FLAGS field is one then, given that enhanced inquiry data has variable length data for any given response, the entire inquiry response sends via data channel 0xF0 to the host, with format described in subsections below. When the number of command-specified inquiry responses are received OR the specified time has elapsed, the final response is sent to indicate to the host that the inquiry procedure is complete. If the DUMP field in the response is non-zero, it is indicating that the host is not reading its receive buffer fast enough and is resulting in RTS deasserting towards the module. FLAGS bit 1-4 in future are to specify a limited access code inquiry. See message sequence diagram (Figure 8-6) which illustrates that the RSP_INQUIRY_REQ message terminates the inquiry process. 8.14.2 Enhanced Inquiry Data Packet Format When enhanced inquiry responses are requested via FLAGS bit 7 being set, each inquiry response sends to the host in data channel 0xF0 and the packet is formatted as follows:
LL F0 AAAAAAAAAAAA CCCCCC RR EE.EE Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 77 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Where::
LL is the total length of the packet, and given only the EE..EE field is of variable length, the length of the EE..EE field is calculated by subtracting 12 (decimal) from LL. F0 is the channel number and is fixed AAAAAAAAAAAA is a 6 byte field containing the Bluetooth address of the responding device. CCCCCC is the device class code of the responding device RR is the measured RSSI value for that response (8 bit signed integer) EE..EE is a variable length field, with a maximum of 240 bytes, containing the enhanced inquiry data which is formatted as multiple len/tag/data structures as specified in the Bluetooth specification. Where both len and tag fields are single bytes and len does not include itself. Any data passed from the baseband must match the format defined in the Bluetooth Specification Version 2.1 + EDR [1], vol3, Part C Generic Access Profile, 8 Extended Inquiry Response Data Format (page 1305 in the *.pdf file). A typical message sequence is as follows:
Figure 8-6: Typical message sequence 8.14.3 Set Discoverable Mode This command enables/disables discoverable mode. Command Packet Offset Field Value LENGTH CHANNEL 5 0 0 1 2 COMMAND
[CMD_ DISCOVERABLE_MODE]
Comments Fixed Fixed Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 78 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 3 4 FLOW_IN
MODE 0..1, 0xFF Response Packet Offset Field Value LENGTH CHANNEL 6 0 0 1 2 3 4 5 Runtime value 0 = Disable, 1 = Generic Access Code 0xFF = Read current mode Comments Fixed Fixed COMMAND
[CMD_ DISCOVERABLE_MODE]
FLOW_OUT ??
Runtime value STATUS As appropriate CURMODE 0..1 1 = Generic Access Code The module uses the parameters stored in S Registers 7 and 8 to set the inquiry scan interval and window. Inquiry scan is how often (interval) the radio listens for an inquirer and for how long (window) each time. 8.15 Pairing Commands This group of commands manages either incoming or outgoing pairings and the trusted device database which resides in the non-volatile memory of the module. The trusted device database is a database with a two tables, each with records of two fields. One field is the Bluetooth address of a paired device and the other stores the 16 byte link key. One database is classed a ROLLING database and stores new pairing information as they happen. If the database is full, then the oldest is discarded to make space for the latest one. The other database is classed as a PERSISTANT database which stores pairing information which can ONLY be deleted when a new pairing initiates to that particular device OR on request from the host. The host protocol provides for a command to transfer a record between these two databases. In addition there is a command for the host to determine if a device is trusted. There is also a command to manually insert a device and its link key into the database. Depending on the peer device, either a legacy pairing procedure or a simple secure pairing occurs. A legacy pairing occurs if the peer device is older than v2.1 of the Bluetooth specification. Simple Secure Pairing (for v2.1 and newer devices) uses a Diffie-Hellman procedure to exchange the secret link key, but is vulnerable to man-in-the-middle attack. When pairing initiates and a legacy 2.0 or older device is not involved, then the basebands perform an I/O capability negotiation with each other to see whether it shall perform a Just Works unathenticated pairing with no man-in-the-middle (MITM) protection or an authenticated pairing which requires user interaction. The I/O capability is one of:
Display Only Keyboard Only Display with Yes/No button Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 79 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide For example:
If one end has Display only, but the other end has keyboard only, then the negotiation results in one end displaying a six digit passcode on the Display Only side, which is then required to be entered at the keyboard only end. If both ends have Display with Yes/No, then during the procedure both ends display a six digit passcode which needs to be visually compared and then the Yes/No buttons are used to confirm that they match. This provides for a one in a million probability that a MITM attach is successful. To enable this new interaction with a user during pairing a new EVT_SIMPLE_PAIRING was defined. 8.15.1 Pair Initiate This command initiates a pairing with a peer device which is assumed to be ready and waiting for a pairing. If that device is compliant with v2.0 and older of the Bluetooth specification then a legacy pairing results and the pincode pin[] in this message is used otherwise there is a simple pairing procedure. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH 28 CHANNEL 0 Fixed Fixed COMMAND
[CMD_ PAIR_INITIATE]
FLOW_IN
TIMEOUT 5..120 Runtime value Pairing timeout in seconds 5..10 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5] Bluetooth addr of device to be paired 11..27 PIN[]
17 byte string array Null Terminated Pin code String. Maximum pin code length is 16. Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 Fixed Fixed COMMAND
[CMD_ PAIR_INITIATE]
FLOW_OUT ??
Runtime value STATUS As appropriate If pairing is successful, the event message EVT_LINK_KEY or EVT_LINK_KEY_EX sends to the host before the response to close the procedure, as shown in the message sequence chart below. Pair Initiate may fail if there are any existing open connections. The status byte in the response will have an appropriate value. 8.15.1.1 Simple Secure Pairing Just Works The message sequence diagram for Just Works when the device has specified no I/O capability is as follows:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 80 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 8-7: Just Works sequence diagram The EVT_SIMPLE_PAIRING displays a success/fail indication. If it fails, then the EVT_LINK_KEY event does not send to the host. 8.15.1.2 Simple Secure Pairing Display Yes/No The message sequence diagram for when the device has display and yes/no capability is as follows:
Figure 8-8: Display Yes/No capability sequence diagram The first EVT_SIMPLE_PAIRING contains a passcode that needs to be confirmed by the host. To confirm the passcode, the host sends a CNF_SIMPLE_PAIRING packet which has a passcode value of 00000001; to reject it, uses a value of 00000000. If pairing is successful, another EVT_SIMPLE_PAIRING with a success value is sent and then a EVT_LINK_KEY event is sent to the host; if not the second EVT_SIMPLE_PAIRING displays a 00000000 value. 8.15.1.1 Simple Secure Pairing Display Only The message sequence diagram for when the device has display only capability is as follows:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 81 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 8-9: Display Only sequence diagram The first EVT_SIMPLE_PAIRING contains the passcode which must be displayed. When the peer confirms the passcode or otherwise, a second EVT_SIMPLE_PAIRING is sent to the host with an appropriate success/fail code. If pairing is successful, EVT_LINK_KEY is sent to the host; if not RSP_PAIR_INITIATE indicates a non-ok status code. 8.15.1.2 Simple Secure Pairing Keyboard Only The message sequence diagram for when the device has keyboard only capability is as follows:
Figure 8-10: Keyboard Only sequence diagram The first EVT_SIMPLE_PAIRING indicates that a simple pairing procedure has started; at that point the host responds with a confirm packet which contains the passcode that was visually obtained from the peer device (or both peers decided to use the same code). When the peer confirms the pairing a second EVT_SIMPLE_PAIRING is sent to the host with an appropriate success/fail code. If pairing is successful, EVT_LINK_KEY is sent to the host; if not, RSP_PAIR_INITIATE indicates a non-
ok status code. 8.15.2 Incoming Pairing Procedure As long as the module is in connectable mode (see CMD_CONNECTABLE_MODE) it can accept pairing from peers. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 82 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide In that situation, when a pairing procedure is detected, a pincode request event packet is sent to the host and the host responds with a CMD_PINCODE or CNF_PINCODE command as shown in the message sequence diagram below (Figure 8-11). It responds with CNF_PINCODE if it is in the middle of making a connection and a response for make connection is still pending. If the host does not send a pincode command, then the peer that initiated the pairing eventually timeouts. 8.15.1.3 Legacy Pairing The message sequence diagram for incoming legacy pairing is as follows:
Figure 8-11: Legacy Pairing sequence diagram 8.15.1.4 Simple Secure Pairing Just Works The message sequence diagram for Just Works when the device has specified no I/O capability is as follows:
Figure 8-12: Just Works with no I/O capability sequence diagram The EVT_SIMPLE_PAIRING displays a success indication. 8.15.1.5 Simple Secure Pairing Display Yes/No The message sequence diagram for when the device has display and yes/no capability is as follows:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 83 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 8-13: SSP, Display Yes/No sequence diagram The first EVT_SIMPLE_PAIRING contains a passcode that must be confirmed by the host. To confirm the passcode, the host sends a CNF_SIMPLE_PAIRING packet which echoes the passcode. To reject it, the host uses any non-matching value. If pairing is successful, another EVT_SIMPLE_PAIRING with a success value is sent and then a EVT_LINK_KEY event is sent to the host, if not the second EVT_SIMPLE_PAIRING displays a 00000000 value. 8.15.1.6 Simple Secure Pairing Display Only The message sequence diagram for when the device has display only capability is as follows:
Figure 8-14: SSP, Display Only sequence diagram The first EVT_SIMPLE_PAIRING contains the passcode which must display. When the peer confirms the passcode or otherwise a second EVT_SIMPLE_PAIRING is sent to the host with an appropriate success/fail code. If pairing is successful, EVT_LINK_KEY is sent to the host; if not RSP_PAIR_INITIATE indicates a non-ok status code. 8.15.1.7 Simple Secure Pairing Keyboard Only The message sequence diagram for when the device has keyboard only capability is as follows:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 84 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 8-15: SSP, Keyboard Only sequence diagram The first EVT_SIMPLE_PAIRING indicates that a simple pairing procedure started and at that point the host responds with a confirm packet which contains the passcode that was visually obtained from the peer device (or both peers decided to use the same code). When the peer confirms the pairing, a second EVT_SIMPLE_PAIRING is sent to the host with an appropriate success/fail code. If pairing is successful, EVT_LINK_KEY is sent to the host; if not RSP_PAIR_INITIATE indicates a non-ok status code 8.15.3 SIMPLE PAIRING Confirmation This confirmation packet provides a response to the module as a result of a EVT_SIMPLE_PAIRING event and conveys to the module additional information required to complete a simple pairing procedure. This is a confirmation packet and does not result in a response from the module. Event Packet Offset Field Value Comments 0 1 2 3 4..9 10 LENGTH CHANNEL EVENT FLOW_OUT BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
15 0
[CNF_ SIMPLE_PAIRING]
action 2..3 Runtime value Bluetooth address of pairing device See description below 11..14 actionval 4 bytes See description below Action :: 0 & 1 This is illegal and is ignored by the module. Action :: 2 This informs the module the response to a YES/NO query. Set actionval to 00000000 for NO and non-
00000000 for YES. Action :: 3 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 85 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide This informs the module the response to a passcode query. In this case the actionval conveys the passcode value. Note: A successful connection to an unpaired 2.1 and newer device requires this confirmation packet because the MP protocol does not process new commands unless the previous command was completed by sending an appropriate response packet. The packet processor in the module queues all commands until a response sends, but processes confirmation packets as they come. 8.15.4 PinCode (Command) This command sends a pincode in response to an EVT_PINCODE_REQUEST message and results in a RSP_PINCODE from the module to the host. This command can also register a pincode for all subsequent incoming legacy pairings from BT2.0 and older devices. In that case the BDADDR[] field MUST be set to all zeros. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH 28 CHANNEL 0 Fixed Fixed COMMAND
[CMD_PINCODE]
FLOW_IN
TIMEOUT 5..120 Runtime value Pairing timeout in seconds 5..10 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5] Bluetooth address of device requesting the 11..27 PIN[]
17 byte string array Response Packet pairing. Or all zeros to register a pincode for incoming pairings Null Terminated Pin code String. Maximum pin code length is 16. Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 COMMAND
[CMD_PINCODE]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate If pairing is successful the event message EVT_LINK_KEY or EVT_LINK_KEY_EX sends to the host after the response. The latter event sends if S Register 47 is set to 1. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 86 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.15.5 PinCode (Confirmation) This is a confirmation packet which sends a pincode in response to an EVT_PINCODE_REQUEST message while making an outgoing connection to a legacy pairing device and there was a pairing challenge by the peer prior to connection acceptance. This packet, just like the command version of this packet, can also register a pincode for all subsequent incoming legacy pairings from BT2.0 and older devices. In that case the BDADDR[] field MUST be set to all zeros. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH 28 CHANNEL 0 COMMAND
[CNF_PINCODE]
FLOW_IN
TIMEOUT 5..120 Fixed Fixed Runtime value Pairing timeout in seconds 5..10 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5] Bluetooth address of device requesting the 11..27 PIN[]
17 byte string array pairing. Or all zeros to register a pincode for incoming pairings Null Terminated Pin code String. Maximum pin code length is 16. If pairing is successful, the event message EVT_LINK_KEY or EVT_LINK_KEY_EX is sent to the host after the response. The latter event sends if S Register 47 is set to one. Note: A successful connection to an unpaired 2.0 and newer device requires this confirmation packet because the MP protocol does not process new commands unless the previous command was completed by sending an appropriate response packet. The packet processor in the module queues all commands until a response sends, but processes confirmation packets as they come hence in this case CMD_PINCODE does not work. 8.15.6 Trusted Database Record Count This command obtains the number of trusted devices in the database specified. Comments Fixed Fixed Command Packet Offset Field Value LENGTH CHANNEL 5 0 0 1 2 3 4 COMMAND
[CMD_ TRUSTED_DB_COUNT]
FLOW_IN
DBTYPE 0..1 Runtime value 0 = ROLLING DATABASE 1 = PERSISTANT DATABASE Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 87 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value Comments 0 1 2 3 4 5 6 7 LENGTH CHANNEL 8 0 COMMAND
[CMD_ TRUSTED_DB_COUNT]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate DBTYPE COUNT 0..1 0..N MAXCOUNT 0..N Echoed from command Number of trusted devices in this database Maximum number of devices that can be stored in this database Note: ROLLING database stores all new pairings automatically. It is up to the host to transfer a record from ROLLING to the PERSISTANT database so that it does not get overwritten. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 88 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.15.7 Trusted Database Read Record This command reads the Bluetooth address of the ITEMNO pairing in the database specified, counted from the top. ITEMNO is indexed from one. COMMAND
[CMD_TRUSTED_DB_READ]
Command Packet Offset Field Value LENGTH CHANNEL 6 0 FLOW_IN
DBTYPE 0..1 5 ITEMNO 1..N Response Packet Offset Field Value LENGTH 13 CHANNEL 0 Comments Fixed Fixed Runtime value 0 = ROLLING DATABASE 1 = PERSISTANT DATABASE Item number to read Comments Fixed Fixed COMMAND
[CMD_TRUSTED_DB_READ]
FLOW_OUT ??
Runtime value STATUS As appropriate DBTYPE ITEMNO 0..1 1..N 7..12 BDADDR[]
Nap[0,1]:Uap[2]:Lap[3,4,5]
Echoed from command Echoed from command Bluetooth addr is all zeros if the item specified does not exist If S Reg 47 is set to one, then it is possible to read a record so that both the address and link key information is supplied by sending the command CMD_ TRUSTED_DB_ISTRUSTED. In that case, the event EVT_LINK_KEY_EX is sent before the response to CMD_TRUSTED_DB_ISTRUSTED. 8.15.8 Trusted Database Delete Record This command deletes a pairing from the databases. It is not necessary to specify the database type, as both databases are scanned. Command Packet Offset Field Value LENGTH 10 CHANNEL 0 Comments Fixed Fixed COMMAND
[CMD_ TRUSTED_DB_DELETE]
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 89 CONN-GUIDE-BT740_v0.2 0 1 2 3 4 0 1 2 3 4 5 6 0 1 2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command Packet Offset Field Value 3 FLOW_IN
4..9 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5]
Response Packet Offset Field Value LENGTH 11 CHANNEL 0 Comments Runtime value Bluetooth addr of device to be unpaired Comments Fixed Fixed COMMAND
[CMD_ TRUSTED_DB_DELETE]
FLOW_OUT ??
Runtime value STATUS As appropriate 5..10 BDADDR[]
Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr, echoed from the command 8.15.9 Trusted Database Change Type This command transfers a record to the database specified. Command Packet Offset Field Value LENGTH 11 CHANNEL 0 COMMAND
[CMD_TRUSTED_DB_CHANGETYPE]
FLOW_IN
DBTYPE 0..1 Runtime value 5..10 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr Comments Fixed Fixed Comments Fixed Fixed Response Packet Offset Field Value LENGTH 12 CHANNEL 0 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 5 COMMAND
[CMD_TRUSTED_DB_CHANGETYPE]
FLOW_OUT ??
Runtime value STATUS As appropriate DBTYPE 0..1 6..11 BDADDR[]
Nap[0,1]:Uap[2]:Lap[3,4,5]
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Echoed from command Bluetooth addr, echoed from the command 90 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.15.10 Trusted Database Is Peer Trusted This command checks if a device is trusted. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH 10 CHANNEL 0 COMMAND
[CMD_ TRUSTED_DB_ISTRUSTED]
Fixed Fixed FLOW_IN
Runtime value 4..9 BDADDR[] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH 11 CHANNEL 0 COMMAND
[CMD_ TRUSTED_DB_ISTRUSTED]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate 5..10 BDADDR[]
Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr, echoed from the command The STATUS value is MPSTATUS_OK if the device is trusted; any other value means not trusted. If S Reg 47 is set to one, then if the peer device is found in the trusted device database, then the event EVT_LINK_KEY_EX is sent to the host BEFORE the response. That event contains the address and link key associated with that address. 8.15.11 Trusted Database Add Key (Out-Of-Band Facilitator) This command manually adds a link key/address pair into the rolling trusted database. The module does not care how the key was generated and the only validation it performs is to check that it is 16 bytes long. Command Packet Offset Field Value LENGTH 1E CHANNEL 0 0 1 2 3 Comments Fixed Fixed COMMAND
[CMD_ TRUSTED_DB_ADD]
FLOW_IN
Runtime value 4..9 BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 91 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command Packet Offset Field Value Comments 10..25 KEY[16]
16 byte Link Key Any random value 26..29 FLAGS[4]
00 00 00 00 For future use and MUST be set to 00000000 Response Packet Offset Field Value LENGTH 11 CHANNEL 0 0 1 2 3 4 Comments Fixed Fixed COMMAND
[CMD_ TRUSTED_DB_ADD]
FLOW_OUT ??
Runtime value STATUS As appropriate The STATUS value is MPSTATUS_OK if the device was successfully added to the database. If the device Bluetooth address is already in the trusted device database, then the old one is deleted and is replaced by this new one. 8.16 Miscellaneous Commands 8.16.1 Get Security Mode This command gets the current security mode of the module. Bluetooth v2.1 and newer devices cannot disable security therefore only values 12 to 15 inclusive are valid. These values specify Simple Secure Pairing with appropriate I/O capabilities. Specifying a value of 0xFF means leave the mode as it is, but inform the host with regards to current mode. Comments Fixed Fixed Command Packet Offset Field Value LENGTH CHANNEL 5 0 0 1 2 3 4 COMMAND
[CMD_SECURITY_MODE]
FLOW_IN
SECMODE 0xFF Runtime value 0xFF = Get current mode Response Packet Offset Field Value 0 1 LENGTH CHANNEL 6 0 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Comments Fixed Fixed 92 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value Comments 2 3 4 5 COMMAND
[CMD_SECURITY_MODE]
FLOW_OUT ??
Runtime value STATUS As appropriate SECMODE 12..15 Current mode 12 = SSP with no input no output 13 = SSP with yes/no display 14 = SSP with keyboard only 15 = SSP with Display only 1. SECMODE is now driven by the Simple Secure Pairing procedure which got included in and after v2.1 of the Bluetooth specification 2. For SECMODE the No I/O capability option is equivalent to Just works scenario in Simple Secure pairing. 3. When this module interacts with a pre 2.1 device it is unconditionally forced into legacy pairing mode. 4. The reader should become familiar with the Simple Secure Pairing concept introduced in and all subsequent version of Bluetooth after v2.1. The best introduction is to Google the phrase Bluetooth Simple Secure Pairing. 5. The reader is also welcome to contact Laird for an informal discussion. 8.16.2 Get Remote Friendly Name This command gets the friendly name of the specified peer device. According to the Bluetooth specification, a friendly name can be up to 248 bytes long. Sending this name in its entirety to the host could violate the max packet length capability of the host because memory restrictions in the host or transmit buffers in the module may not be able to cope. Therefore, the mechanism for getting the name to the host is via multiple event packets is EVT_REM_FNAME. The host decides how many bytes of the name are passed up to it via these events from the offset it also specifies. This implies that in a memory constraint environment, it is possible to relay the name to the host using multiple commands. For example, if the host has space for only 10 bytes and a peer happens to have a very long name, the host can ask for 10 byte fragments of the name over multiple get name requests. Command Packet Offset Field Value LENGTH 13 CHANNEL 0 0 1 2 3 Comments Fixed Fixed COMMAND
[CMD_GET_REM_FNAME]
FLOW_IN
Runtime value 4..9 BDADDR[]
Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth addr 10 11 TIMEOUT 2..120 START N 12 MAXBYTES M Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Timeout in seconds Offset into the friendly name string Maximum number of 93 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Response Packet Offset Field Value LENGTH CHANNEL 8 0 characters to read Comments Fixed Fixed 0 1 2 3 4 5 6 7 COMMAND
[CMD_GET_REM_FNAME]
FLOW_OUT ??
Runtime value STATUS As appropriate NAMELEN 0..248 START SENTLEN N S Actual size of the friendly name Echoed from the command Total number of bytes sent Note: SENTLEN could be less than MAXBYTES. It can happen if there is no space in the modules TX buffer to send events. Figure 8-16: Get Remote Friendly Name sequence diagram 8.16.3 Get Local Friendly Name This command reads the local friendly name which stores in non-volatile memory. Unlike the remote friendly name where there is no control over the maximum length, the local friendly name is limited to 31 characters. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 94 CONN-GUIDE-BT740_v0.2 HOSTMODULEReq Friendly NameEVT_REM_FNAME (index=0,len=10,"?????")CMD_REM_FNAME (bdaddr, timeout, start=0, maxbytes=25)EVT_REM_FNAME (index=10,len=10,"?????")EVT_REM_FNAME (index=20,len=5,"?????")Got Friendly Name (47 bytes)CMD_REM_FNAME (namelen=47,start=0,sent=25)CMD_REM_FNAME (bdaddr, timeout, start=25, maxbytes=22)Req Friendly NameGot Friendly Name (47 bytes)EVT_REM_FNAME (index=25,len=10,"?????")EVT_REM_FNAME (index=35,len=10,"?????")EVT_REM_FNAME (index=45,len=2,"?????")CMD_REM_FNAME (namelen=47,start=25,sent=22) Command Packet Offset Field Value LENGTH CHANNEL 6 0 FLOW_IN START
n MAXBYTES m Response Packet Offset Field Value LENGTH CHANNEL 0 0 1 2 3 4 5 0 1 2 3 4 5 6 7 Enhanced Class 1 Bluetooth v2.1 Module Users Guide This length may still be too big to send to the host in one packet. Therefore the name sends in a similar fashion to get friendly name described above. However, in this case, the event EVT_LCL_FNAME gets the name to the host. COMMAND
[CMD_GET_LCL_FNAME]
Comments Fixed Fixed Runtime value Offset into the friendly name string Maximum number of characters to read Comments Fixed Fixed COMMAND
[CMD_GET_LCL_FNAME]
FLOW_OUT ??
Runtime value STATUS As appropriate NAMELEN 0..31 START SENTLEN n S Actual size of the friendly name Echoed from the command Total number of bytes sent in preceding events. The name string sends to the host in EVT_LCL_FNAME packets. See description of Get Remote Friendly name Note: SENTLEN could be less than MAXBYTES. It can happen if there is no space in the modules TX buffer to send events. 8.16.4 Set Local Friendly Name This command sets the local friendly name in non-volatile memory so that it is used after a power up/reset cycle. Since the module can cope with large packets, the name sent to the module in a single command packet as a null terminated string. Command Packet Offset Field Value Comments Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 95 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH 37 CHANNEL 0 Fixed Fixed COMMAND
[CMD_SET_LCL_FNAME]
FLOW_IN
Runtime value FLAGS 1..2 1 = Write to non-vol store for use on next power up 2 = Make the name visible now 5 NAMELEN 1..30 6..36 NAME[31]
Null terminated string Not more than 30 characters Response Packet Offset Field Value LENGTH CHANNEL 5 0 0 1 2 3 4 COMMAND
[CMD_SET_LCL_FNAME]
FLOW_OUT ??
Runtime value STATUS As appropriate Comments Fixed Fixed 8.16.5 Set Device Class This command sets the device class code so that the base band makes it visible immediately. This is opposed to setting it via S Register 120 which only expedites on power up. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 7 0 Fixed Fixed COMMAND
[CMD_SET_DEVCLASS]
FLOW_IN
Runtime value 4..6 DEVCLASS[3]
New 24 bit device class MSB of device class is at offset 4 Response Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 0 COMMAND
[CMD_SET_DEVCLASS]
Fixed Fixed FLOW_OUT ??
Runtime value Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 96 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 4 STATUS As appropriate Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 97 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.16.6 Factory Default This command clears non-volatile memory in the module so that it reverts to factory default state. The FLAGS field is a bit mask which selectively clears various types of non-volatile memory and should be set to FF. Command Packet Offset Field Value Comments 0 1 2 3 5 LENGTH CHANNEL 5 0 Fixed Fixed COMMAND
[CMD_FACTORYDEFAULT]
FLOW_IN
FLAGS 8 bit mask Runtime value See notes below 0xFF to delete all groups, present and future Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 0 Fixed Fixed COMMAND
[CMD_FACTORYDEFAULT]
FLOW_OUT ??
Runtime value STATUS As appropriate Note: Non-volatile information in the module is divided into various subgroups and the FLAGS bits allow selective resetting to factory state for those subgroups. The bits are allocated as follows:
Bit 0 : S registers Bit 1 : Local Friendly Name Bit 2 : HID Device Descriptos Bit 3 : Reserved Always set to 1 Bit 4 : Reserved Always set to 1 Bit 5 : Reserved Always set to 1 Bit 6 : Link Keys Bit 7 : Special S registers (240 to 255 in the multipoint space) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 98 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.16.7 Get Digital/Analog I/O This command reads the states of up to 16 digital input lines and optionally requests an analogue input reading. This response packet contains two octets containing the digital input states. If an analogue input reading is requested then the ADC reading is supplied in an EVENT_ADC event. Command Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 6 0 COMMAND
[CMD_GET_IO]
FLOW_IN
digId analogId 0 0 Fixed Fixed Runtime value 0 = Digital I/o in Module 0 = No ADC access 1..255 = FUTURE USE See Note 1 Response Packet Offset Field Value Comments LENGTH CHANNEL 0 COMMAND
[CMD_GET_IO]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate 0 1 2 3 4 5 digId 6..7 digIn[2]
0
Echoed from command packet Digital inputs 0 to 15. Bit 15 is bit 7 in the MSB. See Note 2 Note 1:
If the analogID field in the command is non-zero, and EVENT_ADC generates when the ADC is read and available. Note 2: Bit 0 corresponds to GPIO0, Bit 1 corresponds to GPIO1, etc. Refer to the modules data sheet to check which GPIO pins are available for use. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 99 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.16.8 Set Digital I/O This command controls the states of up to 16 digital output lines. Command Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 6 0 COMMAND
[CMD_SET_IO_EX]
FLOW_IN
ioId 0 5..6 mask[2]
0000..FFFF 7..8 ioVal[2]
0000..FFFF Response Packet Fixed Fixed Runtime value 0 = Digital I/o in Module Only set bits are specify which bits in ioVal submit to the digital I/O See Note 1 Only the bits set in mask update at the output See Note 1 Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 0 COMMAND
[CMD_SET_IO]
Fixed Fixed FLOW_OUT ??
Runtime value STATUS As appropriate 1. Bit 0 corresponds to GPIO0, Bit 1 to GPIO1 etc. Please refer to the modules data sheet to check which GPIO pins are available for use. 8.16.9 Reset This command resets the module. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 7 0 COMMAND
[CMD_RESET]
Fixed Fixed FLOW_IN
Runtime value 4..6 RESVD[3]
00 00 00 Reserved for future use, set to zeros. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 100 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide There is no response to this command packet. However, on reset there is at least one EVT_STATUS event so that can be used to detect that the device has rebooted. 8.16.10 BLOB Manage This command manages binary data uploaded from the host through data channels 0x98 to 0x9F (the number of BLOB data channels is compile time dependent). The binary data is referred to as a BLOB
(binary long object). Command Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH 14 CHANNEL 0 Fixed Fixed COMMAND
[CMD_BLOBMANAGE]
FLOW_IN
subCmdId 0..9 blobId 0..1 Runtime value Identifies the BLOB that this command acts on. Data Channels correspond to (0x98 +
blobID) 6..9 ParmA 10..13 ParmB Response Packet Offset 6 is MSB Offset 9 is LSB Offset 10 is MSB Offset 13 is LSB Parameter A Parameter B Offset Field Value Comments 0 1 2 3 4 5 6 LENGTH 15 CHANNEL 0 Fixed Fixed COMMAND
[CMD_ BLOBMANAGE]
FLOW_OUT ??
Runtime value STATUS As appropriate subCmdId Echoed from command blobId Echoed from command 7..10 ParmA 11..14 ParmB Offset 7 is MSB Offset 10 is LSB Offset 11 is MSB Offset 14 is LSB Depends on subCmdId Depends on subCmdId Action to perform Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 101 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide SubCmdId field specifies the actions that the BLOB manager should take on the BLOB specified in field blobID and are described in the following sub sections. Clear :: 0 Use this subcommand to clear the BLOB specified by blobID, On return ParmA and ParmB are set to zero. Get Size :: 1 Use this subcommand to get the number of bytes in the BLOB specified by blobID, On return ParmA contains the number and ParmB is set to zero. Read :: 2 Use this subcommand to transmit the content of the BLOB specified by blobID. If there is data in the BLOB then it results in one or more data packets sending to the host on channel (0x98+BlobID).The data in the BLOB is not destroyed. On return ParmA contains the number of bytes in the BLOB and ParmB contains the number actually sent in the data packets. Save Hid Descriptor :: 3 Use this subcommand to first do a basic validation of the data block identified by blobID to see that it contains a valid HID descriptor and if so, save the data to a non-volatile memory set aside to save an array of HID descriptors. The index into that array is specified by ParmA which is referred to as the HIDID. In the response, ParmA contains 0 for success, 1 for invalid HID descriptor, 2 for failed to save to nonvol array and 000000FF for invalid blobID or invalid HIDID. Load Hid Descriptor :: 4 Use this subcommand to append the content of the HID descriptor in non-volatile memory identified by a HIDID which is specified in ParmA into the data object identified by blobID. In the response, ParmA contains 0 for success, 2 for failed to load from nonvol array and 000000FF for invalid blobID or invalid HIDID. After the BLOB loads, use subcommand Read::2 to force the transmission of the HID descriptor to the host. Save Custom HID Descriptor Service name :: 5 Use this subcommand to save the service name (Less than 30 characters) that is used when a custom HID device SDP record is registered (When SReg 39 > 0). In the response, ParmA contains 0 for success, 1 for invalid service anme, 2 for failed to save to nonvol array and 000000FF for invalid blobID. Load Custom HID Descriptor Service name :: 6 Use this subcommand to append the content of the HID service name in non-volatile memory. In the response, ParmA contains 0 for success, 2 for failed to load from nonvol array and 000000FF for invalid blobID. After the BLOB loads, use subcommand Read::2 to force the transmission of the name to the host. Commit BLOB as Enhanced Inquiry :: 7 Use this subcommand to commit the current content of the BLOB specified as Enhanced Inquiry Responses. The data validates so that it conforms to the format specified in described in the Bluetooth Specification Version 2.1 + EDR [1], vol3, Part C Generic Access Profile, 8 Extended Inquiry Response Data Format (page 1305 in the .pdf-file). Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 102 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide The data block consists of one or more objects, where the first byte of each object specifies the length and the second byte specifies the type of data and the rest of the bytes for that object are the associated data. For example, to send the string HelloWorld and LairdRules! as the manufacturer specific data objects, then the BLOB should load with the following data :
0B FF H e l l o W o r l d 0C FF L a I r d R u l e s !
Where 0B and 0C are length bytes and FF is the type value for manufacturer specific data. Before submission, the data block is verified to see if the length bytes are consistent with total length of the block. Save Enhanced Inquired Response Data :: 8 Use this subcommand to save the BLOB data in non-volatile memory so that the data installs the custom EIR data response on every power up. Before committing to memory, the data block is verified to see if the length bytes are consistent with total length of the block. Load Enhanced Inquired Response Data:: 9 Use this subcommand to load the BLOB specified with data from non-volatile memory associated with Enhanced Inquiry responses; The data that was saved using subcommand 8 described. 8.17 HDP Profile Commands Health Device Profile (HDP) is available on the module in both Agent and Manager roles as defined by the Continua Alliance (see www.continua.org). The manager role is for testing the agent implementation only and it is not expected or designed for eventual certification by the Continua Alliance. It is assumed that the reader is familiar with all the HDP and IEEE documentation and relevant guidelines published by the Continua Alliance. For further background information related to the HDP implementation in this module please refer to AT Application Examples. The HDP commands, responses and events described in the subsequent chapters are merely the MP way of managing the functionality and do not add any new features other than those described in the AT Applications Example section. Laird recommends the reader to refer to the AT Application Examples section for further details. To assist with this cross referencing of details, the table below shows the equivalent commands in AT and MP mode respectively to achieve the same effect in the module. AT Mode Commands AT+HAEiiii,name AT+HMEiiii,name AT+HAL AT+HML AT+HABeeeee,iiii AT+HAAhhhh AT+HARhhhh,pppp[]
AT+HAGhhhh,aaaa,ssss Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless MP Mode Commands CMD_HDP_ENDPOINT Comments Affects an entry in the SDP record CMD_HDP_SDPREGISTER CMD_HDP_BIND CMD_HDP_ASSOCIATE CMD_HDP_SCANREPORT_FI XED CMD_HDP_SCANREPORT_V AR CMD_HDP_ATTRIBUTE_REA Register and activate HDP service record Create an agent data specialization of type iiii which will connect to a manager with Bluetooth address eeeeee In MP, the attribute list for var report is supplied via a BLOB channel. Read an attribute value. In MP 103 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide AT Mode Commands AT+HMGhhhh,oooo,aaaa MP Mode Commands D AT+HAShhhh,aaaa,ssss,dddd dd CMD_HDP_ATTRIBUTE_WRIT E AT+HMThhhh,ttttt CMD_HDP_SETTIME AT+HADhhhh CMD_HDP_DISASSOCIATE Comments mode the data value sends in data channel B0 Write an attribute value. In MP mode the data value is taken from data channel B0 Used at manager end to send new date/time to the agent The following table shows the equivalent AT asynchronous responses and MP events. AT Mode Async Responses HDA:DISASSOCIATED hhhh HDM:DISASSOCIATED hhhh MP Mode Events Comments EVT_HDP_DISASSOCIA TED Sent to host when the agent disassociates from the manager or fails to connect to it HDA:ASSOCIATED hhhh,.. HDM:ASSOCIATED hhhh,.. EVT_HDP_ASSOCIATE D HDA:TIME hhhh,ttttt EVT_HDP_TIMEUPDAT E At Agent end only. Manager informs Agent host of new date/time. Manager triggers this using the command AT+HMD or CMD_HDP_SETTIME 8.17.1 HDP related S Registers To enable HDP profile, Bit 2 in SReg 3 must be set to one and SReg 70 specifies whether it is an agent role ( = 0) or a manager role ( = 1 ). In addition SReg 71 specifies the auto-disassociate timeout in the agent role only, where 0 denotes no timeout. If this is a non-zero value, then after an association or the triggering of a scan report if no further activity occurs in that time, then an automatic disassociation initiates. SReg 72 specifies the maximum transmit PDU size for HDP packets in the underlying Bluetooth transport layer. 8.17.2 Create Endpoint in SDP Record This command creates a data specialization source (for agent role) or a sink (for manager role) which registers using the CMD_HDP_SDPREGISTER command. This SDP entry allows peers to determine which data specialization the module services. It is not necessary to specify which role explicitly in the command because S Reg 70 determines whether the module is configured for an Agent or Manager role. For Agent role SReg 70 is set to 0 and 1 for Manager. This command is relevant for both Agent and Manager roles. Command Packet Offset Field Value Comments Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 104 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 0 1 2 3 LENGTH CHANNEL 22 0 Fixed Fixed COMMAND
[CMD_HDP_ENDPOINT]
FLOW_IN
Runtime value 4..5 SpecType[2] As per IEEE spec
[4]=msb,[5]=lsb Data Specialization code. For example: 100F (4111 dec) for Weigh Scale 6..21 Name[15+1] Null Terminated Name Maximum name size is 15 and name MUST be terminated by a NULL Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 Fixed Fixed COMMAND
[CMD_HDP_ENDPOINT]
FLOW_OUT ??
Runtime value STATUS As appropriate Create multiple data specialization endpoints by submitting this command an appropriate number of times. Internally in the module, the SpecType[2] and Name[15+1] information caches in heap memory until the command CMD_HDP_SDPREGISTER transfers that information into the SDP record for final submission to the underlying Bluetooth stack. 8.17.3 Register SDP record This command registers and activates an HDP related SDP record after creating the endpoints using CMD_HDP_ENDPOINT. Only after this is done can incoming HDP connections be serviced. It is not necessary to specify which role explicitly in the command because S Reg 70 determines whether the module is configured for an Agent or Manager role. For Agent role SReg 70 is set to 0 and 1 for Manager. This command is relevant for both Agent and Manager roles. Command Packet Offset Field Value LENGTH CHANNEL 4 0 0 1 2 3 Comments Fixed Fixed COMMAND
[CMD_HDP_SDPREGISTER]
FLOW_IN
Runtime value Response Packet Offset Field Value Comments Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 105 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 0 1 2 3 4 LENGTH CHANNEL 5 0 Fixed Fixed COMMAND
[CMD_HDP_SDPPREGISTER]
FLOW_OUT ??
Runtime value STATUS As appropriate Internally in the module, the SpecType[2] and Name[15+1] information previously cached in heap memory from CMD_HDPENDPOINT commands transfers into an SDP record and submits to the underlying stack. After this a peer is able to see this device offering HDP services. 8.17.4 Bind Agent to a Manager This command binds the Bluetooth address of a manager and an agent data specialization to create an object within the module which a 16 bit handle can subsequently reference, which returns in the response if the command successfully accepts. This command is relevant for Agent role only. Command Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 14 0 Fixed Fixed COMMAND
[CMD_HDP_BIND]
FLOW_IN
Runtime value 4..9 BDADDR[]
Nap[0,1]:Uap[2]:La p[3,4,5]
Bluetooth address 10.11 SpecType[2]
As per IEEE spec
[10]=msb,[11]=lsb Data Specialization code. For example: 100F (4111 dec) for Weigh Scale 12.13 AssocTout[2]
[12]=msb,[13]=lsb Automatic deassociation timeout. 0 = no timeout Response Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 7 0 Fixed Fixed COMMAND
[CMD_HDP_BIND]
FLOW_OUT
Runtime value STATUS As appropriate 5..6 HANDLE[2]
[5]=msb,[6]=lsb Handle identifying this instance of data specialization agent The handle returned in the response, if STATUS equals 0, is subsequently used in many commands. If the STATUS byte is not 0, then the HANDLE value i 0. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 106 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.17.5 Associate with Manager This command associates an agent with a manager, using the pre-defined object created using the CMD_HDP_BIND command which returns a handle to represent that object. This command is relevant for Agent role only. Command Packet Offset Field Value LENGTH CHANNEL 6 0 0 1 2 3 COMMAND
[CMD_HDP_ASSOCIATE]
FLOW_IN
Runtime value Comments Fixed Fixed 4..5 HANDLE[2]
[4]=msb,[5]=lsb Handle identifying an instance of data specialization agent/manager combination RESPONSE PACKET Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 5 0 COMMAND
[CMD_HDP_ASSOCIATE]
Fixed Fixed FLOW_OUT
Runtime value STATUS As appropriate The host waits until the response receives before submitting further commands. If association is successful prior to receiving the response, the host sends EVT_ASSOCIATED, which contains the config ID of the MDS configuration that was negotiated and the system ID of the peer. See EVT_ASSOCIATED for further details. If association was not successful, because for example the manager is not in range or the Bluetooth device specified in CMD_HDP_BIND does not offer HDP services, then the EVT_DISASSOCIATED sends to the host prior to the response message. This is shown in the message sequence diagram below. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 107 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 8-17: Associate sequence diagram 8.17.6 Send Fixed Scan Report to Manager This command associates (if not already associated) and sends a fixed scan report from an agent to the bound manager. The binding specified via the CMD_HDP_BIND command which returns a handle to represent that combination object. This command is relevant for Agent role only, and results in an EVT_HDP_SCANREPORT event at the manager end. A fixed report sends the values for a list of attributes to a manager where the list is predefined in the MDC_ATTR_ATTRIBUTE_VAL_MAP attribute of the NU collection object. Comments Fixed Fixed Command Packet Offset Field Value LENGTH CHANNEL 9 0 0 1 2 3 COMMAND
[CMD_HDP_SCANREPORT_FIXED]
FLOW_IN
Runtime value 4..5 HANDLE[2]
[4]=msb,[5]=lsb 6..7 PERSONID[2]
[6]=msb,[7]=lsb 8 HOSTCONTEXT XX Response Packet Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Handle identifying an instance of data specialization agent/manager combination This identifies a person ID which the manager can uses appropriately This echos back in the response and helps the host to keep track of them 108 CONN-GUIDE-BT740_v0.2 CMD_HDP_ASSOCIATE(handle)EVT_ASSOCIATED(handle,spec,cfgid,sysid)RSP_HDP_ASSOCIATE(OK)AgentHostCMD_HDP_ASSOCIATE(handle)EVT_DISASSOCIATED(handle)RSP_HDP_ASSOCIATE(not OK)AgentHostSuccessfulAssociationUnsuccessfulAssociation Comments Fixed Fixed Enhanced Class 1 Bluetooth v2.1 Module Users Guide Offset Field Value LENGTH CHANNEL 8 0 0 1 2 3 4 COMMAND
[CMD_HDP_SCANREPORT_FIXED]
FLOW_OUT
Runtime value STATUS As appropriate 5..6 HANDLE[2]
[4]=msb,[5]=lsb Echoed back from the command 7 HOSTCONTEXT XX This is echoed back from the command The host waits until the response receives before submitting further commands. If the agent is not associated, then this command first results in an association request and if that is successful the host receives EVT_ASSOCIATED which contains the config ID of the MDS configuration that was negotiated and the system ID of the peer. See EVT_ASSOCIATED for further details. If the agent is already associated, then there is a response as soon as there is acknowledgement from the manager that the scan report was received. If association was not successful, because for example the manager is not in range or the Bluetooth device specified in CMD_HDP_BIND does not offer HDP services, then the EVT_DISASSOCIATED sends to the host prior to the response message. This is shown in the message sequence diagram below
(Figure 8-18). Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 109 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.17.7 Message Sequence Chart for Fixed Scan Report Figure 8-18: Fixed Scan Report sequence diagram Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 110 CONN-GUIDE-BT740_v0.2 HostAgentNo priorAssociationandSuccessful Scan ReportEVT_ASSOCIATED(handle,spec,cfgid,sysid)HostAgentCMD_HDP_SCANREPORT_FIXED(handle,personid,ctx)PriorAssociationandSuccessful Scan ReportHostAgentCMD_HDP_SCANREPORT_FIXED(handle,personid,ctx)EVT_DISASSOCIATED(handle)No priorAssociationandUnsuccessful Scan ReportHostAgentCMD_HDP_SCANREPORT_FIXED(handle,personid,ctx)PriorAssociationandUnsuccessful Scan ReportCMD_HDP_SCANREPORT_FIXED(handle,personid,ctx)RSP_HDP_SCANREPORT_FIXED(OK)RSP_HDP_SCANREPORT_FIXED(OK)RSP_HDP_SCANREPORT_FIXED(not OK)RSP_HDP_SCANREPORT_FIXED(not OK) Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.17.8 Send VAR Scan Report to Manager This command associates (if not already associated) and then sends a VAR scan report from an agent to the bound manager; the binding is specified via the CMD_HDP_BIND command which returns a handle to represent that combination. This command is relevant for Agent role only, and results in an EVT_HDP_SCANREPORT event at the manager end. A VAR report sends the values for a list of attributes in the NU Collection object to a manager where the host pre-supplies the list. If an attribute does not exist in the NU collection then it is silently ignored. The list is provided by the host via the BLOB data channel for the BLOBID specified in the command (that is, channel number 0x98 plus BLOBID). Command Packet Offset Field Value Comments 0 1 2 LENGTH CHANNEL COMMAND 10 0 Fixed Fixed
[CMD_HDP_SCANREPORT_V AR]
3 FLOW_IN
Runtime value 4..5 HANDLE[2]
[4]=msb,[5]=lsb 6..7 PERSONID[2]
[6]=msb,[7]=lsb 8 HOSTCONTEX T XX 9 BLOBID 0..N Response Packet Offset Field Value LENGTH CHANNEL 8 0 0 1 2 3 4 Handle identifying an instance of data specialization agent/manager combination This identifies a person ID which the manager can use appropriately This echoes back in the response and helps the host to keep track of them See section Blob Manage for details of how to send BLOB data using channel 0x98 for blobID=0 etc Comments Fixed Fixed COMMAND
[CMD_HDP_SCANREPORT_VAR]
FLOW_OUT
Runtime value STATUS As appropriate 5..6 HANDLE[2]
[4]=msb,[5]=lsb Echoed back from the command 7 HOSTCONTEXT XX This echoes back from the command The host waits until the response receives before submitting further commands. If the agent is not associated, then this command first results in an association request and if that is successful the host sends EVT_ASSOCIATED which contains the config ID of the MDS configuration that was negotiated and the system ID of the peer. See EVT_ASSOCIATED for further details. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 111 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide If the agent is already associated, then there is a response as soon as the manager acknowledges that the scan report was received. If association was not successful, because for example the manager is not in range or the Bluetooth device specified in CMD_HDP_BIND does not offer HDP services, then the EVT_DISASSOCIATED sends to the host prior to the response message. This is shown in the message sequence diagram below
(Figure 8-19). Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 112 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.17.9 Message Sequence chart for VAR Scan Report Figure 8-19: VAR Scan Report sequence diagram Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 113 CONN-GUIDE-BT740_v0.2 HostAgentCMD_HDP_SCANREPORT_VAR(handle,personid,ctx,blobId)DATA CHANNEL[0x98+blobid] {aaaa,bbbb,cccc ....}No priorAssociationandSuccessful Scan Reportdata removed from blob data channelRSP_HDP_SCANREPORT_VAR(OK)EVT_ASSOCIATED(handle,spec,cfgid,sysid)HostAgentCMD_HDP_SCANREPORT_VAR(handle,personid,ctx,blobId)DATA CHANNEL[0x98+blobid] {aaaa,bbbb,cccc ....}data removed from blob data channelPriorAssociationandSuccessful Scan ReportRSP_HDP_SCANREPORT_VAR(OK)HostAgentCMD_HDP_SCANREPORT_VAR(handle,personid,ctx,blobId)DATA CHANNEL[0x98+blobid] {aaaa,bbbb,cccc ....}data removed from blob data channelNo priorAssociationandUnsuccessful Scan ReportRSP_HDP_SCANREPORT_VAR( not OK)EVT_DISASSOCIATED(handle)HostAgentCMD_HDP_SCANREPORT_VAR(handle,personid,ctx,blobId)DATA CHANNEL[0x98+blobid] {aaaa,bbbb,cccc ....}data removed from blob data channelRSP_HDP_SCANREPORT_VAR( not OK)PriorAssociationandUnsuccessful Scan Report Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.17.10 Read Attribute Value This command is valid for both agent and manager role and reads the value of the attribute specified via the attribute ID and the qualifier ID. The value returns in HDP data channel 0xB0 formatted as described below. 0 1 2 3 0 1 2 3 4 5 Command Packet Offset Field Value LENGTH CHANNEL 10 0 Comments Fixed Fixed COMMAND
[CMD_HDP_ATTRIBUTE_READ]
FLOW_IN
Runtime value 4..5 HANDLE[2]
[4]=msb,[5]=lsb Handle identifying an instance of data specialization agent/manager combination 6..7 ATTRID[2]
[6]=msb,[7]=lsb 8..9 QUALIFIERID[2]
[8]=msb,[9]=lsb See Note 1 Response Packet Offset Field Value LENGTH CHANNEL 8 0 COMMAND
[CMD_HDP_ATTRIBUTE_READ]
FLOW_OUT
Runtime value STATUS As appropriate HOSTCONTEXT XX 6..7 HANDLE[2]
[6]=msb,[7]=lsb Comments Fixed Fixed This is echoed back from the command Echoed back from the command 1. For manager role, this is the object ID (MDS=0,NU=1 etc) and for Agent please refer to Section Weigh Scale Data Specialization. As more data specializations are added, the qualifierID specifies appropriately for that specialization. The host shall wait until the response receives before submiting further commands. If the attribute exists, then the data sends in a Logical HDP data packet transported in one or more physical data packets over channel 0xB0. The physical packets of incoming data in channel 0xB0 is viewed as a stream of data making up logical packets. The logical packet format is as follows and is also addressed in a dedicated section later:
LEN[2],00,HANDLE[2],ATTRID[2],QUALIFIERID[2],DATA[N]
Where LEN[2], HANDLE[2],ATTRID[2],QUALIFIERID[2] are in big endian format (msb sent first) and N is equal to LEN[2]+9. The 00 after the LEN[2] field signifies that this logical packet consists of attribute data. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 114 CONN-GUIDE-BT740_v0.2 Comments Fixed Fixed Comments Fixed Fixed Enhanced Class 1 Bluetooth v2.1 Module Users Guide Since all data is transparently treated in the module, the endienness of DATA[N] should be determined by trial and error with the aid of an HDP manager and finalized to be correct by the time the implementation submits for certification by the Continua Alliance. However, if the attribute data type is a 16 or 32 bit integer/float, then it is little endian. 8.17.11 Write Attribute Value This command is valid for agent role only and writes the value of the attribute, already preloaded in HDP data channel 0xB0, where the attribute ID and the qualifierID is supplied in the command packet. COMMAND
[CMD_HDP_ATTRIBUTE_WRITE]
FLOW_IN
Runtime value 4..5 HANDLE[2]
[4]=msb,[5]=lsb Handle identifying an instance of data specialization agent/manager combination 6..7 ATTRID[2]
[6]=msb,[7]=lsb 8..9 QUALIFIERID[2]
[8]=msb,[9]=lsb See Note 1 Command Packet Offset Field Value LENGTH CHANNEL 10 0 Response Packet Offset Field Value LENGTH CHANNEL 8 0 0 1 2 3 0 1 2 3 4 5 COMMAND
[CMD_HDP_ATTRIBUTE_WRITE]
FLOW_OUT
Runtime value STATUS As appropriate HOSTCONTEXT XX This echoes back from the command 6..7 HANDLE[2]
[6]=msb,[7]=lsb Echoes back from the command 1. For manager role, this is the object ID (MDS=0,NU=1 etc). As more data specializations are added, the qualifierID specifies appropriately for that specialization. The host waits until the response receives before submiting further commands. If the attribute exists, then the data moves from channel 0xB0 to the attribute container variable. If the attribute does not exist, then the data discards. All the data in the channel is treated as the data for the attribute; that is, there is no qualifying information affixed to the data. In addition, if the attribute exists but the data length does not match that of the attribute, then the write fails (with an appropriate error code) and the data in the channel is discarded. Since all data is transparently treated in the module, the endienness of DATA[N] should be determined by trial and error with the aid of a HDP manager and finalized to be correct by the time the implementation is submitted for certification by the Continua Alliance. However, if the attribute data type is a 16 or 32 bit integer/float, then it will be little endian. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 115 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.17.12 Set Date and Time This command is valid for manager role only and updates the date and time in the associated agent identified by the handle. When any HDP manager sends a time update to an agent, it results in an EVT_HDP_UPDATE event to the host of that agent. COMMAND
[CMD_HDP_SET_TIME]
FLOW_IN
Runtime value 4..5 HANDLE[2]
[4]=msb,[5]=lsb Handle identifying an instance of data specialization agent/manager combination 6..13 DATETIME[8]
Ccyymmddhhssnnxx See Note 1 Command Packet Offset Field Value LENGTH CHANNEL 14 0 Response Packet Offset Field Value LENGTH CHANNEL 14 0 0 1 2 3 0 1 2 3 4 Comments Fixed Fixed Comments Fixed Fixed COMMAND
[CMD_HDP_SET_TIME]
FLOW_OUT
Runtime value STATUS As appropriate 1. This command supplies the date/time information as a string of 8 bytes ccyymmddhhssnnxx where each byte is as follows:
CC Century e.g for 2011 the value shall be 0x14 YY Year e.g for 2011 the value shall be 0x0B MM Month e.g for January the value shall be 0x01 and for say December 0x0C DD Day e.g for 31 the value shall be 0x1F (0 is illegal value) HH Hour e.g for 6:45pm the value shall be 0x12 NN Minutes e.g for 6:45pm the value shall be 0x2D XX fraction This is a fraction of a seconds in hundredths of unit. Valid 00..0x63 (99 For example the date and time 2 Feb 2011, 16:43:33.78 sends at the string 150C020C102D214E The host waits until the response receives before submitting further commands. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 116 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 8.17.13 Disassociate From Manager This command disassociates an agent identified by the handle specified in the command from a manager. This command is relevant for Agent role only. Command Packet Offset Field Value LENGTH CHANNEL 6 0 Comments Fixed Fixed COMMAND
[CMD_HDP_DISASSOCIATE]
FLOW_IN
Runtime value 4..5 HANDLE[2]
[4]=msb,[5]=lsb Response Packet Offset Field Value LENGTH CHANNEL 5 0 Handle identifying an instance of data specialization agent/manager combination Comments Fixed Fixed COMMAND
[CMD_HDP_DISASSOCIATE]
FLOW_OUT
Runtime value STATUS As appropriate 0 1 2 3 0 1 2 3 4 The host waits until the response receives before submitting further commands. The response sends immediately after initiating the disassociation and when the procedure is complete, an EVT_DISASSOCIATED is sent to the host as shown in the message sequence diagram below (Figure 8-20). Figure 8-20: Disassociate sequence diagram Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 117 CONN-GUIDE-BT740_v0.2 AgentHostRSP_HDP_DISASSOCIATE(OK)CMD_HDP_DISASSOCIATE(handle)EVT_DISASSOCIATED(handle) Enhanced Class 1 Bluetooth v2.1 Module Users Guide 9 MODULE EVENTS This section describes all module originated asynchronous events in detail and is specified via the EVT_ID field of all event packets. The description for each event below is in the form of an event packet tables. Each event has a unique EVT_ID value in the range 129 to 255 (0x81 to 0xFF), 0x80 is reserved. The actual value of EVT_ID in the Value column is described as [Descriptive_Name] where Descriptive_Name can be found in a C header file, obtained on request from Laird. 9.1 Inquiry Events This group of events is inquiry related. 9.1.1 Inquiry Result This event sends the inquiry response from a peer as a result of an inquiry request. Event Packet Offset Field Value Comments 0 1 2 3 LENGTH CHANNEL 13 0 EVENT
[EVT_ INQUIRY_RESULT]
FLOW_OUT
Runtime value 4..9 BDADDR[6]
Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address of responding device 10..12 DEVCLASS[3] 0x000000 .. 0xFFFFFF Device class of responding device 9.2 Information Events This group of events conveys information about the module, for example to status. 9.2.1 Unknown Command This event informs the host that a received command had an unknown COMMAND value. The COMMAND value echoes in offset 4. Event Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL EVENT
[EVT_UNKNOWN_COMMAND]
FLOW_OUT ??
Command xx Runtime value CMD_ID value echoed from command Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 118 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 9.2.2 Status This event asynchronously sends current status to the host. This event is sent to the host after power up to inform the host that the module is ready and operational. You can also obtain the information contained in this message by sending the CMD_GET_MODES command. Event Packet Offset Field Value Comments LENGTH CHANNEL 8 0 EVENT
[EVT_ STATUS]
FLOW_OUT
Runtime value STATUS OK or INVALID_LICENSE 0 1 2 3 4 5 6 DISCMODE 0..1 CONNMODE 0..1 7 SECMODE 12..15 1 for discoverable mode Bit 0: 1 for connectable mode In future bit 1, if set, may indicate that incoming SPP connections are auto accepted 12 = SSP + IO_CAP_NO_INPUT_NO_OUTPUT 13 = SSP + IO_CAP_DISPLAY_YES_NO 14 = SSP + IO_CAP_KEYBOARD_ONLY 15 = SSP + IO_CAP_DISPLAY_ONLY 9.2.3 Invalid Packet Size This event informs the host that a command packet was received whose length does not match the size of the structure published in the interface header file BmHostProtocol.h. Event Packet Offset Field Value Comments LENGTH CHANNEL 7 0 EVENT
[EVT_INVALID_PKTSIZE]
FLOW_OUT ??
CMD_ID 1..127 ACT_SIZE DES_SIZE A D Runtime value Echoed from the command Actual size of the packet Desired size of the packet 0 1 2 3 4 5 6 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 119 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 9.3 Connection Events This group of events are connection related. 9.3.1 Connection Setup This event informs the host that a remote device is requesting a connection. The host responds with a CMD_CONNECTION_SETUP with an accept or reject flag. Event Packet Offset Field Value Comments 0 1 2 3 LENGTH 12 CHANNEL 0 EVENT
[EVT_ CONNECTION_SETUP]
FLOW_OUT ??
Runtime value 4..9 BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address of device requesting connection 10..11 UUID[]
Server profile UUID the peer wishes to connect to 0x1101 = SPP 0x1124 = HID DEVICE The UUID field tells the host which server profile the peer wishes to connect to. 9.3.2 Incoming Connection This event informs the host that an incoming connection established. Event Packet Offset Field Value Comments 0 1 2 3 4 LENGTH 13 CHANNEL 0 EVENT
[EVT_ CONNECTION_SETUP]
FLOW_OUT ??
CHANNEL 1..254 5..10 BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
Runtime value Channel ID to be used to send/receive data, see note 1 for channel number allocation. Bluetooth address of device requesting connection 11..12 UUID[]
Server profile UUID the peer wishes to connect to 0x1101 = SPP 0x1124 = HID DEVICE The UUID field tells the host which server profile the peer has connected to. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 120 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 1. Channel number allocation is as follows:
Profile Channel ID Range Command Parser SPP 0x00 0x1 .. 0x7 HID DEVICE(Canned) 0x20 HID HOST(Raw) 0x90 .. 0x97 HID DEVICE(Raw) 0xA0 BLOB HDP 0x98 .. 0x9F 0xB0..0xB1 (B1 is continuation channel) Enhanced Inquiry Response 0xF0 9.3.3 Disconnect This event informs the host that a connection was dropped by the remote device. Event Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 6 0 EVENT
[EVT_ DISCONNECT]
FLOW_OUT ??
CHANNEL 1..7 REASON 0..255 Runtime value Channel number As per the table below The Bluetooth specification specifies the Reason value. Please note that values in the range 0xF0 to 0xFF are custom values defined for this implementation and do not appear in the Bluetooth specification. See header file MPSTATUS.H which is supplied on request. High probability that the remote device went out range for longer than the link supervision timeout or was powered down. 0x01 0x3F 0xFF Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 121 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 9.3.4 Modem Status This event conveys modem status signals originating from the peer device for an SPP connection. Event Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH CHANNEL 6 0 EVENT
[EVT_ MODEM_STATUS]
FLOW_OUT ??
CHANNEL 1..7 MODEMSIG Bit Mask Runtime value Channel ID of an open SPP channel Bit 0: DSR state Bit 1: CTS state Bit 2: DCD state Bit 3: RI state 6 BREAKSIG 0 For future implementation 9.4 Miscellaneous Events 9.4.1 Link Key This event informs the host that a new link key was created for the device indicated and the result of writing to the ROLLING database. Event Packet Offset Field Value Comments 0 1 2 3 LENGTH 11 CHANNEL 0 EVENT
[EVT_ LINK_KEY]
FLOW_OUT ??
Runtime value 4..9 BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address of paired device 10 DBRESULT 0: Success Any other value is a failure and the reason is a STATUS value as per MPSTATUS.H Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 122 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 9.4.2 Link Key Ex This event sends to the host when CMD_TRUSTED_DB_ISTRUSTED processes, a link key for that peer device exists, and S Register 47 is set to 1. It conveys the link key along with the Bluetooth address to the host. Event Packet Offset Field Value Comments 0 1 2 3 LENGTH 30 CHANNEL 0 EVENT
[EVT_ LINK_KEY_EX]
FLOW_OUT ??
Runtime value 4..9 BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address of paired device 10..25 KEY[16]
16 byte array The link key 26..29 RFU[4]
4 byte array Reserved for future 9.4.3 Pin Code Request This event informs the host that a remote device requested a pairing and the procedure requires a pin code to complete. Event Packet Offset Field Value Comments 0 1 2 3 LENGTH 10 CHANNEL 0 EVENT
[EVT_ PINCODE_REQUEST]
FLOW_OUT ??
Runtime value 4..9 BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address of pairing device The host sends a CMD_PINCODE in response to this event. This event receives if accept pairing while in connectable mode enables via S Register 15. 9.4.4 Simple Pairing This event informs the host that a simple pairing procedure is in progress and the action byte in offset 10 tells the host what to do. Event Packet Offset Field Value Comments 0 1 2 LENGTH 15 CHANNEL 0 EVENT
[EVT_ SIMPLE_PAIRING]
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 123 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Event Packet Offset Field Value 3 FLOW_OUT ??
Comments Runtime value 4..9 BDADDR[6] Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address of pairing device 10 action 0..3 11..14 actionval 4 bytes See description below See description below The host reacts to this event based on the value of the action byte in offset 10 as follows:
Action :: 0 This informs the host that a simple pairing procedure has just been completed and actionval is 00000001 for success and 00000000 for fail. The host shall NOT react to this event with the CNF_SIMPLE_PAIRING packet. Action :: 1 This informs the host that a simple pairing procedure is in progress and all it will do is display the passcode in actionval as a six digital decimal number WITH leading zeroes. The host shall NOT react to this event with the CNF_SIMPLE_PAIRING packet. Action :: 2 This informs the host that a simple pairing procedure is in progress and it displays the passcode in actionval as a 6 digital decimal number WITH leading zeros. The host reacts to this event with the CNF_SIMPLE_PAIRING packet with a 00000000 value for No and a non-00000000 value for Yes. The former value, if the host deems that the passcode is not acceptable, and the latter if acceptable. Action :: 3 This informs the host that a simple pairing procedure is in progress and the module is expecting a passcode from the host embedded in a CNF_SIMPLE_PAIRING packet. The host shall react to this event with the CNF_SIMPLE_PAIRING packet with a passcode value. The passcode in the CNF_SIMPLE_PAIRING is either obtained by reading the display on the peer device, or if the peer device is also a keyboard only, then the same random 6 digit value (with leading 0s) that is entered at both ends. 9.4.5 Local Friendly Name This event sends a fragment of the local friendly name to the host. The maximum length of the fragment is 10, so at least 3 of these events are required to convey a local friendly name, if it has the maximum length of 30. Event Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH 16 CHANNEL 0 EVENT
[EVT_LCL_FNAME]
FLOW_OUT ??
Runtime value INDEX LEN 0..29 1..10 Start index into the string Number of valid characters in the NAME[] field that follows Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 124 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 6..15 NAME[10]
Xx xx xx xx The name fragment Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 125 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 9.4.6 Remote Friendly Name This event sends a fragment of the remote friendly name to the host. The maximum length of the fragment is 10, so at least 25 of these events are required to convey a remote friendly name, if it has the maximum length of 248. Event Packet Offset Field Value Comments 0 1 2 3 4 5 LENGTH 16 CHANNEL 0 EVENT
[EVT_REM_FNAME]
FLOW_OUT ??
INDEX LEN 0..247 1..10 Runtime value Start index into the string Number of valid characters in the NAME[] field that follows 6..15 NAME[10]
Xx xx xx xx The name fragment 9.4.7 Event_ADC This event returns after a CMD_GET_IO command where the analogID is set to either 1 or 2. In these circumstances the module digitises the voltage on either Analogue0 or Analogue 1 and reports the value as an eight bit hex number. Therefore the value shown in the ValMSB field should always be zero. Event Packet Offset Field Value Comments 0 1 2 3 4 5 6 LENGTH 16 CHANNEL 0 EVENT
[EVT_ADC]
FLOW_OUT ??
analogId 1..2 valMSB 0 valLSB 0..FF Runtime value 1 AIO0 2 AIO1 MSB of 16 bit digitised input LSB of 16 bit digitised inoput Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 126 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 10 HDP PROFILE RELATED EVENTS 10.1 Associated This event informs the host that an agent associated with the manager and contained the handle, data specialization nominal code, device config ID (as per the IEEE standard) and a unique 8 byte identification number for the agent (or manager). It is relevant for both agent and manager roles. Offset Field Value Comments EVENT PACKET 0 1 2 3 4 LENGTH CHANNEL 11 0 EVENT
[EVT_HDP_ASSOCIATED]
FLOW_OUT
Runtime value ROLE 00=Agent, 01==Manager 5..6 HANDLE[2]
[5]=msb, [6]=lsb Handle of the agent 7..8 SPECTYPE[2]
[7]=msb, [8]=lsb 9..10 DEVCFGID[2]
[9]=msb, [10]=lsb 11..18 SYSID[8]
8 bytes 10.2 Deassociated Data specialization nominal code. E.g 4111 (0x100F) for Weigh Scale The negotiated config ID. Will be defined in the appropriate IEEE data specialization standard. This is a system ID which is unique to the agent instant. This event informs the host that an agent has disassociated from the manager and contains the handle of the agent. It is relevant for both agent and manager roles. Event Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 7 0 EVENT
[EVT_HDP_DISASSOCIATED]
FLOW_OUT ??
Runtime value ROLE 00=Agent, 01==Manager 5..6 HANDLE[2]
[5]=msb, [6]=lsb Handle of the agent Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 127 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 10.3 Time Update This event generates for an agent role only and informs the host that the agent received an updated date and time from the manager. Event Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 11 0 EVENT
[EVT_HDP_TIMEUPDATE]
FLOW_OUT
Runtime value ROLE 00=Agent, 01==Manager 5..6 HANDLE[2]
[5]=msb, [6]=lsb Handle of the agent 11..14 DATETIME[8] ccyymmddhhssnnxx See Note 1 1. The date/time information is supplied in this command as a string of 8 bytes ccyymmddhhssnnxx where each byte is as follows:
CC Century e.g for 2011 the value shall be 0x14 YY Year e.g for 2011 the value shall be 0x0B MM Month e.g for January the value shall be 0x01 and for say December 0x0C DD Day e.g for 31 the value shall be 0x1F (0 is illegal value) HH Hour e.g for 6:45pm the value shall be 0x12 NN Minutes e.g for 6:45pm the value shall be 0x2D XX fraction This is a fraction of a seconds in hundredths of unit. Valid 00..0x63 (99 For example the date and time 2 Feb 2011, 16:43:33.78 shall be sent at the string 150C020C102D214E 11 DEBUG EVENTS 11.1 Debug Packet This event conveys debugging information to the host, and is available in engineering/beta builds only. Event Packet Offset Field Value Comments 0 1 2 3 4 LENGTH CHANNEL 16 0 EVENT
[EVT_DEBUG_PACKET]
FLOW_OUT ??
TYPE_FLAG XX Runtime value Bit 0: First Packet Bit 1: Last Packet Bit 2..5: Reserved Bit 6..7: Message Type 5..15 DATA[]
Contains Ascii data String conveying message Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 128 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 11.2 Malloc Statistics This event conveys pool malloc statistics to the host and is available in engineering/beta builds only. Event Packet Offset Field Value Comments 0 1 2 3 LENGTH 16 CHANNEL 0 EVENT
[EVT_DEBUG_PACKET]
FLOW_OUT ??
4..5 ELSIZE[2]
0..N 6..7 NUMELS[2] 0..N 8..9 TAKEN[2]
0..N 10..11 MAXTKN[2] 0..N 12..13 OVFLO[2]
0..N 12 DATA CHANNELS Runtime value Pool Element Size Number of elements Number of elements taken Tide mark for taken Number of allocations from next bigger element because this size is maxed out This section provides details of some data channels which require further explanation. 12.1 HDP Data Channels 12.1.1 Host to Module Direction Channels B0 and B1 upload attribute data which then transfers to the appropriate data specialization data variable on receipt of a CMD_HDP_ATTRUBUTE_WRITE command. The host ensures that the correct number of bytes for that attribute accumulate in the channel, as length is the only validation performed on the data; the module does not interpret the data in any way besides length. With regards to the endienness of the data, this shall be determined by trial and error using an appropriate certified HDP manager. It is entirely possible that an attribute can be defined which contains data requiring more than 253 bytes. A data packet cannot contain data more than 253 bytes so this could present a problem. The solution to that is both channels B0 and B1 write into a buffer in the module to allow the host to accumulate attribute data using several data packets. However when using B0 it always first deletes any data already accumulated in the buffer and then writes to that buffer, whereas writing to channel B1 shall always append the data to the buffer. 12.1.2 Module to Host Direction Channels B0 and B1 send logical HDP packets to the host. Channel B0 is always the first fragment of the logical packet and subsequent fragments send in channel B1. This means that when the host receives a packet on channel B0, it deletes all data accumulated for an existing ongoing logical packet. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 129 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 12.2 Logical Packet Format The format of the HDP logical packet is as follows:
LEN 2 bytes PACKET_TYPE 1 byte DATA N bytes LEN is set to N+3 and big endian, so that the first byte of LEN sent on the wire is the MSB. The DATA field structure depends on the logical packet type specified by PACKET_TYPE and the following subsections describe the types of packets available at the time of writing. 12.2.1 Packet Type: Attribute Value This logical packet sends to the host as a result of processing the CMD_HDP_ATTRIBUTE_READ command in either the agent or manager roles. For this logical packet type the PACKET_TYPE field sets to 0x00 and the DATA field consists of 4 fields as follows:
Agent Handle Attr Nominal Code Attr Qualifier Field Attr Value 2 bytes 2 bytes 2 bytes N bytes The Agent Handle, Attr Nominal Code and Attr Qualifier ID fields are all 2 byte fields in big endian format (MSB first) and echo from the CMD_HDP_ATTRIBUTE_READ command, and Attr Value is the actual value of the attribute. Calculate the length of N by subtracting 9 from the LEN field of the logical packet. 12.2.2 Packet Type: Scan Report This logical packet sends to the host in a manager role as a result of scan report arriving from an agent. For this logical packet type the PACKET_TYPE field sets to 0x01 and the DATA field consists of multiple fields as follows:
Agent Handle Person ID Num of Objects Data Lists 2 bytes 2 bytes 1 byte N bytes The Agent Handle and PersonID fields are 2 byte fields in big endian format (MSB first), Num of Objects is a one byte field which specifies the number of objects, and the field Data Lists consists of multiple composite fields structured as follows:
Field Type 1 byte Data N bytes Field Type can be 0x00 for OBJECT HANDLE and 0x01 for ATTRIBUTE TAG/VALUE, and the size of the Data field depends on the Field Type. The available Field Types/Data are described in the following sections. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 130 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 12.2.3 Field Type: Object Handle This is the format of the Object Handle field type and is always 3 bytes long:
00 Always 0x00 Object Handle 2 bytes 12.2.4 Field Type: Attribute Tag/Value This is the format of the Attribute Tag/Value field type which is of variable size:
01 ATTR CODE ATTR VALUE LEN ATTR VALUE Always 0x01 2 bytes 2 bytes N bytes The size of this field is ATTR VALUE LEN + 5 12.2.4.1 Example: Scan Report A sample logical scan report packet is as follows:
0021 01 72B4 1234 01 00 0001 01 0A56 0004 12345678 01 0990 0008 2112021216453378 Which is interpreted and expanded as follows-
SCAN REPORT handle=29364 personId=4660, reports=1 O:1 (0001) A:2646 (0A56),<len=4> 12345678 A:2448 (0990),<len=8> 2112021216453378 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 131 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 12.2.5 Sample code to interpret a ScanReport logical packet The following code shows how a logical Scan Report packet could be separated into its constituent parts:
void PrintScanReport(unsigned char *pRxPkt, unsigned nRxPktLen)
char baMsg[512];
uint16 nHandle;
uint16 nPersonId;
uint16 nObject;
uint16 nAttrId;
uint16 nAttrLen;
uint8 *pSrc;
char *pMsg;
nHandle = (pRxPkt[3]<<8)+pRxPkt[4];
nPersonId = (pRxPkt[5]<<8)+pRxPkt[6];
printf(baMsg,"SCAN REPORT handle=%d personId=%d, reports=%d", nHandle, nPersonId, pRxPkt[7]);
pSrc = &pRxPkt[8];
while(pSrc < &pRxPkt[nRxPktLen])
switch(*pSrc)
case HDP_SCANREPORT_INFOTYPE_OBJECT: /* 0x00 */
pSrc++;
if( pSrc >= &pRxPkt[nRxPktLen] )
printf("INSUFFICIENT LENGTH -- ABORT display of msg");
break;
nObject = (pSrc[0]<<8)+pSrc[1];
printf(" O:%d (%04X)",nObject,nObject);
pSrc+=2;
break;
case HDP_SCANREPORT_INFOTYPE_ATTRIBUTE: /* 0x01 */
pMsg = baMsg;
pSrc++;
nAttrId = (pSrc[0]<<8)+pSrc[1];
pSrc+=2;
nAttrLen = (pSrc[0]<<8)+pSrc[1];
pSrc+=2;
if( &pSrc[nAttrLen] > &pRxPkt[nRxPktLen] ) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 132 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide
printf("INSUFFICIENT LENGTH -- ABORT display of msg");
break;
pMsg += sprintf(pMsg," A:%d (%04X),<len=%d> ", nAttrId, nAttrId, nAttrLen);
uint16 nBlockLen = (nAttrLen>24)
? 24
: nAttrLen;
uint8 *pData = pSrc;
while(nBlockLen--)
pMsg += sprintf(pMsg,"%02X",*pData++);
if( nAttrLen > 24 )
pMsg += sprintf(pMsg,"...");
pSrc += nAttrLen;
printf(baMsg);
break;
default:
printf("OBJECT TYPE TAG unknown %d -- ABORT display of msg",*pSrc);
return;
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 133 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 13 MULTIPOINT APPLICATION EXAMPLES 13.1 BLOB Manager BLOB stands for Binary Long OBject. There are many Bluetooth related operations which require large strings to submit to the underlying Bluetooth stack. For example, friendly names and extended inquiry responses fall into this category. These strings can be larger than the data packets allowed by the multipoint protocol defined in this specification. The BLOB manager is basically a software entity in the module which enables these large objects to be uploaded into the module in small packets and have them accumulated in a single object. The BLOB manager can compile time configured to manage up to N objects and unless special firmware builds are generated, this manual assumes that N is 2. Each BLOB is given a zero based identifier. BlobID 0 is the first object etc. A command packet called CMD_BLOBMANAGE exists to manage these BLOBs as required. This command takes four parameters:
Parameter 1 The subcommand ID which tells the BLOB manager what to do. Parameter 2 The BLOB ID Oarameters 3 and 4 4 byte integer values used as arguments for the subcommand specified in parameter 1. The response packet also contains four parameters in exactly the same fashion. Where parameters 1 and 2 echo from the command and parameters 3 and 4 depend on the subcommand. Recall that this entity manages BLOBs and CMD_BLOBMANAGE is the command to act on them. To get data into the BLOBs requires the use of data packets with specific dedicated channel numbers. Channel numbers 0x98 hex to 0x9F hex are reserved for use with BLOBs 0 to 7 respectively. If data is sent in a data packet with a channel number corresponding to a BLOB that does not exist, then the data is silently discarded. Data packets sent to the same BLOB append to any existing data in that BLOB. Please be warned that sending data to a BLOB reduces memory for other uses, so Laird highly recommends that the BLOB be cleared or used up as quickly as possible. The Bluetooth chipset has very limited RAM. Once data accumulates in a BLOB, CMD_BLOBMANAGE performs various actions on that BLOB which is specified via parameter 1 described as subcommand ID above. Some of the actions possible are:
CLEAR Empties the BLOB identified by the blobID parameter 2. GETSIZE Returns the size of the BLOB in bytes in parameter 3 of the response. COPYREAD Sends a copy of all the data in the BLOB back over the UART in data channel
(blobId+0x98). HIDSET Moves the data to the nonvolatile memory location, which stores custom HID descriptors. Many HID descriptors can store and each is identified by a zero indexed identifier. In this case, the HID ID is specified in parameter 3 of the command HIDGET Appends the content of HID descriptor in nonvolatile storage identified by the HID ID in parameter 1 into the BLOB identified by parameter 2. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 134 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide See description of the command CMD_BLOB_MANAGE for all the actions possible. 13.2 HID Connections HID (Human Interface Device) was originally described in detail in a specification published by the USB organization. The Bluetooth SIG has built on that idea but uses wireless instead of USB as the transport mechanism. The HID specifications are very dry and heavy tomes from a developers perspective, denying the user experience, which is it just works and is simple. The objective of the HID functionality provided in the Laird Bluetooth module is to provide the same it just works and is simple concept, but for developers. With this in mind, Laird encourages that the developer view the modules HID functionality as a black box and the only concepts to be aware and fully understand are input reports, output reports, and how to create a HID descriptor. The terminology for input/output is HID Host centric where input means information flow from the HID Device to the HID Host, and vice versa output means information flow from HID Host to HID Device. USB developers are familiar with this concept. Input and output are packets of information whose format and size are predefined in the HID Descriptor that totally describes the devices functionality. For example, the standard PC keyboard is defined by a HID Descriptor which specifies that when a key is pressed or unpressed, an 8 byte INPUT packet shall be sent to the host and likewise, if the host wants to update one of the LEDs on the keyboard (for example the numlock LED) then it shall send a 1 byre OUTPUT packet. How the bits in the INPUT and OUTPUT packets are interpreted are specified in the HID Descriptor. In a nutshell, when something happens at the device end, it informs the host via an INPUT packet, which is also called HID Input Report and likewise the host sends information at any time using OUTPUT packets which are also called HID Output Reports. This implies that a developer using HID supplied in the Laird module only needs to ask, What is the current active HID Descriptor and then from there decide how to generate and process the reports. A simple interface supplied at the UART of the module enables appropriate mapping of data into and out of INPUT and OUTPUT reports. The same interface also enables the developer to upload custom HID Descriptors into the non-volatile memory of the module. If no HID Descriptor is uploaded, and the module is configured to expose a HID Device profile, then by default a HID Descriptor for a 104 key keyboard is exposed, meaning INPUT reports are 8 bytes long and OUTPUT reports are 1 byte long. In this case, when the host conveys a key press, an 8 byte data packet has to submit to the module via the UART with data channel ID 0xA0. Likewise any OUTPUT packets sent by the host appear on data channel 0xA0. If a HID Host profile is active, then the INPUT packets appear on data channel 0x90 and it send OUTPUT reports as data on channel 0x90. The built-in HID Device keyboard descriptor has been made even simpler to use if all you want is to send ASCII characters in the range 0x00 to 0x7F inclusive. In that case, all you must do is send the ASCII string in a data packet on channel 0x20. The data parser in the module generates two INPUT reports for each ASCII character. The first INPUT report specifies a key press and the second INPUT report specifies the unpress event. Note:
If S reg 3 specifies ONLY HID profile, and S Reg 39 specifies the built in keyboard HID descriptor, then the device class for the device in S Reg 128 automatically overrides. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 135 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 13.3 Sending INPUT Reports Once a connection establishes, a report sends by a device end by sending an entire INPUT report in a single data packet with channel ID 0xA0. For example, if the descriptor specifies a standard keyboard and if the a key pressed, then the following data sends over the UART to the module:
0A A0 00 00 04 00 00 00 00 00 And to convey that the left shift was pressed, the data is:
0A A0 02 00 04 00 00 00 00 00 13.4 Getting OUPUT Reports from a Host Once a connection establishes, a report sends by a host to the device by sending an entire OUPUT report in a single data packet with channel ID 0x90, for example: 03 90 01 13.5 Uploading a HID Descriptor into the Module Uploading of HID descriptors, which can be large blocks of arbitrary binary data, is done using the BLOB manager. The BLOB manager is an entity in the module which allows for blocks of binary data to receive over the UART and accumulate in BLOB objects, of which two are made available. The two BLOBs of data have identifiers 0 and 1 respectively. In addition, data channels 0x98 to 0x9F are dedicated to data transfer to/from those BLOBs. Where channel 0x98 is for BLOB 0, 0x99 is for BLOB 1. There is also a command called CMD_BLOBMANAGE which performs various actions on the BLOBs. See the definition of that command for more details; suffice to say that there are subcommands for clearing, getting size, saving to non-volatile storage, and getting from non-volatile storage. In the case of uploading a HID Descriptor, the BLOB commands to use are clear and save. For example, if the contrived thirteen byte HID Descriptor 05 01 09 06 A1 01 05 07 29 65 81 00 C0 is uploaded using BLOB 1 into non-volatile location 1, (where this non-volatile location reference is used in S Register 39) then the following packets submit to the module on the UART. 0E 00 2D 7F 00 01 00000000 00000000 //CMD_BLOBMANAGE --- clear BLOB 1 0B 99 05 01 09 06 A1 01 05 07 29 65 81 //send data into BLOB 1 04 99 00 C0 //send more data into BLOB 1 which is appended to any existing data 0E 00 2D 7F 03 01 00000001 00000000 // CMD_BLOBMANAGE --- save BLOB 1 into nonvol storage ID 1 13.6 Specifying a Custom Hid Descriptor for Use After a custom HID descriptor uploads into the module where a HID descriptor in the range 0..N has becified, the module can configure to use that descriptor when HID Device profile is active by modifying S Register 39. Basically, take the 0 based HID ID, add 1 to it and store that value in that register. 13.6.1 Specifying Service Record Name for Custom Hid For a custom HID descriptor, the device can also register a custom service name if it is saved using the BLOB manager. At any time, the default service name "BTHIDCUSTOM can be invoked by deleting the Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 136 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide service name from non-volatile memory. This can be done by writing an empty name via the BLOB manager. 13.6.2 HDP Usage Message The module offers both HDP Agent and HDP Manager roles with IEEE Data Specialization functionality. HDP Manager functionality is provided mainly for prototyping and testing an Agent implementation and is not intended for eventual Continua Alliance certification. Given two modules in factory default state, the following sections illustrate a typical usage session which consists of a pairing, an association, scan report, time update from manager, and disassociation. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 137 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 13.6.3 Message Sequence Chart Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 138 CONN-GUIDE-BT740_v0.2 HostHostModuleCMD_STORE_SREGCMD_STORE_SREGCMD_RESETCMD_RESETModule in factory default modeModule in factory default modeEnable HDP+SPP ProfileEnable Agent or Manager RoleSave SReg to NonVol MemoryReset to make SReg EffectiveCMD_WRITE_SREG [46 00000000]CMD_WRITE_SREG [03 00000005]CMD_WRITE_SREG [46 00000001]CMD_WRITE_SREG [03 00000005]Pair the devicesCMD_PAIR_INITIATE [ addr ]EVT_SIMPLE_PAIRING [ 00000001]EVT_SIMPLE_PAIRING [ 00000001]EVT_LINK_KEY [ addr ]EVT_LINK_KEY [ addr ]RSP_PAIR_INITIATE [OK]AGENTMANAGERModuleCMD_HDP_ENDPOINT [100F 7363616C6500..]CMD_HDP_SDPREGISTERRegister and activate HDPWeigh Scale Sink Role at ManagerCMD_BIND [addr 100F]CMD_HDP_ENDPOINT [100F 7363616C6500..]Register and activate HDPWeigh Scale Source Rolesat Agent, and also bind Agent to ManagerBluetooth AddressCMD_HDP_SDPREGISTERRSP_BIND [hhhh]AssociateCMD_ASSOCIATE [hhhh]EVT_ASSOCIATED [h1h1 100F 05DC S...S]EVT_ASSOCIATED [h2h2 100F 05DC S...S]Continued on next pageAssociatedAssociated Enhanced Class 1 Bluetooth v2.1 Module Users Guide Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 139 CONN-GUIDE-BT740_v0.2 HostHostModuleModuleAGENTMANAGERAssociatedAssociatedSend a FIXED Scan ReportCMD_HDP_SCANREPORT_FIXED [h1h1 pppp]BLOB 0 CHANNEL 98[0A56 0990 0996]Send a VAR Scan Reportconsisting of 3 attribute0A56, 0990, 0996CMD_HDP_SCANREPORT_VAR [h1h1 pppp]Send a Time Updatefrom Manager to AgentCMD_HDP_SET_TIME [h2h2 tttttttt]EVT_HDP_TIMEUPDATE [h1h1 tttttttt]HDP DATA CHANNEL B0[12345678]CMD_HDP_ATTRIBUTE_WRITE [h1h1 0A56 0000]CMD_HDP_ATTRIBUTE_READ[h1h1 0A56 0000]HDP DATA CHANNEL B0LOGICAL PACKET TYPE 01[LLLL 01 h2h2 pppp [attr data]]HDP DATA CHANNEL B0LOGICAL PACKET TYPE 01[LLLL 01 h2h2 pppp [attr data]]HDP DATA CHANNEL B0LOGICAL PACKET TYPE 00[LLLL 00 h2h2 attr qqqq dddd]Read Attr from Agent MDSAttribute 0A56 (2436 dec) (Can be done only whenassociated)Write a value into an AgentAttribute 0A56 (2646 dec) (Can also be done whennot associated)Read AgentAttribute 0A56 (2646 dec) (Can also be done whennot associated)CMD_HDP_ATTRIBUTE_READ[h2h2 0984 0000]HDP DATA CHANNEL B0LOGICAL PACKET TYPE 00[LLLL 00 h2h2 attr qqqq dddd]CMD_DISASSOCIATE [hhhh]EVT_DISASSOCIATED [h1h1]EVT_DISASSOCIATED [h2h2]DisassociateDisassociatedDisassociated Enhanced Class 1 Bluetooth v2.1 Module Users Guide 13.7 Agent UART Traffic for Chart This section shows the UART traffic for a module operating as a HDP Weigh Scale agent communicating with a manager. It is NOT a log of the UART traffic for the message sequence chart illustrated in the previous section.
<70 006.896 08 00 81 7F 00 00 00 0C EVT_STATUS
//State: RESET_GETADDR
>70 000.000 04 00 02 7F CMD_READ_BDADDR
<70 000.078 0B 00 02 7F 00 0016A4FEF000 RSP_READ_BDADDR (MPSTATUS_OK)
>70 000.015 05 00 17 7F 00 CMD_INFORMATION
//State: RESET_GETVER
<70 000.078 0E 00 17 7F 00 00 8100001300790673 RSP_INFORMATION (MPSTATUS_OK)
<70 001.810 08 00 81 7F 00 01 01 0C EVT_STATUS
>70 057.018 09 00 04 7F 03 00000005 CMD_WRITE_SREG
<70 000.109 0A 00 04 7F 00 03 00000005 RSP_WRITE_SREG (MPSTATUS_OK)
>70 046.192 09 00 04 7F 46 00000000 CMD_WRITE_SREG
<70 000.109 0A 00 04 7F 00 46 00000000 RSP_WRITE_SREG (MPSTATUS_OK)
>70 004.790 04 00 05 7F CMD_STORE_SREG
<70 000.109 05 00 05 7F 00 RSP_STORE_SREG (MPSTATUS_OK)
>70 024.523 07 00 29 7F 000000 CMD_RESET
<70 001.918 08 00 81 7F 00 01 01 0C EVT_STATUS
>70 775.201 1C 00 10 7F 10 0016A4FEF001 3132333400000000000000000000000000 CMD_PAIR_INITIATE
<70 007.300 0F 00 95 7F 0016A4FEF001 00 00000001 EVT_SIMPLE_PAIRING
<70 000.156 0B 00 89 7F 0016A4FEF001 00 EVT_LINK_KEY
<70 001.014 05 00 10 7F 00 RSP_PAIR_INITIATE (MPSTATUS_OK)
>70 032.246 16 00 2E 7F 100F 7363616C650000000000000000000000 CMD_HDP_ENDPOINT
<70 000.109 05 00 2E 7F 00 RSP_HDP_ENDPOINT (MPSTATUS_OK)
>70 009.298 0E 00 32 7F 0016A4FEF001 100F 0000 CMD_HDP_BIND
<70 000.125 07 00 32 7F 00 B538 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 140 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide RSP_HDP_BIND (MPSTATUS_OK)
>70 026.037 04 00 2F 7F CMD_HDP_SDPREGISTER
<70 000.125 05 00 2F 7F 00 RSP_HDP_SDPREGISTER (MPSTATUS_OK)
>70 011.918 06 00 31 7F B538 CMD_HDP_ASSOCIATE
<70 000.109 05 00 31 7F 00 RSP_HDP_ASSOCIATE (MPSTATUS_OK)
<70 002.013 08 00 81 7F 00 00 01 0C EVT_STATUS
<70 003.775 13 00 97 7F 00 B538 100F 05DC 4C414952444D4752 EVT_HDP_ASSOCIATED
>70 029.235 06 B0 12345678
>70 018.127 0B 00 36 7F B538 0A56 0000 CD CMD_HDP_ATTRIBUTE_WRITE
<70 000.109 08 00 36 7F 00 CD 0004 RSP_HDP_ATTRIBUTE_WRITE (MPSTATUS_OK)
>70 013.697 0B 00 35 7F B538 0A56 0000 AB CMD_HDP_ATTRIBUTE_READ
<70 000.109 0F B0 000D00B5380A56000012345678
//HDP Channel : ATTRIBUTE for handle=46392 Attr=2646 QualifierId=0} VALUE = 12345678
<70 000.016 08 00 35 7F 00 AB 0004 RSP_HDP_ATTRIBUTE_READ (MPSTATUS_OK)
>70 042.900 09 00 33 7F B538 1234 AB CMD_HDP_SCANREPORT_FIXED
<70 000.421 08 00 33 7F 00 B538 AB RSP_HDP_SCANREPORT_FIXED (MPSTATUS_OK)
>70 021.185 08 B0 0A5609900996
>70 014.571 0A 00 34 7F B538 1234 CD 00 CMD_HDP_SCANREPORT_VAR
<70 000.109 08 00 34 7F 8F B538 CD RSP_HDP_SCANREPORT_VAR (MPSTATUS_ATTRLIST_INVALID)
>70 035.365 0A 98 34 7F 0A56 0990 09 96 CMD_HDP_SCANREPORT_VAR
>70 008.752 0A 00 34 7F 0A56 0990 09 96 CMD_HDP_SCANREPORT_VAR
<70 000.125 08 00 34 7F 8B 0A56 09 RSP_HDP_SCANREPORT_VAR (MPSTATUS_INVALID_BLOBID)
>70 019.906 08 98 0A5609900996
>70 012.823 0A 00 34 7F B538 1234 CD 00 CMD_HDP_SCANREPORT_VAR
<70 000.296 08 00 34 7F 00 B538 CD RSP_HDP_SCANREPORT_VAR (MPSTATUS_OK)
<70 043.166 0E 00 98 7F B538 140B020C102D214E EVT_HDP_TIMEUPDATE
>70 008.486 06 00 30 7F B538 CMD_HDP_DISASSOCIATE
<70 000.125 05 00 30 7F 00 RSP_HDP_DISASSOCIATE (MPSTATUS_OK)
<70 000.125 07 00 96 7F 00 B538 EVT_HDP_DISASSOCIATED Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 141 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 13.8 Manager UART Traffic for Chart This section shows the UART traffic for a module operating as a HDP manager communicating with a Weigh Scale agent.
<71 003.900 08 00 81 7F 00 00 00 0C EVT_STATUS
//State: RESET_GETADDR
>71 000.000 04 00 02 7F CMD_READ_BDADDR
<71 000.094 0B 00 02 7F 00 0016A4FEF001 RSP_READ_BDADDR (MPSTATUS_OK)
>71 000.015 05 00 17 7F 00 CMD_INFORMATION
//State: RESET_GETVER
<71 000.078 0E 00 17 7F 00 00 8100001300790673 RSP_INFORMATION (MPSTATUS_OK)
<71 001.810 08 00 81 7F 00 01 01 0C EVT_STATUS
>71 062.806 09 00 04 7F 03 00000005 CMD_WRITE_SREG
<71 000.109 0A 00 04 7F 00 03 00000005 RSP_WRITE_SREG (MPSTATUS_OK)
>71 022.449 09 00 04 7F 46 00000001 CMD_WRITE_SREG
<71 000.109 0A 00 04 7F 00 46 00000001 RSP_WRITE_SREG (MPSTATUS_OK)
>71 016.209 04 00 05 7F CMD_STORE_SREG
<71 000.109 05 00 05 7F 00 RSP_STORE_SREG (MPSTATUS_OK)
>71 011.310 07 00 29 7F 000000 CMD_RESET
<71 000.717 08 00 81 7F 00 00 00 0C EVT_STATUS
<71 001.950 08 00 81 7F 00 01 01 0C EVT_STATUS
<71 787.103 0F 00 95 7F 0016A4FEF000 00 00000001 EVT_SIMPLE_PAIRING
<71 000.188 0B 00 89 7F 0016A4FEF000 00 EVT_LINK_KEY
>71 018.564 16 00 2E 7F 100F 7363616C650000000000000000000000 CMD_HDP_ENDPOINT
<71 000.125 05 00 2E 7F 00 RSP_HDP_ENDPOINT (MPSTATUS_OK)
>71 005.413 04 00 2F 7F CMD_HDP_SDPREGISTER
<71 000.125 05 00 2F 7F 00 RSP_HDP_SDPREGISTER (MPSTATUS_OK)
<71 067.751 08 00 81 7F 00 00 01 0C EVT_STATUS
<71 002.028 13 00 97 7F 01 72B4 100F 05DC 0016A4FEF000B539 EVT_HDP_ASSOCIATED
>71 093.210 0B 00 35 7F 72B4 0984 0000 AB CMD_HDP_ATTRIBUTE_READ
<71 000.110 15 B0 00130072B40984000000080016A4FEF000B539
//HDP Channel : ATTRIBUTE for handle=29364 Attr=2436 QualifierId=0}
VALUE = 00080016A4FEF000B539
<71 000.000 08 00 35 7F 00 AB 000A RSP_HDP_ATTRIBUTE_READ (MPSTATUS_OK)
<71 011.419 23 B0 00210172B4123401000001010A5600047856341201099000080000000000000000
//HDP Channel : SCAN REPORT handle=29364 personId=4660, reports=1
// O:1 (0001)
// A:2646 (0A56),<len=4> 78563412
// A:2448 (0990),<len=8> 0000000000000000
<71 113.210 47 B0 00450172B4123401000001010A5600047856341201099000080000000000000000010996000206C 3010A5600047856341201099000080000000000000000010996000206C3
//HDP Channel : SCAN REPORT handle=29364 personId=4660, reports=1
// O:1 (0001)
// A:2646 (0A56),<len=4> 78563412
// A:2448 (0990),<len=8> 0000000000000000
// A:2454 (0996),<len=2> 06C3
// A:2646 (0A56),<len=4> 78563412 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 142 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide
// A:2448 (0990),<len=8> 0000000000000000
// A:2454 (0996),<len=2> 06C3
>71 043.056 0E 00 37 7F 72B4 140B020C102D214E CMD_HDP_SET_TIME
<71 000.109 05 00 37 7F 00 RSP_HDP_SET_TIME (MPSTATUS_OK)
<71 008.721 07 00 96 7F 01 72B4 EVT_HDP_DISASSOCIATED
<71 002.059 08 00 81 7F 00 01 01 0C EVT_STATUS 13.8.1 Sniff Mode Explained Bluetooth connections are master/slave in nature. A master sends packets and a slave has to acknowledge that packet in the next timeslot. Timeslots in Bluetooth are 625 microseconds wide. This implies that a master always knows when packets are sent and received, which further means it is able to optimize power usage by switching on power hungry circuitry only when needed. A slave, however, does NOT have prior knowledge of when a packet receives and has to assume that a packet receives from a master on every receive slot. This means that it has to leave its receiving circuitry switched on for most of the receive slot duration. The result of this is high power consumption where a slave with no data transmission still consumes around 31 mA, whereas a master consumes only 6 mA. This problem was identified early in the evolution of Bluetooth (especially since headsets spend all their time as a slave in a Bluetooth connection) and it was solved by having a mode called Sniff, with appropriate lower layer negotiating protocol. Sniff mode during connection is an agreement between the slave and its master that null packets are only exchanged for N timeslots every M slots. The slave can then assume that it will never be contacted during N-M slots, and so can switch its power hungry circuitry off. The specification goes further by also specifying a third parameter called timeout (T) which specifies extra timeslots that the slave agrees to listen for, after receiving a valid data packet. Put another way, if a data packet is received by the slave then it knows that it MUST carry on listening for at least T more slots. If within that T slot time period another data packet receives, then the timer restarts. This mechanism ensures low power consumption when there is no data transfer at the expense of latency. When there is a lot of data to transfer, it acts as if sniff mode was not enabled. It is stated above that during sniff mode, a slave listens for N slots every M slots. The Bluetooth specification states that a master can have up to 7 slaves attached to it with all slaves requesting varying sniff parameters. It may therefore be impossible to guarantee that each slave gets the M parameter it requested. In light of this, the protocol for enabling sniff mode specifies that a requesting peer specify the M parameter as a minimum and maximum value. This allows the master to interleave the sniff modes for all slaves attached. For this reason, the sniff parameters are specified in the Bluetooth module via four S registers. SRegister 73 (561 in AT mode) specifies N, SRegister 74 (562 in AT mode) specifies T, and SRegisters 75/76
(563/564 in AT mode) specify minimum M and maximum M respectively. Although the specification defines these parameters in terms of timeslots, the S register values have to be specified in units of milliseconds and the firmware does the necessary translation to timeslots. The relationship between M, N, T, and power consumption when sniff mode is activated is illustrated in Figure 13-1. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 143 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 13-1: Sniff Mode 13.8.2 UART Host Power Saving Facility There are circumstances where a CPU driving the module consumes a lot of power and some means are necessary to reduce that power consumption while the module is in a Bluetooth connection. To facilitate that, the module has many GPIO pins, and using S Registers 50 to 65, one (and only one) GPIO pin can configure with the value 13 so that it is an output configuration. The state of the pin is 0 when the modules UART transmit buffer is empty and 1 when there is at least one byte waiting to be transmitted to the UART host. Hence a workable power saving strategy by the CPU is illustrated in Figure 13-2. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 144 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 13-2: CPU power saving strategy 13.8.3 Out of Band (OOB) Pairing When two devices pair using the legacy procedure or the simple secure pairing method, the end result is that they both end up with the same 16 byte random key. This key is subsequently used to authenticate and encrypt subsequent connections. This means the list of pairing kept in each device as a minimum, needs to store the peer Bluetooth address along with the 16 byte link key. The Bluetooth specifications do not mandate that this link key shall only generate/exchange over the Bluetooth radio, and in fact mention Out-Of-Band (OOB) pairing as a valid means of expediting the pairing of two devices. The specification does not describe how the OOB pairing occurs. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 145 CONN-GUIDE-BT740_v0.2 Is PINHigh?AssertRTSWait for datato arrive fromModuleDeassertRTSConfigure to wakeup when PINgoes highGo to SleepPIN goes highWake up andAssert RTS Enhanced Class 1 Bluetooth v2.1 Module Users Guide Whatever OOB means are chosen, it implies that some externally generated key has to be added to the trusted device database in the device. The module caters for this link key addition using the CMD_TRUSTED_DB_ADD command when in the multipoint protocol mode and the AT+KY command when in the AT protocol mode. 13.8.4 Throughput Analysis The following are factors that affect overall data throughput:
Baudrate The baudrate at the UART determines the maximum throughput and has a theoretical maximum of 80% of the baudrate if using none parity and one stopbits. That theoretical maximum reduces to around 67% if parity is enabled along with two stopbits. Radio utilization The radio utilization in the sense that at any time, up to three non-transient operations could be active. The radio could be servicing on-going connections, it could be scanning for inquiries, and it could be scanning for incoming connections. For the latter two, the scanning operation has a duty cycle and the worst case of 100% has a major impact on the throughput as the radio is time shared between the connections and the scanning operations. RF connection quality If the quality is bad and there are many retries of packets, then the throughput can drop to close to zero before the connection automatically drops. For Basic Rate connection packets, the best throughput limits to around 600 kbps in asymmetric data transfer falling to around 400 kbps for symmetric transfers when using Base Rate RF packets. This can triple when using EDR packets. RFCOMM frame size The size of the RFCOMM frame, which according to the BT spec can be a value between 23 and 32767. The bigger the value the better, but the incremental gain around 1000 and above is negligible for embedded Bluetooth stack with limited RAM. This value sets via S Register 11 in multipoint mode and 9011 in AT mode MP packet payload size In the multipoint protocol which is packet-based, the size of the MP packet payload has an impact and in fact the packets should be as large as possible, and yet the MP protocol limits the maximum payload to 253 bytes due to the length field of the packet being only a single byte. The charts that follow, where actual throughput is plotted against the RFCOMM frame size, show that in multipoint mode the packet structure and scanning for inquiries and paging have a significant impact on the throughput. With regards to MP mode, the UART host should optimize performance by sending data to transmit in as large packets as possible and completely disabling all scanning operations by setting S Registers 4 and 5 to zero. It is entirely possible for the host to bombard the module with the worst case scenario of three byte packets with just one data byte payload. In this case, if too many of these packets are sent and the framesize is large (such as 64 and above), it is entirely possible for the module to lose the connection by resetting. This happens because the module panics when it runs out of memory. On the rare occasion that this happens, it is possible to mitigate this issue by increasing the value of S register 81. By default this value is set to 30%. Testing by Laird shows that with a framesize larger than 64 and sending a storm of three byte packets
(with one byte payload) and the default value of 30%, it is possible to panic the module into a reset. Testing with a value of 50% in S Reg 81 solves the problem. But increasing the value of S Register 81 has an impact on how many simultaneous SPP connections can be sustained. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 146 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Basically, users must fine tune S Registers 7,8,9,10,11,81 and MP packet sizes to ensure desired throughput operation. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 147 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 148 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 13.8.5 UART Protocol Selection & Indication Via GPIO S register 255 selects either MP(1) or AT(2) protocol mode for communications over the UART. If S Register 255 is set to zero, then it implies that a GPIO selects the protocol such that zero sets AT mode and one for MP mode. To configure a particular GPIO pin for this functionality, set the appropriate S Reg (in range 50 to 65) to a value of 14. Only the first S Register in the range 50 to 65 is used, any further S Registers with the value 14 are ignored. In addition, if at least one S register in the range 50 to 65 is set to a value of 15, then on power up that pin configures as an output and sets to zero if AT protocol is active and one if MP is active. If S Register 255 is zero and no GPIO is configured for this functionality, then the protocol defaults to MP. 13.8.6 Firmware Upgrade via UART The module has the capability of upgrading the firmware via the UART port using a Windows PC based utility supplied by Laird. Firmware upgrades over the air are not planned as this is not inherently supported by the chipset vendor. The upgrade process requires a direct connection to RX, TX, CTS, and RTS lines of the module via appropriate RS232 level conversion, to a built-in serial port on the Windows PC. The new firmware deploys in a .dfu file as and when new firmware is available. If the user requires the ability to upgrade the firmware when their product is in the field, then provision must be made so that the RX, TX, CTS, and RTS lines are exposed to the outside world. This is complicated if, as in most usage cases, a host microcontroller drives the BT module in the users end product. In that case, the host microcontroller drive the modules RX and CTS input lines and hence cannot also be driven by a Windows PC unless those two lines are gated appropriately. One solution is incorporating the hardware logic illustrated below and use a USB to Serial adapter as per http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm which does not require RS232 levels. Note: This solution should work in theory and Laird does not warrant that it will work given it has not been implemented and tested. The purpose of the suggestion is to make the user evaluate the convenience arising from it and variations thereof. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 149 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 13.8.7 The HCOMMAND & EVENT Values The following is a listing of a snapshot of the file BMHOSTPROTOCOL.H at the time of this documents release. Laird does NOT guarantee that this listing is kept up to date. For development purposes, please request the latest version of the appropriate C header file.
//The following are COMMAND (octet 2) values in command/response packets
#define CMD_NO_OPERATION 0x01
#define CMD_READ_BDADDR 0x02
#define CMD_READ_SREG 0x03
#define CMD_WRITE_SREG 0x04
. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 150 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide
//The following are EVENT (octet 2) values in event packets
#define EVT_STATUS 0x81
#define EVT_INVALID_PKTSIZE 0x82
#define EVT_UNKNOWN_COMMAND 0x83
#define EVT_INQUIRY_RESULT 0x84
#define EVT_MODEM_STATUS 0x85
. 13.8.1.1 STATUS Values The following is a listing of a snapshot of the file MPSTATUS.H at the time of this documents release. Laird does NOT guarantee that this listing will be kept up to date. For development purposes, please request the latest version of the appropriate C header file.
#define MPSTATUS_OK 0x00
#define MPSTATUS_ILLEGAL_COMMAND 0x01
#define MPSTATUS_NO_CONNECTION 0x02
#define MPSTATUS_HARDWARE_FAIL 0x03
#define MPSTATUS_PAGE_TIMEOUT 0x04
. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 151 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14 AT APPLICATION EXAMPLES 14.1 Connection Management Commands ATD, ATA, ATH, AT+BTP, and AT+BTG are all connection related and are discussed generically in this section. On connection, depending on the value of S Register 531, the module enters data pass through mode (S Reg 531 = 0) or remains in command mode (S Reg 531 > 0). In pass through mode, any data received from the host passes to the transmit buffer of the RF connection;
in the case of SPP (UUID=1101) and for all other profiles, it depends on whether a canned mode is provided. Data coming from the remote sends out to the host transparently even in canned mode. A canned mode, which exists for HID profile, is where the incoming character from the host translates into appropriate multi-byte packets expected by the peer. For example, with HID standard keyboard profile where each key press results in an 8 byte HID INPUT report to the host, the ASCII character appropriately expands into the relevant 8 bytes denoting that the key was pressed and then immediately another 8 byte report denotes that the same key was unpressed. If a canned mode is not available for a profile, then module is not allowed to get into pass-through mode. In command and online mode, the command ATXdata forces the module to send data and conversely any incoming data presents to the host in an RXdata asynchronous response. 14.1.1 Incoming Connections The module can be configured using the AT+BTP or AT+BTG command so that it scans for incoming connections from other Bluetooth devices. It can also be configured via S Register 512 to be in this mode by default on power up. When the lower layers detect an incoming call, a RING 123456789012 string sends to the host every second. The command ATA accepts the connection and ATH rejects it. On connection, if the S0 Register is >=0 and S504=0 then confirmation to the host is in the following form:
CONNECT <bd_addr>,<uuid>,<
Where <uuid> is the UUID of the profile that accepted the connection. 14.1.2 Dropping Connections In a conventional telephony modem, a call normally terminates by first sending a +++ escape sequence enveloped by an escape sequence guard time (of the order of 100 to 1000 milliseconds) to enter local command + connected mode, and then the ATH command to force a disconnection. The Laird modules provide a couple of ways of dropping a connection. One method is similar to the above, but instead uses a ^^^ character sequence. This eliminates ambiguity when a data call is in progress via a mobile phone which established using the mobile phones Bluetooth AT modem. The second method involves the host deasserting the DTR modem control line (DSR modem status line from the modules viewpoint) for longer than 500 milliseconds. The escape sequence to force the module from pass-through mode and into command is as follows:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 152 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide
<Guard time><Esc Chr><Guard time><Esc Chr><Guard time><Esc Chr><Guard time>
Where <Guard time> is 100 milliseconds. The four guard time means that even when a file transfer is occurring and it happens to be full of <Esc Chr> characters, it is not going to drop into command mode. This is because when transferring a file, it happens as fast as possible and so the inter character gap will be significantly shorter than the <Guard time>. The <Esc Chr> character can be changed via the S2 register. 14.2 Profiles This section describes all the profiles that the module is capable of making and accepting connection when in AT mode. 14.3 Serial Port Profile (SPP) UUID : 1101 You must set S Register 9003 bit 0 to make this profile active. Outgoing connections are initiated using the command: ATD<bd_addr>
Incoming connections result in at least one RING <bd_addr> response to the host. If S Register 0 is a non-zero value then after the appropriate number of RING responses the connection automatically accepts and a CONNECT <bd_addr>,1101,< response sends to the host. If S Register 0 is 0, then the incoming connection accepts by the host using the command ATA or rejected using ATH. On connection, depending on the value of S Register 531, the module enters pass through mode (data transparently exchanged between UART and air-side) or in command+online mode. In the latter, data sends to the peer using the ATX<string> command and any data from the peer either dumps silently
(S531=1) or send to the host in an RX<string> asynchronous response (S531>1). When in pass-through mode, the escape sequence ^^^ puts the module into command and online mode so that a disconnection can initiate. A disconnection can also initiate by deasserting the DSR input line of the module for more than 500 milliseconds. On disconnection a NO CARRIER async response sends to the host. 14.4 HID Device Profile (HID) UUID : 1124 S Register 9003 bit 1 must be set to make this profile active. In addition, S register 9039 must be set to 0 and above to enable a DEVICE HID profile and a negative value to enable a HOST HID profile. Outgoing connections initiate using the command: ATD<bd_addr>,1124 Incoming connections are automatically accepted and a CONNECT <bd_addr>,1124,< sends to the host. With the HID profile, a built-in standard keyboard HID descriptor is supplied along with a canned mode of operation. It enables a legacy device generating ASCII characters to present to a host as a compliant HID keyboard. In canned mode, each ASCII character (ASCII characters 128 and above are silently discarded) results in two INPUT reports to the host. The first is a corresponding key press and the second is a corresponding key unpress. When the host sends the 1 byte OUTPUT report sends to the host as-is. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 153 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide In non-canned mode (S Reg 531 > 0) the host has to send the raw 8 byte INPUT reports in the ATX<String> command and conversely any OUTPUT reports from the host send to the host in RX<string> asynchronous responses. Disconnections from the module initiate via DSR deassertion. However, if the module is in non-canned mode (S Register 531 > 0) then it is also possible to initiate a disconnection using the ATH command. On disconnection a NO CARRIER async response sends to the host. 14.4.1 HID Descriptors HIDs present their capabilities to a host in a HID descriptor which is essentially a block of octets that describe the devices capability and more importantly how events convey back and forth. This concept was originally developed by the USB organisation and has been adopted by the Bluetooth SIG virtually intact. The HID descriptor contains information about INPUT and OUTPUT reports. They are both blocks of octets described to contain various bit fields describing the event that needs conveyed to the peer. Hence, at the end of the day, if a HID implementation was viewed as a communications black box between a device and host, then it could be viewed as the device generating an INPUT report consisting of X bytes which presents to the host and conversely an OUTPUT report consisting of Y bytes sends by the host to the device. In this modules HID implementation, the module does not care about the content of those INPUT and OUTPUT reports. An INPUT report presents to the module by the UART host in a ATX<string> which then de-escapes and sends as a single atomic packet to the remote host. Similarly, each OUTPUT package arrives atomically in a single packet from the remote host which then sends to the UART host in a single RX<string>
message. It was mentioned above that by default a standard keyboard HID descriptor is built into the firmware and the default value of S Register 9039 makes the module connectable via a HID Device profile. It is possible to download up to two custom HID device descriptors to store in the modules non-volatile memory. These custom HID device descriptors are then identified via a number in the range 0 to N. If S Register 9039 changes to a value 1 to N+1, then on power up, if S Reg 9003 indicates that HID profile is to be made available, it implements the appropriate custom HID descriptor in the service discovery database. When custom HID descriptors are downloaded and stored, there is no validation performed on the block of data. This is because the module has no context to perform such validation. In MP mode, to download a custom HID descriptor, you can use the utility MpBtHost.exe. Right click on the window to invoke a pop-up menu and select Upload HID Descriptor. In the new dialog box, enter the BLOB ID (recommend leave at 0) and HID ID to use. Then to use that descriptor update S Register 9039 with a value which is HidId+1. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 154 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.5 HDP Profile (Health Device Profile) UUID : 1400,1401,1402 14.5.1 Background Health Device Profile (HDP) is available on the module in both Agent and Manager roles as defined by the Continua Alliance (see www.continua.org). There are two aspects to HDP: one is the transport layer, for which only Bluetooth is catered for by this module (although the Continua Alliance has also ratified others, for example USB), and the other aspect is IEEE data encapsulation. The Laird module provides a tightly coupled integrated solution for a Weigh Scale Specialization Agent. More specializations are provided in the future as and when there is demand via a firmware update. It is assumed that the reader is familiar with all the HDP and IEEE documentation and relevant guidelines published by the Continua Alliance. For HDP, it is assumed that the reader has access to the specification from the Bluetooth SIG. For IEEE it is assumed that the reader has access to the IEEE11073-20601 Optimised Exchange Protocol specification and the device specializations specifications 11073-10401 through to 10499. For the Weigher Scale specialization embedded in the module, the specification is 11073-10415. Obtain the IEEE standards from their website standards.ieee.org, and Bluetooth HDP specifications at www.bluetooth.org. The IEEE data specialization along with the Bluetooth physical transport defined in the appropriate specifications is very dry and difficult to understand, and it is pointless to reproduce that information here verbatim. However, an attempt is made to describe it from the modules usage point of view where the module and the functionality it provides is treated in a black box manner. 14.5.2 IEEE Black Box Model In a traditional health related environment, typical actors and props are the patient, instruments that measure appropriate parameters, health professionals, and the (manual and/or automatic) archiving of the records. Over the years there have been many suppliers of the instruments that measure appropriate parameters who have all provided proprietary methods for getting the data stored in records. It has always been the role of the health professionals to transcribe the data from the various instruments into the archive records. The manual process presents risks associated with errors in the transcribing process and so manufacturers provided even more proprietary solutions to automating that task. The Continua Alliance came about to address that confused picture with guidelines and a certification process to ensure that a consistent inter-operable picture emerges with regards to the instruments that measure appropriate parameters and the method for getting the data stored in records. The last thing the Continua Alliance would want to do is dictate how any individual instrument (referred to as an Agent) is physically designed, as that is best left to the engineers who know how best to design them. Instead, they have specified abstract data models for the various types of instruments, which they refer to as Data Specializations, and how they shall convey the data to an entity called a Manager that can be used to consistently store the data in an archive. Examples of data specialization abstract models exist for weigh scales, thermometers, glucose meters, blood pressure meters, ECGs, and many more will become available as they progress through various stages in appropriate working groups. Any Continua Alliance member is free to recommend creation of Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 155 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide data specializations as needed. Once ratified, the end result is always an abstract data model which defines what data is pertinent for that instrument and how it shall be presented to the real world. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 156 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.5.3 Abstract Data Model From a software engineers perspective, an abstract data model for an IEEE data specialization can best be described as a collection of arrays of different types of data (which the specifications refer to as attributes). Each attribute is unambiguously defined to consist of a tag, a type, and the actual value. There is no reliance on any programming language in the definition; it is purely a data model. As a minimum there shall be one array of attributes called the Medical Device System, henceforth referred to as an MDS which represents the properties and services of the device, independent of its health data capabilities and its status. There shall also be one array of attributes called the Numeric, henceforth referred to as NU which contains episodic measurements. There is also an RT-SA collection which to represents continuous samples or waveforms. Other collections exist and the reader is advised to refer to the IEEE11073-20601 standard for a definitive list, described under the general heading of Domain Information Model. At this point, imagine an HDP agent as just a collection of data records that can be read and written to locally under program control and each data point is identified by its tag and publishes its data type. This is analogous to a database table with 4 fields in each record. Three fields are called Tag, Type, Value, and the fourth field is called Collection Name such as MDS or NU or RT-SA. You should further imagine this database as accessible from a Manager over a physical transport media such as Bluetooth or USB. The procedure a Manager uses to gain access to that database of attributes is rigidly defined and standardised via a Service Model using an association state machine defined in the IEEE11073-20601 standard. This Service Model is encapsulated in the Laird Module and the user is encouraged to think of it in terms of a black box whose internal details are not relevant. The picture that should emerge for the Laird module user who requires a data specialization is that of a black box consisting of that conceptual database with a 4 field table and an engine that implements the association service model over Bluetooth so that it facilitates the mirroring of that said database at the HDP manager end. This picture then vastly simplifies the design and development of a health instrument that is required to be Continua Alliance certified. The hope is that, the user is only required to have a general idea about the content of the IEEE 11073-20601 and the data specialization IEEE11073-104xx standards. The following subsections provide more details as to how you can control and manipulate the black box. Please note that initially only a Weigh Scale data specialization as defined in 11073-10415 is available embedded inside the black box. By embedded it is implied that the MDS and NU collections are pre-
defined as per the standard and the attributes that may change values are exposed to the user for manipulation. In future it is hoped that a generic API will be exposed that allows any data specialization to be downloaded and tested. If a user requires a specific data specialization then they are encouraged to contact Laird with that request until that generic API is made available. It is also pertinent to note here that once a user has a working instrument using this module, it is up to the user to obtain Bluetooth Listing (quoting the QDID of the Laird module) prior to Continua Alliance testing and certification. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 157 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.5.4 HDP Agent Model From a software perspective the HDP Agent implementation is as shown in the diagram below. Figure 14-1: HDP Agent implementation Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 158 CONN-GUIDE-BT740_v0.2 104xx Data Specialisation - B104xx Data Specialisation - C104xx Data Specialisation - Weigh Scale (4111)AttributesNUCollectionAttributesMDSCollectionAttributesAttributesNUCollectionOtherCollectionsAttributesMDSCollectionAttributesAttributesNUCollectionOtherCollectionsAttributesMDSCollectionBluetooth StackUartResponses/EventsCommandsIEEE/HDP 'Black Box' Agent ModelBluetooth HDP ProfileLaird IEEE/HDP Services Encapsulation4111,Scale4104,Thermometerxxx,somethingSDP Record Enhanced Class 1 Bluetooth v2.1 Module Users Guide The diagram shows that the agent model is the Bluetooth communications stack. The stack consists of an SDP record that exposes to the outside world the data specializations it is capable of, a Laird IEEE/HDP Service Encapsulation layer which relays commands and responses to the host, and 0 or more instances of Data Specializations. At the time of the first release of the firmware, only a Weigh Scale specialization is offered. All UART commands available to the host are provided so that the various entities in the black box can be controlled or interrogated. Given there can be many agent specializations embedded in the firmware, they are identified in various commands using a 16 bit handle. 14.5.5 Weigh Scale Data Specialization The Weigh Scale Specialization (nominal code 4111) is embedded in the firmware is shown as below and it contains a MDS and an NU object. Figure 14-2: Embedded Weigh Scale Specialization The MDS object is defined in the firmware with the following attributes:
Attribute Tag Data Type Comments MDC_ATTR_ID_HANDLE 2337 HANDLE Always: 0 MDC_ATTR_SYS_TYPE_SPEC_LIST 2650 TYPE_SPEC_LIST Const MDC_ATTR_ID_MODEL 2344 SYSTEM_MODEL Var:SystemModel MDC_ATTR_SYS_ID 2436 OCTET_STRING Var:SystemId MDC_ATTR_DEV_CONFIG_ID 2628 CONFIG_ID 1500 (0x05DC) MDC_ATTR_ATTRIBUTE_VAL_MAP 2645 ATTR_VAL_MAP Const MDC_ATTR_ID_PROD_SPECN 2349 PROD_SPEC Const MDC_ATTR_TIME_ABS 2439 ABSOLUTE_TIME Var:Time MDC_ATTR_MDS_TIME_INFO 2629 MDS_TIME_INFO Const MDC_ATTR_POWER_STAT 2389 POWER_STATUS Var:PowerStatus MDC_ATTR_VAL_BATT_CHARGE 2460 INTU_16 Var: Batt, Chrg. MDC_ATTR_TIME_BATT_REMAIN 2440 BatMeasure Var:time_batt_remain Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 159 CONN-GUIDE-BT740_v0.2 104xx Data Specialisation - Weigh Scale (4111)AttributesNUCollectionAttributesMDSCollection Enhanced Class 1 Bluetooth v2.1 Module Users Guide The NU object is defined with the following attributes:
Attribute Tag Data Type MDC_ATTR_ID_HANDLE 2337 HANDLE MDC_ATTR_ID_TYPE 2351 TYPE Comments Always: 1 Const MDC_ATTR_METRIC_SPEC_SMAL L 2630 METRIC_SPEC_SMALL Const MDC_ATTR_UNIT_CODE 2454 OID_TYPE MDC_ATTR_ATTRIBUTE_VAL_MA P 2645 ATTR_VAL_MAP Var:Weight Units 2646,2448 MDC_ATTR_TIME_STAMP_ABS 2448 ABSOLUTE_TIME Var:Time MDC_ATTR_NU_VAL_OBS_SIMP 2646 SIMPLE_NU_OBS_VAL Var:Weight MDC_ATTR_NU_ACCUR_MSMT 2378 FLOAT_TYPE MDC_ATTR_MSMT_STAT 2375 MEASUREMENT_STATU S Always: 1 Var:Meas. Stat. The attributes commented as variables expose to the host for reading and writing via the UART interface using AT+HAG and AT+HAS commands respectively and are described in detail elsewhere in this document. The UART interface identifies the variable attributes mentioned above using an attribute ID and an additional sub ID. The concept of sub ID is a Laird artefact and is not part of any IEEE standard, but the attribute ID is the same as those defined in the IEEE standard in most cases. The complete list for the Weigh Scale specialization is as per the table below and should be used with the agent attribute read/write commands AT+HAG and AT+HAS. Note: The attribute values passed back and forth from the host are NOT validated in any way by the firmware in the Laird module. It is up to the host to ensure that the correct data writes into an attribute. Any illegal values are picked up at time of Continua Alliance certification testing which prevents certification. Table 14-1: Variable Attributes in Weigh Scale Specialization Attribute Name (See IEEE spec for format) Attr ID Sub ID Size in bytes Weight Weight Units Time Power Status Battery Charge Time Battery Remain value Time Battery Remain unit Measurement Status Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 2646 2454 2448 2389 2460 2440 2440 2375 0 0 0 0 0 0 1 0 4 2 8 2 2 4 2 2 160 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide System ID System Model product name System Model model name Serial Number 2436 2344 2344 2349 0 0 1 0 8 12 16 8 14.5.6 Thermometer Data Specialization The Thermometer Specialization (nominal code 4104) is embedded in the firmware is shown as below and it contains a MDS and an NU object. Figure 14-3: Embedded Thermometer Specialization The MDS object is defined in the firmware with the following attributes:
Attribute Tag Data Type Comments MDC_ATTR_ID_HANDLE 2337 HANDLE Always: 0 MDC_ATTR_SYS_TYPE_SPEC_LIST 2650 TYPE_SPEC_LIST Const MDC_ATTR_ID_MODEL 2344 SYSTEM_MODEL Var:SystemModel MDC_ATTR_SYS_ID 2436 OCTET_STRING Var:SystemId MDC_ATTR_DEV_CONFIG_ID 2628 CONFIG_ID 800 (0x0320) MDC_ATTR_ID_PROD_SPECN 2349 PROD_SPEC Const MDC_ATTR_TIME_ABS 2439 ABSOLUTE_TIME Var:Time MDC_ATTR_MDS_TIME_INFO 2629 MDS_TIME_INFO Const MDC_ATTR_POWER_STAT 2389 POWER_STATUS Var:PowerStatus MDC_ATTR_VAL_BATT_CHARGE 2460 INTU_16 Var: Batt, Chrg. MDC_ATTR_TIME_BATT_REMAIN 2440 BAT_MEASURE Var:time_batt_remain The NU object is defined with the following attributes:
Attribute Tag Data Type MDC_ATTR_ID_HANDLE 2337 HANDLE MDC_ATTR_ID_TYPE 2351 TYPE Comments Always: 1 Const MDC_ATTR_METRIC_SPEC_SMAL L 2630 METRIC_SPEC_SMALL Const Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 161 CONN-GUIDE-BT740_v0.2 104xx Data Specialisation - Thermometer (4104)AttributesNUCollectionAttributesMDSCollection Enhanced Class 1 Bluetooth v2.1 Module Users Guide Attribute Tag Data Type MDC_ATTR_UNIT_CODE 2454 OID_TYPE Comments Var:Weight Units MDC_ATTR_TIME_PD_MSMT_ACT IVE MDC_ATTR_ATTRIBUTE_VAL_MA P 2649 RELATIVE_TIME Var:Time (int32) 2645 ATTR_VAL_MAP 2646,2448 MDC_ATTR_TIME_STAMP_ABS 2448 ABSOLUTE_TIME Var:Time MDC_ATTR_NU_VAL_OBS_BASIC 2636 BASIC_NU_OBS_VAL Var:temperature MDC_ATTR_NU_ACCUR_MSMT 2378 FLOAT_TYPE Always: 1 MDC_ATTR_MSMT_STAT 2375 MEASUREMENT_STAT Var:Meas. Stat. US The attributes commented as variables expose to the host for reading and writing via the UART interface using AT+HAG and AT+HAS commands respectively and are described in detail elsewhere in this document. The host identifies the variable attributes mentioned above on the UART interface using an attribute ID and an additional sub ID. The concept of sub ID is a Laird artefact and is not part of any IEEE standard, but the attribute ID is the same as those defined in the IEEE standard in most cases. The complete list for the Weigh Scale specialization is as per the table below and should be used with the agent attribute read/write commands AT+HAG and AT+HAS. Note: The attribute values passed back and forth from the host are NOT validated in any way by the firmware in the Laird module. It is up to the host to ensure that the correct data writes into an attribute. Any illegal values are picked up at time of Continua Alliance certification testing which prevents certification. Table 14-2: Variable Attributes in Thermometer Specialization Attribute Name
(See IEEE spec for format) Attr ID Sub Id Size in bytes 2636 2454 2448 2389 2460 2440 2440 2375 2436 2344 2344 Temperature Temperature Units Absolute Time Power Status Battery Charge Time Battery Remain value Time Battery Remain unit Measurement Status System ID System Model product name System Model model name Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 0 0 0 0 0 0 1 0 0 0 1 2 2 8 2 2 4 2 2 8 12 16 162 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Serial Number Measurement Active Period 2349 2649 0 0 8 4 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 163 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.5.7 Glucometer Data Specialization The Glucometer Specialization (nominal code 4113) embedded in the firmware is shown as below and it contains a MDS and an NU object. Figure 14-4: Embedded Glucometer Specialization The MDS object is defined in the firmware with the following attributes:
Attribute Tag Data Type Comments MDC_ATTR_ID_HANDLE 2337 HANDLE Always: 0 MDC_ATTR_SYS_TYPE_SPEC_LIST 2650 TYPE_SPEC_LIST Const MDC_ATTR_ID_MODEL 2344 SYSTEM_MODEL Var:SystemModel MDC_ATTR_SYS_ID 2436 OCTET_STRING Var:SystemId MDC_ATTR_DEV_CONFIG_ID 2628 CONFIG_ID 1700 (0x06A4) MDC_ATTR_ID_PROD_SPECN 2349 PROD_SPEC Const MDC_ATTR_TIME_ABS 2439 ABSOLUTE_TIME Var:Time MDC_ATTR_MDS_TIME_INFO 2629 MDS_TIME_INFO Const MDC_ATTR_POWER_STAT 2389 POWER_STATUS Var:PowerStatus MDC_ATTR_VAL_BATT_CHARGE 2460 INTU_16 Var: Batt, Chrg. MDC_ATTR_TIME_BATT_REMAIN 2440 BAT_MEASURE Var:time_batt_remain The NU object is defined with the following attributes:
Attribute Tag Data Type Comments MDC_ATTR_ID_HANDLE 2337 HANDLE MDC_ATTR_ID_TYPE 2351 TYPE Always: 1 Const MDC_ATTR_METRIC_SPEC_SMAL L 2630 METRIC_SPEC_SMALL Const MDC_ATTR_UNIT_CODE 2454 OID_TYPE Var:Weight Units MDC_ATTR_ATTRIBUTE_VAL_MA P 2645 ATTR_VAL_MAP 2646,2448 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 164 CONN-GUIDE-BT740_v0.2 104xx Data Specialisation - Glucometer (4113)AttributesNUCollectionAttributesMDSCollection Enhanced Class 1 Bluetooth v2.1 Module Users Guide Attribute Tag Data Type Comments MDC_ATTR_TIME_STAMP_ABS 2448 ABSOLUTE_TIME Var:Time MDC_ATTR_NU_VAL_OBS_BASIC 2636 BASIC_NU_OBS_VAL Var:temperature MDC_ATTR_NU_ACCUR_MSMT 2378 FLOAT_TYPE Always: 1 MDC_ATTR_MSMT_STAT 2375 MEASUREMENT_STAT Var:Meas. Stat. US The attributes commented as variables expose to the host for reading and writing via the UART interface using AT+HAG and AT+HAS commands respectively and are described in detail elsewhere in this document. The host identifies the variable attributes mentioned above on the UART interface using an attribute ID and an additional sub ID. The concept of sub ID is a Laird artefact and is not part of any IEEE standard, but the attribute ID is the same as those defined in the IEEE standard in most cases. The complete list for the Weigh Scale specialization is as per the table below and should be used with the agent attribute read/write commands AT+HAG and AT+HAS. Note: The attribute values passed back and forth from the host are NOT validated in any way by the firmware in the Laird module. It is up to the host to ensure that the correct data is written into an attribute. Any illegal values are picked up at time of Continua Alliance certification testing which prevents certification. Table 14-3: Variable Attributes in Thermometer Specialization Attribute Name
(See IEEE spec for format) Blood Glucose Blood Glucose Units Absolute Time Power Status Battery Charge Time Battery Remain value Time Battery Remain unit Measurement Status System ID System Model product name System Model model name Serial Number Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Attr ID Sub ID Size in bytes 2636 2454 2448 2389 2460 2440 2440 2375 2436 2344 2344 2349 0 0 0 0 0 0 1 0 0 0 1 0 2 2 8 2 2 4 2 2 8 12 16 8 165 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.6 Agent Related AT Commands This section describes all the commands used to manage the Agent role for HDP. 14.6.1 Connection to an HDP Manager Command:
Response:
Description:
AT+HAAhhhh
<cr,lf> OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Or
<cr,lf>HAD:ASSOCIATE xxxx<cr,lf>OK<cr,lf>
Or
<cr,lf> HAD:DISASSOCIATE xxxx<cr,lf>ERROR nn<cr,lf>
This command establishes a connection to an HDP manager and associates the agent with it so that attribute data can be exchanged. The Bluetooth address of the HDP manager and the agent specialization that needs to associate is defined by the handle hhhh, which is pre-obtained using command AT+HAB. This command waits for the procedure to complete successfully or otherwise before responding with OK or ERROR. If the agent is already associated then an immediate OK is the response. If the agent is not already associated then a Bluetooth connection initiates and as soon as a connection establishes, the association state machine progresses through to negotiating a configuration and then ultimately confirms the association. If association is successful, then a HDA:ASSOCIATE .. asynchronous response sends to the host. If association fails (because BT connection failed or configuration could not be negotiated) then the async response HDA:DISASOCIATE sends to the host. An OK or ERROR response terminates the procedure. Note: If S Reg 9071 is non-zero, then there is an automatic disassociation after a time specified by that register. The timer restarts every time a scan report sends to the manager. SReg Required Settings: Bit 2 set in S9003 and S9070=0 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 166 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.6.2 Bind a Data Specialization Command:
Response:
Description:
AT+HAB<bd_addr>,iiii
<cr,lf>hhhh<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command binds a data specialization identified by the nominal code iiii (for example 4111 = Weigh Scale) with an HDP manager identified by the Bluetooth address <bd_addr>. For this command to be successful, the data specialization identified by iiii has to be pre-embedded in the firmware. Although the firmware allows multiple bindings to the same specialization, please be aware that it is the same object and each instance does not have a unique set of attributes. If the binding is successful, then a 16 bit handle hhhh (a decimal number) returns, which is then used as a parameter in many subsequent commands. SReg Required Settings: Bit 2 set in S9003 and S9070=0 14.6.3 Disassociate an Agent Command:
Response:
Description:
Command:
Response:
Description:
AT+HADhhhh
<cr,lf>OK<cr,lf>
Or
<cr,lf>> HAD:DISASSOCIATE xxxx<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command disassociates an agent identified by the handle hhhh from a manager. This command waits for the procedure to complete successfully or otherwise before responding with OK or ERROR. If the agent is already disassociated then an immediate OK is the response. SReg Required Settings: Bit 2 set in S9003 and S9070=0 AT+HAEiiii,name
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command must be issued prior to sending the AT+HAL commands and includes the data specialization endpoint iiii with the string name as an HDP source (agent) in the SDP record that is exposed to potential peers. This tells potential peers that the device offers a iiii data specialization source. Without this entry in the SDP record, a manager is not able to make a connection to the HDP agent, although it is rare for a manager to initiate connections in typical usage scenarios. SReg Required Settings: Bit 2 set in S9003 and S9070=0 Command:
Response:
AT+HAGhhhh,aaaa,ssss
<cr,lf>hhhhhhhhhhhhhh<cr,lf>OK<cr,lf>
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 167 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Or
<cr,lf>ERROR nn<cr,lf>
Description:
Command:
Response:
Description:
Command:
Response:
Description:
Command:
Response:
This command reads (gets) the value of one of the variable attributes identified by aaaa and sub ID ssss in the attribute collections for that agent identified by the handle hhhh. For the embedded weigh scale data specialization this command reads the value of an attribute listed in Table 14-1. The value always returns as a string of hexadecimal digits representing the binary value, and the size of that string is even. Different attributes have different sizes. SReg Required Settings: Bit 2 set in S9003 and S9070=0 AT+HAL
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command must issue after sending at least one AT+HAE command, and registers and activates the SDP record with information supplied in the AT+HAE commands. Without the SDP record, a manager is not able to make a connection to the HDP agent, although it is rare for a manager to initiate connections in typical usage scenarios. SReg Required Settings: Bit 2 set in S9003 and S9070=0 AT+HARhhhh,pppp[,aaaa[,aaaa[]]]
<cr,lf> OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command triggers a scan report for person ID pppp (16 bit decimal number) from the agent identified by handle hhhh. If the agent is not associated with the bound manager (see AT+HAB) then it first triggers the start of an association. Once association exists, a scan report sends. If [,aaaa[,aaaa[]]] is absent from the command, then the standard scan report as identified by the attribute MDC_ATTR_ATTRIBUTE_VAL_MAP in the NU collection sends to the manager. Otherwise, the
[,aaaa[,aaaa[]]] can be a list of any attribute mentioned in the NU collection. For example, to send a scan report with just the measurement status, just specify the single value 2375. Please note that only attributes mentioned in the NU collection are allowed. Any aaaa value not found in the NU collection is silently ignored. SReg Required Settings: Bit 2 set in S9003 and S9070=0 AT+HAShhhh,aaaa,ssss,hhhhhhhhhhhh
<cr,lf> OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
Description:
This command writes (sets)a new value hhhhhhhhhhhh to one of the variable attributes (identified by aaaa and sub ID ssss) in the attribute Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 168 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide collections for the agent identified by the handle hhhh. For the embedded weigh scale data specialization, this command writes to an attribute listed in Table 14-1. The value hhhhhhhhh is in hexadecimal and is NOT validated in any way apart from the requirement that it shall be twice the size in bytes as specified for that attribute. SReg Required Settings: Bit 2 set in S9003 and S9070=0 14.6.4 Agent Related AT Asynchronous Responses This section describes all the asynchronous responses sent to the host by the HDP Agent. Each response is framed by a <cr,lf> at the start and end. Command:
Response:
Description:
Command:
Response:
Description:
Command:
Response:
Description:
No Command. This is a status message. HDA:DISASSOCIATED hhhh This response sends the host when an association attempt fails (as a result of AT+HAA or AT+HAR commands) or when an association terminates by either AT+HAD or due to loss of Bluetooth connectivity. The parameter hhhh which is a 16 bit decimal number identifies the agent. No Command. This is a status message. HDA:ASSOCIATED hhhh,iiii,cccc,sssssssssssss This response sends to the host when a successful association happens for the agent identified by hhhh (16 bit decimal number). For completeness, the data specialization nominal code iiii (16 bit decimal) and the device configuration ID cccc (16 bit decimal), that got negotiated with the manager, is also provided. The 16 character parameter ssssssss specifies the system ID of the manager. Note: An agent data specialization can be basic as specified in the relevant spec, or one of the more enhanced ones which have more capabilities. For example, with the weigh scale, Laird provides for the basic MDS collection, but it is possible to specify multiple MDS collections which expose more functionality (e.g. body mass index attributes). These extended collections are identified by configuration IDs and are offered to a manager during the association phase in descending order of complexity until the manager accepts one that it can work with. No Command. This is a status message. HDA:TIME hhhh,ccyymmddhhmmssaa This response sends to the host when a manager sends new time information by writing to the MDC_ATTR_TIME_ABS attribute in the MDS collection of the agent identified by hhhh. The time ccyymmddhhmmssaa is a 16 character hexadecimal value which is encoded as follows:
CC Century (e.g. 14==20) YY Year (e.g. 0B==11) MM Month (e.g. 0C==12) DD Day (e.g 1F==31) HH Hour (e.g. 17==23) MM Minutes (e.g 32==50) Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 169 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide SS Seconds (e.g. 2F==47) AA Hundreths of seconds (e.g 63==99) For example, the data and time 12 Feb 2011, 16:45:33.78 sends as 140B020C102D214E 14.6.5 HDP Manager Model From a software perspective the HDP Manager implementation is as shown in the diagram below and the functionality is provided mainly to enable prototyping and regression testing of agent specializations. There are many far more capable HDP Managers available which are hosted on a PC. For example, the latest Toshiba Bluetooth Stack is HDP capable and there are imminent BlueZ releases for Linux PCs. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 170 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Figure 14-5: Manager model with Bluetooth communications stack Figure 14-5 shows that the Manager model consists of the Bluetooth communications stack. The stack consists of:
an SDP record that exposes to the outside world the data specializations it is capable of accepting as sinks a Laird IEEE/HDP Service Encapsulation layer which relays commands and responses to the host Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 171 CONN-GUIDE-BT740_v0.2 Associated Agent ObjectAssociated Agent ObjectAssociated Agent ObjectAssociated Agent ObjectAssociated Agent ObjectBluetooth StackUartResponses/EventsCommandsLaird IEEE/HDP Services Encapsulation4111,Scale4104,Thermometerxxx,somethingSDP RecordIEEE/HDP 'Black Box' Manager ModelPartial List of MDS AttrsPartial List of NU AttributesAttributesAttributesPartial List of MDS AttrsPartial List of NU AttributesAttributesAttributesPartial List of MDS AttrsPartial List of NU AttributesAttributesAttributesPartial List of MDS AttrsPartial List of NU AttributesAttributesAttributesPartial List of MDS AttrsPartial List of NU AttributesAttributesAttributesBluetooth HDP Profile Enhanced Class 1 Bluetooth v2.1 Module Users Guide 0 or more instances of Specialization Associations. These Associated Agent Objects are transient and come into existence only when an agent successfully associates. The associated process results in the top few attributes in the MDS and NU collections caching in the Manager which the host reads using the AT+HMG command after an association. Just like the Agent end, the Manager indicates via its SDP record which Data Specializations it is capable of sinking, and commands analogous to the ones provided for the Agent model have been provided to manipulate that SDP record content. 14.7 Manager Related AT Commands This section describes all the commands used to manage the agent role for HDP. Command:
Response:
Description:
Command:
Response:
Description:
Command:
Response:
Description:
AT+HMEiiii,name
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command must issue prior to sending the AT+HML commands and includes the data specialization endpoint iiii with the string name as a HDP sink in the SDP record that is exposed to potential agents. This tells potential peers that the device offers a iiii data specialization sink. Without this entry in the SDP record, an appropriate agent is not able to make a connection to the HDP Manager. SReg Required Settings: Bit 2 set in S9003 and S9070=1 AT+HMGhhhh,oooo,aaaa
<cr,lf>hhhhhhhhhhhhhh<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command reads the value of one of the cached attributes for an agent identified by hhhh. The parameter oooo is for 0 for attributes in the MDS collection cache and 1 for the NU collection cache and aaaa is the ID of the attribute to read. The value always returns as a string of hexadecimal digits representing the binary value, and the size of that string is even. Different attributes have different sizes. SReg Required Settings: Bit 2 set in S9003 and S9070=1 AT+HML
<cr,lf>OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command must issue after sending at least one AT+HME command and registers and activate the SDP record with information supplied in the AT+HME commands. Without the SDP record, an agent is not able to make a connection to the HDP manager. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 172 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Command:
Response:
Description:
SReg Required Settings: Bit 2 set in S9003 and S9070=1 AT+HMThhhh, ccyymmddhhmmssaa
<cr,lf> OK<cr,lf>
Or
<cr,lf>ERROR nn<cr,lf>
This command sends the current data and time to the associated agent identified by handle hhhh. The time ccyymmddhhmmssaa is a 16 character hexadecimal value which is encoded as follows:
CC Century (e.g. 14==20) YY Year (e.g. 0B==11) MM Month (e.g. 0C==12) DD Day (e.g 1F==31) HH Hour (e.g. 17==23) MM Minutes (e.g 32==50) SS Seconds (e.g. 2F==47) AA Hundreths of seconds (e.g 63==99) For example, the data and time 12 Feb 2011, 16:45:33.78 sends as 140B020C102D214E SReg Required Settings: Bit 2 set in S9003 and S9070=1 14.7.1 Manager Related AT Asynchronous Responses This section describes all the asynchronous responses sent to the host by the HDP Manager. Each response is framed by a <cr,lf> at the start and end. Command:
Response:
Description:
No Command. This is a status message. HDM:DISASSOCIATED hhhh This response sends to the host when an association terminates by an agent or due to loss of Bluetooth connectivity. The parameter hhhh which is a 16 bit decimal number identifies the agent. Command:
Response:
No Command. This is a status message. HDM:ASSOCIATED hhhh,iiii,cccc,sssssssssssss Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 173 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Description:
Command:
Response:
Description:
This response sends to the host when a successful association happens for the agent identified by hhhh (16 bit decimal number). For completeness, the data specialization nominal code iiii (16 bit decimal) and the device configuration ID cccc (16 bit decimal) that got negotiated with the manager, is also provided. The 16 character parameter ssssssss specifies the system ID of the agent. Note: An agent data specialization can be basic as specified in the relevant spec, or more enhanced with more capabilities. For example, with the weigh scale Laird provides for the basic MDS collection, it is possible to specify multiple MDS collection which expose more functionality (such as body mass index attributes). These extended collections are identified by configuration IDs and are offered to a manager during the association phase in descending order of complexity until the manager accepts one that it can work with. No Command. This is a status message. HDM:SCANPERIOD hhhh<more>
This response sends to the host when a scan report receives from agent identified by handle hhhh. Since a scan report can consist of data values for many attributes, this report is formatted with embedded <lf> characters as follows:
<cr><lf>HDM:SCANREPORT hhhh:pppp
<lf>O:oooo
<lf>A:aaaa,ddd..ddd
<lf>A:aaaa,ddd..ddd
<lf>O:oooo
<lf>A:aaaa,ddd..ddd
<lf>A:aaaa,ddd..ddd
<cr><lf>
Where <lf>O: identifies the collection object (oooo == 1 for NU etc) and then subsequence <lf>A: lines consist of value pairs aaaa,ddd.ddd where aaaa is the attribute nominal code and ddd...ddd is its value in hexadecimal. The size of the value for each attribute is specified in the IEEE standards. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 174 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.7.1.1 Sample Host/Module Message Sequence In a typical weigh scale usage, the sequence of commands (red) and responses (blue) from the module is as follows, where it assumed that the both ends start of from factory default state:
AGENT MANAGER
ats9003=5 OK ats9070=1 OK at&w OK ats9003=5 OK ats9070=0 OK at&w OK
PAIRING
AT+BTW0016a4fef005 OK PAIR 0 0016A4FEF005 PAIR 0 0016A4FEF004
REGISTER SDP RECORDS
AT+HME4111,"scale"
OK AT+HML OK AT+HAE4111,"scale"
OK AT+HAB0016a4fef005,4111 46392 OK AT+HAL OK
ASSOCIATE
AT+HAA46392 HDA:ASSOCIATED 46392,4111,1500,4C414952444D4752 HDM:ASSOCIATED 29364,4111,1500,0016A4FEF004B538 OK
READ ATTIBUTES @ MANAGER
AT+HMG29364,0,2628 05DC OK Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 175 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide
READ ATTIBUTES @ AGENT
AT+HAG46392,2646,0 0000004B OK
WRITE ATTIBUTES @ AGENT
AT+HAS46392,2646,0,00000123 OK AT+HAG46392,2646,0 00000123 OK
SEND TIME
AT+HMT29364,140B020C102D214E OK HDA:TIME 46392,140B020C102D214E
SEND FIXED SCAN REPORT
AT+HAR46392,1234 HDM:SCANREPORT 29364:1234 O:1 A:2646,00000123 A:2448,2011021216453378 OK
SEND VARIABLE SCAN REPORT
AT+HAR46392,1234,2454,2448,2646,2375 HDM:SCANREPORT 29364:1234 O:1 A:2454,06C3 A:2448,2011021216453378 A:2646,0000004B A:2375,8000 OK
DISASSOCIATE
AT+HAD46392 OK HDA:DISASSOCIATED 46392 HDM:DISASSOCIATED 29364 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 176 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.7.2 Authentication and Encryption The module and firmware is BT v2.1 compliant so it uses Simple Secure Pairing (SSP) to authenticate devices to trust, and only invokes a legacy pairing procedure when a peer device is v2.0 or older. It is not possible to configure the unit to be only capable of legacy pairing and still have v2.1 approvals. The purpose of pairing, whether legacy or SSP, is to generate the same random 16 byte key at both ends. The key is then used in subsequent connections for authentication and encryption. 14.7.3 Legacy Pairing A legacy pairing procedure is automatically used when pairing is initiated (by either end) and the peer is approved to v2.0 and below. 14.7.3.1 Outgoing To initiate a pairing, the host shall submit the command AT+BTW<bd_addr> to which it gets an immediate OK or ERROR response. The host then waits for a PIN ? <bd_addr> response to which it responds with the command AT+BTK=pincode. When the pairing procedure completes, the module sends to the host the following asynchronous response: PAIR N <bd_addr>. N is 0 when the pairing is successful, 1 for a timeout, and 2 for a generic failure (for example, mismatching pincode). 14.7.3.2 Incoming The module has to be in at least connectable mode for it to participate in a pairing initiated from a legacy peer. The first indication the host gets that an incoming legacy pairing has initiated is when it receives the asynchronous response PIN ? <bd_addr>. To this, the host responds with a shared pincode conveyed in the command AT+BTK=pincode. When the pairing procedure completes, the module sends to the host the following asynchronous response: PAIR N <bd_addr>. N is 0 when the pairing is successful, 1 for a timeout, and 2 for a generic failure (for example, mismatching pincode). 14.7.4 Simple Secure Pairing Simple secure pairing was introduced in v2.1 of the Bluetooth specification to simplify the pairing procedure so it did not rely on a pre-shared pincode and so that all connections are forced to be encrypted. Unlike pre v2.1 devices, it is not possible to create connections without encryption. Simple secure pairing uses the Diffie-Hellman public/private encryption methodology to expedite a common 128 bit key at both ends. This eliminates the need for pre-shared pincodes but introduces the man in the middle (MITM) attack vulnerability. To address the MITM vulnerability the concept of verification via a 6 digit passcode was also added. A 6 digit passcode was selected, as that reduces the probability of a random MITM attack succeeding to one in a million. The 6 digit passcode is NOT a pre shared code, but is a random 6 digit artefact derived from the Diffie-
Hellman calculations such that knowledge of that 6 digit number by an attacker cannot result in back-
calculation of the 128 bit key that generated. For a user to interact and process the 6 digit passcode the SSP procedure requires that each Bluetooth device have an I/O capability which is one of the following:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 177 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide None Display Only Display with a Yes/No button Keyboard only This I/O capability exchanges by the two peers going through a pairing procedure so that the optimal user interaction selects at both ends. For example, if one end admits to keyboard only and the other to Display only, then the two negotiate that the display end shows the passcode with an appropriate prompt to get the user at the other end to type in the passcode. When either has none capability, then pairing procedure completes without any MITM protection by both ends automatically accepting the passcode generated by the pairing algorithm. 14.7.4.1 I/O Capability The I/O capability of the module is set via S Register 6 (9006 in AT mode) where the value to set is as follows:
12 = No I/O capability 13 = Display with Yes/No 14 = Keyboard only 15 = Display Only When both ends are keyboard only, you can enter a pre-shared 6 digit number. When both ends are Display Only it is unlikely the two devices have services that are of use to either and so it could be contrived combination. 14.7.4.2 Outgoing To initiate a pairing, the host shall submit the command AT+BTW<bd_addr> to which it gets an immediate OK or ERROR response. The host then shall wait for a PASSKEY? N <bd_addr> response to which it shall respond with the command AT+BTK=passcode or AT+BTKY or AT+BTKN depending on the value of N in the PASSKEY? message. When the pairing procedure completes, the module sends to the host the following asynchronous response: PAIR N <bd_addr>. N is 0 for a successful pairing, 1 for a timeout, and 2 for a generic failure
(for example, mismatching pincode). As you can see, the host is able to determine if SSP or legacy pairing is in progress because in the former the challenge message is PASSKEY? whereas in the latter it is PIN ?
14.7.4.3 Incoming The module has to be in at least connectable mode for it to participate in a pairing initiated from a SSP capable peer. The first indication the host may get is that an incoming pairing has initiated is when it receives the asynchronous response PASSKEY? N <bd_addr>. To this, the host responds with the command AT+BTK=passcode or AT+BTKY or AT+BTKN depending on the value of N in the PASSKEY? message. When the pairing procedure completes, and for just works, the module sends to the host the following asynchronous response: PAIR N <bd_addr>. N is 0 for a successful pairing, 1 for a timeout, and 2 for a generic failure (for example, mismatching pincode). Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 178 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide As you can see, the host is able to determine if SSP or legacy pairing is in progress because in the former the challenge message is PASSKEY? whereas in the latter it is PIN ?. In the just works scenario the PAIR 0 message informs the host that a pairing is complete. 14.7.4.4 Host processing of the PASSKEY? N response The full format of the PASSKEY? message to the host is:
PASSKEY? N <bd_addr>[,passcode]
N is 1, 2, or 3 and ,passcode is not present when N=3. When N=1, this message requires the host to just display the passcode. The module does not expect any confirmation from the host. When N=2, this message requires the host to display the passcode so that the user can accept or reject the pairing. The host sends the AT+BTKY command to accept the pairing, and to reject it sends AT+BTKN. When N=3, the passcode is not provided and the host submits the AT+BTK=passcode command. To reject, it can send any value not matching the passcode displayed at the remote end OR send AT+BTK=. In the case of pairing where the I/O capability is none, the pairing occurs with just works procedure where both ends automatically accept the pairing. In this case the module becomes aware that the pairing happened when it receives the PAIR N <bd_addr> response. 14.7.4.5 GPIO Access via SReg 619 and 620 The GPIO can be read and written to in AT mode via S registers 619 and 620. SReg 620 reads the current states of all GPIO pins and displays as hex value with a & prefix. To write to output pins, a nonzero mask MUST first write to S register 619. Subsequently, any value written to S Reg 620 only affects GPIO pins which have a corresponding bit in S Reg 619 set to 1. 14.7.5 GPIO Exchange via RFCOMM Modem Signalling There is a modem signalling message in an SPP connection that exchanges between peers. It conveys the status of 4 bits called RTR, RTC, DV, and IC, which normally map to DTR/DSR, RTS/CTS, DCD and RI respectively. This on-air message is transparent and happens in the background as and when required. The firmware in the module allows GPIO to map to those 4 bits. In total 8 GPIO pins can be mapped: 4 for inputs mapped to the bits that are sent to the peer, and 4 for outputs updated when a modem signalling message arrives from the peer. It is not necessary to map all 8 bits and it is perfectly acceptable to have no pins mapped (which is the default). S Registers 651 to 654 inclusive specify OUTPUT pins which update when a modem signal message arrives from a peer. S Registers 661 to 664 inclusive specify INPUT pins which are monitored for changes of state, and when detected result in a modem signal to be sent to the peer. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 179 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide As a result, it is possible to convey the state of a digital pin to the peer with some inherent latency. The latency depends on the quality of the RF connection, and even with the best of connection the user must test actual timings to check that the latency is acceptable for the use case. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 180 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 14.7.6 Enhanced Inquiry Responses Bluetooth 2.1 specification allows up to 240 bytes of extended inquiry data. On BT740-Sx modules, this data is limited to a maximum length based on firmware builds due to internal memory restrictions. Extended inquiry data transmits e.g. the friendly name, UUIDs of supported profiles, or user defined data within the inquiry process and without a Bluetooth connection. The architecture for managing EIR data is composed of a BLOB buffer, a set of AT commands around them, and:
Baseband (EIR data visible to inquiring devices) RAM buffer (allows accumulation of data) EIR persistent store (non-volatile buffer, copied to baseband at boot time) As the input buffer length for one AT command is limited, there is a RAM buffer to accumulate several short data packets. The accumulated data of the RAM buffer can be copied to the baseband where it becomes visible to other inquiring devices immediately. The content of the RAM buffer can copy to the EIR persistent store. If the EIR persistent store contains data, it copies to the baseband automatically at boot time. This allows a flexible usage of extended inquiry data. For example, data with a low data rate (e.g. temperature) can transmit without creating a connection between Bluetooth devices, however without the benefits of encryption and authentication. The command AT+BTB is provided to manage EIR data in AT mode. 14.7.6.1 EIR Data Format When passing EIR data (<data>) to AT commands (AT+BTB=<data> / AT+BTB+<data>), each byte should be presented by its ASCII representation whenever it is a printable character. Each non-printable ASCII character must be presented as 2 hex digits with a preceding \. For example, a byte of decimal value 5 is presented as \05 because the ASCII character of 05d is not printable. A decimal value of 43 should be presented as + because + is the ASCII character representing 43d. The module also accepts \2B (the hexadecimal presentation of 43d) but at the price of two redundant characters. Exceptions:
(quotation mark) must be presented as \22
\ (backslash) must be presented as \5C When querying the content of the BLOB, non-printable ASCII characters are presented by 2 hex digits with preceding \. Exceptions:
(quotation mark) is presented as \22
\ (backslash) is presented as \5C
, (comma) is presented as \2C Any data passed to the baseband must match the format defined in the Bluetooth Specification Version 2.1 + EDR [1], vol3, Part C Generic Access Profile, 8 Extended Inquiry Response Data Format (page 1305 in the *.pdf file). The AT command interpreter does not perform any checks on the baseband data format. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 181 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 15 SURFACE MOUNT MODULES 15.1 Introduction Laird surface mount modules are designed to conform to all major manufacturing guidelines. This section provides additional guidance for mounting the module. This section is considered a living document and is updated as new information is presented. The modules are designed to meet the needs of a number of commercial and industrial applications. The modules are designed to be easily manufactured and conform to current automated manufacturing processes. 15.2 Shipping Modules ship in Electrostatic Discharge (ESD)-safe trays that can load into most manufacturers pick and place machines. Layouts of the trays are provided in Figure 15-1. Figure 15-1: BT740 Shipping Tray Details Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 182 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 15.3 Reflow Parameters Laird surface mount modules are designed to be easily manufactured, including reflow soldering to a PCB. Ultimately it is the responsibility of the customer to choose the appropriate solder paste and to ensure oven temperatures during reflow meet the requirements of the solder paste. Lairds surface mount modules conform to J-STD-020D1 standards for reflow temperatures. WARNING: During reflow, modules should not be above 260 for more than 30 seconds. Figure 15-2: Recommended Reflow Temperature Temperatures should not exceed the minimums or maximums presented in Table 15-1. Table 15-1: Recommended maximum and minimum temperatures Specification Temperature Inc./Dec. Rate (max) Temperature Decrease rate (goal) Soak Temp Increase rate (goal) Flux Soak Period (Min) Flux Soak Period (Max) Flux Soak Temp (Min) Flux Soak Temp (max) Time Above Liquidous (max) Time Above Liquidous (min) Time In Target Reflow Range (goal) Time At Absolute Peak (max) Liquidous Temperature (SAC305) Lower Target Reflow Temperature Upper Target Reflow Temperature Absolute Peak Temperature Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless Value 1~3 2-4
.5 - 1 70 120 150 190 70 50 30 5 218 240 250 260 Unit C / Sec C / Sec C / Sec Sec Sec C C Sec Sec Sec Sec C C C C 183 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 16 FCC REGULATORY STATEMENTS Family BT7x0 US/FCC SQGBT700 CANADA/IC 3147A-BT700 Part #
BT740-SA-XX BT740-SC-XX
*Last two slots "XX" in Part # are for production firmware release changes. Can be values 01-99, aa-zz Form Factor Surface Mount Surface Mount Tx Output 18dBm 18dBm Antenna Chip U.FL The BT740 family is designed to operate with the antennas listed below, with a maximum gain of 2dBi. The required antenna impedance is 50 ohms. Table 16-1: Qualified antennas Item 1 2 3 4 5 6 Part Number Mfg. AT3216-B2R7HAAT ACX Laird MAF94045 ACC-008 EZURIO Laird WRR2400- IP04-
B(MAF94019) WTC2450-IP04-
K(MAF94006) S181FL-L-RMM-
2450S Nearson
(Laird) Laird Type Chip PCB Ceramic Patch Dipole Gain (dBi) 0.5 2 2 1.5 Dipole Dipole 2 2 Note: The OEM is free to choose another vendors antenna of like type and equal or lesser gain as an antenna appearing in the table and still maintain compliance. Reference FCC Part 15.204(c)(4) for further information on this topic. To reduce potential radio interference to other users, the antenna type and gain should be chosen so that the equivalent isotropic radiated power (EIRP) is not more than that permitted for successful communication. 16.1 Power Exposure Information In general, there are two agency classifications for RF radiation exposure in wireless applications: mobile and portable. Mobile A mobile device is a transmitting device designed in such a way that a separation distance of at least 20 cm is normally maintained between the transmitter's radiating structures and the body of the user or nearby persons. The BT740 is fully modular approved for mobile and fixed applications (reference FCC Part 2.1091 for further details on mobile devices). This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. Portable Portable is a classification of equipment where the user, in general, is within 20 cm of the transmitting antenna. Portable equipment is further broken down into two classes: within 2.5 cm of human contact and beyond 2.5 cm. The BT740 does not hold a portable approval classification due to its peak output power and modular approval restrictions. Customers who want to use the BT730 in portable Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 184 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide applications require further RF evaluation. Contact a qualified test house or a Laird representative for further information on this topic (reference FCC Part 2.1093 for further details on portable devices). Maximum Permissible Exposure report was created and shows the minimum distances for Public and Occupational use of the BT740. Note: Occupational Limit Minimum Distance = 1.5 cm. Public Limit Minimum Distance = 3 cm. Note: This equipment was tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference does not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to correct the interference by one or more of the following measures:
Reorient or relocate the receiving antenna Increase the separation between the equipment and the receiver Connect the equipment to an outlet on a circuit that is different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help CAUTION: THIS DEVICE COMPLIES WITH PART 15 OF THE FCC RULES AND INDUSTRY CANADA LICENSE-EXEMPT RSS STANDARD(S). OPERATION IS SUBJECT TO THE FOLLOWING TWO CONDITIONS: (1) THIS DEVICE MAY NOT CAUSE HARMFUL INTERFERENCE, AND (2) THIS DEVICE MUST ACCEPT ANY INTERFERENCE RECEIVED, INCLUDING INTERFERENCE THAT MAY CAUSE UNDESIRED OPERATION. CAUTION: The OEM should have the device incorporating with the BT740 tested by a qualified test house to verify compliance with FCC Part 15 Subpart B limits for unintentional radiators. CAUTION: Any changes or modifications not expressly approved by Laird could void the users authority to operate the equipment. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 185 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 16.2 OEM Responsibilities This device is intended only for OEM integrators under the following conditions:
1) The antenna must be installed such that 20 cm is maintained between the antenna and users, and 2) The transmitter module may not be co-located with any other transmitter or antenna. As long as 2 conditions above are met, further transmitter test will not be required. However, the OEM integrator is still responsible for testing their end-product for any additional compliance requirements required with this module installed IMPORTANT NOTE:
In the event that these conditions can not be met (for example certain laptop configurations or co-location with another transmitter), then the FCC authorization is no longer considered valid and the FCC ID can not be used on the final product. In these circumstances, the OEM integrator will be responsible for re-
evaluating the end product (including the transmitter) and obtaining a separate FCC authorization. End Product Labeling This transmitter module is authorized only for use in device where the antenna may be installed such that 20 cm may be maintained between the antenna and users. The final end product must be labeled in a visible area with the following: Contains FCC ID: SQGBT700. Manual Information To the End User The OEM integrator has to be aware not to provide information to the end user regarding how to install or remove this RF module in the users manual of the end product which integrates this module. The end user manual shall include all required regulatory information/warning as show in this manual. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 186 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Industry Canada (IC) Warning:
This device complies with RSS-210 of the Industry Canada Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. Ce dispositif est conforme la norme CNR-210 d'Industrie Canada applicable aux appareils radio exempts de licence. Son fonctionnement est sujet aux deux conditions suivantes: (1) le dispositif ne doit pas produire de brouillage prjudiciable, et (2) ce dispositif doit accepter tout brouillage reu, y compris un brouillage susceptible de provoquer un fonctionnement indsirable. Radiation Exposure Statement:
This equipment complies with IC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator & your body. Dclaration d'exposition aux radiations:
Cet quipement est conforme aux limites d'exposition aux rayonnements IC tablies pour un environnement non contrl. Cet quipement doit tre install et utilis avec un minimum de 20 cm de distance entre la source de rayonnement et votre corps. This device is intended only for OEM integrators under the following conditions: (For module device use) 1) The antenna must be installed such that 20 cm is maintained between the antenna and users. 2) The transmitter module may not be co-located with any other transmitter or antenna. As long as 2 conditions above are met, further transmitter test will not be required. However, the OEM integrator is still responsible for testing their end-product for any additional compliance requirements required with this module installed. Cet appareil est conu uniquement pour les intgrateurs OEM dans les conditions suivantes:
(Pour utilisation de dispositif module) 1) L'antenne doit tre installe de telle sorte qu'une distance de 20 cm est respecte entre l'antenne et les utilisateurs. 2) Le module metteur peut ne pas tre complant avec un autre metteur ou antenne. Tant que les 2 conditions ci-dessus sont remplies, des essais supplmentaires sur l'metteur ne seront pas ncessaires. Toutefois, l'intgrateur OEM est toujours responsable des essais sur son produit final pour toutes exigences de conformit supplmentaires requis pour ce module install. IMPORTANT NOTE:
In the event that these conditions can not be met (for example certain laptop configurations or co-location with another transmitter), then the Canada authorization is no longer considered valid and the IC ID can not be used on the final product. In these circumstances, the OEM integrator will be responsible for re-
evaluating the end product (including the transmitter) and obtaining a separate Canada authorization. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 187 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide NOTE IMPORTANTE:
Dans le cas o ces conditions ne peuvent tre satisfaites (par exemple pour certaines configurations d'ordinateur portable ou de certaines co-localisation avec un autre metteur), l'autorisation du Canada n'est plus considr comme valide et l'ID IC ne peut pas tre utilis sur le produit final. Dans ces circonstances, l'intgrateur OEM sera charg de rvaluer le produit final (y compris l'metteur) et l'obtention d'une autorisation distincte au Canada. End Product Labeling This transmitter module is authorized only for use in device where the antenna may be installed such that 20 cm may be maintained between the antenna and users. The final end product must be labeled in a visible area with the following: Contains IC: . Plaque signaltique du produit final Ce module metteur est autoris uniquement pour une utilisation dans un dispositif o l'antenne peut tre installe de telle sorte qu'une distance de 20cm peut tre maintenue entre l'antenne et les utilisateurs. Le produit final doit tre tiquet dans un endroit visible avec l'inscription suivante: "Contient des IC: ". Manual Information To the End User The OEM integrator has to be aware not to provide information to the end user regarding how to install or remove this RF module in the users manual of the end product which integrates this module. The end user manual shall include all required regulatory information/warning as show in this manual. Manuel d'information l'utilisateur final L'intgrateur OEM doit tre conscient de ne pas fournir des informations l'utilisateur final quant la faon d'installer ou de supprimer ce module RF dans le manuel de l'utilisateur du produit final qui intgre ce module. Le manuel de l'utilisateur final doit inclure toutes les informations rglementaires requises et avertissements comme indiqu dans ce manuel. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 188 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 1. CE Regulatory The BT740 has been tested for compliance with relevant standards for the EU market. The OEM should consult with a qualified test house before entering their device into an EU member country to make sure all regulatory requirements have been met for their complete device. The BT740 was tested with a 2dBi dipole antenna. The OEM is free to use any manufacturers antenna and type of antenna but it must be <2dBi to remain in compliance with the Laird reports. Reference the Declaration of Conformities listed below for a full list of the standards that the modules were tested to. Test reports are available upon request. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 189 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 17 EU DECLARATIONS OF CONFORMITY 17.1 BT740-SA Manufacturer:
Product:
EU Directive:
Laird BT740-SA RTTE 1995/5/EC Conformity Assessment:
Annex IV Reference standards used for presumption of conformity:
Article Number Requirement Reference standard(s) 3.1a 3.1b Health and Safety EN 60950-1:2006 Protection requirements with respect to electromagnetic compatibility EN 301 489-1 V1.8.1 EN 301 489-17 V2.1.1 Emissions:
EN55022:2006/A1:2000/A2:2006(Cla ssB) Immunity:
EN61000-4-2:1995/A1:1998/A2:2001 EN61000-4-3:2002/A1:2002 3.2 Means of the efficient use of the radio frequency spectrum EN 300 328 V1.7.1 (2006-10) Declaration:
We, Laird Inc., declare under our sole responsibility that the essential radio test suites have been carried out and that the above product to which this declaration relates is in conformity with all the applicable essential requirements of Article 3 of the EU Directive 1995/5/EC, when used for its intended purpose. Place of Issue:
Laird Technologies Saturn House, Mercury Park Wooburn Green HP100HH, United Kingdom tel:+44 (0)1628 858 940 fax: +44 (0)1628 528 382 Date of Issue:
June 2013 Name of Authorized Person:
Andrew Dobbing, Engineering Manager Signature:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 190 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 17.2 BT740-SC Manufacturer:
Product:
EU Directive:
Laird BT740-SC RTTE 1995/5/EC Conformity Assessment:
Annex IV Reference standards used for presumption of conformity:
Article Number Requirement Reference standard(s) 3.1a 3.1b Health and Safety EN 60950-1:2006 Protection requirements with respect to electromagnetic compatibility EN 301 489-1 V1.8.1 EN 301 489-17 V2.1.1 Emissions:
EN55022:2006/A1:2000/A2:2006(ClassB) Immunity:
EN61000-4-2:1995/A1:1998/A2:2001 EN61000-4-3:2002/A1:2002 3.2 Means of the efficient use of the radio frequency spectrum EN 300 328 V1.7.1 (2006-10) Declaration:
We, Laird Inc., declare under our sole responsibility that the essential radio test suites have been carried out and that the above product to which this declaration relates is in conformity with all the applicable essential requirements of Article 3 of the EU Directive 1995/5/EC, when used for its intended purpose. Place of Issue:
Laird Technologies Saturn House, Mercury Park Wooburn Green HP100HH, United Kingdom tel:+44 (0)1628 858 940 fax: +44 (0)1628 528 382 Date of Issue:
June 2013 Name of Authorized Person:
Andrew Dobbing, Engineering Manager Signature:
Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 191 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 18 MECHANICAL DETAILS 18.1 BT740-SC Mechanical Details Figure 18-1: BT740-SC mechanical details Module Keep-Out Area: An area of 1.5 mm around the module should be reserved as a keep-out area .No other components should be placed in this area. 18.2 BT740-SA Mechanical Details Figure 18-2: BT740-SA mechanical details Module Keep-Out Area: An area of 1.5 mm around the module should be reserved as a keep-out area. No other components should be placed in this area. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 192 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 18.3 BT740 Pad Definitions Mechanical Drawing Figure 18-3: Pad definitions mechanical drawing Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 193 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 19 ORDERING INFORMATION Part Number Description BT740-SA BT740-SC Enhanced Class 1 Bluetooth V2.1 Module (internal antenna) Enhanced Class 1 Bluetooth v2.1 Module (uFL for external antenna) DVK BT740-SA Development board with BT740-SA module soldered in place DVK BT740-SC Development board with BT740-SC module soldered in place 19.1 General Comments This is a preliminary datasheet. Please check with Laird for the latest information before commencing a design. If in doubt, ask. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 194 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 20 BLUETOOTH SIG APPROVALS 20.1 Subsystem Combinations This section covers the procedure for generating a new EPL (End Product Listing) on the Bluetooth SIG website. In the instance of subsystems, a member can combine two or more subsystems to create a complete Bluetooth end product. Subsystem listings referenced as an example:
Design Name Owner QDID number Link to listing on the SIG website BT740-Sx Laird B0xxxx Interface Express Subsystem Cambridge Consultants Limited B017578 20.1.1 Assumptions https://www.bluetooth.org/tpg/QLI_viewQDL.cfm?qid
=16072 http://bluetooth.org/tpg/QLI_viewQDL.cfm?qid=17578 This procedure assumes that the member is simply combining two subsystems to create a complete end product. This is achieved by using the EPL interface on the Bluetooth SIG website. The following diagram shows the basic subsystem combination of a controller and host subsystem. The controller provides the RF/BB/LM and HCI layers, with the host providing L2CAP, SDP, GAP, RFCOMM/SPP, and any other specific protocols and profiles existing in the host subsystem listing. The following link provides an overview of the EPL system:
https://www.bluetooth.org/technical/qualification/eploverview.htm For a detailed procedure of how to make an EPL entry, please refer to the following SIG document:
https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=71880 In the case of the Laird and Cambridge Consultants Limited subsystem combination, please search for QDID B016072 in step 4 and then Create New EPL as per step 5. Under step 7, enter QDID B017578 in the box Link additional QDLs. Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 195 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Note: Alternatively, the member can choose to have a new QDID for the subsystem combination. However, note that this incurs a listing fee and requires the subsystem combination to be assessed against the latest qualification requirements. 20.1.2 Useful FAQ links https://www.bluetooth.org/ticketing/view_article.cfm?action=article_comment&aid=284 https://www.bluetooth.org/ticketing/view_article.cfm?action=article_comment&aid=300 https://www.bluetooth.org/ticketing/view_article.cfm?action=article_comment&aid=140 20.1.3 Additional Assistance Please contact your local sales representative for further assistance Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 196 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide 21 GLOSSARY OF TERMS Term Description A2DP
: Advanced Audio Distribution Profile ACL
: Asynchronous Connection-Oriented Link ADC
: Analogue to Digital Converter AGHFP
: Audio Gateway Hands-Free Profile AT
: Command prefix, Attention AVRCP
: Audio/Video Remote Control Profile BISM
: Bluetooth Intelligent Serial Module CoD
: Class Of Device (also referred to as device class) Codec
: Device capable of encoding / decoding an analogue / digital signal DAC
: Digital to Analogue Converter DSP
: Digital Signal Processor DUN
: Dial-Up Network Profile EIR
: Extended Inquiry Response eSCO
: Enhanced Synchronous Connection Oriented Link (used for Audio) FTP
File Transfer Profile GOEP
: Generic Object Access Exchange Profile GPIO
: General Purpose Input Output HF
: Hands-free Role of Hands-free Profile (Hands-free Unit) HFG
: Audio Gateway Role of Hands-free Profile (Hands-free Gateway) HFP
: Hands Free Profile HID HS
: Human Interface Device Profile
: Headset Role of Headset Profile (Headset) HSG
: Audio Gateway Role of Headset Profile (Headset Gateway) HSP
: Headset Profile I/O (IO)
Input/Output Mic
: Microphone MITM
: Man In The Middle OPP
: Object Push Profile PBAP
: Phone Book Access Profile PT
: PASS THROUGH Command Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 197 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Term Description PWM
: Pulse Width Modulation SBC
: Sub Band Codec SCO
: Synchronous Connection Oriented Link (used for Audio) SLC SPP
: Service Level Connection
: Serial Port Profile SSO
: Serial Stream Oriented SSP
: Secure Simple Pairing SUI
: SUBUNIT INFO Command Sxxx
: S-Register No. xxx TDL
Trusted Device List UART
: Universal Asynchronous Receiver / Transmitter UI
: UNIT INFO Command Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 198 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Index
^^^ ........................................................................ 17 AT+BTKY ............................................................. 26 AT S Registers ................................................. 46 AT+BTN? ............................................................. 26 Abstract Data Model ........................................... 146 AT+BTN=<string> ................................................ 26 Agent Related AT Asynchronous Responses .... 157 AT+BTP ............................................................... 27 Agent Related AT Commands............................ 154 AT+BTQ ............................................................... 27 Agent UART Traffic for Chart ............................. 131 AT+BTT? .............................................................. 27 Associate with Manager ..................................... 100 AT+BTT<bd_addr> .............................................. 28 Associated ......................................................... 118 AT+BTTn? ............................................................ 28 AT.. ..................................................................... 17 AT+BTW<bd_addr> ............................................. 28 AT Commands and Responses ........................... 16 AT+BTX ............................................................... 29 AT&F* .................................................................. 21 AT+HAAhhhh ............................................... 29, 154 AT&F*AT* ............................................................ 22 AT+HAB<bd_addr>,iiii.................................. 29, 155 AT&F*MP* ............................................................ 22 AT+HADhhhh ............................................... 29, 155 AT&F+ .................................................................. 21 AT+HAE,iiii,endpointname ................................. 30 AT+BTB+<string> ................................................ 23 AT+HAEiiii,name ............................................. 155 AT+BTB=<string> ................................................ 22 AT+HAGhhhh,aaaa,ssss.............................. 30, 155 AT+BTBnnnn ....................................................... 23 AT+HAL ....................................................... 30, 156 AT+BTD* .............................................................. 24 AT+HARhhhh,pppp[,aaaa[,aaaa[]]] .................. 30 AT+BTD<bd_addr> .............................................. 24 AT+HAShhhh,aaaa,ssss,ddddd ........................... 31 AT+BTF<bd_addr> .............................................. 24 AT+HAShhhh,aaaa,ssss,hhhhhhhhhhhh ........... 156 AT+BTG ............................................................... 24 AT+HME,iiii,endpointname ................................ 31 AT+BTI ................................................................. 25 AT+HMEiiii,name ............................................. 160 AT+BTIE .............................................................. 25 AT+HMGhhhh,oooo,aaaa ............................ 32, 160 AT+BTIN .............................................................. 25 AT+HML ....................................................... 31, 160 AT+BTIV .............................................................. 25 AT+HMThhhh, ccyymmddhhmmssaa ................ 161 AT+BTK=<string> ................................................ 25 AT+HMThhhh,ttttttt ............................................... 32 AT+BTKN ............................................................. 26 AT+KY<addr>,<link_key> .................................... 32 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 199 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide AT+KY<addr>? .................................................... 32 Debug Packet..................................................... 119 ATA ...................................................................... 17 Default S Registers ............................................. 65 ATD<bd_addr>,<uuid> ......................................... 17 Disassociate From Manager .............................. 109 ATEn .................................................................... 18 Disconnect ......................................................... 113 ATH ...................................................................... 18 Drop Connection .................................................. 68 ATIn ..................................................................... 18 Dropping Connections ........................................ 142 ATO ...................................................................... 20 Enhanced Inquiry Data Packet Format ................ 73 ATSn?<$> ............................................................ 20 Enhanced Inquiry Responses ............................ 168 ATSn=? ................................................................ 21 Event Packets ...................................................... 54 ATSn=m ............................................................... 20 Factory Default ..................................................... 92 ATX<string> ......................................................... 21 Firmware Upgrade via UART ............................. 139 Authentication and Encryption ........................... 165 Flow control & Data Integrity ................................ 51 Background ........................................................ 145 Get Connectable, Discoverable, Security Modes . 59 Bind Agent to a Manager ................................... 100 Get Digital/Analog I/O .......................................... 93 Blob Manage ........................................................ 95 Get Local Friendly Name ..................................... 89 BLOB Manager .................................................. 125 Get Open Channel List ......................................... 71 Command Packets ............................................... 52 Get Remote Friendly Name ................................. 88 Configuration Commands .................................... 63 Get Security Mode ............................................... 87 Connection Commands ........................................ 65 Getting OUPUT Reports from a Host ................. 127 Connection Events ............................................. 112 GPIO Access via SReg 619 and 620 ................. 167 Connection Management ................................... 142 GPIO Exchange via Rfcomm Modem Signalling 167 Connection Setup ............................................... 112 HDP Agent Model .............................................. 147 Create Endpoint in SDP Record........................... 98 HDP Data Channels ........................................... 120 Data Channel Numbers ........................................ 55 HDP Manager Model .......................................... 158 Data Channels ................................................... 120 HDP Profile (Health Device Profile) .................... 145 Data Packets .................................................. 53, 55 HDP Profile Commands ....................................... 97 Deassociated ..................................................... 118 HDP Profile Related Events ............................... 118 Debug Events..................................................... 119 HDP related S Registers ...................................... 98 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 200 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide HDP Usage Message ......................................... 128 Malloc Statistics ................................................. 120 HDP: Endpoint Definitionin SDP Record .............. 31 Manager Related AT Asynchronous Responses 161 HID Connections ................................................ 126 Manager Related AT Commands ....................... 160 HID Descriptors .................................................. 144 Manager UART Traffic for Chart ........................ 133 HID Device Profile (HID) .................................... 143 Message Sequence Chart .................................. 129 Host Command/Responses ................................. 58 Miscellaneous Commands ................................... 87 Host Packet Receive Flowchart ........................... 57 Miscellaneous Events ........................................ 114 Host to Module Direction .................................... 120 Modem Status .................................................... 114 Host to Module Packets ....................................... 52 Module Events ................................................... 110 IEEE Black Box Model ...................................... 145 Module to Host Direction .................................... 120 Incoming Connection ......................................... 112 Module to Host Packets ....................................... 53 Incoming Connections ........................................ 142 No Operation ........................................................ 58 Incoming Pairing Procedure ................................. 78 Out of Band (OOB) Pairing ................................ 136 Information ........................................................... 61 Packet Format ...................................................... 52 Information Commands ........................................ 58 Packet Processing Logic ...................................... 53 Information Events ............................................. 110 Packet Type: Attribute Value .............................. 121 Inquiry Commands ............................................... 72 Packet Type: Scan Report ................................. 121 Inquiry Events .................................................... 110 Pair Initiate ........................................................... 76 Inquiry Request .................................................... 72 Pairing Commands ............................................... 75 Inquiry Result ..................................................... 110 Pin Code Request .............................................. 115 Introduction to MultiPoint Protocol........................ 51 PinCode (Command) ........................................... 81 Invalid Packet Size ............................................. 111 PinCode (Confirmation) ........................................ 82 Legacy Pairing ............................................. 78, 165 Profiles ............................................................... 143 Link Key ............................................................. 114 Protocol Activation ............................................... 16 Link Key Ex ........................................................ 115 Read S Register ................................................. 63 Local Friendly Name .......................................... 116 Read Attribute Value .......................................... 106 Logical Packet Format ....................................... 121 Read Local Bluetooth Address ............................. 60 Make Outgoing Connection .................................. 67 Read S Registers Valid Range ............................ 21 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 201 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Read The Link Key For Address Specified .......... 32 Sniff Mode Explained ......................................... 134 Register SDP record ............................................ 99 Special S Registers (240 to 255).......................... 45 Remote Friendly Name ...................................... 117 Specifying a Custom Hid Descriptor for Use ...... 127 Reset .................................................................... 94 Specifying Service Record Name for Custom Hid128 Response Packets ............................................... 54 Standard S Registers ........................................... 35 RSSI and Link Quality .......................................... 70 Status ................................................................. 111 Sample Host/Module Message Sequence ......... 163 STATUS Values ................................................. 141 Send Fixed Scan Report to Manager ................. 102 Store S Registers ............................................... 64 Send VAR Scan Report to Manager .................. 104 The HCOMMAND & EVENT Values .................. 140 Sending INPUT Reports ..................................... 127 Throughput Analysis .......................................... 137 Serial Port Profile (SPP) ..................................... 143 Time Update....................................................... 119 Service Incoming Connection .............................. 66 Trusted Database Add Key (Out-Of-Band Facilitator) ... 86 Set Connectable Mode ......................................... 65 Trusted Database Change Type .......................... 85 Set Date and Time ............................................. 108 Trusted Database Delete Record ......................... 84 Set Device Class .................................................. 91 Trusted Database Is Peer Trusted ....................... 86 Set Digital I/O ....................................................... 94 Trusted Database Read Record........................... 84 Set Discoverable Mode ........................................ 74 Trusted Database Record Count.......................... 83 Set Local Friendly Name ...................................... 90 UART Host Power Saving Facility ...................... 135 Set Modem Lines ................................................. 69 UART Protocol Selection & Indication Via GPIO 139 SIMPLE PAIRING Confirmation ........................... 81 Unknown Command ........................................... 110 Simple Secure Pairing ........................................ 165 Unsolicited/Async Responses .............................. 33 Simple Secure Pairing Display Only ............. 77, 79 Uploading a HID Descriptor into the Module ...... 127 Simple Secure Pairing Display Yes/No ......... 77, 79 Weigh Scale Data Specialization ....... 148, 150, 152 Simple Secure Pairing Just Works ............... 76, 79 Write S Register ................................................. 64 Simple Secure Pairing Keyboard Only ......... 78, 80 Write Attribute Value .......................................... 107 Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 202 CONN-GUIDE-BT740_v0.2 Enhanced Class 1 Bluetooth v2.1 Module Users Guide Smart Technology. Delivered. Laird Ltd. is the world leader in the design and manufacture of customized, performance-critical products for wireless and other advanced electronics applications. Laird partners with its customers to find solutions for applications in various industries such as:
Network Equipment Telecommunications Data Communications Automotive Electronics Computers Aerospace Military Medical Equipment Consumer Electronics Laird offers its customers unique product solutions, dedication to research and development, as well as a seamless network of manufacturing and customer support facilities across the globe. globalsolutions: local support USA: +1.800.492.2320 Europe: +44.1628.858.940 Asia: +852.2923-0610 wireless.support@lairdtech.com www.lairdtech.com/wireless CONN-GUIDE-BT740_v0 2 Copyright 2013 Laird, Inc. All rights reserved. The information contained in this manual and the accompanying software programs are copyrighted and all rights are reserved by Laird, Inc. Laird, Inc. reserves the right to make periodic modifications of this product without obligation to notify any person or entity of such revision. Copying, duplicating, selling, or otherwise distributing any part of this product or accompanying documentation/software without the prior consent of an authorized representative of Laird, Inc. is strictly prohibited. All brands and product names in this publication are registered trademarks or trademarks of their respective holders. This material is preliminary Information furnished by Laird in this specification is believed to be accurate. Devices sold by Laird are covered by the warranty and patent indemnification provisions appearing in its Terms of Sale only. Laird makes no warranty, express, statutory, and implied or by description, regarding the information set forth herein. Laird reserves the right to change specifications at any time and without notice. Laird products are intended for use in normal commercial and industrial applications. Applications requiring unusual environmental requirements such as military, medical life-
support or life-sustaining equipment are specifically not recommended without additional testing for such application. Limited Warranty, Disclaimer, Limitation of Liability Americas: +1-800-492-2320 Option 2 Europe: +44-1628-858-940 Hong Kong: +852-2923-0610 www.lairdtech.com/wireless 203 CONN-GUIDE-BT740_v0.2
1 2 | C2PC | Cover Letter(s) | 1.51 MiB | November 23 2021 |
Class II Permissive Change Request Letter Date: 2021/9/20 We, Laird Connectivity, LLC. would like to confirm that the product with FCC ID:
SQGBT700 (Grant date:05/21/2013) has further modification, main function has been FEDERAL COMMUNICATIONS COMMISSION Authorization and Evaluation Division 7435 Oakland Mills Rd Columbia MD 21046-1609 U.S.A. To whom it may concern, changed. This modification is concerned below item:
PCB balun + regulator change. Applicant and Brand change. Sincerely yours, Brian Petted Technology Leader Laird Connectivity, LLC Brian.Petted@lairdconnect.com Tel: 262-421-4974
1 2 | Power of Attorney Letter | Cover Letter(s) | 432.88 KiB | November 23 2021 |
Date: 2021/9/20 Federal Communications Commission 7435 Oakland Mills Rd Columbia MD 21046-1609 Subject: Product Certification Representative Authorization Letter FCC ID: SQGBT700 Product name: Class 1 Bluetooth Data Module To whom it may concern:
Regulations. International Certification Corp. Name
: Gary Chang Job Title
: Manager e-mail
: garychang@icertifi.com.tw Webs We the undersigned, hereby authorize following person to act as our agent in the preparation of an application for equipment authorization of model BT740-SA ; BT740-SC; BT730-SA; BT730-SC to the FCC Rules and Address
: No.3-1, Lane 6, Wen San 3rd St. Kwei Shan Dist., TaoYuan City 333, Taiwan (R.O.C.) We further certifies that neither the applicant nor any party to this application, as defined in 47 CFR Ch. 1.2002(b), is subject to a denial to Federal benefits, that include FCC benefits, pursuant to section 5301 of the Anti-Drug Abuse Act of 1998, 21 U.S.C. 862. This appointment also includes the authority to complete FCC Form 731 on our behalf and sign the application as an authorized agent. Sincerely yours, Brian Petted Technology Leader Laird Connectivity, LLC Brian.Petted@lairdconnect.com Tel: 262-421-4974
1 2 | STC revised | Cover Letter(s) | 265.89 KiB | November 26 2021 / November 23 2021 |
Date: August 19,2021 Federal Communications Commission Authorization and Evaluation Division 7435 Oakland Mills Rd Columbia MD 21046-1609 Subject: Request for confidentiality FCC ID: SQGBT700 To whom it may concern:
Short-term confidentiality Internal Photographs External Photographs User's manual Test Set up photo Permanent confidentiality Block Diagram Schematics Operational Description Bill of Materials Tune up procedure competitors. Pursuant to DA 04-1705 of the Commissions pubic notice, in order to comply with the marketing regulations in 47CFR 2.803 and the importation rules in 47 CFR 2.1204, while ensuring that business sensitive information remains confidential until the actual marketing of newly authorized devices. We are requesting the commission to grant short-term confidentiality request on the following attachments until 180 days. Pursuant to Sections 0.457 and 0.459 of the Commissions Rules, the Applicant Hereby requests confidential treatment of information accompanying this Application As outlined below:
The above materials contain trade secrets and proprietary information not customarily released to the public. The public disclosure of these materials may be harmful to the applicant and provide unjustified benefits to its The applicant understands that pursuant to Section 0.457 of the Rules, disclosure of this application and all accompanying documentation will not be made before the date of the Grant for this application. Should you require any further information, please contact the undersigned. Thank you for your consideration in this matter.
1 2 | Test Setup Photos-1 | Test Setup Photos | 3.87 MiB | November 23 2021 / May 23 2022 | delayed release |
1 2 | Test Setup Photos-2 | Test Setup Photos | 3.39 MiB | November 23 2021 / May 23 2022 | delayed release |
frequency | equipment class | purpose | ||
---|---|---|---|---|
1 | 2021-11-23 | 2402 ~ 2480 | DSS - Part 15 Spread Spectrum Transmitter | Class II Permissive Change |
2 | 2013-05-22 | 2402 ~ 2480 | DSS - Part 15 Spread Spectrum Transmitter | Original Equipment |
app s | Applicant Information | |||||
---|---|---|---|---|---|---|
1 2 | Effective |
2021-11-23
|
||||
1 2 |
2013-05-22
|
|||||
1 2 | Applicant's complete, legal business name |
Laird Connectivity, LLC
|
||||
1 2 |
Laird Connectivity
|
|||||
1 2 | FCC Registration Number (FRN) |
0022590616
|
||||
1 2 | Physical Address |
W66N220 Commerce Court
|
||||
1 2 |
Cedarburg, WI
|
|||||
1 2 |
Cedarburg, Wisconsin 53012
|
|||||
1 2 |
United States
|
|||||
app s | TCB Information | |||||
1 2 | TCB Application Email Address |
c******@telefication.com
|
||||
1 2 | TCB Scope |
A4: UNII devices & low power transmitters using spread spectrum techniques
|
||||
app s | FCC ID | |||||
1 2 | Grantee Code |
SQG
|
||||
1 2 | Equipment Product Code |
BT700
|
||||
app s | Person at the applicant's address to receive grant or for contact | |||||
1 2 | Name |
B****** P****
|
||||
1 2 |
B**** S****
|
|||||
1 2 | Title |
Technology Leader
|
||||
1 2 |
VP Strategic Business Development
|
|||||
1 2 | Telephone Number |
26242********
|
||||
1 2 |
262-4********
|
|||||
1 2 | Fax Number |
262-3********
|
||||
1 2 |
b******@lairdconnect.com
|
|||||
1 2 |
b******@lairdconnect.com
|
|||||
app s | Technical Contact | |||||
1 2 | Firm Name |
International Certification Corp.
|
||||
1 2 | Name |
G******** C********
|
||||
1 2 | Physical Address |
No.3-1, Lane 6, Wen San 3rd St. Kwei
|
||||
1 2 |
No.3-1, Lane 6, Wen San 3rd St. Kwei Shan
|
|||||
1 2 |
Taiwan
|
|||||
1 2 | Telephone Number |
886-3********
|
||||
1 2 | Fax Number |
886-3********
|
||||
1 2 |
G******@icertifi.com.tw
|
|||||
app s | Non Technical Contact | |||||
1 2 | Firm Name |
International Certification Corp.
|
||||
1 2 | Name |
W******** L****
|
||||
1 2 | Physical Address |
No.3-1, Lane 6, Wen San 3rd St. Kwei
|
||||
1 2 |
Taiwan
|
|||||
1 2 | Telephone Number |
886-3********
|
||||
1 2 | Fax Number |
886-3********
|
||||
1 2 |
w******@icertifi.com.tw
|
|||||
app s | Confidentiality (long or short term) | |||||
1 2 | Does this application include a request for confidentiality for any portion(s) of the data contained in this application pursuant to 47 CFR § 0.459 of the Commission Rules?: | Yes | ||||
1 2 | Long-Term Confidentiality Does this application include a request for confidentiality for any portion(s) of the data contained in this application pursuant to 47 CFR § 0.459 of the Commission Rules?: | Yes | ||||
1 2 | If so, specify the short-term confidentiality release date (MM/DD/YYYY format) | 05/23/2022 | ||||
1 2 | 10/01/2013 | |||||
if no date is supplied, the release date will be set to 45 calendar days past the date of grant. | ||||||
app s | Cognitive Radio & Software Defined Radio, Class, etc | |||||
1 2 | Is this application for software defined/cognitive radio authorization? | No | ||||
1 2 | Equipment Class | DSS - Part 15 Spread Spectrum Transmitter | ||||
1 2 | Description of product as it is marketed: (NOTE: This text will appear below the equipment class on the grant) | Class 1 Bluetooth Data Module | ||||
1 2 | Related OET KnowledgeDataBase Inquiry: Is there a KDB inquiry associated with this application? | No | ||||
1 2 | Modular Equipment Type | Single Modular Approval | ||||
1 2 | Does not apply | |||||
1 2 | Purpose / Application is for | Class II Permissive Change | ||||
1 2 | Original Equipment | |||||
1 2 | Composite Equipment: Is the equipment in this application a composite device subject to an additional equipment authorization? | No | ||||
1 2 | Related Equipment: Is the equipment in this application part of a system that operates with, or is marketed with, another device that requires an equipment authorization? | No | ||||
1 2 | Grant Comments | C2PC: PCB modification and applicant/brand change. Power output listed is conducted. This grant is valid only when the module is sold to OEM integrators and must be installed by the OEM or OEM integrators. The antennas as listed in this application must be installed to provide a separation distance of at least 20 cm from all persons and must not be co-located or operating in conjunction with any other antenna or transmitter. End-users may not be provided with the module installation instructions. OEM integrators and end-users must be provided with transmitter operating conditions for satisfying RF exposure compliance. | ||||
1 2 | Power output listed is conducted. This grant is valid only when the module is sold to OEM integrators and must be installed by the OEM or OEM integrators. The antennas as listed in this application must be installed to provide a separation distance of at least 20 cm from all persons and must not be co-located or operating in conjunction with any other antenna or transmitter. End-users may not be provided with the module installation instructions. OEM integrators and end-users must be provided with transmitter operating conditions for satisfying RF exposure compliance. | |||||
1 2 | Is there an equipment authorization waiver associated with this application? | No | ||||
1 2 | If there is an equipment authorization waiver associated with this application, has the associated waiver been approved and all information uploaded? | No | ||||
app s | Test Firm Name and Contact Information | |||||
1 2 | Firm Name |
International Certification Corp.
|
||||
1 2 | Name |
F****** C****
|
||||
1 2 | Telephone Number |
886-3******** Extension:
|
||||
1 2 | Fax Number |
886-3********
|
||||
1 2 |
J******@icertifi.com.tw
|
|||||
Equipment Specifications | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Line | Rule Parts | Grant Notes | Lower Frequency | Upper Frequency | Power Output | Tolerance | Emission Designator | Microprocessor Number | |||||||||||||||||||||||||||||||||
1 | 1 | 15C | 2402.00000000 | 2480.00000000 | 0.1000000 | ||||||||||||||||||||||||||||||||||||
Line | Rule Parts | Grant Notes | Lower Frequency | Upper Frequency | Power Output | Tolerance | Emission Designator | Microprocessor Number | |||||||||||||||||||||||||||||||||
2 | 1 | 15C | 2402.00000000 | 2480.00000000 | 0.1000000 |
some individual PII (Personally Identifiable Information) available on the public forms may be redacted, original source may include additional details
This product uses the FCC Data API but is not endorsed or certified by the FCC