OSDN Git Service

android-x86/external-bluetooth-bluez.git
10 years agoobexd: Fix memory leak
Andrei Emeltchenko [Fri, 1 Aug 2014 11:26:11 +0000 (14:26 +0300)]
obexd: Fix memory leak

Fixes memory leak for message_listing_cb()

10 years agoobexd: Fix memory leak
Andrei Emeltchenko [Fri, 1 Aug 2014 11:26:10 +0000 (14:26 +0300)]
obexd: Fix memory leak

Fixes memory leak for folder_listing_cb().

10 years agotools: Fix memory leak
Andrei Emeltchenko [Fri, 1 Aug 2014 11:26:09 +0000 (14:26 +0300)]
tools: Fix memory leak

lmpver and hciver are allocated through malloc and need to be freed.

10 years agoAUTHORS: Mention Mike's contributions
Marcel Holtmann [Fri, 1 Aug 2014 19:41:35 +0000 (21:41 +0200)]
AUTHORS: Mention Mike's contributions

10 years agomonitor: Properly decode GATT Find Information Response
Mike Ryan [Fri, 1 Aug 2014 18:24:41 +0000 (11:24 -0700)]
monitor: Properly decode GATT Find Information Response

10 years agoandroid/pts: PTS testing results for SM
Sebastian Chlad [Fri, 1 Aug 2014 09:29:52 +0000 (11:29 +0200)]
android/pts: PTS testing results for SM

10 years agoattrib: Fix memory leak
Andrei Emeltchenko [Tue, 29 Jul 2014 14:21:01 +0000 (17:21 +0300)]
attrib: Fix memory leak

10 years agoandroid/ipc: Remove unneeded check
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:57 +0000 (17:20 +0300)]
android/ipc: Remove unneeded check

rsp_len cannot be NULL since it is checked above and dereferenced.
Remove static analyzers warnings.

10 years agotools/scotest: Fix double close socket
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:56 +0000 (17:20 +0300)]
tools/scotest: Fix double close socket

When executing in a child we close(sk) in the beginning. error label
handles parent process error conditions.

10 years agotools/l2test: Remove unneeded return
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:55 +0000 (17:20 +0300)]
tools/l2test: Remove unneeded return

Remove dead code after exit()

10 years agotools/scotest: Remove unneeded return
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:54 +0000 (17:20 +0300)]
tools/scotest: Remove unneeded return

Remove dead code after exit()

10 years agotools/rctest: Remove dead code
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:53 +0000 (17:20 +0300)]
tools/rctest: Remove dead code

Since do_listen() never returns remove hanging code

10 years agotools/rctest: Remove unneeded return
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:52 +0000 (17:20 +0300)]
tools/rctest: Remove unneeded return

Code is unreachable since we use exit() before

10 years agoandroid/core: Use g_clear_error instead of free and assignment
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:51 +0000 (17:20 +0300)]
android/core: Use g_clear_error instead of free and assignment

g_clear_error() frees err and set it to NULL. This fixes dead code
warnings from analyzers.

10 years agocore: Remove unneeded assignment
Andrei Emeltchenko [Tue, 29 Jul 2014 14:20:50 +0000 (17:20 +0300)]
core: Remove unneeded assignment

Variable rfcomm is never used after assignment

10 years agoemulator: Add support for Read Clock Offset
Johan Hedberg [Fri, 1 Aug 2014 09:24:03 +0000 (12:24 +0300)]
emulator: Add support for Read Clock Offset

10 years agocore: Fix code style
Luiz Augusto von Dentz [Tue, 17 Jun 2014 09:23:28 +0000 (12:23 +0300)]
core: Fix code style

10 years agoandroid: Include avctp.c in build source for btmon
Marcel Holtmann [Thu, 31 Jul 2014 17:26:05 +0000 (19:26 +0200)]
android: Include avctp.c in build source for btmon

10 years agoandroid/pts: Update MPS test results with PTS 5.2
Szymon Janc [Wed, 30 Jul 2014 10:13:57 +0000 (12:13 +0200)]
android/pts: Update MPS test results with PTS 5.2

10 years agoaudio/avrcp: Fix not continuing from the correct index
Luiz Augusto von Dentz [Thu, 31 Jul 2014 12:09:17 +0000 (15:09 +0300)]
audio/avrcp: Fix not continuing from the correct index

The first valid index is 0 not 1.

10 years agoaudio/avrcp: Fix not accounting all items when listing
Luiz Augusto von Dentz [Thu, 31 Jul 2014 12:03:29 +0000 (15:03 +0300)]
audio/avrcp: Fix not accounting all items when listing

The total number of items should account that the start and end index are
included so end - start index is incorrect.

10 years agomonitor: Add mode and channel to struct l2cap_frame
Luiz Augusto von Dentz [Thu, 31 Jul 2014 10:58:29 +0000 (13:58 +0300)]
monitor: Add mode and channel to struct l2cap_frame

This make it simpler to pass it around.

10 years agomonitor: Add AVCTP support to btmon
Vikrampal Yadav [Mon, 28 Jul 2014 14:24:29 +0000 (19:54 +0530)]
monitor: Add AVCTP support to btmon

Support for decoding AVCTP packets added in Bluetooth monitor.

10 years agoshared/queue: Fix not allowing to remove NULL entries
Luiz Augusto von Dentz [Tue, 29 Jul 2014 14:21:26 +0000 (17:21 +0300)]
shared/queue: Fix not allowing to remove NULL entries

queue_remove should not check the data pointer since both queue_push_head
and queue_push_tail don't check it is possible to have NULL pointers in
the queue therefore queue_remove shall be able to remove them.

10 years agoandroid/hog: Add support for UHID_FEATURE event
Luiz Augusto von Dentz [Tue, 29 Jul 2014 08:58:38 +0000 (11:58 +0300)]
android/hog: Add support for UHID_FEATURE event

10 years agoandroid/hog: Cache report value
Luiz Augusto von Dentz [Tue, 29 Jul 2014 08:40:21 +0000 (11:40 +0300)]
android/hog: Cache report value

Report value will be used for implementing support for UHID_FEATURE
event.

10 years agoshared/gatt: Use iterator based discovery result structure.
Arman Uguray [Wed, 30 Jul 2014 22:14:01 +0000 (15:14 -0700)]
shared/gatt: Use iterator based discovery result structure.

This patch changes the GATT specific linked list structure in gatt-helpers to
bt_gatt_result and bt_gatt_iter. bt_gatt_result internally stores a linked list
of ATT response PDUs, which get decoded on-demand by the iterator functions.
Each iterator function operates on a specific ATT response PDU.

10 years agoandroid/pts: Update GATT TC_GAW_CL_BV_02 with errata number
Szymon Janc [Wed, 30 Jul 2014 13:36:08 +0000 (15:36 +0200)]
android/pts: Update GATT TC_GAW_CL_BV_02 with errata number

10 years agoandroid/README: Add tethering fix to recommened Android patch list
Szymon Janc [Wed, 30 Jul 2014 12:22:43 +0000 (14:22 +0200)]
android/README: Add tethering fix to recommened Android patch list

This fix random failures when remote is connecting to NAP.

10 years agodoc: Update mgmt-tester test count
Johan Hedberg [Wed, 30 Jul 2014 11:14:56 +0000 (14:14 +0300)]
doc: Update mgmt-tester test count

10 years agotools/mgmt-tester: Add MITM Pair Device tests with IO cap checks
Johan Hedberg [Wed, 30 Jul 2014 11:14:14 +0000 (14:14 +0300)]
tools/mgmt-tester: Add MITM Pair Device tests with IO cap checks

10 years agomgmt-tester: Renumber Pair Device tests
Johan Hedberg [Wed, 30 Jul 2014 11:06:16 +0000 (14:06 +0300)]
mgmt-tester: Renumber Pair Device tests

10 years agotools/mgmt-tester: Add just-works Pair Device tests with IO cap checks
Johan Hedberg [Wed, 30 Jul 2014 11:04:30 +0000 (14:04 +0300)]
tools/mgmt-tester: Add just-works Pair Device tests with IO cap checks

10 years agodoc: Update mgmt-tester test count
Johan Hedberg [Wed, 30 Jul 2014 10:45:39 +0000 (13:45 +0300)]
doc: Update mgmt-tester test count

10 years agomgmt-tester: Add LE Remove Device test case
Johan Hedberg [Wed, 30 Jul 2014 10:44:45 +0000 (13:44 +0300)]
mgmt-tester: Add LE Remove Device test case

10 years agomgmt-tester: Add powered on Remove Device test case
Johan Hedberg [Wed, 30 Jul 2014 10:37:24 +0000 (13:37 +0300)]
mgmt-tester: Add powered on Remove Device test case

10 years agomgmt-tester: Add basic Remove Device success test
Johan Hedberg [Wed, 30 Jul 2014 10:35:30 +0000 (13:35 +0300)]
mgmt-tester: Add basic Remove Device success test

10 years agomgmt-tester: Add basic Remove Device invalid params tests
Johan Hedberg [Wed, 30 Jul 2014 10:31:41 +0000 (13:31 +0300)]
mgmt-tester: Add basic Remove Device invalid params tests

10 years agomgmt-tester: Add connectable off test case with added device
Johan Hedberg [Wed, 30 Jul 2014 10:26:53 +0000 (13:26 +0300)]
mgmt-tester: Add connectable off test case with added device

10 years agoandroid/bluetooth: Fix loading LTKs
Marcin Kraglak [Wed, 30 Jul 2014 09:38:50 +0000 (11:38 +0200)]
android/bluetooth: Fix loading LTKs

10 years agoandroid/gatt: Always connect with BT_SEC_LOW security
Marcin Kraglak [Wed, 30 Jul 2014 09:38:49 +0000 (11:38 +0200)]
android/gatt: Always connect with BT_SEC_LOW security

Set BT_SEC_LOW for all LE connections. Only specific profiles need
higher security, now it is possible to elevate security with public
GATT API.

10 years agoanroid/hidhost: Set security to MEDIUM after connect
Marcin Kraglak [Wed, 30 Jul 2014 09:38:48 +0000 (11:38 +0200)]
anroid/hidhost: Set security to MEDIUM after connect

According to spec connection with HoG device should always be
encrypted.

10 years agoandroid/gatt: Expose API to elevate security level
Marcin Kraglak [Wed, 30 Jul 2014 09:38:47 +0000 (11:38 +0200)]
android/gatt: Expose API to elevate security level

It will allow to change security from external profile,
for example in hog implementation.

10 years agoandroid/gatt: Split set_security() function
Marcin Kraglak [Wed, 30 Jul 2014 09:38:46 +0000 (11:38 +0200)]
android/gatt: Split set_security() function

Split function to set_security() and set_auth_type(). Set_security()
will be used in public API.

10 years agoandroid/avrcp: Fix crash while discovering records
Luiz Augusto von Dentz [Wed, 30 Jul 2014 10:00:03 +0000 (13:00 +0300)]
android/avrcp: Fix crash while discovering records

If the device is removed before SDP discovery is completed the following
crash can happen:

Invalid read of size 4
    at 0x11CA6A: avrcp_device_free (avrcp.c:472)
    by 0x11D70F: search_cb (avrcp.c:944)
    by 0x13749D: search_completed_cb (sdp-client.c:176)
    by 0x134E0F: sdp_process (sdp.c:4345)
    by 0x1374F5: search_process_cb (sdp-client.c:201)
    by 0x48BD9C7: g_io_unix_dispatch (giounix.c:166)
    by 0x48C2CCB: g_main_context_dispatch (gmain.c:2539)
    by 0x48C2ED9: g_main_context_iterate.isra.19 (gmain.c:3146)
    by 0x48C3167: g_main_loop_run (gmain.c:3340)
    by 0x10D00D: main (main.c:538)
Address 0x4bcb904 is 20 bytes inside a block of size 24 free'd
    at 0x4897E6C: free (in /system/lib/valgrind/vgpreload_memcheck-arm-linux.so)
    by 0x48C5E2B: g_free (gmem.c:252)
    by 0x11A52F: bt_a2dp_notify_state (a2dp.c:238)
    by 0x1172C1: process_disconnect (avdtp.c:1005)
    by 0x48C146B: g_list_foreach (gslist.c:840)
    by 0x48CD869: g_slist_free_full (gslist.c:177)
    by 0x117CAB: connection_lost (avdtp.c:1021)
    by 0x11A02F: session_cb (avdtp.c:2081)
    by 0x48BD9C7: g_io_unix_dispatch (giounix.c:166)
    by 0x48C2CCB: g_main_context_dispatch (gmain.c:2539)
    by 0x48C2ED9: g_main_context_iterate.isra.19 (gmain.c:3146)
    by 0x48C3167: g_main_loop_run (gmain.c:3340)

10 years agomgmt-tester: Add powered on LE Add Device success test case
Johan Hedberg [Wed, 30 Jul 2014 10:14:10 +0000 (13:14 +0300)]
mgmt-tester: Add powered on LE Add Device success test case

10 years agomgmt-tester: Add powered on Add Device success test case
Johan Hedberg [Wed, 30 Jul 2014 10:09:02 +0000 (13:09 +0300)]
mgmt-tester: Add powered on Add Device success test case

10 years agomgmt-tester: Fix up Add Device success tests
Johan Hedberg [Wed, 30 Jul 2014 10:04:02 +0000 (13:04 +0300)]
mgmt-tester: Fix up Add Device success tests

10 years agoandroid/tester: Fix memory leak
Ravi kumar Veeramally [Tue, 29 Jul 2014 12:01:25 +0000 (15:01 +0300)]
android/tester: Fix memory leak

Fixes valgrind report.

==26707== HEAP SUMMARY:
==26707==     in use at exit: 4,943 bytes in 41 blocks
==26707==   total heap usage: 25,702 allocs, 25,661 frees, 1,379,978 bytes allocated
==26707==
==26707== 8 bytes in 2 blocks are definitely lost in loss record 6 of 39
==26707==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26707==    by 0x5089610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==26707==    by 0x50A0B57: g_memdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==26707==    by 0x40E57E: create_property (tester-main.c:623)
==26707==    by 0x40F49C: pin_request_cb (tester-main.c:713)
==26707==    by 0x5F70E7A: notification_handler (hal-ipc.c:125)
==26707==    by 0x534B181: start_thread (pthread_create.c:312)
==26707==    by 0x565C30C: clone (clone.S:111)
==26707==
==26707== 12 bytes in 2 blocks are definitely lost in loss record 7 of 39
==26707==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26707==    by 0x5089610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==26707==    by 0x50A0B57: g_memdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==26707==    by 0x40E57E: create_property (tester-main.c:623)
==26707==    by 0x40F467: pin_request_cb (tester-main.c:709)
==26707==    by 0x5F70E7A: notification_handler (hal-ipc.c:125)
==26707==    by 0x534B181: start_thread (pthread_create.c:312)
==26707==    by 0x565C30C: clone (clone.S:111)
==26707==
==26707== LEAK SUMMARY:
==26707==    definitely lost: 20 bytes in 4 blocks
==26707==    indirectly lost: 0 bytes in 0 blocks
==26707==      possibly lost: 0 bytes in 0 blocks
==26707==    still reachable: 4,923 bytes in 37 blocks
==26707==         suppressed: 0 bytes in 0 blocks

10 years agoandroid/tester: Remove controller type from test name
Szymon Janc [Wed, 30 Jul 2014 09:36:30 +0000 (11:36 +0200)]
android/tester: Remove controller type from test name

This was not allowing to run specific group of tests. Also it is
test implementaion detail whenever emulated device is dual or not
and doesn't need to be reported.

10 years agoandroid/tester: Remove old android-tester
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:32 +0000 (09:18 +0200)]
android/tester: Remove old android-tester

All test cases has already been ported to newer framework.
Old tester was removed and new one now uses its old name.

10 years agoandroid/tester: Remove old HIDHost test cases
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:31 +0000 (09:18 +0200)]
android/tester: Remove old HIDHost test cases

10 years agoandroid/tester-ng: Add HIDHost send data case
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:30 +0000 (09:18 +0200)]
android/tester-ng: Add HIDHost send data case

10 years agoandroid/tester-ng: Add HIDHost set report case
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:29 +0000 (09:18 +0200)]
android/tester-ng: Add HIDHost set report case

10 years agoandroid/tester-ng: Add HIDHost get report case
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:28 +0000 (09:18 +0200)]
android/tester-ng: Add HIDHost get report case

10 years agoandroid/tester-ng: Add HIDHost set protocol mode case
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:27 +0000 (09:18 +0200)]
android/tester-ng: Add HIDHost set protocol mode case

10 years agoandroid/tester-ng: Add HIDHost get protocol mode case
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:26 +0000 (09:18 +0200)]
android/tester-ng: Add HIDHost get protocol mode case

10 years agoandroid/tester-ng: Add HIDHost virtual unplug test case
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:25 +0000 (09:18 +0200)]
android/tester-ng: Add HIDHost virtual unplug test case

10 years agoandroid/tester-ng: Add HIDHost connect, disconnect cases
Jakub Tyszkowski [Tue, 29 Jul 2014 07:18:24 +0000 (09:18 +0200)]
android/tester-ng: Add HIDHost connect, disconnect cases

10 years agoandroid/pts: RFCOMM PTS update
Sebastian Chlad [Tue, 29 Jul 2014 14:12:18 +0000 (16:12 +0200)]
android/pts: RFCOMM PTS update

Number of issues on PTS 5.2 for RFCOMM found. Problems with Credits
(PTS issue #12421), Channel disconnect (PTS issue #12414), accepting
UIH and UA frames (PTS issue #12397).

10 years agodoc: Update mgmt-tester test count
Johan Hedberg [Wed, 30 Jul 2014 08:38:06 +0000 (11:38 +0300)]
doc: Update mgmt-tester test count

10 years agomgmt-tester: Provide basic Add Device success test cases
Johan Hedberg [Wed, 30 Jul 2014 08:36:50 +0000 (11:36 +0300)]
mgmt-tester: Provide basic Add Device success test cases

10 years agomgmt-tester: Add invalid params tests for Add Device
Johan Hedberg [Wed, 30 Jul 2014 08:27:07 +0000 (11:27 +0300)]
mgmt-tester: Add invalid params tests for Add Device

10 years agomonitor: Rename pairable to bondable
Johan Hedberg [Wed, 30 Jul 2014 07:34:57 +0000 (10:34 +0300)]
monitor: Rename pairable to bondable

10 years agodoc/mgmt-api: Rename pairable to bondable
Johan Hedberg [Wed, 30 Jul 2014 07:33:46 +0000 (10:33 +0300)]
doc/mgmt-api: Rename pairable to bondable

10 years agomgmt: Rename pairable to bondable
Johan Hedberg [Wed, 30 Jul 2014 07:32:16 +0000 (10:32 +0300)]
mgmt: Rename pairable to bondable

10 years agocore: Remove left-over reference to AlwaysPairable
Johan Hedberg [Wed, 30 Jul 2014 07:25:16 +0000 (10:25 +0300)]
core: Remove left-over reference to AlwaysPairable

10 years agocore: Remove always_pairable feature
Johan Hedberg [Wed, 30 Jul 2014 04:53:51 +0000 (07:53 +0300)]
core: Remove always_pairable feature

We've decided to have pairable (soon to be renamed to bondable) always
set after all, so neither the always_pairable variable nor the
AlwaysPairable config option is needed.

10 years agomonitor: Add support for LE Connection Parameter Request event
Marcel Holtmann [Wed, 30 Jul 2014 03:18:44 +0000 (05:18 +0200)]
monitor: Add support for LE Connection Parameter Request event

10 years agomonitor: Add support for LE Connection Parameter Request Reply commands
Marcel Holtmann [Wed, 30 Jul 2014 03:12:37 +0000 (05:12 +0200)]
monitor: Add support for LE Connection Parameter Request Reply commands

10 years agoandroid/pts: Update ScPP tests results with PTS 5.2
Szymon Janc [Tue, 29 Jul 2014 12:37:00 +0000 (14:37 +0200)]
android/pts: Update ScPP tests results with PTS 5.2

10 years agoandroid/pts: Update DIS tests results with PTS 5.2
Szymon Janc [Tue, 29 Jul 2014 10:12:07 +0000 (12:12 +0200)]
android/pts: Update DIS tests results with PTS 5.2

10 years agoandroid: Allow to set required handsfree mode on Linux host
Andrei Emeltchenko [Mon, 28 Jul 2014 11:57:19 +0000 (14:57 +0300)]
android: Allow to set required handsfree mode on Linux host

This is usefull for testing handsfree in non-default configuration.

10 years agoandroid/README: Fix few typos and too long line
Szymon Janc [Tue, 29 Jul 2014 08:37:18 +0000 (10:37 +0200)]
android/README: Fix few typos and too long line

10 years agoandroid/hog: Fix handling UHID_FEATURE as UHID_OUTPUT
Luiz Augusto von Dentz [Mon, 28 Jul 2014 11:39:26 +0000 (14:39 +0300)]
android/hog: Fix handling UHID_FEATURE as UHID_OUTPUT

As with input plugin this code contain the same issue handling
UHID_FEATURE events can cause a crash.

10 years agoinput/hog: Cleanup unnecessary code
Luiz Augusto von Dentz [Mon, 28 Jul 2014 11:39:25 +0000 (14:39 +0300)]
input/hog: Cleanup unnecessary code

The callback register by bt_uhid_register already contains the event type
so there is no need to check for it again.

10 years agodoc: Remove bogus DeviceFound signal reference
Johan Hedberg [Tue, 29 Jul 2014 06:09:13 +0000 (09:09 +0300)]
doc: Remove bogus DeviceFound signal reference

10 years agomgmt-tester: Update expected LE Host Supported command parameters
Johan Hedberg [Mon, 28 Jul 2014 20:01:35 +0000 (23:01 +0300)]
mgmt-tester: Update expected LE Host Supported command parameters

10 years agocore: Default to temporary=true when creating new devices
Johan Hedberg [Mon, 28 Jul 2014 10:54:32 +0000 (13:54 +0300)]
core: Default to temporary=true when creating new devices

Since the code that calls Add Device depends on all devices undergoing a
temporary true -> false transition, start off by having them default to
being temporary. This fixes properly calling Add Device when loading
from storage upon bluetoothd startup.

10 years agotools/btmgmt: Fix grammar for zero items
Johan Hedberg [Mon, 28 Jul 2014 10:24:00 +0000 (13:24 +0300)]
tools/btmgmt: Fix grammar for zero items

10 years agoshared/gatt: Implement notification/indication helper.
Arman Uguray [Fri, 25 Jul 2014 22:08:43 +0000 (15:08 -0700)]
shared/gatt: Implement notification/indication helper.

This patch implements bt_gatt_register, which sets up internal callbacks for
incoming notifications and indications, parses the PDU and provides it to the
upper layer. It also automatically sends out a confirmation when an indication
is received.

10 years agoshared/gatt: Implement "Write Long Values" procedure.
Arman Uguray [Fri, 25 Jul 2014 22:08:42 +0000 (15:08 -0700)]
shared/gatt: Implement "Write Long Values" procedure.

This patch implements bt_gatt_write_long_value.

10 years agoshared/gatt: Implement "Write Value" and "Write Without Response" procedures.
Arman Uguray [Fri, 25 Jul 2014 22:08:41 +0000 (15:08 -0700)]
shared/gatt: Implement "Write Value" and "Write Without Response" procedures.

This patch implements the bt_gatt_write_without_response and bt_gatt_write_value
functions.

10 years agoshared/gatt: Implement "Read Long Characteristic Values" procedure.
Arman Uguray [Fri, 25 Jul 2014 22:08:40 +0000 (15:08 -0700)]
shared/gatt: Implement "Read Long Characteristic Values" procedure.

This patch implements bt_gatt_read_long_value.

10 years agoshared/gatt: Implement "Read" procedure.
Arman Uguray [Fri, 25 Jul 2014 22:08:39 +0000 (15:08 -0700)]
shared/gatt: Implement "Read" procedure.

This patch implements bt_gatt_read_value, which can be used to read the value of
a characteristic or descriptor.

10 years agoshared/gatt: Implement "Descriptor Discovery" procedure.
Arman Uguray [Fri, 25 Jul 2014 22:08:38 +0000 (15:08 -0700)]
shared/gatt: Implement "Descriptor Discovery" procedure.

This patch implements bt_gatt_discover_descriptors.

10 years agoshared/gatt: Implement "Characteristic Discovery" procedures.
Arman Uguray [Fri, 25 Jul 2014 22:08:37 +0000 (15:08 -0700)]
shared/gatt: Implement "Characteristic Discovery" procedures.

This patch implements bt_gatt_discover_characteristics, which can perform the
characteristic discovery procedures "Discover All Characteristics of a Service"
and "Discover Characteristics by UUID".

10 years agoshared/gatt: Implement "Discover Primary Service by UUID" procedure.
Arman Uguray [Fri, 25 Jul 2014 22:08:36 +0000 (15:08 -0700)]
shared/gatt: Implement "Discover Primary Service by UUID" procedure.

This patch implements bt_gatt_discover_primary_services for the case when a UUID
is provided.

10 years agoshared/gatt: Implement "Discover All Primary Services" procedure.
Arman Uguray [Fri, 25 Jul 2014 22:08:35 +0000 (15:08 -0700)]
shared/gatt: Implement "Discover All Primary Services" procedure.

This patch implements bt_gatt_discover_primary_services for the case when no
UUID is provided.

10 years agoshared/gatt: Implement bt_gatt_exchange_mtu.
Arman Uguray [Fri, 25 Jul 2014 22:08:34 +0000 (15:08 -0700)]
shared/gatt: Implement bt_gatt_exchange_mtu.

This patch implements the helper function bt_gatt_exchange_mtu, which performs
an ATT "Exchange MTU" request and resizes the internal buffer based on the
result.

10 years agoshared/gatt: Introduce gatt-helpers.h skeleton.
Arman Uguray [Fri, 25 Jul 2014 22:08:33 +0000 (15:08 -0700)]
shared/gatt: Introduce gatt-helpers.h skeleton.

This patch introduces the skeleton for src/shared/gatt-helpers, which defines
helper functions for over-the-air GATT client-side procedures that will be
frequently used by clients. Most of these functions require several sequential
ATT protocol requests and it is useful to abstract these details away from the
upper layer.

10 years agoandroid/cts: Update test results for CTS 4.4 R3
Szymon Janc [Fri, 25 Jul 2014 11:10:42 +0000 (13:10 +0200)]
android/cts: Update test results for CTS 4.4 R3

10 years agoandroid/pts: Regression tests on SM against PTS 5.2
Sebastian Chlad [Fri, 25 Jul 2014 11:01:16 +0000 (13:01 +0200)]
android/pts: Regression tests on SM against PTS 5.2

10 years agoandroid/tester-ng: Fix not freeing porperties value
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:17 +0000 (13:32 +0200)]
android/tester-ng: Fix not freeing porperties value

This fixes 3 valgrind reports like:

8 bytes in 2 blocks are definitely lost in loss record 7 of 47
==8437==    at 0x4C2AB80: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8437==    by 0x5089610: g_malloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==8437==    by 0x50A0B57: g_memdup (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==8437==    by 0x40E94E: create_property (tester-main.c:623)
==8437==    by 0x40F96C: ssp_request_cb (tester-main.c:741)
==8437==    by 0x5F70E5A: notification_handler (hal-ipc.c:125)
==8437==    by 0x534B181: start_thread (pthread_create.c:312)
==8437==    by 0x565C30C: clone (clone.S:111)

10 years agoandroid/tester-ng: Remove not needed include
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:16 +0000 (13:32 +0200)]
android/tester-ng: Remove not needed include

10 years agoandroid/tester-ng: Fix not initializing step
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:15 +0000 (13:32 +0200)]
android/tester-ng: Fix not initializing step

This fixes the following vagrind report:

==12708== 4 errors in context 1 of 1:
==12708== Conditional jump or move depends on uninitialised value(s)
==12708==    at 0x40E359: verify_step (tester-main.c:416)
==12708==    by 0x40E5FD: verify_action (tester-main.c:540)
==12708==    by 0x5083CE4: g_main_context_dispatch (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12708==    by 0x5084047: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12708==    by 0x5084309: g_main_loop_run (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12708==    by 0x40D51C: tester_run (tester.c:812)
==12708==    by 0x40251E: main (tester-main.c:1496)

10 years agoandroid/tester-ng: Fix structure members constness
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:14 +0000 (13:32 +0200)]
android/tester-ng: Fix structure members constness

It's better to know what actually may change by looking at the structure
definitions. Some api calls can modify their parameters (returning file
descriptor in socket HAL API) but most of them don't.

This patch mostly applies to action_data and test_case structs that defines
the actual test case.

10 years agoandroid/tester-ng: Fix treating callback as action step
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:13 +0000 (13:32 +0200)]
android/tester-ng: Fix treating callback as action step

Next action step might pass before the action was even called. This was
possible when not expected callback came. This patch forces check for
callback also on the incomming step and not only on the expected one.

10 years agomonitor: Print proper LE supported state combination
Marcel Holtmann [Fri, 25 Jul 2014 01:37:52 +0000 (03:37 +0200)]
monitor: Print proper LE supported state combination

10 years agoinput: Remove broken UHID_FEATURE support
Johan Hedberg [Thu, 24 Jul 2014 15:26:28 +0000 (18:26 +0300)]
input: Remove broken UHID_FEATURE support

The forward_report function currently assumes that all events it gets
are of UHID_OUTPUT type. Simply remove trying to use it for anything
else until we have a proper patch for UHID_FEATURE handling.