BTM430/431 DATA MODULE
User Guide
Version 5.0
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852-2923-0610
wireless.support@lairdtech.com
www.lairdtech.com/bluetooth
BTM430/431
Bluetooth® AT Data Module User Guide
1
REVISION HISTORY
Revision
Date
Description
Approved By
1.0
3 Jan 2012
Initial Release
Jonathan Kaye
2.0
20 Mar 2012
Updates to firmware v11.28.1.0
Jonathan Kaye
3.0
11 May 2012
Formatting and general editing
Jonathan Kaye
4.0
7 Jan 2013
Updated FCC Statement, new mech. drawings, general
editing / formatting
Jonathan Kaye
4.1
15 Mar 2013
Converted to Laird formatting
Sue White
5.0
04 Feb 2014
Separated into two separate docs (Hardware
Integration Guide and User Guide). Added a Related
Documents section.
Sue White
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
2
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
2
TABLE OF CONTENTS
1 Revision History ....................................................................................................................................... 2
2 Table of Contents.................................................................................................................................... 3
1. Overview and Key Features .................................................................................................................... 4
FEATURES AND BENEFITS
...................................................................................................................................4
2.1 APPLICATIONS ...............................................................................................................................................4
3 AT Command Set Reference .................................................................................................................. 5
3.1 Introduction ...................................................................................................................................................5
3.2 Assumptions ..................................................................................................................................................6
3.3 Commands .....................................................................................................................................................6
3.4 Unsolicited Responses .................................................................................................................................36
3.5 Incoming Connections .................................................................................................................................37
3.6 Dropping Connections .................................................................................................................................37
3.7 Pairing and Trusted Devices ........................................................................................................................38
3.8 Error Responses ...........................................................................................................................................39
3.9 Factory Default Mode ..................................................................................................................................40
3.10 Miscellaneous Features ...............................................................................................................................40
3.11 Known Issues ...............................................................................................................................................41
3.12 Disclaimers ..................................................................................................................................................42
3.13 Data Sheet Status ........................................................................................................................................42
3.14 Changes between release ............................................................................................................................42
4 PCM CODEC Interface ........................................................................................................................... 43
4.1 Compatible Codec Chips ..............................................................................................................................43
5 FTP Client Profile Commands ............................................................................................................... 43
5.1 Generic Notes and Guidance .......................................................................................................................43
5.2 FTP related AT Commands ..........................................................................................................................44
5.2 FTP related Subcommands ..........................................................................................................................44
5.3 FTP related subresponses ............................................................................................................................47
5.4 FTP line multiplexing commands .................................................................................................................49
5.5 Message Sequence Charts ...........................................................................................................................50
6 OBEX Profile Commands ...................................................................................................................... 64
6.1 Generic Notes and Guidance .......................................................................................................................65
6.2 OBEX Push related AT Commands ...............................................................................................................65
6.2 OBEX Push related Subcommands ..............................................................................................................65
6.3 OBEX Push Related Subresponses ...............................................................................................................66
6.4 OBEX Push Line Multiplexing Commands ....................................................................................................68
6.5 Message Sequence Charts ...........................................................................................................................69
7 Related Documents ............................................................................................................................... 73
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
3
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
1. OVERVIEW AND KEY FEATURES
The BTM430 and BTM431 Bluetooth® modules from Laird Technologies have been designed to meet the
needs of developers who wish to add robust, short range Bluetooth data connectivity to their products. They
are based on the market leading Cambridge Silicon Radio BC04 chipset, providing exceptionally low power
consumption with outstanding range.
With physical sizes as small as 12.5 x 18.0mm and best of class, low-power operation, these modules are the
ideal choice for applications where designers need both performance and minimum size. For maximum
flexibility in systems integration, the modules are designed to support a separate power supply for I/O.
To aid product development and integration, Laird Technologies has integrated a complete Bluetooth
protocol stack within the modules, including support for the Bluetooth Serial Port Profile. The modules are
fully qualified as Bluetooth End Products, allowing designers to integrate them within their own products
with no further Bluetooth Qualification. They can then list and promote their products on the Bluetooth
website free of charge.
A comprehensive AT command interface is included, which simplifies firmware integration. Combined with a
low cost developer’s kit, this ensures that the choice of Laird Technologies Bluetooth modules guarantees the
fastest route to market.
FEATURES AND BENEFITS
2.1 APPLICATIONS
®
Bluetooth v2.0+EDR
Adaptive Frequency Hopping to cope with
interference from other wireless devices
External or internal antenna options
Comprehensive AT interface
for simple programming
Bluetooth® END Product Qualified
Compact size
Class 2 output – 4dBm
Low power operation
UART interface
PCM and SCO for external codec
GPIO lines under AT control
Support for multiple profiles
Wi-Fi co-existence
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
4
Embedded Devices
Phone Accessories
Security Devices
Medical and Wellness Devices
Automotive Applications
Bluetooth Advertising
ePOS
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
3
AT COMMAND SET REFERENCE
3.1 Introduction
This document describes the protocol used to control and configure the following Laird Technologies
Bluetooth devices:
BTM430
BTM431
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 Technologies 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.
Just like telephony modems, the Laird Technologies device powers up in an unconnected state and will only
respond via the serial interface. In this state the Laird Technologies device will not even 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
will have a concept of command and data modes. This leads to the matrix of states shown below.
Table 1: Matrix of mode states
RF Unconnected
RF Connected
Local Command Mode
OK
OK
Remote Command Mode
ILLEGAL
OK
Data Mode
ILLEGAL
OK
The combinations ‘Data and RF Unconnected Mode’ and ‘Remote Command and RF Unconnected Mode’ do
not make sense and will be ignored.
Navigation between these states is done using the AT commands which are described in detail in subsequent
sections.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
5
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
3.2 Assumptions
The CSR (Cambridge Silicon Radio) BC04 chipset in Laird Technologies 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 will have 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 Technologies device.
Therefore the following assumptions are made:
All commands are terminated by the carriage return character 0x0D, which is represented by the string
in descriptions below this cannot be changed.
All responses from the Laird Technologies device have carriage return and linefeed characters
preceding and appending the response. These dual character sequences have the values 0x0D and
0x0A respectively and shall be represented by the string .
All Bluetooth addresses are represented by a fixed 12 digit hexadecimal string, case insensitive.
All Bluetooth Device Class codes are represented by a fixed 6 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.
3.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.
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’.
n
A positive integer value.
m
An integer value (positive or negative) which can be entered as a decimal
value or in hexadecimal if preceded by the ‘$’ character. E.g. the value 1234
can also be entered as $4D2
A string delimited by double quotes. E.g. "Hello World". The " character
MUST be supplied as delimiters.
A 4 character UUID number consisting of ASCII characters ‘0’ to ‘9’, ‘A’ to ‘F’
and ‘a’ to ‘f’.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
6
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
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, so 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. Please refer to Section 5: Dropping Connections for more
related information.
In modems this escape sequence is usually “+++”. “^^^” is specified to avoid confusion when the module is
providing access to a modem.
Response: OK
2.
!!! {Enter Remote Command Mode}
When in data and connected mode, the host can force the remote device into a command and connected
mode so that AT Commands can be issued to the device remotely. The escape sequence guard time is
specified by S Register 12 and is the same as per the ^^^ escape sequence. By default the guard time is set
to 100 milliseconds. The remote device issues ATO as normal to return to data mode. (Refer to 2.2.12)
For this command to be effective S Register 536 must be set to 1.
Response: OK
3.
AT
Used to check the module is available.
Response: OK
4.
ATA {Answer Call}
Accept an incoming connection, which is indicated by the unsolicited string
RING 123456789012 every second. 123456789012 is the Bluetooth address of the connecting
device.
Response: CONNECT 123456789012
5.
ATD, {Make Outgoing Connection}
Make a connection to device with Bluetooth address and profile . The is an
optional parameter which specifies the UUID of the profile server to attach to, and if not supplied then the
default UUID from S Register 101 is used. As this is a Laird Technologies device which utilises the RFCOMM
layer as described in the Bluetooth specification, it necessarily implies that only profiles based on RFCOMM
can be accessed.
If is not specified, then authentication is as per register 500, otherwise the connection will be
authenticated.
If is not specified, then encryption is as per register 501, otherwise the connection will have encryption
enabled.
The timeout is specified by S register 505.
Response: CONNECT 123456789012
Or NO CARRIER
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
7
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User 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 will fail with the following
response:
Response: CALL LIMIT
Or NO CARRIER
In that case, issuing an ATZ to reset the device will reset the count to 0 and more connections are possible.
The following RFCOMM based UUIDs are defined in the Bluetooth Specification:
6.
Profile Name
UUID
Serial Port
1101
LAN Access Using PPP
1102
Dialup Networking
1103
IrMC Sync
1104
OBEX Object Push
1105
OBEX File Transfer
1106
IrMC Sync Command
1107
Headset
1108
Cordless Telephony
1109
Intercom
1110
Fax
1111
Audio Gateway
1112
WAP
1113
WAP_CLIENT
1114
ATD, {Make Connection}
Make a connection to device with Bluetooth address and profile specified via S Reg 101 AND
which has a service name starting with the string . The ServiceName parameter is a string
delimited by “.
If is not specified, then authentication is as per register 500, otherwise the connection will be
authenticated.
If is not specified, then encryption is as per register 501, otherwise the connection will have encryption
enabled.
The timeout is specified by S register 505.
Response: CONNECT 123456789012
Or NO CARRIER
7.
ATDL {Remake Connection}
Make a connection with the same device and service as that specified in the most recent ATD command. The
modifiers are optional. An error will be returned if the ‘L’ modifier is specified AND a Bluetooth
address.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
8
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
If both ‘L’ and ‘R’ modifiers are specified then an error will be returned.
Response: CONNECT 123456789012 AE
Or NO CARRIER
8.
ATDR {Make Connection to peer specified in AT+BTR}
Make a connection with the device address specified in the most recent AT+BTR command. The service is as
specified in S Register 101. The modifiers are optional. An error will be returned if the ‘R’ modifier is
specified AND a Bluetooth address.
If both ‘R’ and ‘L’ modifiers are specified then an error will be returned.
Response: CONNECT 123456789012 AE
Or NO CARRIER
9.
ATEn {Enable/Disable Echo}
This command enables or disables the echo of characters to the screen. A valid parameter value will be
written to S Register 506.
E0
Disable echo.
E1
Enable echo.
All other values of n will generate an error.
Response: OK
Or ERROR nn
10.
ATH {Drop Connection}
Drop an existing connection or reject an incoming connection indicated by unsolicited RING messages.
Response: NO CARRIER
11.
ATIn {Information}
This will return the following information about the Laird Technologies device.
I0
The product name/variant.
I1
The CSR firmware build number.
I2
The Laird Technologies firmware build number. For internal use only.
I3
The Laird Technologies firmware revision.
I4
A 12 digit hexadecimal number corresponding to the Bluetooth address of the Laird
Technologies device.
I5
The manufacturer of this device.
I6
The maximum size of trusted device database.
I7
The manufacturer of the Bluetooth chipset.
I8
The chipset format.
I9
0 if not in a connect state and 1 if in a connect state.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
9
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
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
1 = Connection timeout
2 = Connection attempt cancelled
3 = Normal disconnection
4 = Peer device has refused connection
5 = Service profile requested not available on remote device
6 = Connection has failed
32 = ATH was entered
33 = Incoming connection aborted because too many rings
34 = Unexpected incoming connection
35 = Invalid address
36 = DSR is not asserted
37 = Call limit of 65531 connections has been reached
38 = Pairing in progress
39 = No link key
40 = Invalid link key
255 = Unknown Reason
I12
The last ERROR response number.
I13
The Sniff status is returned as follows:Response: a:b,c,d,eOK
Where ‘a’ = 0 when not online and 1 when online and Sniff has been enabled, ‘b’ is the Sniff
Attempt parameter, ‘c’ is the Sniff timeout parameter, ‘d’ is the minimum sniff interval and ‘e’
is the maximum sniff interval. All parameters ‘b’, ’c’, ’d’ and ‘e’ are given as Bluetooth slots
which are 625 microseconds long converted from values of S Registers 561, 562, 563 and
564 respectively.
I14
The current boot mode (Only for firmware 1.18.0 and newer)
I15
The maximum length of an AT command, including the terminating carriage return (only for
firmware 1.6.10 and newer)
I16
The size of AT command input buffer
I20
Returns the number of bytes pending to be sent in the RF buffer when a connection is up.
I33
Version number of Multipoint application
Note: ATI is provided for compatibility in multipoint mode; other AT commands are not
available.
I42
State information. Where the response values are as follows:
13 = NotOpen
14 = OpenIdle
15 = Ringing
16 = OnlineCommand
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 will return 1.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
10
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
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 this is quite a large band, therefore
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. As the value approaches 1000 (BER = 0.1%) it is an indication that
the link is very 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 will generate an error.
Response: As AppropriateOK
Or ERROR nn
12.
ATO {Enter Data Mode} (letter ‘o’)
Return to data mode. Assume that the module is in data mode after OK is received. Responds with an error if
there is no Bluetooth connection.
Response: CONNECT 123456789012
Or ERROR nn
13.
ATSn=m {Set S Register}
As with modems, the Laird Technologies 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 that 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 2: S Registers
Register
S0
Default
1
Range
-1..15
S2
0x5E
0x20..0x7E
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
Comment
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 S504 to 0 and 0, and in a connection, DSR can be used to change
from data to command state by deasserting the DSR line for less
than the time specified in this register. This value is rounded down
to the nearest 100ms
15
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
Register
S520
Default
Depends
on device
– see
comments
Range
1200..11520
0
S521
See
Comment
1200..
921600
S522
1
1
S523
1
1..2
S524
0
0..2
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
Comment
Change to a standard baud rate. The effect is immediate and in
fact the OK will be 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
The default is 9600 for Laird Technologies’ BTM430 / BTM431.
For the Go blue Activator variant of the module this register is read
only
See S Register 526 for further information.
Change baud rate to non-standard value. Laird Technologies’
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 will be returned and the
old baud rate will prevail. To inspect the actual baud rate, do
ATS521?
S521 should only be sued for non-standard baud rates. For
standard baud rates use S520.
The effect is immediate and in fact the OK will be 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 Technologies Module and 115200
for other Laird Technologies devices.
For the Go blue Activator variant of the module this register is read
only
See S Register 526 for 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.
16
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
Register
S525
Default
See
Comment
Range
0..1
S526
3
1..3
S530
1000
100..15000
S531
0
0..5
S532
0
0..7
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
Comment
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.
This register specifies a 2 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 nonvolatile memory.
For example, to change comms parameters, but have them come
into effect only after subsequent power cycles, then this register
should be set to 2, and likewise to affect immediately and yet not
have it persist over a power cycle, the value should be set to 1.
Must be set before the baud rate change.
Reconnect delay when configured as master in pure-cablereplacement mode. This value is rounded down to the nearest
100ms. See S Register 505 and 543 also
Specifies the mode on connection establishment.
0 = Normal, that 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 will be returned
3=LOCAL_COMMAND. UART input is parsed by the AT interpreter
and incoming RF data is sent to the host using the RX
asynchronous response.
4=LOCAL_COMMAND and on the RF side, the GPIO is
automatically sent when there is a change in input. See section 9.5
for more details.
5=DEAMON mode
If non zero, then on every connection, a SCO channel (audio) will
be initiated. Bit 0 for HV1, Bit1 for HV2 and Bit2 for HV3. When
the connection is lost, the SCO channel disappears along with it.
17
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
Register
S533
Default
1
Range
0..2
S534
1
0..2
S535
20
0..41
S536
0
0..1
S537
X
X..X
S538
0
0..1
S539
0
0..1
S540
0
0 48..127
S541
6
-50..6
S542
6
-50..6
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
Comment
If set to 1, then GPIO5 follows RI state, if set to 2 then it follows
the state of DSR and if 0 it is not driven and GPIO5 is available as a
user I/O.
This register will not necessarily 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 will blink.
This register will not necessarily 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.
Link Supervision Timeout. If units go out of range, then a NO
CARRIER message will be sent to the host after the time specified
here
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 will always
return 0 and writing 1 will result in ERROR 33.
This register is no longer available – see 551,552,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 it has room to store it.
When set to 1, in idle mode (S512=1), UART Rx characters are
discarded if DSR is deasserted.
Sets the MTU in L2CAP configuration negotiations. The value of 0
is a special value which is taken to mean that the current value
should remain.
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.
18
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
Register
S543
Default
0
Range
0..1
S544
1
0..1
S551
0x3211
0xFFFF
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
Comment
If this is set to 1, then incoming pairing attempts will be 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 also
Configure the UART for either low latency or maximum
throughput. A setting of 1 gives maximum throughput.
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 deassertion of DSR will cause 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
will be sent to the peer to update the bits.
19
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
Register
S552
Default
0x0122
Range
0x0FFF
S553
0x0201
0x0FFF
S554
0
0..900
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
Comment
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 will get refreshed.
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 =0 then confirmation to the host is in the form:CONNECT 123456789012
CONNECT 123456789012 A
CONNECT 123456789012 E
CONNECT 123456789012 AE
Where ‘A’ means authenticated connection and ‘E’ means encryption has been 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.
3.6 Dropping Connections
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
37
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
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 Technologies 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 is to eliminate ambiguity when a data
call is in progress via a mobile phone which was established using the mobile phone’s Bluetooth AT modem.
The second method involves the host dropping the DTR (DSR from the module’s 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 85kbps instead of about 200kbps. To cater for this performance hit, the
device’s connection drop capability is configurable to be in one of two modes.
One mode allows for a connection to be dropped using either method, and the other mode allows for a
connection drop using the DTR method only. By default, the device is in former mode. This mode is selected
using the S507 register. See S register table described in an earlier section.
To reiterate, the escape sequence is as follows:
This means that even when a file transfer is occurring and it happens to be full of characters then
it is not going to drop into command mode because, when transferring a file it is going to happen as fast as
possible and so the inter character gap is going to be significantly shorter than the .
The character can be changed via the S2 register and the interval can be specified
via the S12 register.
3.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 will require 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 will be automatically saved
to the trusted device database. In that case, the asynchronous message PAIR 0 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 will be searched automatically
and if one exists will be provided without host interaction. If the link key is not present, then the connection
attempt will be terminated and a NO CARRIER response will be given to the ATD command.
A typical session to pair an Ericsson T68i (for example) to a serial module would be:
Make the T68i discoverable and send AT+BTI to the serial module. This will result in inquiry responses
from all devices. Make a note of the Bluetooth address of the phone e.g. 123456789012
On the T68i start pairing procedure by selecting “Phone accepts” in the relevant Bluetooth menu.
Send command AT+BTW123456789012 to the serial module
Confirm that you get an OK response and then PIN? responds on a two second interval.
Enter a pin code on the phone. Say it is 12345768
Then enter the command AT+BTK=”12345678”.
The phone will confirm success and likewise the serial module will respond with OK
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
38
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
On success the serial module will send an unsolicited message in the form of PAIR 0
Send AT+BTT to the serial module so that the pairing information is stored in the non-volatile
database.
Confirm that the link key has been stored by sending the command AT+BTT?. This will result in a list of
all devices paired with the module.
If two Laird Technologies devices need to be paired, then it can be accomplished as follows:
To device 1 send ATI4, it will respond with the local Bluetooth address. E.g. 123456789001
To device 1 send AT+BTP. It will become discoverable and connectable.
To device 2 send AT+BTW123456789001 and it will respond with OK
Then on both devices you will see PIN? asynchronous responses
To both modules send AT+BTK=”12345678”
On success the serial module will send an unsolicited message in the form of PAIR 0
The pairing link key, is at this stage, in volatile memory, so send AT+BTT to both.
The two units now have pairing information which will survive a power cycle.
3.8 Error Responses
All error responses from the Laird Technologies device will be in the form ERROR nn, where nn
will be a number in the range 00 to 99.
Error
Description
01
Register not recognised
02
Value for register is out of range
03
Incoming call NOT pending
04
No call to connect to. This error code has meaning for ATO only
05
Syntax Error
06
Empty String
06
Device Class could not be stored
08
Invalid Device Class Code
09
Invalid Bluetooth Address
10
Could not set Service or Friendly name
11
PS Store Write
12
PS Store Read
13
Not Idle
14
Incorrect Mode
15
Already Scanning
16
Pairing is already in progress
17
Not USED
18
Not USED
19
Not USED
20
Not safe to write to Non-volatile Store - Ongoing Bluetooth Connection
21
Link Key Cache is Empty
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
39
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
Error
Description
22
Link Key Database is Full
23
Malloc returned NULL - Resource Issue
24
Remote Address same as Local Address
25
Connection Setup Fail, DSR Not asserted
26
Unauthenticated licence
27
Max Responses (See S Register 518) too high. Memory allocation error
28
The length of Pin in AT+BTK is too long
29
Invalid Ring count specified for S Register 0 or 100. If S00 and S1000 then S0 must be < S100
30
ADC Error
31
Analogue Value cannot be read as it is set for output
32
Analogue Value cannot be written as it is set for input
33
S Register Value is invalid
34
Both L and R modifier cannot be specified in ATD command
35
Invalid Major Device Class – valid value in range 0x00 to 0x1F inclusive
36
Pairing in progress – Command cannot be actioned – try again later
37
Invalid Sniff parameter specified.
E.g. new Attempt value greater than MinInterval. Solution is to first increase MinInterval and reenter the Attempt value.
38
Get Remote Friendly name Failed
39
Failed to change mode to Multipoint
40
7 Bit mode requires parity to be even or odd
3.9 Factory Default Mode
Laird Technologies devices are capable of operating at a very wide range of baud rates. S Registers 520 and
521 allow the baud rate to be set very easily. The baud rate clock generator in the Laird Technologies device
is more versatile that that available in a standard 16550 UART commonly available in PCs.
In fact, as long as the equation BAUDRATE * 0.004096 produces an integer value, then there will be 0%
error in clocking for that baud rate.
So 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.
To cater for this circumstance, the Laird Technologies device will come out of reset using 9600,N,8,1 comms
settings for exactly 750 milliseconds and then revert to the comms parameters as per the S Registers.
If the host sends the string !! where is the carriage return character within that 750ms
period, then the module will remain at 9600,N,8,1 and will also configure itself using factory default S
Register values.
3.10 Miscellaneous Features
This chapter describes various features which cannot be categorized appropriately.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
40
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
3.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.
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 – see the Known Issues section.
3.10.2 Flash LED on Connectable Mode
S reg 534 now takes a value up to 2. A value of 2 configures it so that it will blink when the module is in
connectable mode.
3.10.3 Reset via BREAK
The module can be reset by sending a BREAK signal. A BREAK signal exists when the module’s UART_RX
input is in a non-idle state (0v) for more than 125 milliseconds.
3.10.4 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 4 at both ends of the connection, then on connection, any changes in the states of
the inputs at one end will be transmitted to the peer, which will then reflect 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 one’s 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 0, which disables echoes.
Note that due to inherent latency of Bluetooth transmission, expect the change of state to be delayed. This
value is typically 100ms 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.
3.10.5 Append Bluetooth Address to Friendly name
If S Reg 593 is set to 1, then the last 6 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.
3.11 Known Issues
This chapter outlines any known issues in BTM430 / BTM31 firmware.
Issue #
FW Release
#
Issue Description
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
Workaround
41
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
1
V11.28.1.0
The issue on the BTM430 /
BTM431 is that GPIO5,
GPIO6 and GPIO7 can only
be used as outputs if certain
conditions are met. They
work fine as inputs without
preconditions.
The Preconditions for BTM430 / BTM431
are as follows:
For GPIO5 to work as an output, the lowest
nibble in the value of S Reg 552 must be
zero (0).
For GPIO6 to work as an output, S Reg 534
must be zero (0).
For GPIO7 to work as an output, S Reg 533
must be zero (0).
S Reg 533 & 534 allow you to use certain
GPIO’s as LED indications for DCD and RI.
3.12 Disclaimers
LAIRD TECHNOLOGIES’S 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.
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.
3.13 Data Sheet Status
Laird Technologies reserve the right to change the specification without prior notice in order to improve the
design and supply the best possible product.
3.14 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
S626 – S629 Please see the Known Issues section for BTM430 / BTM431.
Please check with Laird Technologies Ltd for the most recent data before initiating or completing a design.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
42
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
4 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 Technologies 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.1 Compatible Codec Chips
Winbond W61360 13-bit linear CODEC (Motorola MC145483 compatible)
OKI MSM7702 single channel A-law and μ-law CODEC
OKI MSM7705 four channel A-law and μ-law CODEC
The default codec support is for the Winbond W61360
5 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.
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.
5.1 Generic Notes and Guidance
In the message sequence charts the following abbreviations apply:Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
43
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.2
shall mean a string delimited by the “ character. For example, “hello.txt”
shall mean a string delimited by the “ character.
nnn shall be a decimal number with at least one digit.
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.
FTP related AT Commands
5.2.1 AT+FTP
This command is used to establish a connection to an FTP server profile in a peer device
with Bluetooth address .
When a connection is successfully established, the host shall assume 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.
5.2.2 AT+OFT
This command is used to establish a connection to an FTP server profile in a peer
device with Bluetooth address and functions similarly to AT+FTP, but instead of the responses
being “\r\nNNN FTP\r\n” it will be “\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.
5.2.3 ATSn=m
The following values of n are relevant to FTP operation: 582. A description of these values
is given in Table 2: S Registers.
5.2 FTP related Subcommands
This section describes FTP related subcommands that the host can use to control the
ftp session.
5.3.1 PUT (Send file)
This ftp subcommand is used to send a file to the ftp server.
The length of shall not exceed 24 characters.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
44
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
The optional 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. Hence Laird Technologies have taken to sending out an empty ‘Body’ header by
default which is also what the Windows PC based Widcomm Bluetooth stack does.
To cater for future devices which NEED 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 will be empty. A value of 1 forces that ‘Body’
header to have 1 byte of data – and in this case when the module prompts the host for a length value it shall
respond accordingly.
Laird Technologies hope that the default value of 0 will suffice for all occasions, but provide
the control to modify the packet as required.
5.3.2 PUT –nnn (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 value is inserted into the OBEX length header field. This is optional
for FTP.
See comment above with regards to S Reg 582.
5.3.3 GET (Retrieve a file)
This ftp subcommand is used to retrieve a file from the ftp server.
The length of shall not exceed 24 characters.
5.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
5.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 5 character
string &. Testing has shown that the Widcomm Bluetooth stack and also the Microsoft Windows CE
Bluetooth stack do not comply with that requirement and send the ‘&’ unescaped.
This means that if a folder contains filenames with ‘&’ characters, it will result in a failed
parsing of the xml document and this command will fail 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 command described next.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
45
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.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: Be aware that the Widcomm stack seems to append 2 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 will seem to be corrupted when
it is not.
5.3.7 MD (Create a folder)
This ftp subcommand is used to create (make) a subfolder.
The length of shall not exceed 24 characters.
5.3.8 MD -nnn (Create a folder)
This ftp subcommand is used to create (make) a subfolder which is specified in unicode.
5.3.9 CD (Change folder)
This ftp subcommand is used to navigate to the subfolder specified.
The length of shall not exceed 24 characters
5.3.10 CD -nnn (Change folder)
This ftp subcommand is used to navigate to the subfolder specified in unicode
5.3.11 CD \ (Change folder to root)
This ftp subcommand is used to navigate to the root folder.
5.3.12 CD .. (Change folder to parent)
This ftp subcommand is used to navigate to the parent folder.
RD (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 shall not exceed 24 characters
5.3.13 RD -nnn (Delete a folder)
This ftp subcommand is used to delete the folder specified where the foldername
is specified in unicode.
5.3.14 DEL (Delete a file)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
46
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
This ftp subcommand is used to delete the file specified.
5.3.15 DEL -nnn (Delete a file)
This ftp subcommand is used to delete the file specified where the filename is specified
in Unicode.
5.3.16 ABORT (Abort current ftp command)
This ftp 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.
5.3.17 QUIT (Terminate the FTP session)
This ftp subcommand is used to terminate the ftp session and will also result in the
Bluetooth connection being terminated.
5.3.18 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.
5.3 FTP related subresponses
All FTP related sub responses sent from the module to the host SHALL be 11 characters long in the format:
nnn AAA.
The characters nnn shall be decimal digits ‘0’ to ‘9’, then there is a space character and finally a 3 character
word followed by .
The 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
0x00 to 0x0F
None
Reserved
0x10 (0x90)
100
Continue
0x20 (0xA0)
200
OK, Success
0x21 (0xA1)
201
Created
0x22 (0xA2)
202
Accepted
0x23 (0xA3)
203
Non-Authoritative Information
0x24 (0xA4)
204
No Content
0x25 (0xA5)
205
Reset Content
0x26 (0xA6)
206
Partial Content
0x30 (0xB0)
300
Multiple Choices
0x31 (0xB1)
301
Moved Permanently
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
47
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
OBEX Response Code
HTTP Status
Code
Definition
0x32 (0xB2)
302
Moved temporarily
0x33 (0xB3)
303
See Other
0x34 (0xB4)
304
Not modified
0x35 (0xB5)
305
Use Proxy
0x40 (0xC0)
400
Bad Request - server couldn’t understand request
0x41 (0xC1)
401
Unauthorized
0x42 (0xC2)
402
Payment required
0x43 (0xC3)
403
Forbidden - operation is understood but refused
0x44 (0xC4)
404
Not Found
0x45 (0xC5)
405
Method not allowed
0x46 (0xC6)
406
Not Acceptable
0x47 (0xC7)
407
Proxy Authentication required
0x48 (0xC8)
408
Request Time Out
0x49 (0xC9)
409
Conflict
0x4A (0xCA)
410
Gone
0x4B (0xCB)
411
Length Required
0x4C (0xCC)
412
Precondition failed
0x4D (0xCD)
413
Requested entity too large
0x4E (0xCE)
414
Request URL too large
0x4F (0xCF)
415
Unsupported media type
0x50 (0xD0)
500
Internal Server Error
0x51 (0xD1)
501
Not Implemented
0x52 (0xD2)
502
Bad Gateway
0x53 (0xD3)
503
Service Unavailable
0x54 (0xD4)
504
Gateway Timeout
0x55 (0xD5)
505
HTTP version not supported
0x60 (0xE0)
---
Database Full
0x61 (0xE1)
---
Database Locked
For more details of these values, please 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 Technologies application and are defined as per the table below.
Response Code
‘nnn’
(Laird Technologies Specific)
Definition
050
Syntax Error / Command Unrecognized
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
48
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
051
Server sent unexpected information in obex packet
052
Obex connection fail, because it is unauthorized
053
Memory allocation failure (Please contact Laird Technologies with details)
055
Unicode File/Folder name length cannot be an odd value
056
Command not recognized
090
An XML parsing error occurred (while processing response to DIR command)
099
The Bluetooth connection has unexpected been dropped. For example,
remote out of range etc.
250
GET procedure was aborted
5.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 3 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 as that is what the Widcomm stack seems to be using and the ftp specifies.
5.4.2 nnn OBX
This has the same meaning as “nnn FTP” and is used when AT+OFT command was used to open an FTP
connection.
5.4.3 nnn GET
This ftp response is used during a GET file operation. See appropriate message sequence charts for more
details. See above for ‘nnn’ values.
5.4 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. 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 in the host to module direction and in
the reverse direction.
The commands are described in the following sub sections.
5.5.1 #
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
49
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
This command is used to ask the other end how many bytes of a filename or foldername it will send next.
5.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.
5.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 too big to cope with, then 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 next section).
5.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.
5.5 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 shall
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.
5.5.1 Usage: Make FTP connection (No Authentication)
5.5.2
Usage: FTP Disconnection
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
50
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.3 Usage: Folder Listing
Note: If a number follows a name then that implies a file .
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
51
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.4 Usage: Folder Listing (Raw Output)
Note: The raw output is ASCII text and is in XML format.
5.5.5 Usage: Create Folder (Short Folder name)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
52
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.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.
5.5.7 Usage: Create Folder (Unsuccessful)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
53
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.8 Usage: Change Folder (Short Folder name)
5.5.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.
5.5.10 Usage: Remove Folder (Short Folder name)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
54
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.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.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
55
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.12 Usage: Delete File (Short Filename)
5.5.13 Usage: Delete File (Long Filename – UNICODE)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
56
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.14 Usage: Put File (Short Filename)
Notes:
1. The first NN from the host shall specify a value of 1.
2. Subsequent NN values shall be less than the value returned to command MAX
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
57
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.15 Usage: Put File (Long Filename - UNICODE)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
58
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.16 Usage: Get File (Short Filename)
Notes:
1. After each ! command, if a +NN response is not received after 2 seconds, the host can repeat
that command.
2. 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.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
59
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.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.
5.5.18 Usage: Get File (Long Filename - UNICODE)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
60
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.19 Usage: Get File – ABORT
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
61
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
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.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
62
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
5.5.20 Usage: Unsuccessful FTP connection
Note: Reason for connection failure could be:
1. Device is not in range
2. Device is not connectable
3. Device does not support FTP server profile.
5.5.21 Usage: ABORT a DIR request
Notes: 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” to be sure that the DIR operation has terminated. Some
ftp servers (like widcomm stack) will return a 500 response code.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
63
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
6 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.
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 3 features as follows:
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 in
addition 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.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
64
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
6.1 Generic Notes and Guidance
In the message sequence charts the following abbreviations apply:
shall mean a two character sequence made up of the ASCII characters 0x0D (carriage return)
and 0x0A (line feed).
shall mean a one character sequence made up of the ASCII character 0x0D.
shall mean a one character sequence made up of the ASCII character 0x0A.
shall mean a 12 digit string consisting of only hexadecimal digits 0-9,A-F and a-f
shall mean a string delimited by the “ character. For example, “hello.txt”
shall mean a string delimited by the “ character.
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.
6.2 OBEX Push related AT Commands
6.2.1 AT+OPS
This command is used to establish a connection to an Obex Push server profile in a
peer device with Bluetooth address .
6.2.1 ATSn=m
The following values of n are relevant to OBEX operation: 582. A description of these
values is given in Table 2: S Registers.
6.2 OBEX Push related Subcommands
This section describes Obex Push related subcommands that the host can use to control the
obex push session.
6.3.1 PUT length (Send file)
This obex subcommand is used to send a file to the obex server.
The length of 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 ‘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
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
65
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
then it seems to confuse it. Hence Laird Technologies have taken to sending out an empty ‘Body’ header by
default which is also what the Windows PC based Widcomm Bluetooth stack does.
To cater for future devices which NEED 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 will be empty. A value of 1 forces that ‘Body’ header to have 1 byte of
data – and in this case when the module prompts the host for a length value it shall respond accordingly.
Laird Technologies hope that the default value of 0 will suffice for all occasions, but provide
the control to modify the packet as required.
6.3.2 PUT –nnn length (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.
6.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.
6.3.4 QUIT ( Terminate the OBEX Push session)
This obex subcommand is used to terminate the obex push session and will also result
in the Bluetooth connection being terminated.
6.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.
6.3.6 WHO (Identify current profile)
This obex subcommand is used to identify the current profile. 0 shall mean ObexPush and 1 shall mean FTP.
6.3 OBEX Push Related Subresponses
All Obex Push-related sub responses sent from the module to the host SHALL be 11 characters long in the
format:
nnn AAA.
The characters nnn shall be decimal digits ‘0’ to ‘9’, then there is a space character and finally a 3 character
word followed by .
The 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:
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
66
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
OBEX Response Code
HTTP Status Code
Definition
0x00 to 0x0F
None
Reserved
0x10 (0x90)
100
Continue
0x20 (0xA0)
200
OK, Success
0x21 (0xA1)
201
Created
0x22 (0xA2)
202
Accepted
0x23 (0xA3)
203
Non-Authoritative Information
0x24 (0xA4)
204
No Content
0x25 (0xA5)
205
Reset Content
0x26 (0xA6)
206
Partial Content
0x30 (0xB0)
300
Multiple Choices
0x31 (0xB1)
301
Moved Permanently
0x32 (0xB2)
302
Moved temporarily
0x33 (0xB3)
303
See Other
0x34 (0xB4)
304
Not modified
0x35 (0xB5)
305
Use Proxy
0x40 (0xC0)
400
Bad Request - server couldn’t understand
request
0x41 (0xC1)
401
Unauthorized
0x42 (0xC2)
402
Payment required
0x43 (0xC3)
403
Forbidden - operation is understood but refused
0x44 (0xC4)
404
Not Found
0x45 (0xC5)
405
Method not allowed
0x46 (0xC6)
406
Not Acceptable
0x47 (0xC7)
407
Proxy Authentication required
0x48 (0xC8)
408
Request Time Out
0x49 (0xC9)
409
Conflict
0x4A (0xCA)
410
Gone
0x4B (0xCB)
411
Length Required
0x4C (0xCC)
412
Precondition failed
0x4D (0xCD)
413
Requested entity too large
0x4E (0xCE)
414
Request URL too large
0x4F (0xCF)
415
Unsupported media type
0x50 (0xD0)
500
Internal Server Error
0x51 (0xD1)
501
Not Implemented
0x52 (0xD2)
502
Bad Gateway
0x53 (0xD3)
503
Service Unavailable
0x54 (0xD4)
504
Gateway Timeout
0x55 (0xD5)
505
HTTP version not supported
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
67
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
OBEX Response Code
HTTP Status Code
Definition
0x60 (0xE0)
---
Database Full
0x61 (0xE1)
---
Database Locked
For more details of these values, please 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 Technologies
application and are defined as per the table below.
Response Code
‘nnn’
(Laird Technologies Specific)
Definition
050
Syntax Error / Command Unrecognized
051
Server sent unexpected information in OBEX packet
052
OBEX connection fail, because it is unauthorized
053
Memory allocation failure (Please contact Ezurio with details)
055
Unicode File/Folder name length cannot be an odd value
056
Command not recognized
090
An XML parsing error occurred (while processing response to DIR command)
099
The Bluetooth connection has unexpected been dropped. For example, remote out of
range etc.
250
GET procedure was aborted
6.3.1 nnn OBX
This OBEX response is used to convey the outcome of a subcommand to the host where ‘nnn’ is a fixed 3
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.
6.4 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 in the host to module direction and in
the reverse direction.
The commands are described in the following sub sections.
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
68
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
6.5.1 #
This command is used to ask the other end how many bytes of a filename/ or object it will send next.
6.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.
6.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 too big to cope with, then 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 next section).
6.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.
6.5 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.
6.5.1 Usage: Make OBEX PUSH connection (No Authentication)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
69
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
6.5.2 Usage: OBEX Push Disconnection
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
70
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
6.5.3 Usage: Put File (Short Filename)
Notes:
1. The first NN from the host shall specify a value of 1.
2. Subsequent NN values shall be less than the value returned to command MAX
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
71
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
6.5.4 Usage: Put File (Long Filename - UNICODE)
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
72
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
6.5.5 Usage: Unsuccessful OBEX Push connection
Note: Reason for connection failure could be:
1. Device is not in range
2. Device is not connectable
3. Device does not support OBEX Push server profile
7 RELATED DOCUMENTS
The following additional BTM430/431 technical documents are also available from the Laird BTM430/431
product page under the Documentation tab:
Product Brief
Hardware Integration Guide
Firmware Release Notes - Version 11.28.1.0
Development Kit Schematics
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
73
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
BTM430/431
Bluetooth® AT Data Module User Guide
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.
LWS-UM-BTM430-431
Copyright © 2014 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 lifesustaining equipment are specifically not recommended without additional testing for such application.
Limited Warranty, Disclaimer, Limitation of Liability
Embedded Wireless Solutions Support
Center: http://ews-support.lairdtech.com
www.lairdtech.com/bluetooth
74
Laird
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610