Commit Graph

19002 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
1dd3ac5875 android/avrcp-lib: Fix avrcp_get_player_attribute_text
This fixes avrcp_get_player_attribute_text generating incorrect PDUs.
2014-05-05 15:40:30 +03:00
Luiz Augusto von Dentz
0276e3a164 android/avrcp-lib: Fix parsing of SetPlayerApplicationSettingValue
SetPlayerApplicationSettingValue do not return any parameter in case of
success.
2014-05-05 13:30:58 +03:00
Andrzej Kaczmarek
934d4fb99d hog: Remove redundant struct
Since complete descriptor discovery is now performed inside gatt code,
there's no need to store end handle for characteristics and thus we can
remove disc_desc_cb_data.
2014-05-05 10:49:52 +03:00
Andrzej Kaczmarek
9b9771ce8f gatt: Remove gatt_discover_char_desc
This function is no longer used since all code is changed to use
gatt_discover_desc instead.
2014-05-05 10:49:51 +03:00
Andrzej Kaczmarek
2d593eda55 android/gatt: Discover descriptors using gatt_discover_desc 2014-05-05 10:49:49 +03:00
Andrzej Kaczmarek
b85ba0b438 thermometer: Discover descriptors using gatt_discover_desc 2014-05-05 10:49:47 +03:00
Andrzej Kaczmarek
d83acdf45f cyclingspeed: Discover CCC using gatt_discover_desc 2014-05-05 10:49:41 +03:00
Andrzej Kaczmarek
87d9617b06 heartrate: Discover CCC using gatt_discover_desc 2014-05-05 10:49:24 +03:00
Andrzej Kaczmarek
7e38e7dc94 scan: Discover CCC using gatt_discover_desc 2014-05-05 10:49:17 +03:00
Andrzej Kaczmarek
5b1d5ae2b6 hog: Discover descriptors using gatt_discover_desc 2014-05-05 10:49:10 +03:00
Andrzej Kaczmarek
3d71c376f5 gas: Discover CCC using gatt_discover_desc 2014-05-05 10:49:03 +03:00
Andrzej Kaczmarek
a2d69036e7 attrib: Discover descriptors using gatt_discover_desc 2014-05-05 10:48:55 +03:00
Andrzej Kaczmarek
93229d36d1 attrib: Add simpler call for descriptors discovery
This patch adds gatt_discover_desc() function which performs descriptor
discovery in a manner similar to gatt_discover_char(), i.e. it does
complete discovery procedure and returns list of descriptors found when
finished. For 16-bit UUIDs in addition to string UUID, short UUID is
provided.

It's also possible to specify single descriptor UUID to look for and
discovery procedure is interrupted as soon as UUID is found. This way
no more than one descriptor is returned which is useful when searching
for common descriptors like CCC.
2014-05-05 10:47:16 +03:00
Lukasz Rymanowski
8cb3d744ea android/gatt: Add support for send indication
With this patch Android app can send indication to remote device
2014-04-30 17:30:02 +02:00
Lukasz Rymanowski
bbd1e432b9 android/gatt: Add support for GATT server send response 2014-04-30 17:30:02 +02:00
Lukasz Rymanowski
7c6628e6f2 android/hal-gatt-api: Fix IPC definition for send response 2014-04-30 17:30:02 +02:00
Lukasz Rymanowski
7f58cd9889 android/gatt: Add read_cb for GATT Server
This patch attach read callback to descriptors and characteristics
registered by Android app.
2014-04-30 17:30:02 +02:00
Lukasz Rymanowski
e41bc9b24b android/gatt: Add write_cb to GATT server
Write callback is now attached to characteristics and descriptors
registered by Android app.

Transaction id is generated and stored in gatt_app together with
att_opcode
2014-04-30 17:30:02 +02:00
Lukasz Rymanowski
2a535129fd android/gatt: Add support for write requests
This patch add support for write request, command, prepare write and
execute write.
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
6a5ed944c2 shared/gatt: Add support for write request 2014-04-30 17:30:01 +02:00
Grzegorz Kolodziejczyk
2953164e8e android/gatt: Add Find info gatt server cmd handling
The Find Information Request is used to obtain the mapping of
attribute handles with their associated types. This allows a
client to discover the list of attributes and their types on
a server.
2014-04-30 17:30:01 +02:00
Grzegorz Kolodziejczyk
7b8b0b2121 android/gatt: Add MTU request cmd handling
The Exchange MTU Request is used by the client to inform the server of
client's maximum receive MTU size and request the server to respond with
its maximum receive MTU size.
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
d8796394e1 android/gatt: Add support to read request
Added support for read and read blob
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
c9ca738c02 shared/gatt: Add support to read from database 2014-04-30 17:30:01 +02:00
Grzegorz Kolodziejczyk
edfa54fd0b android/gatt: Add support for ATT read by type 2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
08c3a7ad8b android/gatt: Add support for ATT read by group type 2014-04-30 17:30:01 +02:00
Marcin Kraglak
b7332e5757 shared/gatt: Add function to find information
It will return list of handle and uuid
2014-04-30 17:30:01 +02:00
Marcin Kraglak
9caba1215e shared/gatt: Add function to read by type
It will return list of attributes with given type.
2014-04-30 17:30:01 +02:00
Marcin Kraglak
0d96babc47 shared/gatt: Add function to find by type
It will look for attributes with given uuid and value.
2014-04-30 17:30:01 +02:00
Marcin Kraglak
e86925e621 shared/gatt: Add function to read by group type
It will return list of group values, start handle, end handle and
service attribute value.
2014-04-30 17:30:01 +02:00
Jakub Tyszkowski
501fa6124a android/gatt: Register GATT service
This adds database record about gatt's 'services changed'
characteristic. Proper flag in device is being set to mark it for
notification if gatt services are changed.
2014-04-30 17:30:01 +02:00
Jakub Tyszkowski
279be570ed android/gatt: Register device information service
This adds placeholder data to device information service. To get
real data we should figure out the best way to get Android's system
properties and expose them to profiles for reading.
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
d499eb81ed lib: Add more GATT characteristics UUIDs
These characteristics UUIDs will be used in following patch.
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
9dddc36f55 android/gatt: Add register GAP Service
Register GAP service with device name characteristic,
appearance and peripheral privacy flag
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
705762aee4 android/bluetooth: Add function for getting device Android name
This will be used by GATT HAL
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
9d65e8f98e shared/gatt: Add att_opcode to read/write callback
This is because there is many types of read/write requests and user
needs to know if and what response send back.
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
f1e23432c6 shared/gatt: Extend read/write callback with offset
Offset is needed for read blob and prep write
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
eaf2ad1709 shared/gatt: Use bdaddr instead of request_id
As it turns out we do not need request_id but bdaddr. It is because
response to remote device will be sent from read/write callback.
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
78929de856 android/gatt: Add ATT msg handler
This patch adds skeleton for ATT msg handler and also attach it to the
attrib on connect_cb and connect_event
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
89dab07b09 android/gatt: Assume that each server wants to wait for connection
Make sure that application gets all server related callbacks from
incoming connection we need to keep it on listen_app list.
2014-04-30 17:30:01 +02:00
Lukasz Rymanowski
b8c6e30f5c android/gatt: Add listening socket for GATT
For now we do listen on BLE transport only.
2014-04-30 17:30:01 +02:00
Andrzej Kaczmarek
25656fa3c8 hog: Improve report map debugging
Now that we can split report map into items it's convenient to have it
printed with items structure preserved which makes it more useful for
debugging.

Up to 5 bytes are printed for each item which is enough for short items
and for long items continuation mark ('...') is printed if necessary.
This is because as for now there are no long item tags defined except
for some vendor defined thus we can safely "ignore" them and avoid
overly complicated code.
2014-04-30 15:51:04 +03:00
Andrzej Kaczmarek
06a71a5cfd hog: Fix checking for Report ID item presence
Report ID item in Report Descriptor is now detected by simply looking
for applicable item prefixes anywhere in data and does not take items
structure into consideration. This could lead to false-positive
detections in case value we look for is just part of item data, not an
actual item prefix.

As defined in Device Class Definition for HID (6.2.2.7), Report ID is
a short item with prefix 100001nn (binary) thus we do not need to do
complete parsing of Report Descriptor but only need to check items
prefixes in order to find Report ID items reliably.

This patch checks Report Descriptor item by item looking for item
prefix which matches Report ID, as defined in spec above.
2014-04-30 15:51:04 +03:00
Luiz Augusto von Dentz
13eee21e64 android/avrcp-lib: Fix avrcp_get_capabilities_rsp
The PDU that avrcp_get_capabilities_rsp generates are incorrect since it
does not includes the capability.
2014-04-30 15:45:14 +03:00
Luiz Augusto von Dentz
db89f55e01 android/avrcp: Add avrcp_set_player_value_rsp function
This function can be used to generate SetPlayerValue responses.
2014-04-30 15:45:13 +03:00
Marcin Kraglak
d5ba226fd9 android/gatt: Add descriptor implementation
It will add characteristic descriptor attribute to local database.
2014-04-30 13:01:54 +02:00
Marcin Kraglak
15e65b8684 android/gatt: Add stop service command handling
It will stop service in local database.
2014-04-30 13:01:54 +02:00
Marcin Kraglak
6da0129f65 android/gatt: Add handling of start service command
It will start service added to local database.
2014-04-30 13:01:54 +02:00
Marcin Kraglak
f80ec26206 android/gatt: Add characteristic implementation
It will add characteristic declaration and value attributes to
local database.
2014-04-30 13:01:54 +02:00
Marcin Kraglak
79ed8c8d3b android/gatt: Add included service implementation
It will add included service attribute to database.
2014-04-30 13:01:54 +02:00