BTM461 Development Kit
Quick Start Guide
June 2013
Introduction
This document briefly describes how to configure a Laird Technologies BTM46x Bluetooth module to pair and
connect to an Apple iOS device with the SPP/iAP (iPod Accessory Protocol) profile.
The iAP profile is built on top of the standard SPP profile. In order to meet Apple’s requirements, the Laird
BTM44x firmware has been adapted so that a series of conditions are met before the Laird BTM46x module
can function as a Bluetooth device. An extra layer of protocol has also been added so that the BTM46x
firmware can interface with the Apple’s iAP.
However, since the BTM46x still communicates with non-Apple Bluetooth devices, the software is designed
such that the user does not need to know which type of device they are attempting to connect to. The
connection process is completely seamless.
This Quick Start Guide details the quickest way to get a BTM46x up and running to communicate with an
Apple device. It defines the registers/parameters that must be set and the minimum set of commands that are
required to pair and open a connection. All other settings can be left at their default values.
If something goes wrong during the process, there are other options to try and settings to check. These do
not fall within the scope of this document. For a fuller description of the BTM46x module and more
information on how it communicates with an Apple device, see References.
Requirements
DVK-BTM46x Development Kit
USB cable (A-B) – ONLY for power supply to the DVK
RS232 Cable – For communications
iOS device supporting iAP (iPhone 3 onwards, iPad 1
onwards, iPod Touch 4th gen onwards)
Terminal software such as Laird / EZURiO Terminal for PC
Configuration
When connecting to an Apple Bluetooth device there are eight
parameters that must be passed to the Apple device as part of the IDPS (Identify Preferences and Settings)
process (Table 1). These values cannot be set by the module manufacturer (Laird). They must be set by the
device manufacturer. Apple further requires that these parameters must be empty when the firmware is
loaded; Laird cannot even set default values.
Even if you have no intention of connecting to an Apple device, you must set these parameters. This is a
requirement of the BTM461’s Apple certification.
Table 1: Parameter Addresses
Parameter
Manufacturer Name
Accessory Name
Accessory Model
Accessory Serial
Seed Value
Firmware Version
Hardware Version
Subprotocol Data Name
Blob Address
Write Address
32769
32770
32771
32772
32773
32774
32775
32776
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
ATI150
Read Address
33025
33026
33027
33028
33029
33030
33031
33032
1
0x001
0x002
0x004
0x008
0x010
0x020
0x040
0x080
Laird Technologies
BTM461 Development Kit
Quick Start Guide
The data is stored and retrieved from non-volatile memory using Laird Technologies BLOB mechanism, which
handles data strings of varying sizes. The required command sequence to store data is:
AT+BTB=”string”
AT+BTBxxxxx
“String” is the data that you wish to store (note that the “” are required) and xxxxx is the write address.
AT+BTB=”string” stores the string in the BLOB and AT+BTBxxxxx writes the most recently stored string in the
given address.
To retrieve data, enter the command:
AT+BTByyyyy
Here, yyyyy is the read address. This sequence MUST be repeated for all 8 parameters in Table 1.
Several of the parameters have strict formatting requirements, detailed in Table 2.
Table 2: IPS Parameter - Formatting Requirements
Parameter
Hardware Version
Firmware Version
Seed Value
Subprotocol Data Name
Format
6-digit number (internally split into three 2-digit values)
6-digit number (internally split into three 2-digit values)
10-digit Hexadecimal number
When testing in Lterminal, must be set to com.lairdtech
Figure 1 shows some screenshots from the Laird iOS utility ‘LTerminal’.
Figure 1: LTerminal on iOS
Command ATI150 returns a bit map representing each of the configuration parameters that require setting. If
this returned value is not 0, then one or more of the parameters have not been set correctly. Any bit that is
set to 1 indicates the parameter that has not been set.
Figure 2 shows a screen shot of the read and write sequence and the expected responses from the module.
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
2
Laird Technologies
BTM461 Development Kit
Quick Start Guide
Figure 2: UWTerminal interfacing with BTM461
You must also set the VID (Vendor ID) and the PID (Product ID) for the module. Laird may not set these
values. These values are stored in S Registers (see Table 3).
Table 3: S Register Parameters
Parameters
VID
PID
SRegister
9037
9038
ATI150
0x200
0x100
These are set using the following command sequence:
ATSxxxx=$yyyy
Here, xxxx is the S Register value and $yyyy is the hex value to be stored. Note that ‘$’ signifies a hex value. If
there is no ‘$’ the value is a decimal. The hex value must lie between 0000 and ffff. These registers come
with preset values. The PID can remain the same, but the VID value must be changed as this is the Laird
Technologies VID.
To read the value back, use:
ATSxxxx?$ or
ATSxxxx?
If ‘$’ is appended at the end of the command the value is returned as a hex value, if not then it is returned as
a decimal.
For these settings to persist, they must be manually saved to non-volatile memory and the module power
cycled. This is carried out with the following commands:
AT&W
ATZ
Figure 3 shows this terminal sequence.
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
3
Laird Technologies
BTM461 Development Kit
Quick Start Guide
Figure 3: Configuration sequence in UWTerminal
Note:
If the BTM46x is set to factory default, these parameters are cleared, ATI150 returns 0x3ff, and the
unit stops functioning as a Bluetooth device until reconfigured. This is an Apple requirement.
Apple lastly requires that an authentication chip must be present in the end product. This chip can only be
purchased by Apple licensees and through approved Apple distributors. If this chip isn’t present, the BTM46x
will be unable to connect to an Apple Device. The following command reports whether a chip is present:
ATI149
Figure 4 shows ATI149 confirming an authentication chip is present.
Figure 4: ATI149 confirms presence of authentication chip
Pairing
Unless you know the Bluetooth address of the device you are attempting to pair with, pairing is usually
preceded by an Inquiry.
The 2 commands are
AT+BTI
AT+BTW
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
4
Laird Technologies
BTM461 Development Kit
Quick Start Guide
Once pairing is complete, AT+BTW initiates an SDP inquiry to the device to establish whether the device is an
Apple device. Figure 5 shows a screenshot of an inquiry and a pairing to an Apple and a non-Apple device,
and the expected terminal replies. Note that for all intents, “Android device“ means any non-Apple device.
Figure 5: Inquiry / Pairing to an Apple and non-Apple device
To list the devices with which you are paired, enter the command:
AT+BTT+?
This returns a list of connected devices with a number indicating if they are Apple (1) or otherwise (2). This list
is shown in Figure 6.
Figure 6: AT+BTT+ command
Connecting
The connection command is ATD. If the SDP inquiry is successful, this is seamless to the user. The
BTM46x will establish the connecting device’s type from the data returned in the SDP inquiry. The user does
nothing differently than if they were connecting to a non-Apple device.
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
5
Laird Technologies
BTM461 Development Kit
Quick Start Guide
Note the sequence that the BTM46x module has to go through. If it fails at any point the process stops and
an error message is returned.
IAP:IDPS – indicates that the IDPS process has started.
IAP:IDPS OK indicates that the IDPS process has been completed.
IAP:AUTH OK indicates that a valid authentication chip has been found on the device.
IAP Messages are shown in Figure 7.
Figure 7: IAP Messages during connection
Pairing and Connecting from an Apple iOS device
Technically you cannot make an iAP/SPP connection to a BTM46x, or any other Bluetooth device, from an
Apple device. There are no API calls within the iOS operating system that allows a Bluetooth connection to be
made. The application is simply informed that a connection is available.
However, an Apple device may make a connection by first connecting over another Bluetooth profile. Then,
the BTM46x closes that connection and opens an SPP/IAP connection. The following S Registers must be set:
ATS9003=3 – Allows the BTM46x to support both the HID and SPP profiles.
ATS9089=1 – Allows the BTM46x to initiate an iAP/SPP connection upon a HID request from an Apple device.
Also, to initiate the connection from another device, the BTM46x must first be made connectable and
discoverable. To do so, you may set S Register 512 (ATS512=4) or enter the command:
AT+BTP
This ensures the BTM46x appears in the list of available devices after inquiry scan, and that it is connectable.
For these settings to persist, use the AT&W and ATZ commands.
Note:
When initiating a connection from an Apple device, the connection state on the Apple screen may
change from “Connected” to “Not Connected” and then back to “Connected”. This is expected,
as there is initially an HID connection that must be closed before initiating the iAP connection.
References
1. BTM46x_MFi_Application Note
2. LWS-UM-BTM46X
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
6
Laird Technologies
很抱歉,暂时无法提供与“DVK-BTM461”相匹配的价格&库存,您可以联系我们找货
免费人工找货