Page 501 - From GMS to LTE
P. 501
Bluetooth and Bluetooth Low Energy 487
Device 1 Device 2
Application: Application:
File Transfer Client File Transfer Server
OBEX OBEX
RFCOMM SDP RFCOMM SDP
L2CAP LMP L2CAP LMP
File system File system
ACL-link ACL-link
Figure 7.19 Protocol stack of the OBEX file transfer profile.
to copy files or directories to the remote Bluetooth device. For this purpose, the general
OBEX PUT command is used.
If the user changes to a subdirectory on the remote device, the OBEX SETPATH com-
mand is used in combination with another OBEX GET command to request the direc-
tory listing. Figure 7.20 shows how the content of a directory is XML‐encoded in a
human readable format and sent to the requesting device.
In the OBEX protocol layer, the CONNECT, DISCONNECT, PUT, GET, SETPATH
and ABORT commands and the corresponding answers are processed as packets. The
first byte of a packet identifies the command. The command field is followed by 2‐byte
length field and the parameters of the command. A parameter can be a directory name,
a directory listing or the contents of a requested file. The standard uses the term ‘header’
for a parameter, which is somewhat confusing. To be able to recognize the type of a
parameter, each parameter contains a type information in the first byte. The type of a
parameter can, for example, be ‘filename’ or ‘body’ (the content of the file).
The maximum size of a packet is 64 kB. To transfer bigger files, that is, ‘header’ of type
‘body’, the file is automatically split into several packets by the OBEX layer.
Although the FTP profile is not commonly used anymore, a somewhat simpler appli-
cation of the GOEP, that is, the object push profile [8] (Figure 7.21), has remained quite
popular. This profile is used if the user wants to transmit a single calendar entry, address
book entry or a single file via Bluetooth to another device. The profile works in the same
<xml version=“1.0“>
<!DOCTYPE folder-listing SYSTEM „obex-folder listing.dtd“>
<folder-listing-version=“1.0“>
<folder name=“Camera“ modified=“2004117T100840“
user perm=“RWD“ group perm“W“ />
<folder name=“other pics“ modified=“2004117T13321“
user perm=“RWD“ group perm“W“ />
</folder-listing>
Figure 7.20 XML‐encoded directory structure.