User Manual

Table Of Contents
USER'S AND DEVELOPER'S GUIDE WRAP MULTIRADIO ACCESS SERVER
9 BLUETOOTH SERVER SOCKET INTERFACE
The Bluetooth in the WRAP is controlled via the TCP socket interface. The first Bluetooth server
is listening on port 10101. In case of WRAP 2293, the second Bluetooth server is listening on
port 10102 and the third one is listening on port 10103. All commands to a Bluetooth 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
commands 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 identifier), simply ignore the reply.
Normally, the Bluetooth Server Socket Interface is not protected with a password. The
password can be enabled and changed: see the SET command below. If the password is
enabled, it must be sent first, immediately following the "READY." prompt, to the Bluetooth
server. Otherwise, all commands will fail.
For an example of using the Bluetooth Server Socket Interface, please see
src/examples/btsend in the SDK directory.
9.1 T
ERMS
Bluetooth address (bdaddr) is six hex digits separated by a colon. For example,
"1a:2b:3c:4d:5e:6f". With commands requiring Bluetooth address, you can also use Bluetooth
friendly name instead.
Bluetooth channels are numbered from 1 to 30. In WRAP, the Serial Port Profile is assigned to
channel number two, the Object Push/File Transfer Profile to channel number 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 used to identify established Bluetooth
connections.
9.2 S
TARTING THE BLUETOOTH SERVERS
Normally, the Bluetooth servers are started automatically upon power-up. You can restart the
servers manually (for example, to apply the changes made to the Bluetooth settings with
"setup" application without rebooting the system). To restart the servers manually, execute
the startup script with option "restart":
/> /etc/init.d/bluetooth restart
When the Bluetooth servers start up, it uses the settings configured with the "setup"
application described in the User manual. You can put your extra Bluetooth Server Socket
Interface commands in the /etc/bluetooth.conf file. The commands in that file are processed as
the last task every time each Bluetooth server is started.
9.3 B
ASIC COMMANDS
These commands are used for searching for and inquiring about nearby Bluetooth devices and
for controlling the Bluetooth server and/or the control connection itself.
Bluegiga Proprietary, Copyright © Bluegiga Technologies 2001-2004 51 (94)