Andrei Emeltchenko
2ed135a67a
android/hal-audio: Fix leaving open socket
...
When getting out of the poll loop we shall close socket always.
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
c1e035a30f
android/hal-sco: Fix incorrect assignment
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
d7f381df6f
android/hal-sco: Defer SCO connection to write()
...
Do not return error when opening output stream if SCO is not connected
yet, we will check it later with actual out_write().
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
946d78cd07
android/hal-sco: Get SCO audio fd on demand
...
When SCO fd is not known try to get it from the daemon. SCO is
established via handsfree HAL independently from Audio HAL.
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
47a539d67f
android/hal-sco: Add stream synchronization
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
8d324852fd
android/hal-sco: Choose buffer size
...
For 8k choose buffer size 576 which is multiple from 48 and 64.
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
baf59474e3
android/hal-sco: Skip resampling for input of 8k
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
f9949413d6
android/hal-sco: Skip resampling for output stream with 8k
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
671f4005d8
android/hal-sco: Implement read
...
Add read and resampling from 8000 to 44100.
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
979486f091
android/hal-sco: Fix memory leak
...
Release resampler on exit.
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
d081491bb2
android/hal-sco: Make debug more readable
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
4cf3843d43
android/hal-sco: Use global sco file descriptor
...
Android may open input/output stream independently so we use global sco
file descriptor and mutexes.
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
4f781c78de
android/hal-sco: Check file descriptor >= 0
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
8076518856
android/hal-sco: Implement open input stream
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
fa05f8f8fa
android/hal-sco: Make use of config parameter
...
Use config parameter when opening output stream.
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
6166bddbbb
android/hal-sco: Add SCO packet cache
...
SCO cached is used when Android writes with packet sizes which cannot
fit to 48 bytes SCO frames. Remaining frames are cached and written next
time Android perform out->write().
2014-07-18 13:41:22 +02:00
Andrei Emeltchenko
69dae65503
android/hal-sco: Move mtu assignment to open_stream()
...
mtu shall be assigned when opening stream to be logically correct.
2014-07-18 13:41:21 +02:00
Andrei Emeltchenko
cf0f491d92
android/hal-sco: Use nanosleep for SCO synchronization
2014-07-18 13:41:21 +02:00
Jakub Tyszkowski
581735bc5b
android/tester: Remove old test cases
...
Those tests are now in the newer tester.
2014-07-18 13:21:27 +02:00
Jakub Tyszkowski
a78895a915
android/tester-ng: Add remote device set property fail cases
...
Those set property requests should fail as they request to set remotes
adapter properties.
2014-07-18 13:21:27 +02:00
Jakub Tyszkowski
d7be9f5f55
android/tester-ng: Add set remote friendly name success case
2014-07-18 13:21:27 +02:00
Jakub Tyszkowski
3dd783586c
android/tester-ng: Add get remote property failing cases
...
Those properties requests should fails as those are adapter specific
ones and does not apply to remote devices.
2014-07-18 13:21:27 +02:00
Jakub Tyszkowski
4788bf0d5e
android/tester-ng: Add get remote props cases
...
This patch also introduces bt_action_data for passing arguments to HAL
api calls. So far one argument was enough but now there's need for more.
2014-07-18 13:21:27 +02:00
Jakub Tyszkowski
2a61e0961a
android/tester-ng: Replace action result with status
...
Action (HAL api call) result is always status or file descriptor.
Integer value is enough to hold both so it replaced the truct.
2014-07-18 13:21:27 +02:00
Jakub Tyszkowski
4b7f7aa90f
android/tester-ng: Add get remote properties case
2014-07-18 13:21:27 +02:00
Jakub Tyszkowski
3ef2668d71
android/tester-ng: Add remote device found case
...
This patch adds first test case that requires remote emulated device to be
discovered. New action step was added to activate this device on demand.
2014-07-18 13:21:26 +02:00
Jakub Tyszkowski
57e63ba067
emulator: Add flags param to advertise enabling function
...
This allows to pass additional parameter describing wheter to set
flags parameter in advertising data.
This is needed to make device discoverable.
2014-07-18 13:21:26 +02:00
Grzegorz Kolodziejczyk
01e2d2833b
android/pts: Update PTS files for HFP
...
PICS and PIXITs updated to PTS 5.2. Regression done for Android
4.4.4.
2014-07-18 11:33:00 +02:00
Sebastian Chlad
bfe05543fb
android/build: Add rctest tool to Android build
2014-07-18 11:33:00 +02:00
Marcin Kraglak
9b482edd04
android/gatt: Fix incorrect status in read characteristic cb
...
Pass correct status to upper layer.
2014-07-18 11:14:43 +02:00
Marcin Kraglak
b18e79e0d9
android/gatt: Send proper status of read descriptor callback
...
Pass proper status to upper layer.
2014-07-18 11:14:43 +02:00
Marcin Kraglak
0e97774e4a
android/gatt: Add GATT_PERM_NONE define
...
Use this permission if no read and write is allowed. It is now set
in service change characteristic.
2014-07-18 11:14:43 +02:00
Marcin Kraglak
727ff7133a
android/gatt: Fix read responses with 0 length value
...
Attribute's value length can be 0, so fill read response and send.
2014-07-18 11:14:43 +02:00
Marcin Kraglak
e4fc38f46d
android/gatt: Fix check for permissions error
...
If error is returned from check_device_permissions, fill response
data and return. In case of read errors we didn't send error response.
Zero length data was send instead.
2014-07-18 11:14:43 +02:00
Marcin Kraglak
fce3c5c215
android/gatt: Fix searching primary services by uuids
...
Return all instances of services. It is not proper behaviour to
return only one instance of service with same uuid.
2014-07-18 11:14:43 +02:00
Marcin Kraglak
cad930f409
android/gatt: Fix service class id of built in gatt services
2014-07-18 11:14:42 +02:00
Jakub Tyszkowski
0056b9b249
android/tester-ng: Add cancel discovery cases
2014-07-18 09:49:13 +02:00
Jakub Tyszkowski
7cb7fbcc66
android/tester-ng: Add start discovery success cases
2014-07-18 09:49:13 +02:00
Jakub Tyszkowski
1ac0eec299
android/tester-ng: Use test case independent naming for props
...
This patch abstracts out data from the specific test cases. Every data
that is sent through the hal (i.e. properties) and then the result is
verified is a test data thus uses 'test_prop_<dataname>' convention.
Data that is retrieved from the deamon and is adapter's default settings
use 'emu_prop_<dataname>' notation.
Data name now represents it's content and is no longer bound to specific
test case thus can be reused. Its also easier to actually see what the
test case do without browsing through its data set.
2014-07-18 09:49:13 +02:00
Jakub Tyszkowski
103aa3250a
android/tester-ng: Use array of statics instead of case pointers
...
This is yet another macro that hides the test implementation details and
shortens the amount of code that needs to be written for each test case.
2014-07-18 09:49:12 +02:00
Jakub Tyszkowski
3f93ade572
android/tester-ng: Add test declaration helper macro
...
This replaces test cases declaration with simplier macro call.
2014-07-18 09:49:12 +02:00
Jakub Tyszkowski
fb49bdf691
android/tester-ng: Use action and callback defining macros
...
This significantly shortens the action definitions.
2014-07-18 09:49:12 +02:00
Sebastian Chlad
5a97d13ff1
android/pts: Update PTS files for MAP
...
Regression tests for MAP on PTS 5.2 and Android 4.4.4.
2014-07-18 09:10:34 +02:00
Sebastian Chlad
3e997b69fa
android/pts: Update PTS files for HSP
...
Re-run PTS tests for HSP on PTS 5.2 and Android 4.4.4
2014-07-16 17:40:06 +02:00
Sebastian Chlad
22ee204a54
android/pts: Update PTS files for AVRCP
...
Regression test round using PTS 5.2 and Android 4.4.4
2014-07-16 17:40:06 +02:00
Jakub Tyszkowski
4eac9995b7
android/tester: Remove old cases
...
Those were already reimplemented using newer testing framework.
2014-07-16 16:40:56 +02:00
Jakub Tyszkowski
051707adff
android/tester-ng: Add set scan mode none succes case
2014-07-16 16:40:50 +02:00
Jakub Tyszkowski
c93ef59d0d
android/tester-ng: Add get properties success cases
2014-07-16 16:40:45 +02:00
Jakub Tyszkowski
f7a44893a2
android/tester-ng: Add set scan mode success case
2014-07-16 16:40:39 +02:00
Jakub Tyszkowski
a64610e3d2
android/tester-ng: Add various property set fail cases
...
These cases should fail as they are read only props.
2014-07-16 16:40:34 +02:00
Jakub Tyszkowski
61fd708888
android/tester-ng: Add get bdaddr and bdname success cases
2014-07-16 16:40:27 +02:00
Jakub Tyszkowski
9f3048ebdb
android/tester-ng: Verify action results also for success case
...
Case when we were expecting fail as action result but we got success was
not caught.
2014-07-16 16:40:13 +02:00
Jakub Tyszkowski
ca1d84a5f6
android/tester-ng: Set proper callback count
...
This was a missing piece after fixing the callback count verifying
routine.
2014-07-16 16:40:13 +02:00
Jakub Tyszkowski
d6943b94c7
android/tester-ng: Fix for not checking callback count in step
...
If no callback count was set in the step, test passed despite valid properties
still waiting to be verified.
2014-07-16 16:40:13 +02:00
Jakub Tyszkowski
0bcf025146
android/tester-ng: Use loop for adding cases to the queue
...
It will be simplier to add new cases.
2014-07-16 16:40:13 +02:00
Andrei Emeltchenko
97ea25442b
android/client: Refactor stop and closing streams
2014-07-16 12:03:54 +02:00
Andrei Emeltchenko
161fa547c6
android/client: Add mono to stereo conversion for loopback
2014-07-16 12:03:48 +02:00
Andrei Emeltchenko
b6a255e18d
android/client: Correct check for similar buffer size
...
The new check takes into account number of channels.
2014-07-16 12:03:35 +02:00
Andrei Emeltchenko
c7e0fedd04
android/client: Add sample rate parameter when opening audio streams
...
Opening input/output audio streams makes use of config with sample rate.
2014-07-16 12:03:12 +02:00
Andrei Emeltchenko
131b56d733
android/client: Implement read to file
...
Reads data from stream_in and write to specified file.
2014-07-16 12:02:58 +02:00
Andrei Emeltchenko
13ed6a54d4
android/client: Add loop command
...
loop command makes stream_in->read() and then stream_out->write(). At
the moment buffers shall be equal.
2014-07-16 12:02:45 +02:00
Andrei Emeltchenko
04af313f56
android/client: Add read command
...
Read command makes stream_in->read() call to Audio HAL.
2014-07-16 12:02:30 +02:00
Andrei Emeltchenko
f55aa903b6
android/client: Add open/close input stream commands
2014-07-16 12:02:11 +02:00
Grzegorz Kolodziejczyk
9ab95ccb76
android/android-tester: Remove test cases replaced by tester-ng
...
Enable, Enable done, Disable, set bdname, discovery timeout, scan mode
test cases are no longer needed in android-tester because of
android-tester-ng test rewrite.
2014-07-14 16:58:39 +02:00
Grzegorz Kolodziejczyk
0a9c7b4b62
Android/tester-bluetooth: Add disc_timeout set success tc
...
This adds discovery timeout set property success test case.
2014-07-14 16:58:39 +02:00
Grzegorz Kolodziejczyk
7bc8fe2874
Android/tester-bluetooth: Add scan_mode set success tc
...
This adds scan_mode set property success test case.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
7bd91c88b5
android/tester-bluetooth: Add bdname set success tc
...
This adds handling of property check and bdname set property success
test case. Android tester framework is enhanced by set bd name action.
Test data is enchanced by user step data which can be used inside test
case step.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
8cc89fe32b
android/tester-bluetooth: Add disable success test case
...
This also adds disable action.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
53a3719d05
android/tester-ng: Add property check handling
...
This adds property check handling. Existing test cases (enable, enable
done) are updated with property check. If property type/len/val is not
expected in test step its value should be set to 0/NULL. Order of
property is not considered while checking.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
b6f9d6c90f
android/tester-gatt: Add initial test case
2014-07-14 16:58:38 +02:00
Jakub Tyszkowski
bb984785f9
android/tester-gatt: Initial gatt tester
...
This is initial patch for android gatt HAL tester. It'll contain test
cases for gatt hal.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
84bbd9ae25
android/tester-hidhost: Add initial test case
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
5014b6509c
android/tester-hidhost: Initial hidhost tester
...
This is initial patch for android hidhost HAL tester. It'll contain test
cases for hidhost hal.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
01e8fc9e03
android/tester-socket: Add initial test case
...
This is patch with initial test case testing setup for socket hal test
cases.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
aa9cbddcd0
android/tester-socket: Initial socket tester
...
This is initial patch for android socket HAL tester. It'll contain test
cases for socket hal.
2014-07-14 16:58:38 +02:00
Grzegorz Kolodziejczyk
c727e4dc5f
android/tester-ng: Add double enable success test case
2014-07-14 16:58:38 +02:00
Jakub Tyszkowski
9cc44d5cd7
android/tester-ng: Add callback mechanism
...
This patch adds bt_cb_data to be used for passing callback data from
asynchronous call to tester's main loop. As for now this struct contains
only state but will be extended to handle various callbacks.
2014-07-14 16:58:37 +02:00
Grzegorz Kolodziejczyk
364db6c204
android/tester-bluetooth: Add enable success test case
...
This adds also enable action which enable bluetooth adapter.
2014-07-14 16:58:37 +02:00
Grzegorz Kolodziejczyk
cd9a6e7a44
android/tester-bluetooth: Add initial test case
...
This also adds handle of test steps in android tester framework like:
initializing, matching, verifyng and generic test action which
performes first step action.
2014-07-14 16:58:37 +02:00
Grzegorz Kolodziejczyk
204fb41d73
android/tester-bluetooth: Initial bluetooth HAL tester
...
This is initial patch for android bluetooth HAL tester. It'll contain
test cases for bluetooth hal using android tester framework
(tester-main). Test step actions for this and every tester should be
declared in main tester. Cohesion of test action make action function
more useful and centralized.
2014-07-14 16:58:37 +02:00
Grzegorz Kolodziejczyk
11d6f55490
android/tester-ng: Add android-tester-ng
...
Based on past experience with android-tester, new android tester is
written from scrath with fixed all known bugs and framework
inadvertancies. Once new test case will be added, same one from old
android tester will be removed, until whole test case list will be
replaced.
2014-07-14 16:58:37 +02:00
Szymon Janc
4002d4d329
android/gatt: Disallow signed write on BR/EDR connection
...
As per Core Specification 4.1 Part G p. 4.9.2 signed write without
reponse shall not be used on BR/EDR.
2014-07-14 14:33:03 +02:00
Szymon Janc
688218cd94
android/gatt: Fix not sending notification for signed write
...
Signed write has no response and notificatino should be send to
Android Framework in case of write succeed.
2014-07-14 14:33:03 +02:00
Szymon Janc
897025255d
android/gatt: Fix signed write on encrypted link
...
This fix invalid setting of res instead of status in error case.
2014-07-14 14:33:03 +02:00
Szymon Janc
797466d189
android/gatt: Make signed_write_cmd similar to rest of write functions
...
This avoids confusion with assigning bool to uint type.
2014-07-14 14:33:03 +02:00
Szymon Janc
6930cd12df
android/README: Don't mention minor Android release number
...
Minor releases are quite often and don't introduce significant changes.
There is no need pointing this here since aosp-bluez page already
provides info about latest supported minor release.
2014-07-12 14:51:40 +02:00
Szymon Janc
4a7e8d54fd
android/gatt: Register SDP records for services
2014-07-11 21:55:29 +02:00
Szymon Janc
31a3c6c961
android/gatt: Choose LE or BR/EDR based on last seen bearer
...
This allows to connect both over LE and BR/EDR bearer.
2014-07-11 21:55:28 +02:00
Szymon Janc
7eb9cab6ab
android/bluetooth: Add function for checking last seen bearer
2014-07-11 21:55:28 +02:00
Szymon Janc
5b791c2c36
android/gatt: Add support for GATT over BR/EDR
...
This adds listening on both LE and BR/EDR and SDP records for GAP,
GATT and DIS.
2014-07-11 21:55:28 +02:00
Johan Hedberg
f0591385d2
android: Fix usage of PATH_MAX
...
PATH_MAX already contains the terminating null so there's no need to +1
to it.
2014-07-11 13:33:06 +03:00
Sebastian Chlad
424bfc77b8
android/pts: Update PTS files for DID
...
Updated PICS, PIXITs and PTS tests results for DID.
PTS version 5.2. Android version 4.4.4
2014-07-10 21:20:24 +02:00
Sebastian Chlad
db83ef1dc4
android/pts: Update PTS files for AVCTP
...
PICS and PIXITs updated to PTS 5.2. Regression done for Android
4.4.4.
2014-07-10 21:20:23 +02:00
Sebastian Chlad
44715cf099
android/pts: PTS updates for A2DP
...
PICS and PIXITs files checked against PTS 5.2.
2014-07-10 21:20:23 +02:00
Sebastian Chlad
394b68982e
android/pts: Initial PTS docs for RFCOMM
2014-07-10 21:20:23 +02:00
Marcin Kraglak
066066949c
android/gatt: Set need_resp flag in when received PREP_WRITE_REQ
...
Set need_resp flag if pepare write request have been received.
This is needed because application should send response to stack.
2014-07-09 11:31:19 +02:00
Marcin Kraglak
c5966b25c1
android/gatt: Fix sending incorrect frames
...
Don't send pdu if encoding failed. It cause errors when trying
send notification larger than MTU. Length passed to
g_attrib_send was 0 which caused errors on ATT.
2014-07-09 11:29:41 +02:00
Andrei Emeltchenko
9d08490a5f
android/gatt: Fix length check
...
Function fill_gatt_response() has check shown below:
if (!len)
return;
This eliminates clang warning:
...
android/gatt.c:4443:3: warning: Function call argument is an
uninitialized value
fill_gatt_response(resp_data, resp_data->handle,
...
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
f243bda1dd
android/tester: Remove unused assignment
...
Fixes clang warning:
...
android/android-tester.c:1014:2: warning: Value stored to 'status' is
never read
status =
data->if_bluetooth->get_remote_device_property(&remote_addr, prop.type);
1 warning generated.
...
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
2560fdb750
android/haltest: Add check for valid channel
...
Channel is got from user and needs to be validated before use as index
in the array.
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
2f1ea3485b
android/gatt: Add missing error check
...
Fixes clang warning:
...
android/gatt.c:2097:4: warning: Value stored to 'srvc_search_success' is
never read
srvc_search_success = search_dev_for_srvc(conn, NULL);
...
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
da16db5af6
android/hal-gatt: Remove unneeded never read initialization
...
Fixes clang warning:
...
android/hal-gatt.c:1021:3: warning: Value stored to 'data' is never read
data += service_uuid_len;
^ ~~~~~~~~~~~~~~~~
1 warning generated.
...
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
81aaa6f880
android/haltest: Auto-accept pairing
...
Simplify PTS testing by asking for pairing consent.
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
b1e91f779f
android/gatt: Fix warning by rearranging allocation
...
We need to allocate array of uint8_t so fix allocation parameter, this
also removes unneeded type conversion.
This fixes clang warnings:
...
android/gatt.c:5967:29: warning: Result of 'calloc' is converted to a
pointer of type 'uint8_t', which is incompatible with sizeof operand
type 'uint16_t'
entry->value = (uint8_t *) new0(uint16_t, 1);
~~~~~~~~~ ^~~~~~~~~~~~~~~~~
./src/shared/util.h:81:26: note: expanded from macro 'new0'
^~~~~~ ~~~~~~~~~
...
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
53b22f4480
android/hal-msg: trivial: Correct coding style
...
Move rsp close to cmd improving readability of the code.
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
c04629c784
android/gatt: Change DBG() to error()
2014-07-04 16:46:51 +02:00
Andrei Emeltchenko
46c97c9a29
android/gatt: Fix memory leak
...
Fixes clang warnings:
...
android/gatt.c:2823:1: warning: Potential leak of memory pointed to by
'cb_data'
...
2014-07-04 15:49:09 +02:00
Szymon Janc
708ec91af7
android/README: Add HealthService fix to recommended AOSP patches
2014-07-04 14:37:51 +02:00
Szymon Janc
e90bc34143
android/README: Add section with bug reporting instructions
2014-07-04 14:37:51 +02:00
Szymon Janc
916ca5caf6
android/README: Mark health implementation as complete
2014-07-04 14:37:51 +02:00
Ravi kumar Veeramally
a29e487d1c
android/hal-health: Fix do not modify fd flags in non connected state
...
Only on BTHL_CONN_STATE_CONNECTED state valid fd will be passed. Other states
fd value is -1. Just call channel status call back.
2014-07-03 15:34:25 +02:00
Andrei Emeltchenko
95a476ffb0
android/hal-health: Clear NONBLOCK flag from fd
...
Java expects file descriptor passed with channel_state_cb() to be
blocking.
2014-07-03 13:35:31 +02:00
Szymon Janc
066f353c9a
android/pics: Update HDP settings
...
IEEE 11073 Agent role is for heatlh devices.
2014-07-03 12:42:58 +02:00
Luiz Augusto von Dentz
90af2bb55c
android/gatt: Fix duplicate const
2014-07-03 11:41:05 +03:00
Luiz Augusto von Dentz
fad2138c4a
android: Fix local variables not being marked as static
2014-07-03 11:41:05 +03:00
Luiz Augusto von Dentz
348b5af247
android: Fix non-ANSI function declaration
2014-07-03 11:41:05 +03:00
Luiz Augusto von Dentz
697110ce07
android: Fix using plain integer as NULL pointer
2014-07-03 11:41:05 +03:00
Grzegorz Kolodziejczyk
d64ca282fe
android/pts: Update HOGP tests results
2014-07-02 12:36:49 +02:00
Grzegorz Kolodziejczyk
7f2197ae96
android/client: Fix data parsing for write descriptor
...
This fix data parsing for write descriptor by using fill buffer function.
Fill buffer helper has been moved upper to be visible for write descriptor
function.
2014-07-02 12:36:44 +02:00
Ravi kumar Veeramally
69f8e6a006
android/pts: Update result for HDP TC_SRC_CC_BV_09_C
2014-07-02 12:24:12 +02:00
Ravi kumar Veeramally
9fc27fdde7
android/client: Change multi dimension array to struct mode
...
It will be hard to add extra parameters in multi dimension array.
2014-07-02 12:23:51 +02:00
Ravi kumar Veeramally
c43eb0ed0a
android/health: Handle incoming streaming data channel request
...
First data channel should be reliable data channel when remote device
in sink role request data channel with option any.
2014-07-02 12:18:05 +02:00
Grzegorz Kolodziejczyk
b4b9893a5f
android/pts: Update HOGP tests result
...
Test results for write report characteristic update.
2014-07-02 11:09:27 +03:00
Szymon Janc
661e7ae5d5
android/hidhost: Use bt_hog_send_report in bt_hid_set_report
...
If bt_hid_set_report is called for a HoG device send data using
bt_hog_send_report.
2014-07-02 11:09:27 +03:00
Luiz Augusto von Dentz
f88613527f
android/hog: Add bt_hog_send_report
...
This function can be used to send data using specified report if one is
available.
2014-07-02 11:09:27 +03:00
Szymon Janc
a1d9887c97
android/README: Add PBAP fix to recommended Android patch list
2014-07-01 16:33:55 +02:00
Szymon Janc
d6c8704dc7
android/pts: Update PBAP tests results
2014-07-01 16:33:54 +02:00
Szymon Janc
936c850a9e
android/pts: Update HDP tests results
2014-07-01 11:04:02 +02:00
Szymon Janc
3db24561f8
android/pts: Update L2CAP test results
2014-07-01 09:32:31 +02:00
Andrei Emeltchenko
9e019ffdd3
android/pts: Update PTS test results for HDP
2014-06-30 22:29:03 +02:00
Ravi kumar Veeramally
9c7feeb264
android/health: Update PTS result
...
Results for TC_SRC_HCT_BV_04_I, TC_SRC_HCT_BV_06_C and
TC_SNK_HCT_BV_04_I.
2014-06-30 21:55:33 +02:00
Ravi kumar Veeramally
020a07355f
android/health: Implement MDL reconnection from remote device
2014-06-30 21:55:33 +02:00
Ravi kumar Veeramally
f79aaa49a0
android/health: Fix do not set mdl callbacks on mcl_reconneced call back
...
MDL related callbacks should be already set when creating mcl. Only
update connection status.
2014-06-30 21:55:32 +02:00
Ravi kumar Veeramally
469e97b54e
android/health: Implement mcl_uncached callback
2014-06-30 21:55:32 +02:00
Ravi kumar Veeramally
f13833fcb8
android/health: Implement mcl_disconnected cb
...
Provide a utility to find device by mcl and update the
mcl status.
2014-06-30 21:55:32 +02:00
Szymon Janc
f77a6b22da
android/pts: Update HOGP tests results
2014-06-30 18:52:54 +02:00
Luiz Augusto von Dentz
2275ace595
android/dis: Detach on free
2014-06-30 18:52:54 +02:00
Luiz Augusto von Dentz
2669e85abe
android/bas: Read CCC initial value for Battery Level
...
This is required by the following test:
- TP/HGRF/HH/BV-11-I [Read Client Characteristic Configuration Descriptor
for Battery Level Characteristic]
2014-06-30 18:52:54 +02:00
Luiz Augusto von Dentz
6295771c45
android/bas: Enable notification for Battery Level characteristic
2014-06-30 18:52:54 +02:00
Luiz Augusto von Dentz
563ccacc9e
android/scpp: Fix not detaching on free
2014-06-30 18:52:54 +02:00
Luiz Augusto von Dentz
fc65a8cff6
android/scpp: Fix not unregistering on detach
2014-06-30 18:52:54 +02:00
Luiz Augusto von Dentz
a41d08c376
android/hog: Remove unused code
...
report_free is only called once after detaching so this code is no longer
necessary.
2014-06-30 18:52:53 +02:00
Luiz Augusto von Dentz
ab945f5d23
android/hog: Fix not detaching on free
2014-06-30 18:52:53 +02:00
Luiz Augusto von Dentz
31fa4c92d1
android/hog: Fix not resetting properly on detach
2014-06-30 18:52:53 +02:00
Luiz Augusto von Dentz
714434769a
android/hog: Read CCC initial value for Input Report
...
This is required by the following test:
- TP/HGRF/RH/BV-05-I [Read Client Characteristic Configuration Descriptors
for Report Characteristics – Input Report]
2014-06-30 18:52:53 +02:00
Luiz Augusto von Dentz
3d86acb969
android/hog: Read initial value of Report characteristic
...
This is required by following tests:
- TP/HGRF/RH/BV-03-I [Read Report Characteristics – Input Report]
- TP/HGRF/RH/BV-19-I [Read Report Characteristics – Output Report]
- TP/HGRF/RH/BV-07-I [Read Report Characteristics – Feature Report]
2014-06-30 18:52:53 +02:00
Szymon Janc
1c7fa08119
android/README: Add another fix to recommended Android patch list
...
This patch fixes bug in GATT service which could result in infine
loop in service.
2014-06-30 18:16:36 +02:00
Szymon Janc
a1282d1d35
android/pics: Update HDP settings
2014-06-30 15:26:35 +02:00
Szymon Janc
d7b87439b0
android/bluetooth: Fix updateing bond state
2014-06-30 15:19:13 +02:00
Szymon Janc
75cb163190
android/bluetooth: Fix adding device to bonded list multiple times
...
Current bearer pair state needs to be checked as well since event
triggering state update can be received multiple times.
This fix crash on bluetoothd shutdown due to double free of device.
2014-06-30 15:19:13 +02:00
Andrei Emeltchenko
f235a4bcc9
android/pts: Update PTS test results for HDP
2014-06-30 15:14:09 +02:00
Andrei Emeltchenko
8bc8a1d7b7
android/health: Fix adding missing break
2014-06-30 15:14:09 +02:00
Andrei Emeltchenko
95c99bccee
android/client: Fix using unvalidated index to access array
...
Fixes static analyzers warnings.
2014-06-30 15:14:09 +02:00
Andrei Emeltchenko
ac404e671c
android/health: Add channel_notify for incoming connections
...
For other then ECHO mdep send send_channel_state_notify with fd.
2014-06-30 15:14:08 +02:00
Andrei Emeltchenko
147049dac9
android/health: Set L2CAP mode for MCAP channels
...
Check configuration and set L2CAP mode. Enables several PTS test cases.
2014-06-30 15:13:57 +02:00
Andrei Emeltchenko
b3372a4c48
android/health: Add handling incoming connection
...
Add support for normal data channel creation. Also add search helper for
searching apps for suitable mdepid.
2014-06-30 11:33:41 +02:00
Szymon Janc
a825bbc702
android/pts: Update L2CAP tests results
2014-06-30 11:00:31 +02:00
Szymon Janc
a089fdbb16
android/pts: Update HOGP test coverage
...
Disable not supported optional features.
2014-06-29 15:46:51 +02:00
Szymon Janc
3802a7d350
android/pts: Update HOGP tests results
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
2b3210a9bf
android/hog: Only discover if External Report has a Report UUID
...
Some devices, including PTS, may include characteristics other than
Report as External Report.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
b3163f1161
android/hog: Enable notifications only for Input Reports
...
HoG spec has the following statement:
"The Report Host shall enable notifications, via the Client
Characteristic Configuration descriptor, of the Report characteristic
for all instances of the Report characteristic where the Report Type
as defined in the Report Reference characteristic descriptor
refers to an Input Report."
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
47a337152d
android/hog: Fix using the same callback for different descriptors
...
External Report and Report descriptors take different user_data so have
different callbacks to avoid possible crash if a discover happen to find
the descriptors of unexpect type.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
831b17ae4d
android/hog: Add support for multiple instaces
...
This is necessary to pass PTS tests which does include 2 instances.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
02f9e6e88b
android/hog: Add support for Battery Service
...
If primary is not provided meaning primary should be auto discovered it
probably means other primary services such as Battery Service are not
being handled either so just handle BaS as well in such case.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
2467040f42
android: Add initial implementation of Battery Service client
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
3f3e1c02ed
android/hog: Add support for reading device details via DIS
...
If primary is not provided meaning primary should be auto discovered it
probably means other primary services such as Device Information
Service are not being handled either so just handle DIS as well in such
case.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
6e9e2b2aa5
android/dis: Only cache the handle not all the characteristics
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
6df02947eb
android/dis: Add bt_dis_set_notification
...
Function bt_dis_set_notification can be used to set notify callback.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
2fe26ad5a0
android/dis: Strip dependencies from deviceinfo plugin
...
This strip any dependecy from deviceinfo plugin so the code can be reused
by HoG implementation.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
46247817b7
android/dis: Add copy to Device Info implementation
2014-06-29 14:52:36 +02:00
Szymon Janc
fadaf6540e
android/pts: Update L2CAP settings and tests results
2014-06-29 14:25:30 +02:00
Andrei Emeltchenko
9c9010a3f5
android/pts: Update HDP test results
...
Mark ECHO server tests passed.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
31cee75db5
android/health: Improve debug
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
82a4700920
android/health: Add handling for ECHO service
...
Reply received buffer back for ECHO service.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
da667c204b
android/health: Create mdep for ECHO channel
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
6dafdbdf54
android/health: Assign channel to user_data
...
Assign channel for incoming connections when it is created.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
352a275e53
android/health: Add channel connect
...
Connect channel on incoming connection callback
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
3a7ee97b14
android/health: Refactor channel creation
...
Avoid using app_id when we shall use app structure itself. Otherwise we
end up with unnecessary searches for app and problems for incoming
connections.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
ea49265918
android/health: Add handling MDL connection request
...
Handles MDL connection request for ECHO service
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
9e4f42449c
android/health: Add HDP definitions
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
e4f4e50353
android/health: Add error check when creating app
2014-06-29 14:17:19 +02:00
Sebastian Chlad
7441f6c6a9
android/pts: Add test files for DIS
2014-06-27 19:15:03 +02:00
Szymon Janc
dcbf0593c7
android/gatt: Remove System ID from DIS
...
System ID is not just a string but has a specified format and
should be unique.
DIS specification p. 3.7:
"The System ID characteristic shall represent a structure containing
an Organizationally Unique Identifier (OUI) followed by a manufacturer-defined
identifier and is unique for each individual instance of the product."
2014-06-27 19:15:03 +02:00
Sebastian Chlad
76d93eab9a
android/pts: Add test files for ScPP
2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
006e46b3e2
android/hog: Add support for Scan Parameter Service
...
If primary is not provided meaning primary should be auto discovered it
probably means other primary services such as Scan Parameter Profile
are not being handled either so just handle ScPP as well in such case.
2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
6c534e2f75
android/scpp: Check for cached handles on attach
2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
dbd31643a1
android/scpp: Add bt_scpp_set_interval and bt_scpp_set_window
...
These functions can be used to change the current values.
2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
579a639f09
android/scpp: Strip dependencies from scan plugin
...
This strip any dependecy from scan plugin so the code can be reused
by HoG implementation.
2014-06-27 18:09:43 +02:00
Luiz Augusto von Dentz
5d5e9d5ba1
android/scpp: Add copy to Scan Parameter Profile implementation
2014-06-27 18:09:43 +02:00
Andrei Emeltchenko
bc29b7834e
android/health: Fix NULL dereference
2014-06-27 16:12:18 +02:00
Andrei Emeltchenko
f9f6dd4c58
android/mcap: Fix using uninitialised value
...
Fixes clang warning:
...
android/mcap-lib.c:2366:20: warning: The left operand of '*' is a
garbage value
return tv->tv_sec * 1000000ll + tv->tv_nsec / 1000ll;
~~~~~~~~~~ ^
1 warning generated.
...
2014-06-27 16:10:03 +02:00
Andrei Emeltchenko
12c8d6fdd4
android/health: Fix wrong callback return type
2014-06-27 15:43:31 +02:00
Ravi kumar Veeramally
58088e30b7
android/health: Implement destroy_channel call
...
Delete MDL channel with MDL_DELETE_REQ.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
8efc2021a2
android/health: Implement mdl reconnect
...
MDL reconnection can be called only when it is already created, connected
and closed not deleted.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
d411e3e012
android/health: Fix deleting channels queue
...
Channels queue is created only on device creation. So do not destroy
queue on all mdls deleted in mdl_deleted_cb, just remove all entries.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
424b25f164
android/health: Implement mdl_closed_cb callback
...
Callback will be called when data channel is disconnected/closed.
It does not mean that it is deleted. So only change connected status.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
71677f06b0
android/client: Introduce close_channel API in health
...
In order to run PTS MDL disconnect and reconnect, HAL api does
not support it. This close simply shutdown the fd, remote device
will be notified like data channel is closed not deleted. So ready
for reconnection.
2014-06-27 15:30:13 +02:00
Ravi kumar Veeramally
28fb4b17a8
android/health: Fix wrong user data passing in set_mcl_cb
...
It used to be channel, when set_mcl_cb refactored
it got changed to channed->dev.
commit 32180fa3a6
introduced it.
2014-06-27 15:29:33 +02:00
Jakub Tyszkowski
bec4567faa
android/pts: Update MCAP results
2014-06-27 14:35:41 +02:00
Jakub Tyszkowski
38efcec2f0
android/mcaptest: Support unavailable response to first MDL connect
...
This is needed to pass TC_MCAP_ERR_BI_16_C
2014-06-27 14:35:41 +02:00
Jakub Tyszkowski
1e71953f80
android/mcaptest: Send clock sync capabilities request
...
This adds option to send synchronization capabilities and requirements
request on MCL connection.
2014-06-27 14:35:41 +02:00
Jakub Tyszkowski
9bdab3911d
android/pts: Update MCAP results
2014-06-26 18:04:42 +02:00
Jakub Tyszkowski
da9035cc45
android/mcaptest: Support MDL reconnection if MCL reconnected
...
This is needed in some PTS test cases.
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
c74c2926ba
android/mcaptest: Support MDL and MCL disconnection
...
This adds support for MDL disconnection triggered with timeout after the
MDL is connected. It also adds MCL disconnection timeout after the MDL
has been disconnected. If less than 0 is passed as '-e' or '-f' option
parameter, disconnection is not triggered. This is needed to pass some
PTS test cases.
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
7ba28627a5
android/mcaptest: Support incoming connections
...
This adds support for handling incoming Control Link (MCL) and Data
Link (MDL) connections.
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
24989893f8
android/mcaptest: Support connect
...
This initiates the connection
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
126dbad0d1
android/mcaptest: Add skeleton for mcap test tool
...
This adds skeleton for simple tool for testing mcap library. As mcap-lib
uses bt_io, this tool works in daemon-like mode, by utilizing Glib's main
loop.
2014-06-26 18:04:39 +02:00
Jakub Tyszkowski
ce58b0bd70
android/pts: Change MCAP PIXIT value
...
Handling single data channel will simplify mcaptest tool.
This can be changed later when mcaptest will be improved.
2014-06-26 17:35:51 +02:00
Szymon Janc
2c2e873870
android/gatt: Fix not sending notification on get included service
...
If there was and error notification with GATT error status should be
send.
2014-06-26 11:15:31 +02:00
Szymon Janc
2520ba8587
android/gatt: Fix not sending notification if no included services
2014-06-26 11:15:30 +02:00
Ravi kumar Veeramally
ebf5439c30
android/health: Provide a helper funtion to search channel by id
2014-06-26 11:15:25 +02:00
Ravi kumar Veeramally
09d30507f0
android/hal-health: Return app_id and channel_id -1 in case of error
...
Right now returning only status of request but java layer expecting
-1 for app_id and channel_id in failure case.
2014-06-26 10:56:26 +02:00
Ravi kumar Veeramally
a0ec9aee8f
android/health: Rename matching functions
2014-06-26 10:28:18 +02:00
Luiz Augusto von Dentz
e847a85605
android/hog: Fix using invalid range for external report
2014-06-26 09:44:44 +02:00
Andrei Emeltchenko
e181b40d7c
android/health: Fix setting wrong PSM for SDP record
2014-06-26 09:42:55 +02:00
Luiz Augusto von Dentz
8cdfae35c1
android/hog: Fix code style
2014-06-25 17:36:05 +02:00
Luiz Augusto von Dentz
ab063ec8c6
android/hidhost: Add hid_device_new helper function
2014-06-25 17:36:05 +02:00
Andrei Emeltchenko
16e27fa445
android/health: Add setting mcl callbacks for incoming connection
...
For incoming connection NULL is passed as argument since application is
not known yet.
2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
c701a30bbe
android/health: Refactor create_device
...
create_device() should not search for apps again since we have searched
already, and we do not have always app_id.
2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
f756b74ba4
android/health: Add actual error message to error print
2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
32180fa3a6
android/health: Refactor setting mcl callbacks to function
...
Function will be used in other places as well.
2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
c2cb1bf8c8
android/health: trivial: Fix missing space
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
90d3512560
android/health: Remove extra check
...
gerr is always set on error condition.
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
a1d44da044
android/health: trivial: Remove empty line
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
fddcaa4833
android/health: Fix missing error check
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
ee86b4a255
android/health: Fix possible overflow
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
1403ec3781
android/health: Remove unneeded check
...
In case of error err is always set so the check is not needed.
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
e8bb8f1e1d
android/hal-health: trivial: Correct coding style
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
961cbdfe13
android/gatt: Remove dead code
...
The code apparently left after wrong rebase as it duplicates code
several lines above.
2014-06-25 17:15:32 +02:00
Andrei Emeltchenko
054f3bcf05
android/gatt: Fix wrong size argument
...
Instead of sizeof of (uint8_t *) pass real length, though for that
function it doesn't matter at this point.
2014-06-25 17:15:32 +02:00
Szymon Janc
374d7a37da
android/cts: Update tests results with CTS 4.4 R3
...
No LE GATT tests were run yet.
2014-06-25 16:51:54 +02:00
Szymon Janc
2ea7214869
android/bluetooth: Log error if loading LTKs or IRKs failed
2014-06-24 22:40:14 +02:00
Szymon Janc
df257c1950
android/gatt: Use proper address when connecting
...
If device was using RPA but address was resolved IDA must be used.
2014-06-24 22:40:14 +02:00
Szymon Janc
aea4b868b9
android/bluetooth: Map RPA to Identity address on New IRK event
...
This patch allows to pair with devices using RPA. There is no API
to notify HAL about new Identity Address. When New IRK event is
received ID address is stored in device and map to RPA is done.
This allows to use RPA after address was resolved making this
transparent to Android Framework. When daemon is restarted device
is advertised to Framework with ID address.
2014-06-24 22:40:14 +02:00
Szymon Janc
edb033a01b
android/bluetooth: Add get_device_android_addr helper
...
This will be used to fake address for Android Framework.
2014-06-24 22:40:14 +02:00
Szymon Janc
fded4d3716
android/bluetooth: Fix passing address type to SSP replies
2014-06-24 22:40:14 +02:00
Szymon Janc
d3e7e6f546
android/bluetooth: Pass device to send_bond_state_change function
2014-06-24 22:40:14 +02:00
Szymon Janc
36d29fc88f
android/bluetooth: Add helper for finding device with android address
2014-06-24 22:40:14 +02:00
Grzegorz Kolodziejczyk
a0ad13ddd2
android/hidhost: Fix adding hidhost device on devices list
...
Create hog connection cb functionality tried to operate on stored on
list hidhost device. Adding hidhost device to list should be done
before operating on it.
It caused sending bogus connecting state change.
2014-06-24 11:48:15 +02:00
Ravi kumar Veeramally
162f3f64db
android/health: Update PTS results
...
Update test results for TC_SRC_CC_BV_03_C, TC_SRC_CC_BV_07_C,
TC_SNK_CC_BV_04_C, TC_SNK_HCT_BV_01_I, TC_SNK_CC_BV_08_C and
TC_SRC_HCT_BV_01_I.
2014-06-24 10:20:12 +02:00
Ravi kumar Veeramally
ef7e4c3796
android/client: Write dummy data on fd on health source connect
...
PTS expects dummy data on fd when it connects in source role.
2014-06-24 10:19:17 +02:00
Ravi kumar Veeramally
1a384796a5
android/client: Fix coding style
2014-06-24 10:19:02 +02:00
Ravi kumar Veeramally
36c0227f52
android/health: Fix error messages
2014-06-24 10:19:02 +02:00
Ravi kumar Veeramally
5503e3ae0e
android/health: Fix wrong mdep config index
...
MDEP Id starts from 1, (0 value for Echo). HAL api sends mdep cfg index
which starts from 0.
2014-06-24 10:19:02 +02:00
Luiz Augusto von Dentz
ee675de191
android/pics: Do not set Suspend feature in HOGP
...
This requires integration with Android power management so leave it out
for now.
2014-06-24 09:50:55 +02:00
Luiz Augusto von Dentz
33a5353e06
android/pics: Fix having both types of discover set in HOGP
...
Currently the code discover by service handle and not by UUID.
2014-06-24 09:50:43 +02:00
Szymon Janc
59a17e31ce
android/client: Fix closing wrong FD in health HAL
2014-06-23 15:29:11 +02:00
Ravi kumar Veeramally
7d4d7bec38
anrdroid/client/health: Cache fd and close on channel disconnection
...
Cache fd and close them on channel disconnect or destroy notification.
When running PTS tests it is expecting to close all data channels before
exiting test case.
2014-06-23 10:57:59 +02:00
Ravi kumar Veeramally
6d127e3bae
android/health: Implement mcap_mdl_deleted_cb
...
mcap_mdl_deleted_cb will be called if remote device sends MDL_DELETE_REQ.
Free channel data and notify channel is destroyed.
2014-06-23 10:57:59 +02:00
Ravi kumar Veeramally
a61f99c4a3
android/health: Create and connect MDL
...
Request for md_create_mdl and on successful response
connect mdl and pass fd. First data channel should be reliable
data channel.
2014-06-23 10:57:59 +02:00