OSDN Git Service
Andrei Emeltchenko [Fri, 1 Nov 2013 15:19:19 +0000 (17:19 +0200)]
android/daemon: Add logs to trace failed cmd
Andrei Emeltchenko [Fri, 1 Nov 2013 15:19:16 +0000 (17:19 +0200)]
android/hal: Add extra logs to HAL
Use exported functions from hal test tool to print properties.
Andrei Emeltchenko [Fri, 1 Nov 2013 15:19:15 +0000 (17:19 +0200)]
android/haltest: Fix print device name
Andrei Emeltchenko [Fri, 1 Nov 2013 15:19:14 +0000 (17:19 +0200)]
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.
Andrei Emeltchenko [Fri, 1 Nov 2013 15:19:13 +0000 (17:19 +0200)]
android/haltest: Export print property
Export property printing debug function.
Marcel Holtmann [Sun, 3 Nov 2013 10:09:04 +0000 (02:09 -0800)]
monitor: Fix decoding of link policy values
Marcel Holtmann [Sun, 3 Nov 2013 09:56:21 +0000 (01:56 -0800)]
monitor: Improve device id decoding
Luiz Augusto von Dentz [Fri, 1 Nov 2013 13:52:45 +0000 (15:52 +0200)]
android/socket: Log not implemented HAL functions
This makes it easier to spot which functions the HAL is calling.
Luiz Augusto von Dentz [Fri, 1 Nov 2013 13:52:44 +0000 (15:52 +0200)]
android/hid: Log not implemented HAL functions
This makes it easier to spot which functions the HAL is calling.
Luiz Augusto von Dentz [Fri, 1 Nov 2013 13:52:43 +0000 (15:52 +0200)]
android/adapter: Log not implemented properties
This makes it easier to stop which functions the HAL is calling.
Andrei Emeltchenko [Fri, 1 Nov 2013 13:41:44 +0000 (15:41 +0200)]
android/daemon: Add handler for device disconnected
Send event to callback thread which shall call acl state change callback.
Andrei Emeltchenko [Fri, 1 Nov 2013 13:41:43 +0000 (15:41 +0200)]
android/hal: Add debug prints for every HAL callback
This allows us to trace callbacks to Java.
Andrei Emeltchenko [Fri, 1 Nov 2013 13:41:42 +0000 (15:41 +0200)]
android/daemon: Add debug handlers for unhandled mgmt event
Add debug prints to some mgmt events.
Andrei Emeltchenko [Fri, 1 Nov 2013 13:41:41 +0000 (15:41 +0200)]
android/hal: Handle acl_state_changed event
Andrei Emeltchenko [Fri, 1 Nov 2013 13:41:40 +0000 (15:41 +0200)]
android/daemon: Implement mgmt device connected event
Send HAL_EV_ACL_STATE_CHANGED event to HAL through IPC.
Andrei Emeltchenko [Fri, 1 Nov 2013 13:41:39 +0000 (15:41 +0200)]
android/ipc: Update HAL IPC header
Add ACL states to the header.
Marcel Holtmann [Fri, 1 Nov 2013 13:25:30 +0000 (06:25 -0700)]
android: Fix up the GATT client to handle KitKat API changes
Marcel Holtmann [Fri, 1 Nov 2013 13:24:55 +0000 (06:24 -0700)]
android: Copy the KitKat Bluetooth hardware headers
Luiz Augusto von Dentz [Fri, 1 Nov 2013 13:08:41 +0000 (15:08 +0200)]
android/hid: Add handling of HAL_EV_HID_INFO
Luiz Augusto von Dentz [Fri, 1 Nov 2013 13:08:40 +0000 (15:08 +0200)]
android/hal-hidhost: Add implemention of .hid_info_cb
Luiz Augusto von Dentz [Fri, 1 Nov 2013 13:08:39 +0000 (15:08 +0200)]
android/hid: Fix passing vendor id as version to uHID
Luiz Augusto von Dentz [Fri, 1 Nov 2013 13:08:38 +0000 (15:08 +0200)]
android/hid: Rename hdev vars to dev
Marcel Holtmann [Fri, 1 Nov 2013 13:07:42 +0000 (06:07 -0700)]
android: Make system-emulator start daemon only once
Andrei Emeltchenko [Fri, 1 Nov 2013 11:46:38 +0000 (13:46 +0200)]
android/daemon: Update CoD and RSSI only when they exist
This avoid sending zeroed Class of Device and making it unidentified.
...
prop[0]: type=BT_PROPERTY_CLASS_OF_DEVICE len=4 val=000000
prop[1]: type=BT_PROPERTY_REMOTE_RSSI len=1 val=-75
prop[2]: type=BT_PROPERTY_BDNAME len=249 val=Microsoft Bluetooth Number Pad
...
Marcel Holtmann [Fri, 1 Nov 2013 10:53:56 +0000 (03:53 -0700)]
android: Add support for device id information
Marcel Holtmann [Fri, 1 Nov 2013 10:51:46 +0000 (03:51 -0700)]
android: Add the missing HAVE_CONFIG_H check to adapter.c
Marcel Holtmann [Fri, 1 Nov 2013 10:40:05 +0000 (03:40 -0700)]
android: Run through valgrind with the system-emulator
Marcel Holtmann [Fri, 1 Nov 2013 10:18:47 +0000 (03:18 -0700)]
android: Allow connect() for property_set to fail
Ravi kumar Veeramally [Fri, 1 Nov 2013 08:58:44 +0000 (10:58 +0200)]
android/hid: Initial implementation for uHID
This patch reads data on interrupt channel and feeds into uHID.
Kernel will take care rest of the things and connects bt mouse
and keyboard:
[168988.557647] input: bluez-input-device as /devices/virtual/misc/uhid/input54
Ravi kumar Veeramally [Fri, 1 Nov 2013 08:58:43 +0000 (10:58 +0200)]
android/hid: Fetch record before attempting to connect
This patch fetch HID record and store the information needed by uHID.
Andrei Emeltchenko [Thu, 31 Oct 2013 15:30:18 +0000 (17:30 +0200)]
android/hid: Shutdown HID L2CAP sockets on unregister
Fixes address already in use issue if we reenable HID.
...
bluetoothd[2894]: Failed to listen on ctrl channel:
l2cap_bind: Address already in use (98)
...
Marcel Holtmann [Thu, 31 Oct 2013 21:56:35 +0000 (14:56 -0700)]
android: Monitor child process termination
Marcel Holtmann [Thu, 31 Oct 2013 20:21:48 +0000 (13:21 -0700)]
android: Disable connectable and discoverable before power on
Marcel Holtmann [Thu, 31 Oct 2013 19:42:22 +0000 (12:42 -0700)]
android: Switch controller off when shutting the daemon down
Marcel Holtmann [Thu, 31 Oct 2013 19:35:07 +0000 (12:35 -0700)]
android: Power off controller when daemon gets killed
Marcel Holtmann [Thu, 31 Oct 2013 19:17:58 +0000 (12:17 -0700)]
android: Don't use abort() for exit
Grzegorz Kolodziejczyk [Thu, 31 Oct 2013 15:26:22 +0000 (16:26 +0100)]
android: Add support for setting adapters name
Marcel Holtmann [Thu, 31 Oct 2013 19:14:16 +0000 (12:14 -0700)]
android: No need for volatile sig_atomic_t when using signalfd
Marcel Holtmann [Thu, 31 Oct 2013 19:06:18 +0000 (12:06 -0700)]
android: Exit daemon if no controller is found within 5 seconds
Marcel Holtmann [Thu, 31 Oct 2013 16:51:29 +0000 (09:51 -0700)]
android: Add system-emulator for wrapping daemon start
Andrei Emeltchenko [Thu, 31 Oct 2013 14:45:05 +0000 (16:45 +0200)]
android/hid: Add error message to error print
Andrei Emeltchenko [Thu, 31 Oct 2013 14:45:04 +0000 (16:45 +0200)]
android/hidhost: Fix not unregistering HID
If HID is not unregistered it cannot be registered again and we get
following error:
...
E/BluetoothHidServiceJni( 2849): Failed to initialize Bluetooth HID, status: 1
...
Jakub Tyszkowski [Thu, 31 Oct 2013 14:25:34 +0000 (15:25 +0100)]
android: Add support for remote device name confirmation
Jakub Tyszkowski [Thu, 31 Oct 2013 14:25:33 +0000 (15:25 +0100)]
android: Add device found notifications passing
This patch adds remote device found and remote device properties changed
notifications passing using IPC.
Jakub Tyszkowski [Thu, 31 Oct 2013 14:25:32 +0000 (15:25 +0100)]
android: Add name property length define
Add define for adapter and remote device name property.
Jakub Tyszkowski [Thu, 31 Oct 2013 14:25:31 +0000 (15:25 +0100)]
android: Add device discovery mgmt event handling
This patch provides basic handling of device found events from management
interface. Temporary device adress list is being used to determine which
devices has already been reported and device property changed event should
be sent instead of device found event.
Jakub Tyszkowski [Thu, 31 Oct 2013 14:25:30 +0000 (15:25 +0100)]
android: Add support for starting and cancelling device discovery
Android will cancel ongoing discovery after some period of time so there
is no need for another timeout inside the daemon itself.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:15 +0000 (11:45 +0100)]
android/client: Add GATT server methods
This patch implements GATT server method calls.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:14 +0000 (11:45 +0100)]
android/client: Add GATT server callbacks code
This patch adds callbacks code for GATT server interface.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:13 +0000 (11:45 +0100)]
android/client: Add tab completion to GATT client
This patch adds tab completion to GATT client methods.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:12 +0000 (11:45 +0100)]
android/client: Add GATT complex type parsing
This patch adds code to parse: UUID, service ID, characteristic ID,
and general hex string filed.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:11 +0000 (11:45 +0100)]
android/client: Add GATT client method calls
This patch adds code for all GATT client methods.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:10 +0000 (11:45 +0100)]
android/client: Add helper macros to verify args
This patch adds bunch of macros that will simplify
common arguments checking for methods.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:09 +0000 (11:45 +0100)]
android/client: Add init/cleanup for GATT
This patch adds gatt functions code.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:08 +0000 (11:45 +0100)]
android/client: Add complex GATT type formating
This adds formating for complex types in GATT.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:07 +0000 (11:45 +0100)]
android/client: Add GATT client callbacks code
This adds callbacks code, mostly printing.
Complex formating function not implemented yet.
Jerzy Kasenberg [Thu, 31 Oct 2013 10:45:06 +0000 (11:45 +0100)]
android/client: Add skeleton for GATT interface
This patch adds empty functions for all gatt methods
and callbacks.
Szymon Janc [Thu, 31 Oct 2013 13:22:01 +0000 (14:22 +0100)]
android/client: Don't align name property while printing
Received name property is guaranteed to be NULL terminated so there is
no need to use length specifier. This also fix really long space while
printing due to text alignment to the right.
Szymon Janc [Thu, 31 Oct 2013 13:15:09 +0000 (14:15 +0100)]
android: Set pairable mode only if it is not set
There is no need to set already set setting.
Szymon Janc [Thu, 31 Oct 2013 13:15:08 +0000 (14:15 +0100)]
android: Always enable SSP if supported by controller
There is no HAL function to enable/disable SSP so always enable it if
supported by controller.
Andrei Emeltchenko [Thu, 31 Oct 2013 12:42:35 +0000 (14:42 +0200)]
android/daemon: Fix not reporting scan mode to Java
After set_adapter_property() higher layer expects callback to be returned
even if property is not changes. Otherwise Java timeouts and reset Bluetooth
enetring to the loop.
...
BluetoothAdapterState( 2850): Timeout will setting scan mode..
Continuing with disable...
...
Andrei Emeltchenko [Thu, 31 Oct 2013 11:52:38 +0000 (13:52 +0200)]
android/daemon: Fix error setting property
Do not return error setting property which is already set. This fixes
bug with set_scan_mode which might return HAL_STATUS_DONE.
Luiz Augusto von Dentz [Thu, 31 Oct 2013 12:19:48 +0000 (14:19 +0200)]
android/hid: Add handling of HAL_EV_HID_CONN_STATE
This patches generate proper events when the connection state changes:
>hidhost connect
BlueZ D: android/hal-hidhost.c:hh_connect()
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_CONNECTING
if_hh->connect: BT_STATUS_SUCCESS
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_CONNECTED
>hidhost disconnect
BlueZ D: android/hal-hidhost.c:hh_disconnect()
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_DISCONNECTING
if_hh->disconnect: BT_STATUS_SUCCESS
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_DISCONNECTED
Luiz Augusto von Dentz [Thu, 31 Oct 2013 12:19:47 +0000 (14:19 +0200)]
android/hal-hidhost: Add implementation of .connection_state_cb
Luiz Augusto von Dentz [Thu, 31 Oct 2013 12:19:46 +0000 (14:19 +0200)]
android/hid: Add handling of incoming connections
Jerzy Kasenberg [Thu, 31 Oct 2013 10:56:26 +0000 (11:56 +0100)]
android/client: Fix crash in get_profile_interface
This fixes crash due to uncheck input from user.
Szymon Janc [Thu, 31 Oct 2013 10:23:33 +0000 (11:23 +0100)]
android: Add support for handling remove bond command
Bond state change is send when command complete for unpair device is
received and status was success.
Szymon Janc [Wed, 30 Oct 2013 15:30:54 +0000 (16:30 +0100)]
android/hal: Add support for repacking received IPC data to HAL data
Some HAL defined types that are passed as type-len-value in properties
callback needs to be repacked at runtime to match defined types.
This is due to HAL using data types without strict refined sizes like
enums or unpacked structures. This is needed only if data is passed as
TLV. With data passed to callbacks as parameters compiler will handle
types convertion.
Currently only enum types are supported.
Andrei Emeltchenko [Thu, 31 Oct 2013 08:37:20 +0000 (10:37 +0200)]
android/haltest: Fix bug when building for Android 4.2.2
Since I started to use system Android headers instead of local this
bug was found.
Andrei Emeltchenko [Thu, 31 Oct 2013 08:37:19 +0000 (10:37 +0200)]
android/haltest: Use Android system headers instead of local
Szymon Janc [Thu, 31 Oct 2013 02:55:54 +0000 (02:55 +0000)]
android: Add support for handling SSP reply command
Szymon Janc [Thu, 31 Oct 2013 02:55:53 +0000 (02:55 +0000)]
android: Add support for handling pin reply command
Szymon Janc [Thu, 31 Oct 2013 02:55:52 +0000 (02:55 +0000)]
android: Add support for notify variant in SSP request event
Szymon Janc [Thu, 31 Oct 2013 02:55:51 +0000 (02:55 +0000)]
android: Add support for entry variant in SSP request event
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.