Commit Graph

2799 Commits

Author SHA1 Message Date
Lukasz Rymanowski
35a6c189c0 android/gatt: Fix for device type in gatt
This patch fixes remote device type in GATT cache, which should be
updated on connect confirm
2014-09-02 17:12:52 +02:00
Szymon Janc
ef1680fb9a android/avdtptest: Add support for receiving media as SINK 2014-09-01 15:54:17 +02:00
Szymon Janc
d8f9a248a9 android/avdtptest: Add support for fragmentation 2014-09-01 15:54:17 +02:00
Szymon Janc
8aae2a1d26 android/avdtptest: Add support for initiator role and discovery 2014-09-01 15:54:17 +02:00
Szymon Janc
b8823ffcba android/avdtptest: Add option to reject commands
Currently all commands are rejected. If needed this can be extended
to specify which command to reject.
2014-09-01 15:54:17 +02:00
Szymon Janc
491c71d0c3 android/avdtptest: Add support for streaming 2014-09-01 15:54:16 +02:00
Szymon Janc
ffe06d0391 android: Add initial code for AVDTP testing tool
This tools is intended for AVDTP qualification with PTS.
2014-09-01 15:54:16 +02:00
Andrei Emeltchenko
45bfe0e3b2 android/health: Fix incorrect check
"!create_mdl(channel) < 0" is always false since it returns bool
2014-08-29 16:11:49 +02:00
Lukasz Rymanowski
9a7323f111 android/gatt: Add remove bond handling
With this patch GATT is aware about unpaired devices so the local cache
can be cleared
2014-08-29 16:09:03 +02:00
Lukasz Rymanowski
b08fb7759e android/hidhost: Add remove bond handling
With this patch HID/HOG is aware when remote device has been unpaired.
2014-08-29 16:09:03 +02:00
Lukasz Rymanowski
8ecbe67084 android/bluetooth: Add unpaired device callback
GATT, HID, HOG, might be interested in the fact that some device has
been unpaired in order to clear cache or similar. This patch adds means
to register and unregister callback for unpaired event.
2014-08-29 16:09:03 +02:00
Andrei Emeltchenko
59ba24851f android/handsfree: Refactor handle_dial()
Call callback only once.
2014-08-29 15:49:16 +02:00
Andrei Emeltchenko
2c47af011d android/client: Fix incorrect memory access
In case argc==3 we might access argv[3]. Make code more readable.
2014-08-29 15:49:16 +02:00
Szymon Janc
e6eee7c2fc android/avdtp: Cleanup watch id when removing session watch
When session_cb returns FALSE respective watch id is removed so it
must be cleanup. This fix following Glib warning when unrefing
avdtp after transport was disconnected by remote:
(process:28510): GLib-CRITICAL **: Source ID 2 was not found when
    attempting to remove it
2014-08-29 13:26:41 +03:00
Ravi kumar Veeramally
393192c187 android/tester: Add HDP Destroy Sink Streaming Channel test case 2014-08-28 20:58:12 +02:00
Ravi kumar Veeramally
ef23d9449a android/tester: Add HDP Connect Sink Streaming Channel test case 2014-08-28 20:58:12 +02:00
Ravi kumar Veeramally
b01894793f android/tester: Add HDP Destroy Source Reliable Channel test case 2014-08-28 20:58:12 +02:00
Ravi kumar Veeramally
a86bccc18c android/tester: Add HDP Connect Source Reliable Channel test case 2014-08-28 20:58:12 +02:00
Ravi kumar Veeramally
fbc5f2c1c1 android/health: Avoid multiple times of sdp search
First it searches for control and data PSMs and then search again
for remote mdep id. It would be better to search remote mdep id
and cache in first time itself. Patch avoids load of sdp search
request for second time.
2014-08-28 20:58:12 +02:00
Lukasz Rymanowski
218c6b62fd android/tester: Add test for incoming bonding
This patch add test for incoming just works bonding
2014-08-28 20:27:47 +02:00
Lukasz Rymanowski
d058432b7e android/tester: Add function to set io cap to bthost
Some tests might need to change default io capabilities of bthost.
This patch adds means to do it.
2014-08-28 20:27:47 +02:00
Lukasz Rymanowski
80a5bb2a4a android/tester: Add parameter to remote connect function
This patch extends emu_remote_connect_hci_action function with address
type of device to be connected
2014-08-28 20:27:47 +02:00
Lukasz Rymanowski
8cbfee5f96 android/tester: Move emu related functions to tester main
Those function can be used by other tester modules

In addition function emu_remote_disconnect_hci_action has been changed a
bit so it take handle from step data now. It was needed as cid_data was
static in tester_gatt.c
2014-08-28 20:27:47 +02:00
Lukasz Rymanowski
811c5edc00 android/bluetooth: Fix incoming just works bonding
With this patch Android framework will be notified about bonded device
which initiated bonding and used just works association model.
2014-08-28 20:27:47 +02:00
Szymon Janc
7e518f2f9a android/avdtp: Move PSM definition to AVDTP header 2014-08-28 20:26:19 +02:00
Szymon Janc
fc387495f9 android/avdtp: Constify data in avdtp_service_cap_new 2014-08-28 20:24:44 +02:00
Jakub Tyszkowski
2884336bac android/hid: Force encryption for keyboards
Encryption is mandatory for keyboards. Instead of using hardcoded security
level it's now set per device (with LOW as default) and raised for
keyboards (after the SDP query is done). This level is then used to
establish outgoing connections and raising the security level of the
incomming ones.
2014-08-27 19:06:34 +03:00
Jakub Tyszkowski
36bb67a400 android/hid: Reject connections from unknown devices
Don't accept input from not bonded devices.
2014-08-27 19:06:34 +03:00
Szymon Janc
bf9ea7fd0c android/client: Factor out hex string verification
Use common macro for hex string verification and convertion.
2014-08-26 15:13:36 +02:00
Marcin Kraglak
a7e27ae377 android/pts: Update PTS GATT test results 2014-08-26 15:13:31 +02:00
Marcin Kraglak
5a405f2ff6 android/client: Fix incorrect data parsing
Use fill_buffer function in processing write_characteristic
and send_indication functions.
2014-08-26 15:12:38 +02:00
Szymon Janc
e3d4ab4a8c android/README: Update not implemented status
get_remote_service_record is now implemented. Despite not being used
by Android Framework it turned out to be usefull for qualification.
2014-08-26 13:04:56 +02:00
Marcin Kraglak
a5b34cb0d3 android/pts: Update PICS/PIXIT for GATT 2014-08-26 11:28:18 +02:00
Sebastian Chlad
5b2c710c22 android/pts: HDP regression tests
Regression round for HDP against PTS 5.2 and Android 4.4.4
2014-08-26 11:28:18 +02:00
Andrei Emeltchenko
a5c9529a83 android/doc: Update repository for Intel device build
Use repositories from github/01org/
2014-08-26 11:28:18 +02:00
Szymon Janc
9aaa38fd3b android/health: Shutdown MDL socket when freeing channel
PTS expects to close all data channels before sending delete
confirmation to peer. FD is passed over IPC to Android Bluetooth
application so it needs to be shutdown while freeing channel to
avoid races.
2014-08-25 16:22:25 +02:00
Ravi kumar Veeramally
790795f600 android/health: Call MDL shutdown after mdl_deleted_cb callback
Shutdown_mdl shutdown io channels and unrefs it. After that related
callbacks will shutdown or close and free its data. Due to timing
issue process_md_delete_mdl_req send delete confirmation response to
peer before properly shutting down all opened data channels.
2014-08-25 11:43:25 +02:00
Ravi kumar Veeramally
8aa494f4c0 android/health: Remove mcl instance on mcl_disconnected call back
MCAP library is maintaining two sets of mcl list. On mcl_disconnected
call mcl instance is removed from regular mcl list and cached in
mcl_cache list. health.c doesn't maintain any cached mcls list. So
mcl_conn variable doesn't make any sense of not being connected on
mcl_disconnected call back. So unref mcl on mcl_disconnected and don't
do anything in mcl_unached callback.
2014-08-25 11:31:58 +02:00
Marcin Kraglak
72a76bb64b android/tester: Force remotes ACL disconnection
This is needed or else we would need to extend the timeout for a single
test case in tester framework and wait two more seconds for ACL to
disconnect.
2014-08-25 11:30:56 +02:00
Jakub Tyszkowski
2515c432f3 android/tester: Wait for ACL disconnection before reconnect
We need the remote to drop its ACL before it tries to connect again.
2014-08-25 10:57:42 +02:00
Szymon Janc
b70c70576e android: Don't depend on libcap when building for Linux
Those are used only when building for Android target.
2014-08-22 12:09:55 +02:00
Lukasz Rymanowski
dfe726976b android/pts: Update MPS test result
Test TC_SRC_TG_HFAV_CLH_MD_BV_04_I pass when Music application triggers
music play/pause after it gets both: Button Pushed and Button
Released events.

Note that AOSP Music player triggers play/pause just after it gets
Button Pushed
2014-08-22 10:18:50 +02:00
Marcin Kraglak
b4ba03d2bf android/pts: Update GAP PTS test results 2014-08-22 10:15:43 +02:00
Andrei Emeltchenko
f318a11384 android/handsfree: Fix alignment 2014-08-22 10:05:51 +02:00
Andrei Emeltchenko
2af0c998ac android: Fix header include
Since Android KitKat we can use sys/prctl.h and sys/capability.h
as specified in the manual page. Fixes also build warnings:
...
warning: implicit declaration of function 'prctl'
[-Wimplicit-function-declaration]
  if (prctl(PR_SET_KEEPCAPS, 1) < 0) {
  ^
...
2014-08-22 10:05:51 +02:00
Luiz Augusto von Dentz
042b4faba9 android/avrcp: Register CT record
This fixes TC_SDAS_BV_03_I which requires CT record.
2014-08-20 13:45:29 +03:00
Lukasz Rymanowski
212d3b0fd2 android/bluetooth: Add debug log to select_device_bearer
This patch refactor a bit select_device_bearer function so we can get
debug log out of it. This log might be very useful in dual mode devices
scenarios
2014-08-20 10:26:52 +02:00
Lukasz Rymanowski
e73a294291 android/bluetooth: Fix bdaddr_type in pairing scenario
With this patch correct bdaddr type is used in ssp pairing scenario
2014-08-20 10:26:52 +02:00
Andrei Emeltchenko
05fd766946 android/health: Fix NULL dereference
In a case get_app(), get_device(), get_channel() fail prevent
dereference of NULL pointer. Fixes clang warnings:
...
android/health.c:1980:15: warning: Access to field 'dev' results in a
dereference of a null pointer (loaded from variable 'channel')
        queue_remove(channel->dev->channels, channel);
                     ^~~~~~~~~~~~
1 warning generated.
...
2014-08-20 10:26:32 +02:00
Lukasz Rymanowski
21fb4064f2 android/bluetooth: Update pairing status on pair complete event
So far BfA updates android bond state after link key(s) are
distributed. With LE pairing it might happen that no keys are
distributed e.g remote device has Initiator Key Distribution and
Responder Key Distribution set to 0. In such case link is encrypted
with STK and after its disconnected, pairing needs to be done again.

With this patch Android will get update about pairing complete just
after BfA gets pairing complete from the kernel. It solve issue withnot
updated Android settings application, which is hanging on "Pairing", in
case when no keys are distributed.

However, bacause Android does not see the difference between bonded /
paired devices and because Android does not allow to update its bond
state if FSM it is not in 'pending' state, BfA updates Android with
BONDED state on pair_complete with success. This is how we are doing
so far for bonding and non-bonding pairing.

Note: BfA will update its bonded state after link key(s) are
distribiuted.
2014-08-20 10:23:56 +02:00