OSDN Git Service
Szymon Janc [Thu, 31 Oct 2013 02:55:50 +0000 (02:55 +0000)]
android: Add initial support for sending SSP request event
Only consent and confirm variants are supported in this patch.
Szymon Janc [Thu, 31 Oct 2013 02:55:49 +0000 (02:55 +0000)]
android: Add support for sending pin code request
Szymon Janc [Thu, 31 Oct 2013 02:55:47 +0000 (02:55 +0000)]
android: Add support for handling cancel bond command
Szymon Janc [Thu, 31 Oct 2013 02:55:46 +0000 (02:55 +0000)]
android: Add support for handling create bond command
Szymon Janc [Thu, 31 Oct 2013 02:55:45 +0000 (02:55 +0000)]
android: Set default IO capability on daemon start
There is no HAL function for setting IO capabilities so this is
hardcoded to DisplayYesNo as Android devices usually have screen
and input.
Szymon Janc [Thu, 31 Oct 2013 02:55:44 +0000 (02:55 +0000)]
android: Make load_link_keys function load keys
GSlist passed is expected to hold mgmt_link_key_info structures.
Szymon Janc [Thu, 31 Oct 2013 02:55:43 +0000 (02:55 +0000)]
android: Add support for handling new link key mgmt event
When link key is emitted by kernel bond state change notification is
send to HAL. Storing link key is not yet implemented.
Szymon Janc [Thu, 31 Oct 2013 02:55:42 +0000 (02:55 +0000)]
android: Add missing bond state definition to IPC header
Szymon Janc [Thu, 31 Oct 2013 02:55:41 +0000 (02:55 +0000)]
android: Add missing bonding state definitions to IPC specification
Andrei Emeltchenko [Wed, 30 Oct 2013 15:51:24 +0000 (17:51 +0200)]
android: Use Android headers instead of local ones
Add path to Android libhardware library headers
Marcin Kraglak [Wed, 30 Oct 2013 15:16:33 +0000 (16:16 +0100)]
android: Initial implementation of socket interface
Add stub implementation of socket interace on daemon side.
Marcin Kraglak [Wed, 30 Oct 2013 15:16:32 +0000 (16:16 +0100)]
android/hal: Add initial socket implementation
Added socket api opcodes and structures and its implementation
in hal-sock.c.
Jerzy Kasenberg [Wed, 30 Oct 2013 14:47:22 +0000 (15:47 +0100)]
android/client: Define Android version for host
This patch defines PLATFORM_SDK_VERSION like it is handled in
Android.mk. This value corresponds to current copy of headers
from Android committed to bluez.
Luiz Augusto von Dentz [Wed, 30 Oct 2013 14:24:54 +0000 (16:24 +0200)]
android/hid: Fix not cleanup properly after disconnect
If the device is disconnected it should be removed from the list of
connected devices and free its data.
Jerzy Kasenberg [Wed, 30 Oct 2013 14:22:38 +0000 (15:22 +0100)]
android: Fix compiler flags with Android version
This fixes commit that removed PLATFORM_SDK_VERSION when building
haltest. Now all android targets get this define.
Johan Hedberg [Wed, 30 Oct 2013 14:12:32 +0000 (16:12 +0200)]
tools/mgmt-tester: Rename 'LE-only' to 'LE' for nicer logs
Johan Hedberg [Wed, 30 Oct 2013 13:53:41 +0000 (15:53 +0200)]
tools/mgmt-tester: Add LE test for set_connectable when limited discoverable
We also need to update the order of the initial settings since limited
discoverable is only allowed when powered on.
Johan Hedberg [Wed, 30 Oct 2013 13:44:19 +0000 (15:44 +0200)]
tools/mgmt-tester: Add LE test for connectable off when discoverable
Johan Hedberg [Wed, 30 Oct 2013 13:33:56 +0000 (15:33 +0200)]
tools/mgmt-tester: Add basic LE-only discoverable on test case
Johan Hedberg [Wed, 30 Oct 2013 13:26:06 +0000 (15:26 +0200)]
tools/mgmt-tester: Add basic LE-only limited discoverable on test case
Johan Hedberg [Wed, 30 Oct 2013 13:10:04 +0000 (15:10 +0200)]
tools/mgmt-tester: Add basic BR/EDR limited discoverable on test cases
Johan Hedberg [Wed, 30 Oct 2013 12:47:46 +0000 (14:47 +0200)]
tools/mgmt-tester: Fix sending right set_discoverable parameters in setup
Johan Hedberg [Wed, 30 Oct 2013 12:43:47 +0000 (14:43 +0200)]
tools/mgmt-tester: Fix calling test_setup twice
Jakub Tyszkowski [Wed, 30 Oct 2013 10:00:32 +0000 (11:00 +0100)]
android: Add missing discovery state definitions to IPC header
Jakub Tyszkowski [Wed, 30 Oct 2013 10:00:31 +0000 (11:00 +0100)]
android/hal: Add device state changed event handler
This is used to report property change of already reported remote
device.
Jakub Tyszkowski [Wed, 30 Oct 2013 10:00:30 +0000 (11:00 +0100)]
android/hal: Add device found event handler
This is called when new remote device is found.
Jakub Tyszkowski [Wed, 30 Oct 2013 10:00:29 +0000 (11:00 +0100)]
android/hal: Extract bt property repacking code for further reuse
This extracted part of code can be reused for repacking remote device
properties.
Jakub Tyszkowski [Wed, 30 Oct 2013 10:00:28 +0000 (11:00 +0100)]
android/hal: Add support for handling discovery state change event
Jakub Tyszkowski [Wed, 30 Oct 2013 10:00:27 +0000 (11:00 +0100)]
android/hal: Add support for start/cancel device discovery commands
Szymon Janc [Tue, 29 Oct 2013 15:23:38 +0000 (16:23 +0100)]
android: Suppress compiler warnings not used in autotools build
Android build system is enabling some additional warnings that are not
enabled when building with autotools. This avoids spurious warnings
while building on Android.
Szymon Janc [Tue, 29 Oct 2013 15:23:37 +0000 (16:23 +0100)]
android: Add common place for adding compiler flags in Android.mk
This will contain CFLAGS common for all BlueZ code.
Jerzy Kasenberg [Wed, 30 Oct 2013 09:31:12 +0000 (10:31 +0100)]
android/client: Fix crash in tab completion
When user pressed tab on third or later argument when
first two did not make sense tool crashed.
Now method is checked for NULL before accessing help field.
Szymon Janc [Wed, 30 Oct 2013 09:05:16 +0000 (10:05 +0100)]
android: Add README file with instructions
This file cotains help on how BlueZ for Android should be build, run
and test. Some hints and examples on how BlueZ can be intergrated into
Android are present as well.
Luiz Augusto von Dentz [Tue, 29 Oct 2013 14:07:14 +0000 (16:07 +0200)]
audio/AVRCP: Always assign a player to TG role
Currently the code does not assign a player if version is bellow 1.3,
but sometimes the version may not be initialized correctly e.g: record
could not be fetch.
Futhermore by assigning a player for 1.0 CT it won't break backward
compatibility as no commands will be sent but adds the possibility to
respond properly in case the CT is sending commands above its own
version which is a violation of the spec but unfortunately there exists
such stacks on the market.
Szymon Janc [Tue, 29 Oct 2013 12:49:05 +0000 (13:49 +0100)]
android/hal: Add support for handling SSP request event
Szymon Janc [Tue, 29 Oct 2013 12:49:04 +0000 (13:49 +0100)]
android/hal: Add support for handling pin request event
Andrei Emeltchenko [Tue, 29 Oct 2013 12:48:41 +0000 (14:48 +0200)]
android: Fix build errors
The patch fixes following issues when building:
Make links to sco.h and rfcomm.h needed for Android sockets.
...
btio.c:39:30: fatal error: bluetooth/rfcomm.h: No such file or directory
compilation terminated.
...
btio.c:40:27: fatal error: bluetooth/sco.h: No such file or directory
compilation terminated.
...
Szymon Janc [Tue, 29 Oct 2013 11:52:40 +0000 (12:52 +0100)]
android/hal: Add support for handling bond state change event
Szymon Janc [Tue, 29 Oct 2013 11:52:39 +0000 (12:52 +0100)]
android: Update IPC headers to match SSP and PIN requests events
Name should be 249 bytes so it is always NULL terminated string.
Class of device is send as uint32. This will allow to make simple
passing of data in HAL library without need of copying data.
Szymon Janc [Tue, 29 Oct 2013 11:52:38 +0000 (12:52 +0100)]
android: Define class of device as four bytes in IPC doc
For PIN and SSP requests callback define CoD as 4 bytes. This will
allow HAL library to pass CoD direclty to callback. Will also match
how CoD is passed as property.
Szymon Janc [Mon, 28 Oct 2013 16:37:06 +0000 (17:37 +0100)]
build: Move Makefile.android to android/Makefile.am
This will keep all Android related changes within android directory.
Szymon Janc [Mon, 28 Oct 2013 15:45:37 +0000 (16:45 +0100)]
android/hal: Set callbacks before initializing IPC
Notification thread is started on IPC init and it can be scheduled
before main thread.
Fix following crash on HAL init:
pid: 3392, tid: 3492, name: droid.bluetooth >>> com.android.bluetooth <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr
00000028
eax
00000000 ebx
ce047f64 ecx
ce0405d0 edx
f7763724
esi
cdf3af00 edi
f837fb90
xcs
00000023 xds
0000002b xes
0000002b xfs
00000000 xss
0000002b
eip
ce042289 ebp
cdf3a9f8 esp
cdf3a9e0 flags
00010292
backtrace:
#00 pc
00003289 /system/lib/hw/bluetooth.default.so (bt_thread_associate+25)
#01 pc
000015f8 /system/lib/hw/bluetooth.default.so (notification_handler+40)
#02 pc
0000f804 /system/lib/libc.so (__thread_entry+276)
#03 pc
0002999d /system/lib/libc.so
#04 pc
00082ae7 /system/lib/libdvm.so (dvmThreadSelf()+39)
#05 pc
00010db9 /system/lib/libc.so (pthread_mutex_unlock+25)
Ravi kumar Veeramally [Tue, 29 Oct 2013 09:48:16 +0000 (11:48 +0200)]
android: Add initial HID disconnect implementation.
Implemented basic HID disconnect method. Host disconnects
with bt device at L2CAP level.
Ravi kumar Veeramally [Tue, 29 Oct 2013 09:48:15 +0000 (11:48 +0200)]
android: Add initial HID connect implementation
Implemented basic HID connect method. Host connects to
bt device at L2CAP level.
Szymon Janc [Mon, 28 Oct 2013 13:45:14 +0000 (14:45 +0100)]
android: Use helper function to convert bdaddr to android format
This will make easier to understand why swap is needed.
Szymon Janc [Mon, 28 Oct 2013 13:45:13 +0000 (14:45 +0100)]
android: Add helper functions for converting bdaddr transmitted over IPC
Android holds Bluetooth address in reverse order comparing to
bluetoothd. Add convenient functions for converting to and from that
format.
Convertion will done on daemon side to keep HAL library simple.
Szymon Janc [Mon, 28 Oct 2013 12:46:15 +0000 (13:46 +0100)]
android: Remove bogus hal_rsp_register_module structure
Core service Register ID command doesn't return any parameter.
Szymon Janc [Mon, 28 Oct 2013 12:46:14 +0000 (13:46 +0100)]
android: Fix HAL_OP_REMOVE_BOND value
This is a copy-and-paste mistake.
Szymon Janc [Mon, 28 Oct 2013 12:46:12 +0000 (13:46 +0100)]
android: Rename send_adapter_name to send_adapter_address
Make function name match what it acctually does.
Jerzy Kasenberg [Mon, 28 Oct 2013 12:48:13 +0000 (13:48 +0100)]
android/client: Add clear screen on Cltr-L
This patch allows to clear screen on Ctrl-L.
Luiz Augusto von Dentz [Mon, 28 Oct 2013 12:09:06 +0000 (14:09 +0200)]
android/hal-pan: Add implementation of .disconnect
Luiz Augusto von Dentz [Mon, 28 Oct 2013 12:09:05 +0000 (14:09 +0200)]
android/hal-pan: Add implementation of .connect
Luiz Augusto von Dentz [Mon, 28 Oct 2013 12:09:04 +0000 (14:09 +0200)]
android/hal-pan: Add implementation of .get_local_role
Luiz Augusto von Dentz [Mon, 28 Oct 2013 12:09:03 +0000 (14:09 +0200)]
android/hal-pan: Add implementation of .enable
Luiz Augusto von Dentz [Mon, 28 Oct 2013 12:09:02 +0000 (14:09 +0200)]
android/hal-pan: Add implementation of .init
Jerzy Kasenberg [Mon, 28 Oct 2013 11:39:03 +0000 (12:39 +0100)]
android/client: Add completion for hf methods
This patch adds completion functions to handsfree methods.
Jerzy Kasenberg [Mon, 28 Oct 2013 11:39:02 +0000 (12:39 +0100)]
android/client: Add code for handsfree methods
This patch adds implementation of handsfree methods to haltest.
Jerzy Kasenberg [Mon, 28 Oct 2013 11:39:01 +0000 (12:39 +0100)]
android/client: Add code for handsfree callbacks
This adds implementation for handsfree callbacks.
Jerzy Kasenberg [Mon, 28 Oct 2013 11:39:00 +0000 (12:39 +0100)]
android/client: Add skeleton for handsfree calls
This patch adds skeleton for all methods of handsfree along with
all callbacks.
Luiz Augusto von Dentz [Mon, 28 Oct 2013 10:58:56 +0000 (12:58 +0200)]
android/hal-av: Fix command struct names
The command struct names should start with hal_cmd as the others.
Grzegorz Kolodziejczyk [Fri, 25 Oct 2013 15:52:07 +0000 (17:52 +0200)]
android/hal: Add support for send av disconnect command
This allows HAL to send av disconnect command
Grzegorz Kolodziejczyk [Fri, 25 Oct 2013 15:52:06 +0000 (17:52 +0200)]
android/hal: Add support for send av connect command
This allows HAL to send av connect command
Grzegorz Kolodziejczyk [Fri, 25 Oct 2013 15:52:05 +0000 (17:52 +0200)]
android/hal: Add support for handling av audio state event
Grzegorz Kolodziejczyk [Fri, 25 Oct 2013 15:52:04 +0000 (17:52 +0200)]
android/hal: Add support for handling av connection state event
Grzegorz Kolodziejczyk [Fri, 25 Oct 2013 15:52:03 +0000 (17:52 +0200)]
android/hal: Add skeleton for handling av notifications
Only default case is handled in skeleton
Grzegorz Kolodziejczyk [Fri, 25 Oct 2013 15:52:02 +0000 (17:52 +0200)]
android/hal: Fix typo in A2DP HAL service name
A2DP was misspelled as AD2P
Luiz Augusto von Dentz [Sun, 27 Oct 2013 11:57:11 +0000 (13:57 +0200)]
android: Rename setting_powered_changed to powered_changed
Szymon Janc [Fri, 25 Oct 2013 15:15:03 +0000 (17:15 +0200)]
android: Add support for notifying HAL about scan mode change
If connectable or discoverable setting changes property change is send
to HAL.
Szymon Janc [Fri, 25 Oct 2013 15:15:02 +0000 (17:15 +0200)]
android: Always set adapter to pairable on init
There is no operation to enable/disable pairable mode in Android HAL.
Szymon Janc [Fri, 25 Oct 2013 15:15:01 +0000 (17:15 +0200)]
android: Add support for setting adapter scan mode
This allows to set all modes defined: none, connectable and
'connectable and discoverable'.
Szymon Janc [Fri, 25 Oct 2013 15:15:00 +0000 (17:15 +0200)]
android: Add missing scan mode difinitions to IPC header
Szymon Janc [Fri, 25 Oct 2013 15:14:59 +0000 (17:14 +0200)]
android: Add initial code for handling adapter set property command
No commands are handled yet.
Szymon Janc [Fri, 25 Oct 2013 15:14:58 +0000 (17:14 +0200)]
android: Use common exit path for commands in bt_adapter_handle_cmd
All adapter commands return no parameters so putting error and success
response on common exit path. This will make function easier to follow
when more commands support will be added.
Andrei Emeltchenko [Fri, 25 Oct 2013 13:28:46 +0000 (16:28 +0300)]
android/hal: Use debug helpers from hal client
Debug helpers really helps a lot when debugging on Android target. The
patch uses helper functions already defined for hal test tool so
we do not need to reimplement them.
Andrei Emeltchenko [Fri, 25 Oct 2013 13:28:45 +0000 (16:28 +0300)]
android/hal: Use defined function to check that interface is ready
Andrei Emeltchenko [Fri, 25 Oct 2013 11:34:46 +0000 (14:34 +0300)]
android/hal: Associate thread to Java
Without thread assiciation callbacks are not received by Java.
They are blocked by JNI:
E/BluetoothServiceJni( 2844): Callback env check fail: env: 0x0, callback: 0x0
E/BluetoothServiceJni( 2844): Callback: 'adapter_state_change_callback' is not
called on the correct thread
Luiz Augusto von Dentz [Fri, 25 Oct 2013 12:22:24 +0000 (15:22 +0300)]
android: Rename ipc_send_error to ipc_send_rsp
Luiz Augusto von Dentz [Fri, 25 Oct 2013 12:13:48 +0000 (15:13 +0300)]
android: Rename ERROR enum and command to STATUS
This is more consistent with HAL interface which does name the enum as
bt_status_t and does use BT_STATUS prefix.
Szymon Janc [Fri, 25 Oct 2013 10:50:11 +0000 (12:50 +0200)]
android: Add initial support for handling adapter get property command
Support for HAL_BT_PROP_BDADDR property only.
Szymon Janc [Fri, 25 Oct 2013 10:50:10 +0000 (12:50 +0200)]
android: Add missing success status definition to IPC header
This is used in HAL callbacks to indicate success.
Szymon Janc [Fri, 25 Oct 2013 10:50:09 +0000 (12:50 +0200)]
android/hal: Add support for handling adapter properties change event
Szymon Janc [Fri, 25 Oct 2013 10:50:08 +0000 (12:50 +0200)]
android/hal: Add support for sending adapter SSP reply command
This allows HAL to reply to SSP request.
Szymon Janc [Fri, 25 Oct 2013 10:50:07 +0000 (12:50 +0200)]
android: Add missing SSP variant definitions to IPC header
Szymon Janc [Fri, 25 Oct 2013 10:50:06 +0000 (12:50 +0200)]
android: Add missing SSP Variant definitions to IPC document
Those are used to specify SSP association model.
Szymon Janc [Fri, 25 Oct 2013 10:50:05 +0000 (12:50 +0200)]
android/hal: Add support for sending adapter PIN reply command
This allows HAL to reply to PIN code request.
Szymon Janc [Fri, 25 Oct 2013 10:50:04 +0000 (12:50 +0200)]
android/hal: Add support for sending adapter remove bond command
This allows HAL to remove bonding.
Szymon Janc [Fri, 25 Oct 2013 10:50:03 +0000 (12:50 +0200)]
android/hal: Add support for sending cancel bond command
This allows HAL to cancel pending bonding.
Szymon Janc [Fri, 25 Oct 2013 10:50:02 +0000 (12:50 +0200)]
android/hal: Add support for sending create bond command
This allows HAL to start bonding.
Szymon Janc [Fri, 25 Oct 2013 10:50:01 +0000 (12:50 +0200)]
android/hal: Add support for sending adapter get properties command
This allows HAL to get all adapter properties.
Szymon Janc [Fri, 25 Oct 2013 10:50:00 +0000 (12:50 +0200)]
android/hal: Add support for sending adapter get property command
This allows HAL to get adapter property.
Szymon Janc [Fri, 25 Oct 2013 10:49:59 +0000 (12:49 +0200)]
android/hal: Add support for sending adapter set property command
This allows HAL to set adapter property.
Szymon Janc [Fri, 25 Oct 2013 10:49:58 +0000 (12:49 +0200)]
android: Add properties defines to hal-msg.h
Android HAL defines some properties as adapter specific, some as
device specific and some as common. We split those to separate
adapter and device properties hence overlaping or holes in codes.
Szymon Janc [Fri, 25 Oct 2013 10:49:57 +0000 (12:49 +0200)]
android: Remove not needed local variable in connect_hal
err variable was set but never read.
Jerzy Kasenberg [Fri, 25 Oct 2013 10:51:46 +0000 (12:51 +0200)]
android/client: Add processing of .haltestrc
This patch allows tool to read commands from .haltestrc.
So it is possible to call some functions that are typically used.
So user can have:
adapter init
adapter get_profile_interface socket
adapter get_profile_interface pan
adapter get_profile_interface hidhost
adapter get_profile_interface a2dp
pan init
av init
Jerzy Kasenberg [Fri, 25 Oct 2013 10:51:45 +0000 (12:51 +0200)]
android/client: Add source command to haltest
New command allows to read script file into tool and
execute its contents as if it was typed.
Jerzy Kasenberg [Fri, 25 Oct 2013 08:51:10 +0000 (10:51 +0200)]
android/client: Fix incorrect casts of addresses
This fixes printing of addresses.
If char is set to be signed (as it should) some addresses were
printed with leading FFFFFF.
Jerzy Kasenberg [Thu, 24 Oct 2013 09:50:20 +0000 (11:50 +0200)]
android/client: Fix various coding style issues
Mostly indentation of arguments in functions and calls.
Prefix p remove from puser/penum_func.
Some empty lines added after closing } when needed.
Magic number for string length changed to preprocessor define.
Added spaces after casts.
Andrei Emeltchenko [Thu, 24 Oct 2013 14:22:41 +0000 (17:22 +0300)]
android: Make haltest and bluetoothd depend on HAL lib
The patch makes haltest and bluetoothd depend on bluetooth.default target
which is already defined. glib dependency Android resolves itself.
Fixes issue that for the fresh build only bluetooth.default.so is built.
Szymon Janc [Thu, 24 Oct 2013 14:05:38 +0000 (16:05 +0200)]
android: Fix debug logs when running on Android
Current Android log backed dones't enable debug logs. Instead of coping
code from src/log.c, just use it on Android as well.
No functionality is lost as currently Android log backed only prints
to standard output.
Szymon Janc [Thu, 24 Oct 2013 09:54:24 +0000 (11:54 +0200)]
android: Use adapter index in mgmt functions
Instead of hardcoding index 0 use real index of adapter. This fix
using invalid index if adapter ID happens to be different than 0.
This should not happen on Android but is possible while testing on
Linux PC.