OSDN Git Service

android-x86/external-bluetooth-bluez.git
9 years agotools: Request LE remote version information as well
Marcel Holtmann [Mon, 29 Sep 2014 10:09:56 +0000 (12:09 +0200)]
tools: Request LE remote version information as well

9 years agotools: Add comment for retrieving LE remote features
Marcel Holtmann [Mon, 29 Sep 2014 09:55:22 +0000 (11:55 +0200)]
tools: Add comment for retrieving LE remote features

9 years agotools: Increase timeout for sending LE scan command
Marcel Holtmann [Mon, 29 Sep 2014 09:55:05 +0000 (11:55 +0200)]
tools: Increase timeout for sending LE scan command

9 years agolib: Add function for reading remote LE features
Marcel Holtmann [Mon, 29 Sep 2014 09:54:36 +0000 (11:54 +0200)]
lib: Add function for reading remote LE features

9 years agotools: Fix wrong number for LE_LINK connection type
Marcel Holtmann [Mon, 29 Sep 2014 09:28:33 +0000 (11:28 +0200)]
tools: Fix wrong number for LE_LINK connection type

9 years agoemulator/hciemu: Fix not handling failed read correctly
Szymon Janc [Thu, 25 Sep 2014 10:33:53 +0000 (12:33 +0200)]
emulator/hciemu: Fix not handling failed read correctly

If read failed due to signal or blocking watch was removed resulting
in closing /dev/vhci and emulated adapter being removed.

This was affecting android-tester since premature removal of adapter
is considered error on android daemon.

9 years agoandroid/avdtp: Fix crash on disconnect
Szymon Janc [Fri, 26 Sep 2014 13:14:02 +0000 (15:14 +0200)]
android/avdtp: Fix crash on disconnect

Last reference to session may be dropped while calling connection_lost
so move watch ID clean before that.

external/bluetooth/bluez/android/avdtp.c:session_cb()
external/bluetooth/bluez/android/avdtp.c:avdtp_parse_resp() CLOSE
    request succeeded
external/bluetooth/bluez/android/avdtp.c:avdtp_sep_set_state() stream
    state changed: OPEN -> CLOSING
external/bluetooth/bluez/android/a2dp.c:sep_close_cfm()
external/bluetooth/bluez/android/avdtp.c:avdtp_sep_set_state() stream
    state changed: CLOSING -> IDLE
external/bluetooth/bluez/android/avdtp.c:session_cb()
external/bluetooth/bluez/android/avdtp.c:connection_lost()
    Disconnected: I/O error (5)
external/bluetooth/bluez/android/avdtp.c:avdtp_ref() 0x4a27fc8: ref=2
external/bluetooth/bluez/android/a2dp.c:bt_a2dp_notify_state() device
    00:1E:DE:21:85:6A state 0
external/bluetooth/bluez/android/avrcp.c:bt_avrcp_disconnect()
external/bluetooth/bluez/android/avctp.c:avctp_shutdown() AVCTP:
    closing  uinput
external/bluetooth/bluez/android/avrcp.c:disconnect_cb()
external/bluetooth/bluez/android/avdtp.c:avdtp_unref() 0x4a27fc8: ref=1
external/bluetooth/bluez/android/avdtp.c:avdtp_unref() 0x4a27fc8: ref=0
external/bluetooth/bluez/android/avdtp.c:avdtp_free() 0x4a27fc8

==1225== Invalid write of size 4
==1225==    at 0x11ABDE: session_cb (avdtp.c:2084)
==1225==    by 0x48BD9C7: g_io_unix_dispatch (giounix.c:166)
==1225==    by 0x48C2CCB: g_main_context_dispatch (gmain.c:2539)
==1225==    by 0x48C2ED9: g_main_context_iterate.isra.19 (gmain.c:3146)
==1225==    by 0x48C3167: g_main_loop_run (gmain.c:3340)
==1225==    by 0x10D379: main (main.c:628)
==1225==  Address 0x4a27fdc is 20 bytes inside a block of size 1,104 free'd
==1225==    at 0x4897E6C: free (in /system/lib/valgrind/
   vgpreload_memcheck-arm-linux.so)
==1225==    by 0x48C5E2B: g_free (gmem.c:252)
==1225==    by 0x11ABDB: session_cb (avdtp.c:2082)
==1225==    by 0x48BD9C7: g_io_unix_dispatch (giounix.c:166)
==1225==    by 0x48C2CCB: g_main_context_dispatch (gmain.c:2539)
==1225==    by 0x48C2ED9: g_main_context_iterate.isra.19 (gmain.c:3146)
==1225==    by 0x48C3167: g_main_loop_run (gmain.c:3340)
==1225==    by 0x10D379: main (main.c:628)
==1225==

9 years agodoc: Update Android tests coverage
Szymon Janc [Fri, 26 Sep 2014 10:22:44 +0000 (12:22 +0200)]
doc: Update Android tests coverage

9 years agoandroid/handsfree-client: Verify variable length data received from IPC
Jakub Tyszkowski [Fri, 26 Sep 2014 10:04:15 +0000 (12:04 +0200)]
android/handsfree-client: Verify variable length data received from IPC

Dial uses variable length data, check if we received as much as was
declared. This fixes two negative ipc-tester cases for hfp-client dial
api call not passing.

9 years agoandroid/ipc-tester: Add cases for the handsfree client interface
Jakub Tyszkowski [Tue, 23 Sep 2014 06:52:16 +0000 (08:52 +0200)]
android/ipc-tester: Add cases for the handsfree client interface

9 years agoandroid/client: Add handsfree client api calls
Jakub Tyszkowski [Tue, 23 Sep 2014 06:49:40 +0000 (08:49 +0200)]
android/client: Add handsfree client api calls

9 years agoandroid/client: Handle more callbacks for the handsfree client
Jakub Tyszkowski [Tue, 23 Sep 2014 06:49:39 +0000 (08:49 +0200)]
android/client: Handle more callbacks for the handsfree client

9 years agoandroid/client: Handle handsfree client audio state change callback
Jakub Tyszkowski [Tue, 23 Sep 2014 06:49:38 +0000 (08:49 +0200)]
android/client: Handle handsfree client audio state change callback

9 years agoandroid/client: Handle handsfree client connecton state callback
Jakub Tyszkowski [Tue, 23 Sep 2014 06:49:37 +0000 (08:49 +0200)]
android/client: Handle handsfree client connecton state callback

9 years agoandroid/client: Add skeleton for handsfree client interface
Jakub Tyszkowski [Fri, 26 Sep 2014 06:02:44 +0000 (08:02 +0200)]
android/client: Add skeleton for handsfree client interface

9 years agoandroid/core: Fix extra assignment
Andrei Emeltchenko [Fri, 26 Sep 2014 08:16:45 +0000 (11:16 +0300)]
android/core: Fix extra assignment

prop is assigned in the beginning of for() loop. Fixes warning:
...
android/main.c:336:3: warning: Value stored to 'prop' is never read
                prop = buf;
                ^      ~~~
...

9 years agodoc/obex-api: Split FilterBy into FilterAll and FilterAny
Luiz Augusto von Dentz [Tue, 23 Sep 2014 10:11:49 +0000 (13:11 +0300)]
doc/obex-api: Split FilterBy into FilterAll and FilterAny

This makes a simpler API and document the fact that they cannot be used
together.

9 years agoMonitor: Add AVRCP AddToNowPlaying support
Vikrampal Yadav [Thu, 25 Sep 2014 10:18:23 +0000 (15:48 +0530)]
Monitor: Add AVRCP AddToNowPlaying support

Support for decoding AVRCP AddToNowPlaying added in Bluetooth
monitor.

9 years agoMonitor: Add AVRCP PlayItem support
Vikrampal Yadav [Thu, 25 Sep 2014 10:18:22 +0000 (15:48 +0530)]
Monitor: Add AVRCP PlayItem support

Support for decoding AVRCP PlayItem added in Bluetooth monitor.

9 years agoMonitor: Add AVRCP SetAddressedPlayer support
Vikrampal Yadav [Thu, 25 Sep 2014 10:18:21 +0000 (15:48 +0530)]
Monitor: Add AVRCP SetAddressedPlayer support

Support for decoding AVRCP SetAddressedPlayer added in Bluetooth
monitor.

9 years agoMonitor: Add AVRCP SetAbsoluteVolume support
Vikrampal Yadav [Thu, 25 Sep 2014 10:18:20 +0000 (15:48 +0530)]
Monitor: Add AVRCP SetAbsoluteVolume support

Support for decoding AVRCP SetAbsoluteVolume added in Bluetooth
monitor.

9 years agoMonitor: Add AVRCP RegisterNotification support
Vikrampal Yadav [Thu, 25 Sep 2014 10:18:19 +0000 (15:48 +0530)]
Monitor: Add AVRCP RegisterNotification support

Support for decoding AVRCP RegisterNotification added in Bluetooth
monitor.

9 years agoMonitor: Add AVRCP GetPlayStatus support
Vikrampal Yadav [Thu, 25 Sep 2014 10:18:18 +0000 (15:48 +0530)]
Monitor: Add AVRCP GetPlayStatus support

Support for decoding AVRCP GetPlayStatus added in Bluetooth
monitor.

9 years agoandroid: Fix btmgmt build on Android
Szymon Janc [Fri, 26 Sep 2014 06:48:08 +0000 (08:48 +0200)]
android: Fix btmgmt build on Android

target Executable: btmgmt (out/target/product/mako/obj/EXECUTABLES/
   btmgmt_intermediates/LINKED/btmgmt)
external/bluetooth/bluez/tools/btmgmt.c:2970: error: undefined
    reference to 'bt_gap_new'
external/bluetooth/bluez/tools/btmgmt.c:2972: error: undefined
    reference to 'bt_gap_set_ready_handler'
external/bluetooth/bluez/tools/btmgmt.c:3039: error: undefined
    reference to 'bt_gap_unref'
collect2: error: ld returned 1 exit status

9 years agoshared: Add helper functions for HCI based crypto
Marcel Holtmann [Thu, 25 Sep 2014 15:00:13 +0000 (17:00 +0200)]
shared: Add helper functions for HCI based crypto

9 years agoandroid/build: Fix missing linking to libbluetooth
Szymon Janc [Thu, 25 Sep 2014 12:55:28 +0000 (14:55 +0200)]
android/build: Fix missing linking to libbluetooth

9 years agotools: For testing purposes also initialize shared GAP support
Marcel Holtmann [Thu, 25 Sep 2014 13:11:38 +0000 (15:11 +0200)]
tools: For testing purposes also initialize shared GAP support

9 years agobuild: Add initial code for shared GAP handling
Marcel Holtmann [Thu, 25 Sep 2014 13:11:12 +0000 (15:11 +0200)]
build: Add initial code for shared GAP handling

9 years agoandroid: Replace new0 with malloc call
Marcel Holtmann [Thu, 25 Sep 2014 13:05:59 +0000 (15:05 +0200)]
android: Replace new0 with malloc call

9 years agobuild: Move hciemu.c and hciemu.h into emulator directory
Marcel Holtmann [Thu, 25 Sep 2014 12:39:10 +0000 (14:39 +0200)]
build: Move hciemu.c and hciemu.h into emulator directory

9 years agobuild: Use internal libshared-glib and libshared-mainloop libraries
Marcel Holtmann [Thu, 25 Sep 2014 11:01:43 +0000 (13:01 +0200)]
build: Use internal libshared-glib and libshared-mainloop libraries

9 years agoandroid/client: Use release version for tool version
Szymon Janc [Wed, 24 Sep 2014 08:52:49 +0000 (10:52 +0200)]
android/client: Use release version for tool version

9 years agodoc: Update Android tests coverage
Szymon Janc [Thu, 25 Sep 2014 09:31:51 +0000 (11:31 +0200)]
doc: Update Android tests coverage

9 years agoandroid/tester: Improve GATT tests names
Szymon Janc [Thu, 25 Sep 2014 09:28:51 +0000 (11:28 +0200)]
android/tester: Improve GATT tests names

9 years agoandroid/tester: Add GATT Write Characteristic Wrong params
Marcin Kraglak [Wed, 24 Sep 2014 11:38:00 +0000 (13:38 +0200)]
android/tester: Add GATT Write Characteristic Wrong params

Test calling write characteristic with wrong params.

9 years agoandroid/gatt: Set proper status of write_data
Marcin Kraglak [Wed, 24 Sep 2014 11:37:59 +0000 (13:37 +0200)]
android/gatt: Set proper status of write_data

Set proper status in write characteristic callback data struct.

9 years agoandroid/tester: Add GATT Write Characteristic Ins. Auth.
Marcin Kraglak [Wed, 24 Sep 2014 11:37:58 +0000 (13:37 +0200)]
android/tester: Add GATT Write Characteristic Ins. Auth.

Test write characteristic with Insufficient Authorization error.

9 years agoandroid/tester: Add GATT Characteristic Write Req Success
Marcin Kraglak [Wed, 24 Sep 2014 11:37:57 +0000 (13:37 +0200)]
android/tester: Add GATT Characteristic Write Req Success

Test Characteristic write request.

9 years agoandroid/tester: Add GATT Characteristic Write Cmd Success
Marcin Kraglak [Wed, 24 Sep 2014 11:37:56 +0000 (13:37 +0200)]
android/tester: Add GATT Characteristic Write Cmd Success

Test Characteristic write command.

9 years agoandroid/tester: Add GATT Descriptor Read Wrong params
Marcin Kraglak [Wed, 24 Sep 2014 11:37:55 +0000 (13:37 +0200)]
android/tester: Add GATT Descriptor Read Wrong params

Test reading descriptor with wrong params.

9 years agoandroid/tester: Add GATT Descriptor Read Ins. Auth.
Marcin Kraglak [Wed, 24 Sep 2014 11:37:54 +0000 (13:37 +0200)]
android/tester: Add GATT Descriptor Read Ins. Auth.

Test reading descriptor's value while Insufficient Authorization
is returned.

9 years agoandroid/tester: Add GATT Descriptor Read Success
Marcin Kraglak [Wed, 24 Sep 2014 11:37:53 +0000 (13:37 +0200)]
android/tester: Add GATT Descriptor Read Success

Test Reading Descriptor Value.

9 years agoandroid/tester: Add GATT Characteristic Read Wrong Params
Marcin Kraglak [Wed, 24 Sep 2014 11:37:52 +0000 (13:37 +0200)]
android/tester: Add GATT Characteristic Read Wrong Params

Test Reading Characteristic value with wrog parameters.

9 years agoandroid/tester: Add GATT Characteristic Read Ins. Auth.
Marcin Kraglak [Wed, 24 Sep 2014 11:37:51 +0000 (13:37 +0200)]
android/tester: Add GATT Characteristic Read Ins. Auth.

Test reading Characteristing while Insufficient Authorization
is returned.

9 years agoandroid/tester: Add GATT Characteristic Read Success
Marcin Kraglak [Wed, 24 Sep 2014 11:37:50 +0000 (13:37 +0200)]
android/tester: Add GATT Characteristic Read Success

Test Characteristic Read request.

9 years agoandroid/tester: Add support for GATT Client Read/Write callbacks
Marcin Kraglak [Wed, 24 Sep 2014 11:37:49 +0000 (13:37 +0200)]
android/tester: Add support for GATT Client Read/Write callbacks

It will service GATT Client read/write callbacks.

9 years agoandroid/tester: Make local variable static
Marcin Kraglak [Wed, 24 Sep 2014 11:37:48 +0000 (13:37 +0200)]
android/tester: Make local variable static

This variable should be defined as static.

9 years agoandroid/tester: Change function names
Marcin Kraglak [Wed, 24 Sep 2014 11:37:47 +0000 (13:37 +0200)]
android/tester: Change function names

Functions which refers to specific actions should have "action"
suffix.

9 years agoandroid/tester: Fix condition check
Marcin Kraglak [Wed, 24 Sep 2014 11:37:46 +0000 (13:37 +0200)]
android/tester: Fix condition check

It may cause NULL pointer dereference.

9 years agoTODO: Add item to support included services in shared/gatt-client.
Arman Uguray [Wed, 24 Sep 2014 18:25:30 +0000 (11:25 -0700)]
TODO: Add item to support included services in shared/gatt-client.

9 years agoandroid/tester: Explicitly set IO capabilities for SSP pairing tests
Jakub Tyszkowski [Wed, 24 Sep 2014 08:39:21 +0000 (10:39 +0200)]
android/tester: Explicitly set IO capabilities for SSP pairing tests

Those tests are periodically broken every time default IO capabalities
are changed. This patch sets them explicitely to avoid this breakage.

9 years agohealth: Use proper type for tid
Szymon Janc [Fri, 19 Sep 2014 14:10:14 +0000 (16:10 +0200)]
health: Use proper type for tid

tid holds glib source id and should be of guint type.

This fix following compilation error with musl:
  CC       profiles/health/bluetoothd-hdp.o
profiles/health/hdp.c:84:2: error: unknown type name 'uint'
  uint   tid;  /* echo timeout */
  ^

 Please enter the commit message for your changes. Lines starting

9 years agoandroid/client: Fix compilation errors with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:13 +0000 (16:10 +0200)]
android/client: Fix compilation errors with musl

Fix number of build errors similar to:

  CC       android/client/android_haltest-tabcompletion.o
android/client/tabcompletion.c: In function 'print_matches':
android/client/tabcompletion.c:52:3: error: implicit declaration of
   function 'strncmp' [-Werror=implicit-function-declaration]
   if (strncmp(enum_name, prefix, len) == 0)
   ^
android/client/tabcompletion.c: In function 'split_command':
android/client/tabcompletion.c:87:3: error: implicit declaration of
    function 'strncpy' [-Werror=implicit-function-declaration]
   strncpy(arg->ntcopy, arg->origin, len);
   ^

9 years agoandroid/pan: Fix compilation error with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:12 +0000 (16:10 +0200)]
android/pan: Fix compilation error with musl

  CC       android/pan.o
android/pan.c: In function 'bridge_if_down':
android/pan.c:153:33: error: 'caddr_t' undeclared
   (first use in this function)
  err = ioctl(sk, SIOCSIFFLAGS, (caddr_t) &ifr);
                                 ^
android/pan.c:153:33: note: each undeclared identifier
   is reported only once for each function it appears in
Makefile:5422: recipe for target 'android/pan.o' failed
make[1]: *** [android/pan.o] Error 1

9 years agoobexd: Fix compilation error with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:11 +0000 (16:10 +0200)]
obexd: Fix compilation error with musl

  CC       obexd/plugins/obexd-filesystem.o
In file included from obexd/plugins/filesystem.c:40:0:
/usr/include/wait.h:1:2: error: #warning redirecting incorrect
    #include <wait.h> to <sys/wait.h> [-Werror=cpp]
 #warning redirecting incorrect #include <wait.h> to <sys/wait.h>
  ^
cc1: all warnings being treated as errors
Makefile:6447: recipe for target 'obexd/plugins/obexd-filesystem.o' failed
make[1]: *** [obexd/plugins/obexd-filesystem.o] Error 1

9 years agocore: Fix compilation error with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:10 +0000 (16:10 +0200)]
core: Fix compilation error with musl

  CC       profiles/alert/bluetoothd-server.o
In file included from profiles/alert/server.c:49:0:
./src/textfile.h:24:1: error: unknown type name 'mode_t'
 int create_file(const char *filename, const mode_t mode);
 ^
Makefile:7469: recipe for target 'profiles/alert/bluetoothd-server.o'
   failed
make[1]: *** [profiles/alert/bluetoothd-server.o] Error 1
Makefile:3072: recipe for target 'all' failed

9 years agoalert: Fix compilation error with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:09 +0000 (16:10 +0200)]
alert: Fix compilation error with musl

  CC       profiles/alert/bluetoothd-server.o
In file included from profiles/alert/server.c:49:0:
./src/textfile.h:24:1: error: unknown type name 'mode_t'
 int create_file(const char *filename, const mode_t mode);
 ^
Makefile:7469: recipe for target 'profiles/alert/bluetoothd-server.o'
    failed
make[1]: *** [profiles/alert/bluetoothd-server.o] Error 1
Makefile:3072: recipe for target 'all' failed

9 years agoshared: Fix compilation errors with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:08 +0000 (16:10 +0200)]
shared: Fix compilation errors with musl

C       src/shared/hci.o
src/shared/hci.c: In function 'send_command':
src/shared/hci.c:139:2: error: implicit declaration of function
    'writev' [-Werror=implicit-function-declaration]
  if (writev(fd, iov, iovcnt) < 0)
  ^
cc1: all warnings being treated as errors
Makefile:5422: recipe for target 'src/shared/hci.o' failed
make[1]: *** [src/shared/hci.o] Error 1

9 years agotools: Fix compilation errors with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:07 +0000 (16:10 +0200)]
tools: Fix compilation errors with musl

This fix number of includes for <sys/poll.h> instead of <poll.h>

  CC       tools/hciattach.o
In file included from tools/hciattach.c:41:0:
/usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect
   #include <sys/poll.h> to <poll.h> [-Werror=cpp]
 #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
  ^

9 years agoandroid/hal-audio: Fix compilation errors with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:06 +0000 (16:10 +0200)]
android/hal-audio: Fix compilation errors with musl

  CC       android/android_audio_a2dp_default_la-hal-audio-sbc.lo
android/hal-audio-sbc.c: In function 'sbc_codec_init':
android/hal-audio-sbc.c:269:2: error: implicit declaration of function
    'calloc' [-Werror=implicit-function-declaration]
  sbc_data = calloc(sizeof(struct sbc_data), 1);
  ^
android/hal-audio-sbc.c:269:13: error: incompatible implicit
    declaration of built-in function 'calloc' [-Werror]
  sbc_data = calloc(sizeof(struct sbc_data), 1);
             ^
android/hal-audio-sbc.c: In function 'sbc_cleanup':
android/hal-audio-sbc.c:291:2: error: implicit declaration of function
   'free' [-Werror=implicit-function-declaration]
  free(codec_data);
  ^
android/hal-audio-sbc.c:291:2: error: incompatible implicit declaration
    of built-in function 'free' [-Werror]
cc1: all warnings being treated as errors

9 years agolib: Fix compilation error with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:05 +0000 (16:10 +0200)]
lib: Fix compilation error with musl

  CC       lib/hci.lo
In file included from lib/hci.c:39:0:
/usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect
   #include <sys/poll.h> to <poll.h> [-Werror=cpp]
 #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
  ^
cc1: all warnings being treated as errors

9 years agosap: Fix compilation errors with musl
Szymon Janc [Fri, 19 Sep 2014 14:10:04 +0000 (16:10 +0200)]
sap: Fix compilation errors with musl

Fix multiple errors similar to:

profiles/sap/sap-u8500.c: In function 'send_request':
profiles/sap/sap-u8500.c:288:3: error: implicit declaration of
    function 'strerror' [-Werror=implicit-function-declaration]
   sap_error("sending request failed: %s", strerror(ENOMEM));
   ^
profiles/sap/sap-u8500.c:288:3: error: format '%s' expects argument
    of type 'char *', but argument 2 has type 'int' [-Werror=format=]
profiles/sap/sap-u8500.c:297:3: error: implicit declaration of function
    'memcpy' [-Werror=implicit-function-declaration]
   memcpy(msg->payload, param->val, param->len);
   ^

9 years agoMonitor: Add AVRCP GetElementAttributes support
Vikrampal Yadav [Wed, 24 Sep 2014 09:13:29 +0000 (14:43 +0530)]
Monitor: Add AVRCP GetElementAttributes support

Support for decoding AVRCP GetElementAttributes added in
Bluetooth monitor.

9 years agoshared/gatt-client: Remove stray line.
Arman Uguray [Tue, 23 Sep 2014 21:02:20 +0000 (14:02 -0700)]
shared/gatt-client: Remove stray line.

Remove copy-paste artifact.

9 years agoTODO: shared/gatt-client now handles Service Changed
Arman Uguray [Tue, 23 Sep 2014 20:47:17 +0000 (13:47 -0700)]
TODO: shared/gatt-client now handles Service Changed

9 years agotools/btgatt-client: Set service changed handler.
Arman Uguray [Tue, 23 Sep 2014 20:47:16 +0000 (13:47 -0700)]
tools/btgatt-client: Set service changed handler.

btgatt-client now sets a service changed handler by calling
bt_gatt_client_set_service_changed.

9 years agoshared/gatt-client: Add bt_gatt_client_set_service_changed.
Arman Uguray [Tue, 23 Sep 2014 20:47:15 +0000 (13:47 -0700)]
shared/gatt-client: Add bt_gatt_client_set_service_changed.

This patch introduces the bt_gatt_client_set_service_changed function which
allows upper layers to register a callback with gatt-client for
"Service Changed" events. The callback gets invoked for each indication from the
Service Changed characteristic after service discovery within the changed range
has completed and gatt-client's service cache has been updated.

9 years agoshared/gatt-client: Add handler for "Service Changed" if GATT service changes.
Arman Uguray [Tue, 23 Sep 2014 20:47:14 +0000 (13:47 -0700)]
shared/gatt-client: Add handler for "Service Changed" if GATT service changes.

If the GATT service on a peripheral changes gatt-client unregisters its handler
for "Service Changed" indications. This patch adds code that re-registers the
handler at the end of re-discovery if there was a change in the Service Changed
characteristic.

9 years agoshared/gatt-client: Rediscover services within changed range.
Arman Uguray [Tue, 23 Sep 2014 20:47:13 +0000 (13:47 -0700)]
shared/gatt-client: Rediscover services within changed range.

This patch adds the discovery step of handling "Service Changed". A primary
service discovery is performed within the affected handle range and results are
inserted into the service list as a contiguous block of services, sorted by
handle.

9 years agoshared/gatt-client: Remove effected services from cache on Service Changed.
Arman Uguray [Tue, 23 Sep 2014 20:47:12 +0000 (13:47 -0700)]
shared/gatt-client: Remove effected services from cache on Service Changed.

This patch implements the first step of handling "Service Changed", which
involves removing all effected services from the internal list of services and
removing all registered notify handlers that have a handle on a characteristic
within the effected handle range.

9 years agoshared/gatt-client: Register "Service Changed" handler as part of init.
Arman Uguray [Tue, 23 Sep 2014 20:47:11 +0000 (13:47 -0700)]
shared/gatt-client: Register "Service Changed" handler as part of init.

This patch changes shared/gatt-client so that a struct bt_gatt_client
registers a handler for indications from the "Service Changed" characteristic
at the end of its init sequence if the characteristic was discovered. The
handles for the Service Changed characteristic value and the GATT service are
stored during discovery.

9 years agoshared/gatt-client: Make service discovery more modular.
Arman Uguray [Tue, 23 Sep 2014 20:47:10 +0000 (13:47 -0700)]
shared/gatt-client: Make service discovery more modular.

This patch makes the existing service discovery procedures more modular by
making the following changes:

  - Don't accumulate the discovery results in struct bt_gatt_client's internal
    service list. Instead, accumulate them inside struct discovery_op and assign
    them to bt_gatt_client during completion.

  - Add a completion callback to struct discovery_op which gets called at the
    end of a discovery operation. This allows discovery ops triggered for
    different reasons (e.g. init vs "Service Changed") to process discovery
    results separately.

9 years agoshared/gatt-helpers: Allow service discovery by handle range.
Arman Uguray [Tue, 23 Sep 2014 20:47:09 +0000 (13:47 -0700)]
shared/gatt-helpers: Allow service discovery by handle range.

This patch adds the "start" and "end" parameters to
bt_gatt_discover_primary_services to allow restricting the service discovery
procedure to a handle range. Also added the
bt_gatt_discover_all_primary_services function which internally calls
bt_gatt_discover_primary_services within the handles 0x0001 and 0xffff.

9 years agoshared/hfp: Remove not used permissive_syntax value
Lukasz Rymanowski [Wed, 24 Sep 2014 07:35:29 +0000 (09:35 +0200)]
shared/hfp: Remove not used permissive_syntax value

It was planned to be used in case of some unspecified commands, but in
the end we did not have to use it

9 years agoandroid: Use common watch for start and shutdown timeouts
Szymon Janc [Tue, 23 Sep 2014 19:52:41 +0000 (21:52 +0200)]
android: Use common watch for start and shutdown timeouts

Both start and shutdown timeouts use same callback function. This
also fix not removing watch on daemon shutdown.

9 years agoandroid: Fix not clearing up start timeout watch
Szymon Janc [Tue, 23 Sep 2014 19:26:51 +0000 (21:26 +0200)]
android: Fix not clearing up start timeout watch

If start failed due to no adapter being ready before timeout fired
invalid watch was removed on shutdown resulting in:

(bluetoothd:17083): GLib-CRITICAL **: Source ID 2 was not found
when attempting to remove it

9 years agoandroid: Move BLUEZ_EXTENSIONS to AM_CFLAGS
Szymon Janc [Tue, 23 Sep 2014 14:22:53 +0000 (16:22 +0200)]
android: Move BLUEZ_EXTENSIONS to AM_CFLAGS

9 years agoandroid/build: Add BLUEZ_EXTENSIONS to default cflags
Jakub Tyszkowski [Tue, 23 Sep 2014 06:48:47 +0000 (08:48 +0200)]
android/build: Add BLUEZ_EXTENSIONS to default cflags

This is to be sure that all modules knows when we use extensions.

9 years agoandroid/handsfree-client: Implement hf client events
Lukasz Rymanowski [Fri, 19 Sep 2014 14:30:51 +0000 (16:30 +0200)]
android/handsfree-client: Implement hf client events

This patch implements skeleton for following events:
1. Volume Changed event
2. Command Complete event
3. Subscriber Info event
4. In Band Ringtone event
5. Last Voice Tag Number event
6. RING notification event

9 years agoandroid/handsfree-client: Implement hf client events
Lukasz Rymanowski [Fri, 19 Sep 2014 14:30:50 +0000 (16:30 +0200)]
android/handsfree-client: Implement hf client events

This patch implements skeleton for following events:
1. Call Indicator event
2. Call Setup Indicator event
3. Call Held Indicator event
4. Response and Hold Status event
5. Add Call Waiting and Call Line Ident. events
6. Add Current Client Call event

9 years agoandroid/handsfree-client: Implement hf client events
Lukasz Rymanowski [Fri, 19 Sep 2014 14:30:49 +0000 (16:30 +0200)]
android/handsfree-client: Implement hf client events

This patch implements skeleton for following events:
1. Network State event
2. Network Roaming State event
3. Network Signal Strenght event
4. Battery Level event
5. Operator Name event

9 years agoandroid/handsfree-client: Implement hf client events
Lukasz Rymanowski [Fri, 19 Sep 2014 14:30:48 +0000 (16:30 +0200)]
android/handsfree-client: Implement hf client events

This patch implements skeleton for following events:
1. Connection State event
2. Audio Connection State event
3. Voice Recognition State event

9 years agoandroid/handsfree-client: Fix defines for action command
Lukasz Rymanowski [Fri, 19 Sep 2014 14:30:47 +0000 (16:30 +0200)]
android/handsfree-client: Fix defines for action command

9 years agoandroid/hal-ipc-api: Fix location size and add missing feature list
Lukasz Rymanowski [Fri, 19 Sep 2014 14:30:46 +0000 (16:30 +0200)]
android/hal-ipc-api: Fix location size and add missing feature list

This patch changes location size of Dial Memory command to 4 bytes in
order to be consistent with HAL API

It also adds missing peer and chld features values. Size of those
features also has been changed to be consisten with HAL API.

9 years agoandroid: Add debug prints with configure options
Szymon Janc [Tue, 23 Sep 2014 08:49:29 +0000 (10:49 +0200)]
android: Add debug prints with configure options

9 years agoandroid/hal-bluetooth: Fix wrong length in configuration command
Szymon Janc [Tue, 23 Sep 2014 08:24:29 +0000 (10:24 +0200)]
android/hal-bluetooth: Fix wrong length in configuration command

HAL was sending extra byte at the end of command. Refactor code to
use pointer + offset and avoid less intuitive pointers subtraction.

Syscall param sendmsg(msg.msg_iov[1]) points to uninitialised byte(s)
   at 0x53529BD: ??? (syscall-template.S:81)
   by 0x6D96197: hal_ipc_cmd (hal-ipc.c:369)
   by 0x6D8D41E: send_configuration (hal-bluetooth.c:453)
   by 0x6D8EC16: init (hal-bluetooth.c:489)
   by 0x412B20: setup (tester-main.c:1411)
   by 0x40CE05: setup_callback (tester.c:394)
   by 0x5083CE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/
    libglib-2.0.so.0.4000.0)
   by 0x5084047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
   by 0x5084309: g_main_loop_run (in /lib/x86_64-linux-gnu/
    libglib-2.0.so.0.4000.0)
   by 0x40DB4C: tester_run (tester.c:815)
   by 0x40259E: main (tester-main.c:2335)
 Address 0xffefffe31 is on thread 1's stack

9 years agodoc/obex-api: Mark DatabaseIdentifier as optional
Luiz Augusto von Dentz [Tue, 16 Sep 2014 11:06:43 +0000 (14:06 +0300)]
doc/obex-api: Mark DatabaseIdentifier as optional

There is no need to declare DatabaseIdentifier in case it is invalid
since by omitting it should indicate GetVersion is not supported.

9 years agoobexd: Fix the double check for agent
Gowtham Anandha Babu [Mon, 22 Sep 2014 07:12:08 +0000 (12:42 +0530)]
obexd: Fix the double check for agent

Removes the check for NULL agent.

9 years agoandroid/README: Update customization section
Szymon Janc [Mon, 22 Sep 2014 14:30:13 +0000 (16:30 +0200)]
android/README: Update customization section

9 years agoandroid/bluetoothd-wrapper: Fix indentation
Szymon Janc [Mon, 22 Sep 2014 14:30:13 +0000 (16:30 +0200)]
android/bluetoothd-wrapper: Fix indentation

9 years agoandroid: Use helper for accesing Android properties
Szymon Janc [Mon, 22 Sep 2014 14:30:13 +0000 (16:30 +0200)]
android: Use helper for accesing Android properties

9 years agoandroid/hal: Add helper for quering config from Android properties
Szymon Janc [Mon, 22 Sep 2014 14:30:13 +0000 (16:30 +0200)]
android/hal: Add helper for quering config from Android properties

Helper searches config in "persis.sys.bluetooth." and "ro.bluetooth."
namespaces and allows to fallback to custom property if none is
found.

9 years agoandroid/hal-bluetooth: Add support for sending configuration
Szymon Janc [Mon, 22 Sep 2014 14:30:13 +0000 (16:30 +0200)]
android/hal-bluetooth: Add support for sending configuration

9 years agoandroid/gatt: Use configuration data for device information profile
Szymon Janc [Mon, 22 Sep 2014 14:30:12 +0000 (16:30 +0200)]
android/gatt: Use configuration data for device information profile

9 years agoandroid/bluetooth: Use model name for default adapter name
Szymon Janc [Mon, 22 Sep 2014 14:30:12 +0000 (16:30 +0200)]
android/bluetooth: Use model name for default adapter name

9 years agoandroid: Add functions for getting configuration options
Szymon Janc [Mon, 22 Sep 2014 14:30:12 +0000 (16:30 +0200)]
android: Add functions for getting configuration options

9 years agoandroid: Add support for configuration command
Szymon Janc [Mon, 22 Sep 2014 14:30:12 +0000 (16:30 +0200)]
android: Add support for configuration command

9 years agoandroid/hal-msg: Add configuration command
Szymon Janc [Mon, 22 Sep 2014 14:30:11 +0000 (16:30 +0200)]
android/hal-msg: Add configuration command

9 years agoandroid/hal-ipc-api: Add Configuration command
Szymon Janc [Mon, 22 Sep 2014 14:30:10 +0000 (16:30 +0200)]
android/hal-ipc-api: Add Configuration command

9 years agoemulator/smp: Add full key distribution support
Johan Hedberg [Mon, 22 Sep 2014 12:16:52 +0000 (15:16 +0300)]
emulator/smp: Add full key distribution support