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
59
8.3.2 PUT nnn<length>(Send file)
This FTP subcommand is used to send a file to the FTP server where the filename is in UNICODE text
and the filename is nnn bytes long.
The optional <length> value is inserted into the OBEX length header field. This is optional for FTP.
See comment above TBC with regards to S Reg 582.
8.3.3 GET <filename>(Retrieve a file)
This FTP subcommand is used to retrieve a file from the FTP server.
The length of <filename> shall not exceed 24 characters.
8.3.4 GET -nnn(Retrieve a file)
This FTP subcommand is used to retrieve a file from the FTP server where the filename is in UNICODE
and the filename is nnn bytes long.
8.3.5 DIR(Get folder listing)
This FTP subcommand is used to retrieve the folder listing.
The Bluetooth FTP specification requires a server to transmit a folder listing as a properly formed XML
document. In a properly formed document, the character ‘&’ is supposed to be escaped into a five
character string &amp;. Testing shows that the Widcomm Bluetooth stack and the Microsoft Windows CE
Bluetooth stack do not comply with that requirement; they send the ‘&’ unescaped.
This means that if a folder contains filenames with ‘&’ characters, this results in a failed
parsing of the XML document and this command fails with the response “090 FTP”.
In this circumstance, the only way for the host to extract the folder listing from the server
is to request the folder listing in raw XML form. This is expedited using the DIR -RAW(Get folder listing,
XML document) command.
8.3.6 DIR -RAW(Get folder listing, XML document)
This FTP subcommand is used to retrieve the folder listing. In this variant, the OBEX response packet,
which is in ASCII XML format, is sent to the host verbatim.
WARNING: The Widcomm stack seems to append two null characters at the end of the XML document.
This means extra care if the host stores data as null terminated strings, because the final
“200 FTP” prompt appears corrupted when it is not.
8.3.7 MD <foldername>(Create a folder)
This FTP subcommand is used to create a subfolder. The length of <foldername> shall not exceed 24
characters.
8.3.8 MD -nnn(Create a folder)
This FTP subcommand is used to create a subfolder which is specified in Unicode.