Claudio Takahasi
379a8c7651
tools: Add Get/Set descriptor
...
This patch adds get and set callbacks to allow managing "Value" property
of the user defined descriptor related to IAS Alert Level.
2014-03-31 16:14:16 +03:00
Claudio Takahasi
062d5fc4c1
tools: Add testing descriptor for IAS Alert Level
...
This patch adds a testing purpose only characteristic descriptor to
allow reading and writing descriptor's "Value" property.
2014-03-31 16:14:16 +03:00
Jakub Tyszkowski
38eac490c3
android/gatt: Use proper GATT status
...
This patch introduces GATT_SUCCESS and GATT_FAILURE status codes
according to Android API. This patch also fixes event status codes.
2014-03-31 14:38:37 +02:00
Marcin Kraglak
c108888cc5
android/gatt: Simplify find_device helper
...
We don't need to use dev pointer in second search attempt.
2014-03-31 14:38:37 +02:00
Luiz Augusto von Dentz
8878bd46a1
android/avrcp-lib: Add support for parsing RegisterNotification response
2014-03-31 10:45:36 +03:00
Luiz Augusto von Dentz
72fda35f3f
android/avrcp-lib: Add support for parsing GetElementAttributes response
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
6451a036af
android/avrcp-lib: Add support for parsing GetPlayStatus response
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
4f45fa2bde
android/avrcp-lib: Add support for parsing SetPlayerValue response
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
78119f0faa
android/avrcp-lib: Add support for parsing GetCurrentPlayerValue response
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
d74ac785cb
android/avrcp-lib: Add support for parsing GetPlayerValueText response
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
2d4b61bb2b
android/avrcp-lib: Add avrcp_get_player_value_text
...
This function can be used to send GetPlayerValueText command PDUs.
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
f0456be23c
android/avrcp-lib: Add support for parsing ListPlayerValues response
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
5f370c08be
android/avrcp-lib: Add avrcp_list_player_values
...
This function can be used to send ListPlayerValues command PDUs.
2014-03-31 10:45:35 +03:00
Luiz Augusto von Dentz
93c753c0b1
android/avrcp-lib: Add support for parsing GetPlayerAttributeText response
2014-03-31 10:45:34 +03:00
Luiz Augusto von Dentz
6af4aef934
android/avrcp-lib: Add support for parsing ListPlayerAttributes response
2014-03-31 10:45:34 +03:00
Luiz Augusto von Dentz
545963a135
android/avrcp-lib: Add support for parsing GetCapabilities response
2014-03-31 10:45:34 +03:00
Marcel Holtmann
40d55fa51f
android: Include hcitool utility in debug builds
2014-03-30 16:37:08 -07:00
Marcel Holtmann
1e19efd1b9
tools: Remove device name cache feature from hcitool
2014-03-30 16:29:27 -07:00
Lukasz Rymanowski
74a6dc0087
android/gatt: Fix regression introduced by b278efa5
...
Seems that GattService onScanResult is only looking into remote uuids in
adverisement data. No device object is created in the Android framework,
Therefore we need to send regular device found for BLE devices as well.
Otherwise the Android GATT application will not be aware of remote device
properties like name etc.
2014-03-30 23:46:26 +02:00
Claudio Takahasi
7422613626
gatt: Add descriptor to the database
...
Initial support for GATT characteristic descriptors. This patch adds the
characteristic descriptor attribute to the GATT local database based
on the fetched GDBusProxy objects.
2014-03-28 19:32:44 +02:00
Andre Guedes
63e695bce0
gatt: Introduce helper for adding descriptors
...
This patch adds btd_gatt_add_char_desc() helper which adds a
characteristic descriptor to the local attribute database.
2014-03-28 19:32:15 +02:00
Marcin Kraglak
1a25673af3
android/gatt: Add deregister_for_notification implementation
...
This will unregister handlers for notification and indications
and remove notification_data from client's list.
2014-03-28 13:27:30 +01:00
Marcin Kraglak
51e719a124
android/gatt: Add handler for ATT_OP_HANDLE_NOTIFY and ATT_OP_HANDLE_IND
...
Invoke callback notify_cb with received data. We set flag is_notify
properly to inform Android what type of notification has been received.
2014-03-28 13:27:30 +01:00
Marcin Kraglak
4da74db8b0
android/gatt: Add send_register_for_notif_ev function
...
It will be called with register/deregister will be called.
It will send status, service id and characteristic id.
2014-03-28 13:27:30 +01:00
Marcin Kraglak
fa82af50bc
android/gatt: Add initial implementation of register_for_notification
...
It will register notification and indication handler for given parameters.
Proper callback should be send with status of registration.
2014-03-28 13:27:30 +01:00
Marcin Kraglak
407a646c0e
android/gatt: Add implementation of get_included_cb
...
It will pass found services to upper layer with notification.
Caching included services should be done later.
2014-03-28 13:27:30 +01:00
Marcin Kraglak
f11108d3a1
android/gatt: Add get_included_data struct and callback
...
Create user data passed to callback get_included_cb.
It will handle included services and pass it to notification.
2014-03-28 13:27:30 +01:00
Marcin Kraglak
c045be1014
android/gatt: Add initial implementation of get_included_service
...
It will look for included service in range passed in command.
It call gatt_find_included(), but without result callback now,
as it is initial version.
2014-03-28 13:27:30 +01:00
Claudio Takahasi
154aa9c0f2
gatt: Fix proxies list iteration
2014-03-28 14:25:52 +02:00
Jakub Tyszkowski
2620e5c7ab
attrib/gatttool: Use define for UUID format check
2014-03-28 14:24:37 +02:00
Jakub Tyszkowski
1e11df4348
attrib: Use const source data pointer for write
...
Source buffer for write operations should be immutable.
2014-03-28 14:24:22 +02:00
Johan Hedberg
763b079dd8
doc/gatt: Make allowed flags list more readable
2014-03-28 14:24:12 +02:00
Claudio Takahasi
5ff223e970
doc: Remove Core SPEC page number from gatt-api.txt
...
Remove Core SPEC page number from the API document to avoid wrong
page reference when the SPEC changes.
2014-03-28 14:22:02 +02:00
Alvaro Silva
12947cc943
test: Add permissions for Alert Level of gatt-service
...
This patch adds properties to Alert Level characteristic of the
Immediate Alert Service. IAS specification defines Write Without
Response as mandatory.
2014-03-28 14:22:00 +02:00
Claudio Takahasi
9215893477
gatt: Make Characteristic Flags optional
...
"Flags" is an optional property. Default value is allow read and
write procedures. If it is not informed the upper-layer should
manage security requirements returning errors using "-errno"
format in the operation result callback.
2014-03-28 14:20:24 +02:00
Claudio Takahasi
fa828db27d
gatt: Set read and write callbacks based on Flags
...
This patch checks the characteristic property bitmask before setting
read and write callbacks. This approach avoids additional GDBusProxy
calls and later verifications if the characteristic doesn't support
read or write procedures.
2014-03-28 14:20:10 +02:00
Claudio Takahasi
9c7a23cff0
gatt: Add parsing GattCharacteristic1 Flags
...
When fetching the external application characteristics, "Flags" field
representing the characteristic supported properties should be properly
translated to a bitmask value required to create the characteristic
declarations. Ref Core SPEC page 2183, Table 3.5: Characteristic
Properties bit field.
2014-03-28 14:19:51 +02:00
Marcin Kraglak
6466199dc3
android/gatt: Add helper for getting device by conn_id
...
It will look for cgatt_device by conn_id.
2014-03-28 11:27:40 +01:00
Marcin Kraglak
2edb4a4a5f
android/gatt: Add helper to get client by id
...
It will look for gatt_client by client_id.
2014-03-27 22:47:59 +01:00
Marcin Kraglak
8d2cc1ff3d
android/gatt: Fix possible NULL pointer defererence
...
If memory allocation failed, return error from handle_client_register.
2014-03-27 22:45:09 +01:00
Andrei Emeltchenko
1f949a0982
android/handsfree: Check service class is not zero
...
Fixes static analyzers NULL dereference warnings. The similar check is
done in src/device.c in line 2959.
2014-03-27 21:43:27 +01:00
Jakub Tyszkowski
fc329006a3
android/gatt: Remove redundant queue check
...
It is safe to just call queue_peak_head on empty queue. Now its also
safe to pass NULL to send_client_char_notify as status will be set
inside it.
2014-03-27 20:10:41 +01:00
Jakub Tyszkowski
a8cf659c53
android/gatt: Refactor characteristic notify function
...
This removes redundant status from function parameter list, as sent
status is different than success only when there is no characteristic.
2014-03-27 20:10:41 +01:00
Jakub Tyszkowski
f68c0cd9ca
android/gatt: Fix cached services having element_id uuid not set
...
This patch removes temporary uuid as we already have uuid in services
element_id, which now is properly filled.
2014-03-27 19:27:48 +01:00
Jakub Tyszkowski
685189f5cc
android/gatt: Fix sendig wrong byte ordered uuids
...
We were sending wrong byte ordered uuids since the last gatt library
changes. Two helpers were introduced for swapping uuids sent to, and
received from HAL.
2014-03-27 19:27:48 +01:00
Jakub Tyszkowski
0bbef65183
android/gatt: Reduce callback data struct scope
...
This saves us from redundant data (de)allocation if characteristics are
already cached.
2014-03-27 16:22:54 +01:00
Jakub Tyszkowski
322a1de42e
android/gatt: Add helper for service search
...
This kind of search will be performed in most of the functions
implementing gatt's HAL API.
2014-03-27 16:22:54 +01:00
Jakub Tyszkowski
25cafb36da
android/gatt: Use better name for function filling element_id
2014-03-27 16:22:54 +01:00
Jakub Tyszkowski
f9f0ab8b93
android/gatt: Use better name for matching function
...
As there is no static type check for matching functions, we should keep
their names more descriptive, like 'match_dev_by_conn_id' is.
2014-03-27 16:22:54 +01:00
Jakub Tyszkowski
9ff7b4f0cf
android/gatt: Unify destroy functions
...
This patch unifies destroy function names. We should also keep destroy
functions convention as it is in /src/shared/hci.c for example, and
check passed pointer before dereferencing it.
2014-03-27 16:22:53 +01:00