Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 352 — #378
i
i
i
i
i
i
i
i
sdptool
The program sdptool can be used to check which services are made
available by a specific device. The command sdptool browse
<device_address> returns all services of a device. The command
sdptool search <service_code> can be used to search for a specific
service. This command scans all accessible devices for the requested ser-
vice. If one of the devices offers the service, the program prints the (full)
service name returned by the device together with a brief description. A list
of all possible service codes can be viewed by entering sdptool without
any parameters.
16.4.5 Examples
The following two examples demonstrate some of the capabilities of Blue-
tooth.
Network Connection between Two Hosts
The first example shows the establishment of a network connection be-
tween two hosts with pand (personal area networking). The following com-
mands must be executed by the user root. The description focuses on the
Bluetooth-specific actions and does not provide a detailed explanation of
the network command (ip).
Start pand with the command pand -s on one of the two hosts (referred
to as H1). Determine the device address of the second host (H2) by run-
ning hcitool inq on this host. Run pand -c <device_address> to
establish a connection. If you query the available network interfaces with
ip link show, an entry such as the following should be displayed (the lo-
cal device address should be displayed instead of 00:12:34:56:89:90):
bnep0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 00:12:34:56:89:90 brd ff:ff:ff:ff:ff:ff
This interface must be assigned an IP address and activated. This can be
done with the following two commands. On H1:
ip addr add 192.168.1.3/24 dev bnep0
ip link set bnep0 up
352
16.4. Bluetooth — Wireless Connections










