OSDN Git Service

dis: Move code from android to profiles
[android-x86/external-bluetooth-bluez.git] / TODO
1 Background
2 ==========
3
4 - Priority scale: High, Medium and Low
5
6 - Complexity scale: C1, C2, C4 and C8.  The complexity scale is exponential,
7   with complexity 1 being the lowest complexity.  Complexity is a function
8   of both task 'complexity' and task 'scope'.
9
10   The general rule of thumb is that a complexity 1 task should take 1-2 weeks
11   for a person very familiar with BlueZ codebase.  Higher complexity tasks
12   require more time and have higher uncertainty.
13
14   Higher complexity tasks should be refined into several lower complexity tasks
15   once the task is better understood.
16
17 General
18 =======
19
20 - UUID handling: Use the new functions created for UUID handling in all parts
21   of BlueZ code.  Currently, the new bt_uuid_* functions are being used by
22   GATT-related code only.
23
24   Priority: high
25   Complexity: C4
26
27 - Update PBAP client/server implementation to 1.2 and create necessary APIs for
28   new features it introduces.
29
30   Priority: Medium
31   Complexity: C4
32
33 - Create GOEP unit tests based on its test specification:
34
35   https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=230559
36
37   Priority: Medium
38   Complexity: C2
39
40 - Function in src/adapter.c to convert old storage files to new ini-file format
41   should be removed 6-8 months after first BlueZ 5 release.
42
43   Priority: Low
44   Complexity: C1
45
46 - Remove usage of symlinks for drivers, such as profiles/input/suspend.c and
47   profiles/sap/sap.c. Instead, select drivers at runtime by using config
48   options or probing for running D-Bus services (using e.g.
49   g_dbus_add_service_watch()). Idea first mentioned on
50   http://thread.gmane.org/gmane.linux.bluez.kernel/30175/focus=30190.
51
52 - Reuse connection handling code of src/profile.c also for built-in profiles
53   so plugins would only need to register their btd_profile and the core takes
54   care of the rest including listen to the right channel and manages the sdp
55   record. Once btd_profile manages the connection it can also notify about
56   their state, this probably remove the need of having callbacks to
57   .connect/.disconnect since their state can be tracked, it also enables any
58   plugin to track any profile state change which can be useful for e.g.
59   a connection policy plugin in case one is needed.
60
61   Priority: Low
62   Complexity: C2
63
64 - Add queueing support for src/agent.c, currently if there is any request
65   pending the code fail with error EBUSY which is very inconvenient.
66
67   Priority: Low
68   Complexity: C2
69
70 Low Energy
71 ==========
72
73 - Connection modes. Adapter interface needs to be changed to manage
74   connection modes and adapter type. See Volume 3, Part C, section 9.3.
75   1. Mode management: Peripheral / Central
76
77   Priority: Medium
78   Complexity: C2
79
80 - Advertising data. The D-Bus interface needs to be updated to enable setting
81   scan response data, and to read the advertising and scan response data which
82   has been broadcast from other LE devices.
83
84   Priority: Medium
85   Complexity: C2
86
87 - Static random address setup and storage. Once this address is written
88   in a given remote, the address can not be changed anymore.
89
90   Priority: Low
91   Complexity: C1
92
93 - Device Name Characteristic is a GAP characteristic for Low Energy. This
94   characteristic shall be integrated/used in the discovery procedure. The
95   idea is to report the value of this characteristic using DeviceFound signals.
96   Discussion with the community is needed before to start this task. Other GAP
97   characteristics for LE needs to follow a similar approach. It is not clear
98   if all GAP characteristics can be exposed using properties instead of a primary
99   service characteristics.
100   See Volume 3, Part C, section 12.1 for more information.
101
102   Priority: Low
103   Complexity: C2
104
105 ATT/GATT (new shared stack)
106 ===========================
107
108 - Add complete GATT test coverage in unit/test-gatt following the GATT test
109   spec. This could use shared/gatt-client and shared/gatt-server at the same
110   time to test both against eachother. We should definitely have tests for
111   gatt-server and gatt-client simultaneously on one side of the connection.
112
113   Priority: High
114   Complexity: C4
115
116 - Write an example using client D-Bus API using C.
117
118   Priority: High
119   Complexity: C2
120
121 - Write an example using client D-Bus API using python.
122
123   Priority: High
124   Complexity: C2
125
126 - Define packed structs for ATT protocol PDUs in shared/att-types to improve
127   readability. We should probably do this once there are extensive unit tests
128   for gatt-client/gatt-server so that we don't accidentally break working code.
129
130   Priority: Medium
131   Complexity: C2
132
133 - Use struct iovec to pass around byte buffers that will be sent over the wire,
134   instead of passing uint8_t and size_t parameters everywhere.
135
136   Priority: Medium
137   Complexity: C1
138
139 - Persist client attribute cache across reboots.
140
141   Priority: Medium
142   Complexity: C4
143
144 - Move all daemon plugins and profiles that are GATT based to use
145   shared/gatt-client instead of attrib/*. This is a complicated task that
146   potentially needs a new plugin/profile probing interface and a lot of
147   rewriting that can cause regressions in existing functionality.
148
149   Priority: Medium
150   Complexity: C4
151
152 - Introduce a way for shared/gatt-server to check security permissions on the
153   current connection through bt_att.
154
155   Priority: Medium
156   Complexity: C2
157
158 - Implement other low-priority ATT protocol operations for shared/gatt-server:
159
160       Read Multiple Request
161
162   Priority: Low
163   Complexity: C1
164
165 - Implement the server portion of doc/gatt-api.txt using shared/gatt-server once
166   it exists.
167
168   Priority: Medium
169   Complexity: C4
170
171 - Send out indications from the "Service Changed" characteristic upon
172   reconnection if a bonded device is not connected when the local database is
173   modified.
174
175   Priority: High
176   Complexity: C2
177
178 - Unify the GATT server and client D-Bus implementations into a single module.
179   While these don't share a lot of code, keeping them all in src/gatt-dbus seems
180   to make more sense from an organizational perspective.
181
182   Priority: Low
183   Complexity: C1
184
185 - Isolate all GATT code inside the daemon into its own module and perform
186   interaction with other modules (e.g. src/device.c) via callbacks. This
187   includes client/server management, tracking incoming/outgoing connections for
188   ATT, and callbacks to perform profile probing.
189
190   Priority: Low
191   Complexity: C4
192
193 - Support included services in the GATT D-Bus client API.
194
195   Priority: Medium
196   Complexity: C1
197
198 - The recently added support for ATT signed writes requires the following kernel
199   modules to be enabled:
200
201      CONFIG_CRYPTO_USER_API
202      CONFIG_CRYPTO_USER_API_HASH
203      CONFIG_CRYPTO_USER_API_SKCIPHER
204
205   Currently, if these are not enabled, bt_att_new silently returns NULL. We
206   should handle this more gracefully by not supporting signed writes if we can't
207   initialize bt_crypto while succeeding bt_att initialization regardless.
208
209   This behavior should be documented in the README.
210
211   Priority: High
212   Complexity: C1
213
214
215 ATT/GATT (old/outdated)
216 =======================
217
218 - At the moment authentication and authorization is not supported at the
219   same time, read/write requirements in the attribute server needs to
220   be extended. According to Bluetooth Specification a server shall check
221   authentication and authorization requirements before any other check is
222   performed.
223
224   Priority: Medium
225   Complexity: C1
226
227 - Implement ATT PDU validation. Malformed PDUs can cause division by zero
228   when decoding PDUs. A proper error PDU should be returned for this case.
229   See decoding function in att.c file.
230
231   Priority: Medium
232   Complexity: C1
233
234 - Refactor read_by_group() and read_by_type() in src/attrib-server.c
235   (they've grown simply too big). First step could be to move out the
236   long for-loops to new functions called e.g. get_groups() and get_types().
237
238   Priority: Low
239   Complexity: C1
240
241 - Agent for characteristics: Agent interface should be extended to support
242   authorization per characteristic if the remote is not in the trusted list.
243
244   Priority: Low
245   Complexity: C1
246
247 - gatttool should have the ability to wait for req responses before
248   quitting (some servers require a small sleep even with cmd's). Maybe a
249   --delay-exit or --timeout command line switch.
250
251   Priority: Low
252   Complexity: C1
253
254 - Client needs to export a property in the Device Characteristic hierarchy
255   to manage characteristic value changes reports in the remote device.
256   Currently, Client Characteristic Configuration attribute is not exposed
257   as an object. The user needs to use gatttool to change the value of the
258   this attribute to receive notification/indications. Export this attribute
259   as a property is a proposal that needs further discussion.
260
261   Priority: Low
262   Complexity: C1
263
264 - Attribute server should process queued GATT/ATT commands if the
265   client disconnects. The client can simply send a command and quit,
266   without wait for a response(ex: Write Command). For this scenario
267   that the client disconnects the link quickly the queued received
268   command is ignored.
269
270   Priority: Low
271   Complecity: C1
272
273 - Implement Server characteristic Configuration support in the attribute
274   server to manage characteristic value broadcasting. There is a single
275   instance of the Server Characteristic Configuration for all clients.
276   See Volume 3, Part G, section 3.3.3.4 for more information.
277
278   Priority: Low
279   Complexity: C1
280
281 - Long write is not implemented. Attribute server, client and command line
282   tool shall be changed to support this feature.
283
284   Priority: Low
285   Complexity: C2
286
287 Management Interface
288 ====================