User's Manual
Class 1 Bluetooth v2.0 Module
User’s Guide
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852-2923-0610
www.lairdtech.com/bluetooth
58
CONN-GUIDE-BT730_v0.9
8.2 FTP related AT Commands
8.2.1 AT+FTP<bd_addr>
This command is used to establish a connection to an FTP server profile in a peer device
with Bluetooth address <bd_addr>.
When a connection is successfully established, the host assumes that the current
folder is the root folder. This root folder is always relative to the host. It is not necessarily the absolute root
folder of the host machine.
8.2.2 AT+OFT<bd_addr>
This command is used to establish a connection to an FTP server profile in a peer device with Bluetooth
address <bd_addr> and functions similarly to AT+FTP, but instead of the response being “\r\nNNN
FTP\r\n” it is “\r\nNNN OBX\r\n”, where NNN is a decimal number.
This capability of choosing the response type is to allow a host to cater generically a connection which is
either FTP or ObexPush.
8.2.3 ATSn=m
The following values of n are relevant to FTP operation: 582. A description of these values is given on
page 18 TBC.
8.3 FTP related Subcommands
This section describes FTP-related subcommands that the host can use to control the FTP session.
8.3.1 PUT <filename><length> (Send file)
This FTP subcommand is used to send a file to the FTP server.
The length of <filename> shall not exceed 24 characters.
The optional <length> value is inserted into the OBEX length header field. This is optional for FTP.
There is some ambiguity as to how the first OBEX PUT packet is formed with respect to the ‘Body’ header.
The OBEX specification does not prohibit the first ‘Body’ header to be empty; neither does it say that it
must not be empty. If the first body is not empty when sending a file to a Nokia 6820 phone then it seems
to confuse it. Because of this, Laird sends out an empty ‘Body’ header by default which is also what the
Windows PC based Widcomm Bluetooth stack sends.
To cater for future devices which require the first ‘Body’ header to be non-empty, a new
S Register 582 has been added to allow a host to have control over how the first body header is
constructed.
The new S register 582 takes values in the range 0 to 1. The default value is 0 which
implies that the first ‘Body’ header in the PUT OBEX packet is empty. A value of 1 forces that ‘Body’
header to have one byte of data – and in this case, when the module prompts the host for a length value
it shall respond accordingly.
Laird hopes that the default value of zero suffices for all occasions, but provides the control to modify the
packet as required.