Commit Graph

15 Commits

Author SHA1 Message Date
Grzegorz Kolodziejczyk
557760601a android/gatt: Handle get characteristic client command
This adds get characteristic client command handling. If characteristic
id is given, then next characteristic after given is returned. In case of
no initial characteristic, first characteristic in given service is
returned. Characteristics are cached on first get characteristic command
call for service.
2014-03-26 13:39:39 +01:00
Grzegorz Kolodziejczyk
350107b3c4 android/gatt: Keep client notify functions names consistent
We should use consistent names for client notify functions.
2014-03-25 11:34:25 +01:00
Lukasz Rymanowski
914c394e50 android/gatt: Restart scan after connection
With this patch we make sure that scan is restarted if it was holded for
connection purpose.
2014-03-24 14:03:57 +01:00
Lukasz Rymanowski
0a783f1163 android/gatt: Fix scan handling
Android has its own ScanQueue which is used for tracking scanning
clients which means we do not have to have this logic internally.

Android will call Scan Off only when his scanQueue is empty.
2014-03-24 14:03:57 +01:00
Szymon Janc
0416bd086b android/bluetooth: Constify bdaddr parameter in bt_le_device_found 2014-03-22 18:42:08 +01:00
Lukasz Rymanowski
0ae17af642 android/gatt: Find primary services
With this patch it is possible to search all primary services.
2014-03-17 11:45:09 +01:00
Lukasz Rymanowski
27f05c1c55 android/gatt: Add disconnect GATT device
Disconnect scenarios:

1. If there is more then one client for a given gatt_device then
client id is removed from dev->clients, success response is sent
together with success disconnect event.

2. If there is only one client for a given remote device then we
do what is decribed above plus clean of gattrib stuff

3. In case client_if or conn_id is incorrect, response failed is sent
2014-03-17 10:41:46 +01:00
Lukasz Rymanowski
0c62d593c4 android/gatt: Add GATT Connect
This patch introduce connect LE device functionality.

There is gatt_device representing remote le device. Each gatt device
has a list own list of clients as it is possible that more apps
would like to use same remote device.

Possible connect scenarios:

1.  There is no ACL connection to device:
Then new dev is put on conn_wait_queue and le scan is enabled.
Once device is found we do connect it.

Once device is connected then device is moved form conn_wait_queue to
conn_list and success event is sent to client(s) with conn_id

2. Device is already connected:
Then we update client list, reply with success and do send connect event.

3. For unregisterd clients or uknown conn_id, failed response is sent.
2014-03-17 10:41:46 +01:00
Jakub Tyszkowski
b0502eec1b android/gatt: Use Core profile for LE scan
This makes gatt capable of triggering LE scan using functionality
exposed by Core API. GATT registers its own callbacks for discovering
events.
2014-03-17 10:41:46 +01:00
Jakub Tyszkowski
a4b3e5f22a android/gatt: Change name of match functions 2014-03-14 00:09:44 +01:00
Grzegorz Kolodziejczyk
642c54d72f android/gatt: Use queue and stdlib instead of GLib where possible
This patch changes using GLib to queues and stdlib operators.
2014-03-14 00:08:29 +01:00
Grzegorz Kolodziejczyk
1701a37e52 android/gatt: Handle Unregister gatt client command
This adds unregister gatt client app command handling.
2014-03-12 14:01:41 +01:00
Grzegorz Kolodziejczyk
79a98874bc android/gatt: Handle Register gatt client command
This adds register gatt client app command handling.
2014-03-12 14:01:41 +01:00
Grzegorz Kolodziejczyk
1def0ca307 android/gatt: Add stubs for GATT commands handlers
Add empty handlers for GATT IPC commands.
2014-03-03 16:11:07 +01:00
Grzegorz Kolodziejczyk
319245da2b android/gatt: Add initial files
This adds initial daemon code for GATT profile.
2014-03-03 16:11:07 +01:00