Commit Graph

19002 Commits

Author SHA1 Message Date
Marcin Kraglak
a73741c461 shared/gatt: Modify gatt_db_read_by_type to return handles only
For now read_by_type function will just return handles of found attributes.
2014-05-15 16:22:18 +02:00
Marcin Kraglak
f20cfda54c android/gatt: Refactor ATT read operations
This changes device info and gap services callbacks to use response queue.
It will allow them work with plain read and read by type as well.

This starts transition to single response data queue, which should be
filled by various read type functions and processed in one place. This
will unify the way that responses are send, regardless of data source
(value taken directly from database, returned by read callback or sent
from upper layers asynchronously).

We will also introduce 'getter' type functions, using handles to
retrieve data from database. This will make various read and find
operations return handles instead of their own custom structures,
different for every operation performed.
2014-05-15 16:22:16 +02:00
Marcin Kraglak
02c6fdc7d2 shared/gatt: Extend gatt_db_read function
If value exists in database, return pointer to it instead of returning
false. It is needed because some attributes don't have read_cb callback
and their value can be read directly from database.
2014-05-15 16:21:10 +02:00
Johan Hedberg
4d1d63777c core: Fix missing static declaration for main_conf 2014-05-15 17:02:10 +03:00
Johan Hedberg
da90eb1e81 core: Make use of device_set_[bearer]_support functions 2014-05-15 16:12:47 +03:00
Johan Hedberg
a74268601e core: Simplify device lookup logic in update_found_devices() 2014-05-15 16:12:47 +03:00
Johan Hedberg
033f0b92d3 core: Fix updating bearer support when looking up devices 2014-05-15 16:12:47 +03:00
Johan Hedberg
aa5223d662 core: Fix matching based on public address regardless of bearer 2014-05-15 16:12:47 +03:00
Johan Hedberg
1479dd29ac core: Add API to set LE support for a device 2014-05-15 16:12:46 +03:00
Johan Hedberg
625fe7d94c core: Fix device_set_bredr_support to update storage if necessary 2014-05-15 15:34:30 +03:00
Johan Hedberg
986c3d2b1a plugins/policy: Both !uuids and !uuids[0] mean an empty list 2014-05-15 11:46:00 +03:00
Johan Hedberg
de663bfc39 plugins/policy: Remove reconnect timer in reconnect_reset()
In the case that the remote starts connecting to us while we're waiting
for the timeout to discover we shouldn't just reset the basic time
keeping variables but also remove the timer.
2014-05-15 11:46:00 +03:00
Johan Hedberg
422015388d core: Add "Policy" to valid main.conf groups 2014-05-15 11:19:32 +03:00
Johan Hedberg
f8a0c50bc6 plugins/policy: Add support to retreive ReconnectUUIDs from main.conf 2014-05-15 11:19:32 +03:00
Johan Hedberg
86f4b55232 core: Add API to get access to main.conf 2014-05-15 11:16:34 +03:00
Johan Hedberg
40e77e7b71 plugins/policy: Rename UUIDs list variable to avoid name collisions 2014-05-15 11:16:34 +03:00
Johan Hedberg
42fd4ce72c plugins/policy: Add exponential backoff for reconnection attempts 2014-05-15 11:16:34 +03:00
Johan Hedberg
c3a21d3393 plugins/policy: Continue reconnections after connect attempt failure
This patch adds support for continuing reconnecting for several more
times (up to 3 minutes) even when a connection attempt fails.
2014-05-15 11:16:34 +03:00
Johan Hedberg
967a38d45a core: Export API for tracking connection failures
This will be used by the reconnection policy logic.
2014-05-15 11:16:33 +03:00
Johan Hedberg
e0929a6e88 plugins/policy: Add basic reconnection handling 2014-05-15 11:16:33 +03:00
Johan Hedberg
b98bb6c102 core: Export API to request services to be connected
This API reuses the existing serialized profile connection creation and
its primary user is the reconnection policy.
2014-05-15 11:16:33 +03:00
Johan Hedberg
396b3b62c9 core: Add API to monitor device disconnections
This patch adds an API to monitor devices disconnections, including the
reason for the disconnection. It paves the way to allow creating a
policy for reconnecting when disconnected.
2014-05-15 11:16:33 +03:00
Szymon Janc
5c0c4d1aeb tools: Fix hex2hcd compilation error
Fix following with GCC version 4.8.2 (Debian 4.8.2-21):

tools/hex2hcd.c: In function ‘main’:
tools/hex2hcd.c:118:19: error: comparison between signed and
  unsigned integer expressions [-Werror=sign-compare]
     for (i = 0; i < hex_to_int(rbuf + 1); i++) {
                   ^
cc1: all warnings being treated as errors
2014-05-14 23:14:42 +03:00
Szymon Janc
9dfcb9f7fc hog: Fix compilation error on 32 bit machine
Fix following with GCC version 4.8.2 (Debian 4.8.2-21):

  CC       profiles/input/bluetoothd-hog.o
profiles/input/hog.c: In function ‘report_value_cb’:
profiles/input/hog.c:149:8: error: format ‘%lu’ expects argument of
   type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
    [-Werror=format=]
        status, sizeof(ev));
        ^
2014-05-14 23:14:34 +03:00
Szymon Janc
18a7a7ecb5 input: Fix compilation errors on 32 bit machine
Fix following with GCC version 4.8.2 (Debian 4.8.2-21):

  CC       profiles/input/bluetoothd-device.o
profiles/input/device.c: In function ‘uhid_send_feature_answer’:
profiles/input/device.c:232:8: error: format ‘%lu’ expects argument
  of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
   [-Werror=format=]
        len, sizeof(ev));
        ^
profiles/input/device.c: In function ‘uhid_send_input_report’:
profiles/input/device.c:274:8: error: format ‘%lu’ expects argument of
   type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
   [-Werror=format=]
        len, sizeof(ev));
        ^
2014-05-14 23:14:30 +03:00
Sebastian Chlad
81c45d5f75 android/pts: Run PTS tests for SM 2014-05-14 20:53:45 +02:00
Sebastian Chlad
ae21b85c19 android/pts: Correct file's header 2014-05-14 20:53:45 +02:00
Szymon Janc
37831ea513 android/pan: Print error if failed to create bridge 2014-05-14 16:30:48 +02:00
Grzegorz Kolodziejczyk
a5703d66d9 android/gatt: Refresh device cache on disconnect if not bonded
This adds refreshing of device cache in case if device is not bonded.

It affects on TC_GAD_CL_BV_01_C, TC_GAD_CL_BV_02_C and search services
PTS test cases. With this patch those PTS tests cases pass.
2014-05-14 15:24:16 +02:00
Grzegorz Kolodziejczyk
c12323a594 android/bluetooth: Add function for checking device bond state
This will be used by GATT HAL.
2014-05-14 15:24:00 +02:00
Lukasz Rymanowski
533301a631 android/gatt: Fix handling advertising state
This patch fixes enabling advertising.
It was not possible to enable it if we had server registered
which is on listen_apps list but does not trigger advertising.

This patch introduces static counter to track number of clients
requested advertising.
2014-05-14 15:18:05 +02:00
Johan Hedberg
68c6c26512 TODO: ATT/LE parsing is already done 2014-05-14 13:03:01 +03:00
Johan Hedberg
2d0a4eddfa TODO: The legacy gatt.c is not being actively worked on anymore 2014-05-14 13:03:01 +03:00
Johan Hedberg
ccda938ce2 TODO: ATT server API has already been defined 2014-05-14 13:03:01 +03:00
Johan Hedberg
595e4bd338 TODO: Remove DeviceFound item (there is no such signal anymore) 2014-05-14 13:03:01 +03:00
Luiz Augusto von Dentz
ab63fc7add android/handsfree: Fix Connect SCO command
This command should not trigger SCO connection since there is already a
command Connect Audio dedicated to do that.
2014-05-14 12:51:02 +03:00
Johan Hedberg
a3d40ccac5 TODO: Remove pointless dynamic ATT PSM tasks 2014-05-14 10:55:45 +03:00
Johan Hedberg
e8a9bf96ad TODO: Remove glib-helper item as the file doesn't exist anymore 2014-05-14 10:55:45 +03:00
Marcel Holtmann
53a4f2a82a tools: Print codec name for MPEG24 capability type 2014-05-13 22:08:29 -07:00
Marcel Holtmann
8b1b5b1b3f android: Make PTS version information machine readable 2014-05-13 09:24:18 -07:00
Szymon Janc
905d6e8935 android/bluetooth: Make sure proper controller mode is set on start
BR/EDR and LE features can be toggled before daemon is started and
we should not assume their state.
2014-05-13 18:20:09 +02:00
Sebastian Chlad
9ae1bc2e15 android/pts: Add PTS testing files for MPS
Adding all required files for MPS: PICS, PIXIT as well as pts
tests listing.
2014-05-13 18:11:20 +02:00
Andrei Emeltchenko
08da5dfd4d android/hal-sco: Add write support
For synchronization interleave read and write.
2014-05-13 14:17:18 +03:00
Andrei Emeltchenko
cb5460ab29 android/hal-sco: Use resampler interface to resample
Resample Android audio from 44100 to 8000.
2014-05-13 14:17:18 +03:00
Andrei Emeltchenko
397f4ba12f android/hal-sco: Add downmix support to SCO HAL 2014-05-13 14:17:18 +03:00
Andrei Emeltchenko
effd53a0ff audio/haltest: Make audio_stream static 2014-05-13 14:17:18 +03:00
Andrei Emeltchenko
f5ae98bd94 android: Add resampler support
The patch adds support for resampling audio in host and Android. There
are Android wrappers for SPEEXDSP library added to host.
2014-05-13 14:17:18 +03:00
Andrei Emeltchenko
bda174dd1c android/haltest: Add testing for SCO HAL
Adds testing support for SCO HAL.
2014-05-13 14:16:52 +03:00
Andrei Emeltchenko
cdfa78049e android/hal-sco: Implement IPC on SCO HAL 2014-05-13 14:16:52 +03:00
Andrei Emeltchenko
25cc813c72 android/handsfree: Add SCO Audio IPC
If SCO Audio IPC gets connected it provides only one command:
connect_sco().
2014-05-13 14:16:51 +03:00