Commit Graph

15965 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
cd8bbd29f4 android/hid: Fix passing wrong adapter address to bt_io_listen 2013-11-05 15:21:27 +02:00
Jerzy Kasenberg
ef0609cc15 android/client: Fix build for android 4.3
Chagnes in HAL interface from 4.3 to 4.4 result in build failure:

target thumb C: haltest <=
    external/bluetooth/bluez/android/client/if-gatt.c
external/bluetooth/bluez/android/client/if-gatt.c:225:1:
    error: unknown type name 'btgatt_gatt_id_t'

This patch allows to build GATT for Android 4.3 (api level 18).
2013-11-05 14:55:37 +02:00
Ravi kumar Veeramally
5de2f26a11 android/hid: Add hid event proto mode structure to hal msg headers 2013-11-05 14:52:34 +02:00
Johan Hedberg
ced41b02f9 tools/smp-tester: Add simple success test case 2013-11-05 13:40:30 +02:00
Szymon Janc
762a2ef434 android: Suppress compiler warnings not enabled by autotools build
missing-field-initializers warning is not enabled on autotools build.
Current code rely on implicit fields intializations resulting in flood
of bogus compiler warnings while building for Android.

monitor/packet.c:348:2: warning: missing initializer
    [-Wmissing-field-initializers]
monitor/packet.c:348:2: warning: (near initialization for
    'error2str_table[64].error') [-Wmissing-field-initializers]
monitor/packet.c:542:2: warning: missing initializer
    [-Wmissing-field-initializers]
monitor/packet.c:542:2: warning: (near initialization for
    'svc_class_table[8].bit') [-Wmissing-field-initializers]
monitor/packet.c:557:2: warning: missing initializer
    [-Wmissing-field-initializers]
monitor/packet.c:557:2: warning: (near initialization for
    'major_class_computer_table[8].val') [-Wmissing-field-initializers]
2013-11-05 13:04:00 +02:00
Luiz Augusto von Dentz
b01319a33f android/adapter: Make adapter_set_name call adapter_name_changed
This simplifies the code since the action of changing the name should
always be progated to the HAL there is no point in doing this
separately.
2013-11-05 12:43:43 +02:00
Andrei Emeltchenko
324ba2b35f android/daemon: Save adapter name on complete event
Saving adapter name was missing from set name complete event.
Refactor code to function and reuse it in both places where
name is changed.
2013-11-05 12:32:53 +02:00
Jerzy Kasenberg
126aad3a5d android/client: Change adapter to bluetooth
This fixes all places where adapter should be changed to
bluetooth.
2013-11-05 12:31:27 +02:00
Jerzy Kasenberg
c73ddc609b android/client: Fix style and typos
Fixes spelling errors and white space style errors.
2013-11-05 12:31:25 +02:00
Andrei Emeltchenko
6886d16e6c android: Add btmon to Android Makefile
Build btmon for Android image. btmon requires fresh bionic to build.
2013-11-05 12:30:40 +02:00
Johan Hedberg
5d09808201 tools: Add smp-tester for automated LE SMP end-to-end tests 2013-11-05 11:38:12 +02:00
Johan Hedberg
d5306edce0 emulator/bthost: Add support for CID hooks
This patch adds support for registering CID based hooks to a bthost.
These are intended for test tools to override the default data handling
for specific CIDs.
2013-11-05 11:38:12 +02:00
Ravi kumar Veeramally
c5ca292eb6 android/hid: Retrieve BOOT_DEVICE attribute from SDP and cache it
It will be usefull to handle when application level requests
get or set protocol from hid device.
2013-11-05 10:19:15 +02:00
Ravi kumar Veeramally
34492997bf android/hid: Rename function name set_state to notify_state
Renaming notification preparation function name from bt_hid_set_state
to bt_hid_notify_state. Rest of the funtions name will have proper
notify* names.
2013-11-05 10:18:51 +02:00
Szymon Janc
d2064df699 android: Send current state of all properties while powering adapter
When adapter is powered on it is expected to emit all properties so
that framework could synchronize its state machine with current
state of HAL. There is no need to set scan mode to none on startup
as framework will set scan mode if current mode is different than
desired one.
2013-11-04 21:31:27 +02:00
Szymon Janc
556c5ceb71 android: Implement scan_mode property in get property command
This will allow to query current state of scan mode property.
2013-11-04 21:31:20 +02:00
Szymon Janc
a880b227bd android: Add support for handling get properties commands
When this commands is received all properties shall be reported to HAL.
2013-11-04 21:31:16 +02:00
Andrei Emeltchenko
8baa84b767 android/client: Fix printing not NULL terminated strings
Android passes not NULL terminated strings.
2013-11-04 21:17:50 +02:00
Andrei Emeltchenko
5af8a574eb android/daemon: Fix setting adapter name
Android use the full string returned even if we terminate it with '\0'.
2013-11-04 21:15:58 +02:00
Andrei Emeltchenko
2dda637c83 android/daemon: Clean up get_address name
Make function name consistent with the rest of the code.
2013-11-04 21:15:46 +02:00
Andrei Emeltchenko
c98ce8a67b android/daemon: Implement get adapter name
Use adapter_name_changed for get_property call.
2013-11-04 21:15:37 +02:00
Jerzy Kasenberg
fe552a1a5d android/client: Fix annoying delay in command line
Move fflush(stdout) to after prints and user input.
This removes delay of showing prompt.
2013-11-04 21:14:35 +02:00
Jerzy Kasenberg
180bc6dbd8 android/client: Change interface name to bluetooth
This changes 'adapter' to 'bluetooth' as name of HAL interface.
This name matches name fond in bluetooth.h where all interfaces
are defined.
2013-11-04 21:13:52 +02:00
Luiz Augusto von Dentz
1ca4c658d9 android/pan: Add initial code for handling commands 2013-11-04 21:13:05 +02:00
Luiz Augusto von Dentz
8e955dfd82 android: Add initial skeleton for pan in the daemon 2013-11-04 21:12:40 +02:00
Luiz Augusto von Dentz
00e69a7570 android/a2dp: Add initial code for handling commands 2013-11-04 21:12:25 +02:00
Luiz Augusto von Dentz
5daffcb642 android: Add initial skeleton for a2dp in the daemon 2013-11-04 21:12:23 +02:00
Giovanni Campagna
d0682a5f25 hid2hci: fix regression in /dev format after moving away from libusb
The paths under /dev, in the default udev configuration, are formatted
with two leading zeros, but the number obtained from sysfs don't have
them, so we must convert them to integers and reformat them.
2013-11-04 20:06:25 +02:00
Jerzy Kasenberg
bd75bd816e android: Bump PLATFORM_SDK_VERSION to KitKat
This updates PLATFORM_SDK_VERSION to 19 since
bluetooth headers were updated already.
2013-11-04 12:15:45 +02:00
Szymon Janc
3c82cea914 android: Fix not sending scan mode change notification
Check for current settings instead of changed setting mask when
sending notification. Otherwise scan mode change would be communicated
only if power state changed at the same time.
2013-11-04 12:15:04 +02:00
Jerzy Kasenberg
6807460f1b android/client: Fix uninitialized variable
Pin accept variable was intended to be set to 1
only when pin was typed by user. If no pin was given
accept should be set to 0. This patch fixes this.
2013-11-04 12:14:18 +02:00
Luiz Augusto von Dentz
d661ba725c android: Add the missing HAVE_CONFIG_H check daemon files 2013-11-04 12:10:31 +02:00
Luiz Augusto von Dentz
f18bb68ba5 android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible 2013-11-04 12:10:29 +02:00
Marcin Kraglak
992f3f669f Fix incorrect result type in set_adapter_name 2013-11-04 12:07:47 +02:00
Marcin Kraglak
c304a4c963 android: Add stub of get_remote_services command 2013-11-04 10:20:28 +02:00
Marcin Kraglak
5658fadf26 android/hal: Send get_remote_services cmd 2013-11-04 10:20:07 +02:00
Marcin Kraglak
ef4e9a8884 android: Fix typo in get_remote_services command 2013-11-04 09:37:13 +02:00
Andrei Emeltchenko
f2782699e8 android/daemon: Add logs to trace failed cmd 2013-11-04 09:33:19 +02:00
Andrei Emeltchenko
be06afd877 android/hal: Add extra logs to HAL
Use exported functions from hal test tool to print properties.
2013-11-04 09:29:09 +02:00
Andrei Emeltchenko
5ad3530e8b android/haltest: Fix print device name 2013-11-04 09:28:49 +02:00
Andrei Emeltchenko
2563307c2d android/haltest: Use pointer as parameter for debug
Pass structure as pointer. This makes it consistent with the rest of
the code and helps to reuse this function in other parts.
2013-11-04 09:28:33 +02:00
Andrei Emeltchenko
59dcd70722 android/haltest: Export print property
Export property printing debug function.
2013-11-04 09:28:16 +02:00
Marcel Holtmann
e996efa8ed monitor: Fix decoding of link policy values 2013-11-03 02:09:04 -08:00
Marcel Holtmann
d590e1314c monitor: Improve device id decoding 2013-11-03 01:56:21 -08:00
Luiz Augusto von Dentz
bcbbe2d1f3 android/socket: Log not implemented HAL functions
This makes it easier to spot which functions the HAL is calling.
2013-11-01 16:40:40 +02:00
Luiz Augusto von Dentz
da48ebbe18 android/hid: Log not implemented HAL functions
This makes it easier to spot which functions the HAL is calling.
2013-11-01 16:40:38 +02:00
Luiz Augusto von Dentz
bb7f3b6304 android/adapter: Log not implemented properties
This makes it easier to stop which functions the HAL is calling.
2013-11-01 16:40:35 +02:00
Andrei Emeltchenko
33323282cd android/daemon: Add handler for device disconnected
Send event to callback thread which shall call acl state change callback.
2013-11-01 16:39:07 +02:00
Andrei Emeltchenko
c70142b3f4 android/hal: Add debug prints for every HAL callback
This allows us to trace callbacks to Java.
2013-11-01 16:39:07 +02:00
Andrei Emeltchenko
2a33a44431 android/daemon: Add debug handlers for unhandled mgmt event
Add debug prints to some mgmt events.
2013-11-01 16:39:07 +02:00