Update Bluetooth chapter and document SDP changes

Looked at by:		imp (mentor), ru
No response from:	doc@
This commit is contained in:
Maksim Yevmenkin 2004-04-09 21:37:57 +00:00
parent 95cec682e4
commit ad8f34373f
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=20645

View file

@ -1436,35 +1436,32 @@ hcsecd[16484]: Sending PIN_Code_Reply to 'ubt0hci' for remote bdaddr 0:80:37:29:
services. This process of looking for any offered services is called
<emphasis>browsing</emphasis>.</para>
<para>Currently Bluetooth SDP server and client are implemented in a
third-party package <application>sdp-1.5</application> that can be
downloaded from
<ulink url="http://www.geocities.com/m_evmenkin/">here</ulink>. The
<application>sdptool</application> is a command line SDP client.
<para>The Bluetooth SDP server &man.sdpd.8; and command line client
&man.sdpcontrol.8; are included in the standard &os; installation.
The following example shows how to perform a SDP browse query.</para>
<screen>&prompt.root; <userinput>sdptool browse 00:80:37:29:19:a4</userinput>
Browsing 00:80:37:29:19:A4 ...
Service Name: Dial-up Networking
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Service Name: Fax
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Service Name: Voice gateway
<screen>&prompt.user; <userinput>sdpcontrol -a 00:01:03:fc:6e:ec browse</userinput>
Record Handle: 00000000
Service Class ID List:
"Headset Audio Gateway" (0x1112)
"Generic Audio" (0x1203)
Service Discovery Server (0x1000)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 3
L2CAP (0x0100)
Protocol specific parameter #1: u/int/uuid16 1
Protocol specific parameter #2: u/int/uuid16 1
Record Handle: 0x00000001
Service Class ID List:
Browse Group Descriptor (0x1001)
Record Handle: 0x00000002
Service Class ID List:
LAN Access Using PPP (0x1102)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
LAN Access Using PPP (0x1102) ver. 1.0
</screen>
<para>... and so on. Note that each service has a list of attributes
@ -1474,24 +1471,22 @@ Protocol Descriptor List:
it is possible to search for the specific service. The example below
shows how to search for the OBEX Object Push (OPUSH) service.</para>
<screen>&prompt.root; <userinput>sdptool search --bdaddr 00:07:e0:00:0b:ca OPUSH</userinput></screen>
<screen>&prompt.user; <userinput>sdpcontrol -a 00:01:03:fc:6e:ec search OPUSH</userinput></screen>
<para>Offering services on &os; to Bluetooth clients is done with the
<application>sdpd</application> server.</para>
&man.sdpd.8; server.</para>
<screen>&prompt.root; <userinput>sdpd</userinput></screen>
<para>The <application>sdptool</application> is also used to register
a service with the local SDP server. The example below shows how to
register the Network Access with PPP (LAN) service. Note that some
services require attributes (RFCOMM channel for example).</para>
<para>The local server application that wants to provide Bluetooth
service to the remote clients will register service with the local
SDP daemon. The example of such application is &man.rfcomm.pppd.8;.
Once started it will register Bluetooth LAN service with the local
SDP daemon.</para>
<screen>&prompt.root; <userinput>sdptool add --channel=7 LAN</userinput></screen>
<para>The list of services registered with the local SDP server can be
obtained by issuing SDP browse query via local control channel.</para>
<para>The list of services registered with local SDP server can be
obtained by issuing SDP browse query to a <quote>special</quote>
BD_ADDR.</para>
<screen>&prompt.root; <userinput>sdptool browse ff:ff:ff:00:00:00</userinput></screen>
<screen>&prompt.root; <userinput>sdpcontrol -l browse</userinput></screen>
</sect2>
@ -1529,7 +1524,7 @@ Protocol Descriptor List:
<para>In &os; both profiles are implemented with &man.ppp.8; and
&man.rfcomm.pppd.8; - a wrapper that converts RFCOMM Bluetooth
connection into something PPP can operate with. Before any profile
can be used, a new PPP label in <filename>/etc/ppp/ppp.conf</filename>
can be used, a new PPP label in the <filename>/etc/ppp/ppp.conf</filename>
must be created. Consult &man.rfcomm.pppd.8; manual page for examples.
</para>
@ -1538,20 +1533,18 @@ Protocol Descriptor List:
DUN RFCOMM channel. The actual RFCOMM channel number will be obtained
from the remote device via SDP. It is possible to specify RFCOMM channel
by hand, and in this case &man.rfcomm.pppd.8; will not perform SDP
query. Use <application>sdptool</application> to find out RFCOMM
query. Use &man.sdpcontrol.8; to find out RFCOMM
channel on the remote device.</para>
<screen>&prompt.root; <userinput>rfcomm_pppd -a 00:80:37:29:19:a4 -c -C dun -l rfcomm-dialup</userinput></screen>
<para>In order to provide Network Access with PPP (LAN) service
<application>sdpd</application> server must be running. It is also
required to register LAN service with the local SDP server. Note that
LAN service requires RFCOMM channel attribute. A new entry for LAN
clients must be created in <filename>/etc/ppp/ppp.conf</filename> file.
Consult &man.rfcomm.pppd.8; manual page for examples. Finally, RFCOMM
PPP server must be running and listening on the same RFCOMM channel
as registered with the local SDP server. The example below shows how
to start RFCOMM PPP server.</para>
<para>In order to provide Network Access with PPP (LAN) service the
&man.sdpd.8; server must be running. A new entry for LAN clients must
be created in the <filename>/etc/ppp/ppp.conf</filename> file. Consult
&man.rfcomm.pppd.8; manual page for examples. Finally, start RFCOMM PPP
server on valid RFCOMM channel number. The RFCOMM PPP server will
automatically register Bluetooth LAN service with the local SDP daemon.
The example below shows how to start RFCOMM PPP server.</para>
<screen>&prompt.root; <userinput>rfcomm_pppd -s -C 7 -l rfcomm-server</userinput></screen>
@ -1559,7 +1552,7 @@ Protocol Descriptor List:
<indexterm><primary>OBEX</primary></indexterm>
<sect2>
<title>OBEX Push (OPUSH) Profile</title>
<title>OBEX Object Push (OPUSH) Profile</title>
<para>OBEX is a widely used protocol for simple file transfers between
mobile devices. Its main use is in infrared communication, where it is
used for generic file transfers between notebooks or Palm handhelds,
@ -1567,12 +1560,11 @@ Protocol Descriptor List:
phones and other devices with PIM applications.</para>
<para>The OBEX server and client are implemented as a third-party package
<application>obexapp-1.0</application> that can be downloaded from
<application>obexapp-1.2</application> that can be downloaded from
<ulink url="http://www.geocities.com/m_evmenkin/">here</ulink>.
The package requires the <application>openobex</application> library
(included) and the <filename role="package">devel/glib12</filename>
port. Note that <application>obexapp</application> does not require
root privileges to operate.</para>
The package requires the <application>openobex-1.0.1</application>
library (included) and the <filename role="package">devel/gmake</filename>
port.</para>
<para>OBEX client is used to push and/or pull objects from the OBEX server.
An object can, for example, be a business card or an appointment.
@ -1596,15 +1588,13 @@ Success, response: OK, Success (0x20)
obex&gt; di
Success, response: OK, Success (0x20)</screen>
<para>In order to provide OBEX Push service,
<application>sdpd</application> server must be running. It is also
required to register OPUSH service with the local SDP server. Note that
OPUSH service requires RFCOMM channel attribute. A root folder, where
all incoming objects will be stored, must be created. The default path
to the root folder is <filename>/var/spool/obex</filename>. Finally,
OBEX server must be running and listening on the same RFCOMM channel
as registered with the local SDP server. The example below shows how
to start OBEX server.</para>
<para>In order to provide OBEX Object Push service,
&man.sdpd.8; server must be running. A root folder, where all incoming
objects will be stored, must be created. The default path to the root
folder is <filename>/var/spool/obex</filename>. Finally, start OBEX
server on valid RFCOMM channel number. The OBEX server will
automatically register OBEX Object Push service with the local SDP
daemon. The example below shows how to start OBEX server.</para>
<screen>&prompt.root; <userinput>obexapp -s -C 10</userinput></screen>
</sect2>