OSDN Git Service

shared/gatt-client: Fix the "Find Information req" error
[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 Low Energy
65 ==========
66
67 - Connection modes. Adapter interface needs to be changed to manage
68   connection modes and adapter type. See Volume 3, Part C, section 9.3.
69   1. Mode management: Peripheral / Central
70
71   Priority: Medium
72   Complexity: C2
73
74 - Advertising data. The D-Bus interface needs to be updated to enable setting
75   scan response data, and to read the advertising and scan response data which
76   has been broadcast from other LE devices.
77
78   Priority: Medium
79   Complexity: C2
80
81 - Static random address setup and storage. Once this address is written
82   in a given remote, the address can not be changed anymore.
83
84   Priority: Low
85   Complexity: C1
86
87 - Device Name Characteristic is a GAP characteristic for Low Energy. This
88   characteristic shall be integrated/used in the discovery procedure. The
89   idea is to report the value of this characteristic using DeviceFound signals.
90   Discussion with the community is needed before to start this task. Other GAP
91   characteristics for LE needs to follow a similar approach. It is not clear
92   if all GAP characteristics can be exposed using properties instead of a primary
93   service characteristics.
94   See Volume 3, Part C, section 12.1 for more information.
95
96   Priority: Low
97   Complexity: C2
98
99 ATT/GATT (new shared stack)
100 ===========================
101
102 - Add complete GATT test coverage in unit/test-gatt following the GATT test
103   spec. This could use shared/gatt-client and shared/gatt-server at the same
104   time to test both against eachother. We should definitely have tests for
105   gatt-server and gatt-client simultaneously on one side of the connection.
106
107   Priority: High
108   Complexity: C4
109
110 - Write an example using client D-Bus API using C.
111
112   Priority: High
113   Complexity: C2
114
115 - Write an example using client D-Bus API using python.
116
117   Priority: High
118   Complexity: C2
119
120 - Define packed structs for ATT protocol PDUs in shared/att-types to improve
121   readability. We should probably do this once there are extensive unit tests
122   for gatt-client/gatt-server so that we don't accidentally break working code.
123
124   Priority: Medium
125   Complexity: C2
126
127 - Use struct iovec to pass around byte buffers that will be sent over the wire,
128   instead of passing uint8_t and size_t parameters everywhere.
129
130   Priority: Medium
131   Complexity: C1
132
133 - Persist client attribute cache across reboots.
134
135   Priority: Medium
136   Complexity: C4
137
138 - Move all daemon plugins and profiles that are GATT based to use
139   shared/gatt-client instead of attrib/*. This is a complicated task that
140   potentially needs a new plugin/profile probing interface and a lot of
141   rewriting that can cause regressions in existing functionality.
142
143   Priority: Medium
144   Complexity: C4
145
146 - Introduce a way for shared/gatt-server to check security permissions on the
147   current connection through bt_att.
148
149   Priority: Medium
150   Complexity: C2
151
152 - Implement other low-priority ATT protocol operations for shared/gatt-server:
153
154       Read Multiple Request
155
156   Priority: Low
157   Complexity: C1
158
159 - Implement the server portion of doc/gatt-api.txt using shared/gatt-server once
160   it exists.
161
162   Priority: Medium
163   Complexity: C4
164
165 - Send out indications from the "Service Changed" characteristic upon
166   reconnection if a bonded device is not connected when the local database is
167   modified.
168
169   Priority: High
170   Complexity: C2
171
172 - Unify the GATT server and client D-Bus implementations into a single module.
173   While these don't share a lot of code, keeping them all in src/gatt-dbus seems
174   to make more sense from an organizational perspective.
175
176   Priority: Low
177   Complexity: C1
178
179 - Isolate all GATT code inside the daemon into its own module and perform
180   interaction with other modules (e.g. src/device.c) via callbacks. This
181   includes client/server management, tracking incoming/outgoing connections for
182   ATT, and callbacks to perform profile probing.
183
184   Priority: Low
185   Complexity: C4
186
187 - Support included services in the GATT D-Bus client API.
188
189   Priority: Medium
190   Complexity: C1
191
192 - The recently added support for ATT signed writes requires the following kernel
193   modules to be enabled:
194
195      CONFIG_CRYPTO_USER_API
196      CONFIG_CRYPTO_USER_API_HASH
197      CONFIG_CRYPTO_USER_API_SKCIPHER
198
199   Currently, if these are not enabled, bt_att_new silently returns NULL. We
200   should handle this more gracefully by not supporting signed writes if we can't
201   initialize bt_crypto while succeeding bt_att initialization regardless.
202
203   This behavior should be documented in the README.
204
205   Priority: High
206   Complexity: C1
207
208
209 ATT/GATT (old/outdated)
210 =======================
211
212 - At the moment authentication and authorization is not supported at the
213   same time, read/write requirements in the attribute server needs to
214   be extended. According to Bluetooth Specification a server shall check
215   authentication and authorization requirements before any other check is
216   performed.
217
218   Priority: Medium
219   Complexity: C1
220
221 - Implement ATT PDU validation. Malformed PDUs can cause division by zero
222   when decoding PDUs. A proper error PDU should be returned for this case.
223   See decoding function in att.c file.
224
225   Priority: Medium
226   Complexity: C1
227
228 - Refactor read_by_group() and read_by_type() in src/attrib-server.c
229   (they've grown simply too big). First step could be to move out the
230   long for-loops to new functions called e.g. get_groups() and get_types().
231
232   Priority: Low
233   Complexity: C1
234
235 - Agent for characteristics: Agent interface should be extended to support
236   authorization per characteristic if the remote is not in the trusted list.
237
238   Priority: Low
239   Complexity: C1
240
241 - gatttool should have the ability to wait for req responses before
242   quitting (some servers require a small sleep even with cmd's). Maybe a
243   --delay-exit or --timeout command line switch.
244
245   Priority: Low
246   Complexity: C1
247
248 - Client needs to export a property in the Device Characteristic hierarchy
249   to manage characteristic value changes reports in the remote device.
250   Currently, Client Characteristic Configuration attribute is not exposed
251   as an object. The user needs to use gatttool to change the value of the
252   this attribute to receive notification/indications. Export this attribute
253   as a property is a proposal that needs further discussion.
254
255   Priority: Low
256   Complexity: C1
257
258 - Attribute server should process queued GATT/ATT commands if the
259   client disconnects. The client can simply send a command and quit,
260   without wait for a response(ex: Write Command). For this scenario
261   that the client disconnects the link quickly the queued received
262   command is ignored.
263
264   Priority: Low
265   Complecity: C1
266
267 - Implement Server characteristic Configuration support in the attribute
268   server to manage characteristic value broadcasting. There is a single
269   instance of the Server Characteristic Configuration for all clients.
270   See Volume 3, Part G, section 3.3.3.4 for more information.
271
272   Priority: Low
273   Complexity: C1
274
275 - Long write is not implemented. Attribute server, client and command line
276   tool shall be changed to support this feature.
277
278   Priority: Low
279   Complexity: C2
280
281 Management Interface
282 ====================