~ubuntu-branches/ubuntu/intrepid/kdebluetooth/intrepid-proposed

« back to all changes in this revision

Viewing changes to doc/ru/kbluetoothd.docbook

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2008-08-07 09:49:47 UTC
  • mto: This revision was merged to the branch mainline in revision 56.
  • Revision ID: james.westby@ubuntu.com-20080807094947-pj6q3uxwuv7l844q
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<sect1 id="components.kbluetoothd">
2
 
<title>kbluetoothd: The Core of the KDE Bluetooth Framework</title>
3
 
<para>
4
 
KBluetoothD is a central piece of the KDE Bluetooth framework. It runs all the time in the system tray usually and starts other services like the OBEX Server, handsfree or
5
 
bemused on demand. Its system tray icon tells you about ongoing bluetooth connections and
6
 
also gives you quick access to the service configuration, recently used 
7
 
services, devices in range and more.
8
 
</para>
9
 
<para>
10
 
Programmers who want to integrate their program with kdebluetooth, 
11
 
should take a look at the <link linkend="developers.kbluetoothd">developers section</link> for more information.
12
 
</para>
13
 
 
14
 
<sect2>
15
 
<title>Starting kbluetoothd</title>
16
 
<para>
17
 
You can start KBluetoothD by typing <command>kbluetoothd</command> on 
18
 
the command line or by starting it from the K-Menu (usually System/kbluetoothd).
19
 
</para><para>
20
 
KBluetoothD displays and icon in the system tray, but if you don't like it
21
 
you can disable "Always visible" in the context menu of the tray icon.
22
 
Then kbluetoothd will run without any visible user interface, even after
23
 
it's restarted. To re-enable the icon, simply start kbluetoothd again.
24
 
If the icon was disabled, it will still appear for the duration of a
25
 
bluetooth connection.
26
 
</para>
27
 
<para>When kbluetoothd is running until the system is shut down, it will be started again automatically next time you log in. To keep kbluetooth from starting up automatically, just close it and tell it not to start when you log in the next time.</para>
28
 
<para>
29
 
</para>
30
 
</sect2>
31
 
 
32
 
<sect2>
33
 
<title>What kbluetoothd does</title>
34
 
<para>
35
 
The most important feature of kbluetoothd is its Bluetooth meta server. Since kbluetoothd is running all the time anyway, it also monitors your Bluetooth adaptor, tells you when there are connections and caches name requests. The idea is that kbluetoothd is the only bluetooth related program that needs to run all the time while still having access to all activated services.
36
 
</para>
37
 
<sect3>
38
 
<title>The meta server</title>
39
 
<para>
40
 
If you know what the inetd is doing in a Linux system, then you already
41
 
have an idea what the meta server of kbluetoothd is good for: It waits
42
 
for incoming connections on behalf of the real service handlers and starts
43
 
them when necessary. So you don't need to have an obex server running all
44
 
the time, but when someone sends you a file via OBEX, then the 
45
 
OBEX-server will be started automatically.
46
 
</para>
47
 
 
48
 
<para>There are several reasons for using such an indirection: </para>
49
 
 
50
 
<itemizedlist>
51
 
<listitem>
52
 
<para>
53
 
It reduces the memory requirements when you use several services. 
54
 
The KDE Bluetooth Framework currently comes with four server programs: 
55
 
the obex server, the handsfree client, 
56
 
the bemused client and the serial chat tool. While you may need some of these
57
 
services only rarely, you can still leave them enabled at no cost.
58
 
</para>
59
 
</listitem>
60
 
 
61
 
<listitem>
62
 
<para>
63
 
Your system tray won't be cluttered with lots of rarely used icons.
64
 
</para>
65
 
</listitem>
66
 
 
67
 
<listitem>
68
 
<para>
69
 
It improves security and makes access control easier to manage. 
70
 
KBluetoothD will by default pop up a dialog asking for permission if 
71
 
there is an incoming connection. The user can override this dialog
72
 
and permanently allow or disallow connections for each service and device.
73
 
This gives every application managed by kbluetoothd access control 
74
 
for free.
75
 
</para>
76
 
<!-- authentication request no implemented!! <para>
77
 
It is also worth noting that this feature is isn't an alternative to
78
 
the bluetooth security features, but it is completing them instead:
79
 
When a bluetooth connection is authenticated because you paired the 
80
 
two bluetooth devices before, you can be sure about the identity
81
 
over the other party. With kbluetoothd now you can make use of this
82
 
authentication feature by having per-device and per-service control over
83
 
which device is allowed to access which service.
84
 
</para>-->
85
 
</listitem>
86
 
 
87
 
<listitem>
88
 
<para>
89
 
It has the potential to make bluetooth services more reliable.
90
 
Each server is started for every new connection, so if a server
91
 
crashes, you can try again without having to restart it.
92
 
</para>
93
 
<para>
94
 
For a webserver it may be a bottleneck to be managed by inted, but in the case of Bluetooth, connection setup takes several seconds anyway and every action is usually user initiated, which makes using a metaserver uncritical.
95
 
</para>
96
 
</listitem>
97
 
 
98
 
<listitem>
99
 
<para>
100
 
Service registration with the SDP server is very simple. Please
101
 
see the <link linkend="developers.kbluetoothd">developer section</link>
102
 
for how kbluetoothd-managed application register with the SDP server.
103
 
</para>
104
 
</listitem>
105
 
 
106
 
<listitem>
107
 
<para>
108
 
Simple server programs - even scripts - can be used to implement a bluetooth server
109
 
without using Bluetooth-related functions at all. 
110
 
</para>
111
 
</listitem>
112
 
</itemizedlist>
113
 
<para>
114
 
You can enable/disable services used by kbluetoothd with it control center module
115
 
under the "Local services" tab. There you can also configure service specific options
116
 
by selecting a service and clicking on the "Configure..."-Button.
117
 
</para>
118
 
<para>
119
 
Under the "Confirmation" tab you can customize how kbluetoothd will react on
120
 
incoming connections. 
121
 
</para>
122
 
</sect3>
123
 
 
124
 
 
125
 
<sect3>
126
 
<title>The Device Discovery Service</title>
127
 
<para>
128
 
For many applications it is important to know, if a given device is currently in reach or not, or even be notified if a device comes in reach or leaves. Unlike USB, where the hotplug framework notifies you about new devices, there is no such service for bluetooth. </para>
129
 
 
130
 
<para>kbluetoothd fills this gap with the Device Discovery Service. It will periodically search for nearby devices and keep a list of those which are currently in reach. To access a dicovered device, right click the kbluetoothd tray icon and take a look at the "Open recent"-menu. This menu consists of one section for recently accessed services (like "obex ftp on MyPhone") and - if there actually are already discovered devices - a second section above with a list of devices. Clicking one of them will show the services of that device in konqueror.
131
 
</para>
132
 
<para>
133
 
In the control center module of kbluetoothd you can configure if and how often kbluetoothd searches for devices ("Periodially update neighbor list"). I recommend not to use intervals smaller than one minute here, otherwise other applications might have occacional problems searching for devices. That is because most devices don't expect other applications to use bluetooth at the same time. 
134
 
</para>
135
 
<para>
136
 
Many devices are <phrase>non-discoverable</phrase> by default for privacy/security reasons. In that case the device won't be detected when searching for devices. Instead, kbluetoothd has to try to access each of these devices individually. You can add a device to the list of non-discoverable devices by clicking on "Additional search options for non-discoverable devices". Please note that either you have to set your device to be discoverable temporarly or you have to know its hardware address to be able to add it to the list.
137
 
</para>
138
 
<para>
139
 
This will prevent other programs from searching for devices or even setting up a connection to another device for about 30 seconds <emphasis>per device</emphasis> if the device in not reachable currently. Therefore you should use rather long interval here. 10 minutes seems to be a reasonable value. Just try yourself and find out how small the interval can be until it start bothering you.
140
 
</para>
141
 
 
142
 
<para>
143
 
Having just a list of currently reachable devices isn't that useful. Instead you can use the device discovery service to execute <phrase>Discovery Jobs</phrase> when a device comes in reach or disappears. These discovery jobs are simple scripts. You can easily write your own script - see the developer section about <link linkend="developers.kbluetoothd.discovery">discovery scripts</link>. But kbluetoothd already comes with some scripts, including:
144
 
</para>
145
 
 
146
 
<variablelist>
147
 
<varlistentry>
148
 
<term>Discovery protocol</term>
149
 
<listitem><para>This script will create a html page with some technical information for every device when it is discovered for the first time. You can use this script if you are curious to see who else is using bluetooth near your. Having this script activated all the time doesn't hurt much, since it will only try to access the device when it is disocvered for the first time or after you deleted the corresponding html page.
150
 
</para></listitem>
151
 
</varlistentry>
152
 
 
153
 
<varlistentry>
154
 
<term>Kopete_AutoAway</term>
155
 
<listitem><para>This will set the availability status of kopete depending on if you (together with your phone) are in reach or not.
156
 
</para></listitem>
157
 
</varlistentry>
158
 
 
159
 
<varlistentry>
160
 
<term>Photo_Copy</term>
161
 
<listitem><para>This script will check a folder on your phone via kio_obex for new files and copy them over to a local directory. It also renames them with the date of the file as the file name. I wrote this script for my Nokia 6230. If you want to use it for your own phone, you will most likely have to change the script in many places.
162
 
</para></listitem>
163
 
</varlistentry>
164
 
 
165
 
<varlistentry>
166
 
<term>Screensaver</term>
167
 
<listitem><para>Starts or kills the screensaver/screen locker every time one of the monitored devices come in reach or disappear.
168
 
</para></listitem>
169
 
</varlistentry>
170
 
</variablelist>
171
 
 
172
 
<para>Most scripts must be configured first to work correctly. Clicking "configure" will usually just pop up kedit with the settings part of the script. Also be aware that <emphasis>you may have to limit the devices reported to each job</emphasis>, if you don't want the script to be executed when someone else passes by with a Bluetooth phone turned on.
173
 
</para>
174
 
 
175
 
</sect3>
176
 
 
177
 
<sect3>
178
 
<title>The "most recently used services" list</title>
179
 
<para>
180
 
You can quickly access services you've used before by finding
181
 
them in the "Recently used"-submenu of kbluetoothd's tray icon.
182
 
If you already sent some files to you mobile with the name "My phone" via
183
 
kbtobexclient, then you will find a menu entry with the name
184
 
"Obex push client - My phone", which will start kbtobexclient and
185
 
immediately connect to your phone without a time consuming inquiry
186
 
process.
187
 
</para>
188
 
<para>
189
 
Please note that kbluetoothd shows all recently used services, no
190
 
matter if the respective device is currently in range or not.
191
 
</para>
192
 
<para>
193
 
This feature must be supported by the respective application.
194
 
</para>
195
 
</sect3>
196
 
 
197
 
<sect3>
198
 
<title>Connection monitor</title>
199
 
<para>You can see if there is currently a bluetooth connection by
200
 
looking at the tray icon of kbluetoothd. It will bling if a 
201
 
connection is being established and turn blue once the connection
202
 
is set up.
203
 
</para>
204
 
<para>
205
 
You can get more information about the current connection by right-clicking
206
 
on the tray icon and selecting "Connection details...".
207
 
</para>
208
 
<para>
209
 
What kbluetoothd displays here are ACL-links, not Rfcomm-connection. 
210
 
If you are connected to a single device with several programs (handsfree 
211
 
and bemused for instance), this will still be displayed as one connection,
212
 
since there can only be one ACL link to a single device at a given time.
213
 
</para>
214
 
</sect3>
215
 
</sect2>
216
 
 
217
 
<sect2 id="components.kbluetoothd.configuration">
218
 
<title>Configuring kbluetoothd</title>
219
 
<para>
220
 
Usually, kbluetoothd and the servers managed by it should work out
221
 
of the box. But there are still some options you can change.
222
 
To configure kbluetoothd, you can either use the KDE control center
223
 
and go to <guimenuitem>Internet &amp; Network -> Bluetooth services</guimenuitem>,
224
 
or right-click the kbluetoothd tray icon and select 
225
 
<guimenuitem>Configuration -> Services...</guimenuitem>
226
 
</para>
227
 
 
228
 
<sect3 id="components.kbluetoothd.confirmation">
229
 
<title>Confirmation of incoming connections</title>
230
 
<para>
231
 
In this tab you can change the confirmation settings for incoming connections.
232
 
By default, kbluetoothd will pop up a confirmation dialog before
233
 
the actual server program (like the OBEX Push Server) is started.
234
 
Here you can disable this confirmation dialog for some devices/services
235
 
or tell kbluetoothd to silently reject incoming connections.
236
 
</para>
237
 
<para>
238
 
New device entries will be added when you select the "Always accept"-checkbox
239
 
of a confirmation popup.
240
 
</para>
241
 
</sect3>
242
 
 
243
 
<sect3 id="components.kbluetoothd.serviceconfig">
244
 
<title>Local Services</title>
245
 
<para>
246
 
In this tab you can enable or disable single Bluetooth services
247
 
which are managed by kbluetoothd. Some services also provide some
248
 
configuration options, like the bemused server for instance.
249
 
In that case, the <guibutton>Configure...</guibutton> will be enabled
250
 
when you select the respective service.
251
 
</para>
252
 
<para>
253
 
Since kbluetoothd automatically assigns rfcomm channels to the services,
254
 
the channel used for one service might change when you are using other 
255
 
bluetooth servers. If you need to know, which channel was assigned to 
256
 
some service, this dialog will tell you.
257
 
</para>
258
 
</sect3>
259
 
 
260
 
</sect2>
261
 
 
262
 
</sect1>
263