User Manual

Table Of Contents
Chapter 7. iWRAP - Bluetooth Interface
The Bluetooth service in Access Server is controlled through the TCP socket interface called
iWRAP. The first iWRAP server is listening on port 10101. In the case of Access Server 2293, the
second iWRAP server is listening on port 10102, and the third one is listening on port 10103. All
commands to an iWRAP server and replies from the server are plain ASCII strings ending in
CR+LF ("\r\n"). Commands and replies are not case sensitive.
When connecting to a server, you must first wait for the READY. prompt. Do not send any com-
mands prior to this. Some replies are broadcast to all clients of the server. If you see something
that you have not requested or that is not intended for your client (identified by the link identi-
fier), simply ignore the reply.
Normally, the iWRAP is protected with the buffy password. The password can be disabled
or changed. For more information, see the SET command. If the password is enabled, it must
be sent first, immediately following the READY. prompt, to the iWRAP server. Otherwise, all
commands will fail.
For an example of using the iWRAP, please see the asdk/examples/btsend file in the SDK
directory.
In the following examples, bold lines are commands sent by the client to the iWRAP server
and normal lines are replies received from the iWRAP server by the client.
7.1. Terms
Bluetooth address (bdaddr) consists of six hex digits separated by a colon. For example,
"00:07:80:80:bf:01". With commands requiring a Bluetooth address, you can also use the
Bluetooth friendly name instead.
Bluetooth channels are numbered from 1 to 30. In Access Server, the Serial Port Profile is as-
signed to channel number two, the Object Push Profile and File Transfer Profile to channel num-
ber three, and the LAN Access Profile is on channel number four. The other channels are free for
user applications.
Link Identifier (link_id) is a number from 0 to 99. It is used to identify established Bluetooth
connections.
7.2. Starting the iWRAP Servers
Normally, the iWRAP servers are started automatically upon power-up. You can restart the
servers manually (for example, to apply the changes made to the iWRAP settings with the setup
application without rebooting the system). To restart the servers manually, execute the startup
script with option restart:
[root@wrap /] /etc/init.d/bluetooth restart
When the iWRAP servers start up, they use the settings configured with the setup application.
You can put additional iWRAP commands to the /etc/bluetooth.conf file. The commands in
that file are processed as the last task every time the iWRAP server is started.
68