OSDN Git Service
Johan Hedberg [Wed, 6 Nov 2013 12:35:47 +0000 (14:35 +0200)]
monitor: Fix missing break in switch statement
Johan Hedberg [Wed, 6 Nov 2013 11:48:03 +0000 (13:48 +0200)]
tools/smp-tester: Clarify bthost callback naming
Johan Hedberg [Wed, 6 Nov 2013 11:27:02 +0000 (13:27 +0200)]
tools/smp-tester: Add initial SMP client test code
Johan Hedberg [Wed, 6 Nov 2013 11:25:59 +0000 (13:25 +0200)]
tools/smp-tester: Make basic parameters usable for both slave and master
Marcin Kraglak [Wed, 6 Nov 2013 10:59:22 +0000 (11:59 +0100)]
android: Implement class of device property callback
This will send adapter property with class of device
to notification socket.
Johan Hedberg [Wed, 6 Nov 2013 08:35:58 +0000 (10:35 +0200)]
android: Fix struct variable alignments in IPC header
Johan Hedberg [Wed, 6 Nov 2013 08:33:31 +0000 (10:33 +0200)]
android/hid: Fix unnecessary second check for cmd->buf_size value
Johan Hedberg [Wed, 6 Nov 2013 08:31:31 +0000 (10:31 +0200)]
android/hid: Fix get report buffer size variable name
Johan Hedberg [Wed, 6 Nov 2013 08:29:25 +0000 (10:29 +0200)]
android/hid: Fix camelcase variable names
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:18 +0000 (23:09 +0200)]
android/hid: Align hal hid struct variables properly
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:17 +0000 (23:09 +0200)]
android/hid: Handle uhid events
Handling few uhid events and described scenarios. OUTPUT and
FEATURE events are not yet handled.
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:16 +0000 (23:09 +0200)]
android/hid: Handle invalid parameters in HAL
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:15 +0000 (23:09 +0200)]
android/hid: Replace header checking magic number with defines
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:14 +0000 (23:09 +0200)]
android/hid: Handle get report notification in HAL
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:13 +0000 (23:09 +0200)]
android/hid: Implement hid set report in daemon
This patch requests hid device to set report.
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:12 +0000 (23:09 +0200)]
android/hid: Add missing set report parameters to ipc document
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:11 +0000 (23:09 +0200)]
android/hid: Implement hid get report in daemon
This patch requests hid device report and reads reply
message and sends notification to HAL.
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:10 +0000 (23:09 +0200)]
android/hid: Add hid event get report structure to HAL msg headers
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:09 +0000 (23:09 +0200)]
android/hid: Handle protocol mode notification in HAL
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:08 +0000 (23:09 +0200)]
android/hid: Implement hid set protocol in daemon
This patch requests hid device to set protocol mode and reads
reply message and sends notification to HAL.
Ravi kumar Veeramally [Tue, 5 Nov 2013 21:09:07 +0000 (23:09 +0200)]
android/hid: Implement hid get protocol in daemon
This patch requests hid device protocol mode and reads reply
message and sends notification to HAL.
Johan Hedberg [Wed, 6 Nov 2013 08:12:13 +0000 (10:12 +0200)]
android: Use more common 'failed' label instead of 'error'
Szymon Janc [Tue, 5 Nov 2013 16:07:38 +0000 (17:07 +0100)]
android: Add option to specify controller index to use
This will be usefull while testing on Linux where more controllers
can be present.
Szymon Janc [Tue, 5 Nov 2013 14:18:48 +0000 (15:18 +0100)]
android: Stop mainloop if reading index list failed
If reading index list failed mainloop should be stopped since adapter
init guard timer is not yet running.
Szymon Janc [Tue, 5 Nov 2013 14:18:47 +0000 (15:18 +0100)]
android: Stop mainloop if reading version failed
If reading mgmt version failed or kernel supported version is to old
mainloop should be stopped.
Szymon Janc [Tue, 5 Nov 2013 14:18:46 +0000 (15:18 +0100)]
android: Remove mgmt_version and mgmt_revision static variables
There is no need to keep those as Android daemon is expecting new
enough kernel to operate.
Szymon Janc [Tue, 5 Nov 2013 14:18:45 +0000 (15:18 +0100)]
android: Require at least 1.3 version of mgmt interface
Android daemon is not providing old kernels compatibility features.
Szymon Janc [Tue, 5 Nov 2013 18:22:59 +0000 (18:22 +0000)]
adapter: Move MGMT_VERSION macro to mgmt.h
This will be also used in Android daemon.
Szymon Janc [Tue, 5 Nov 2013 13:22:53 +0000 (14:22 +0100)]
monitor: Fallback to 80 columns terminal if not able to get real size
This makes num_columns always return valid number of columns, which is
expected by print_packets function.
This also fix garbage prints while using btmon via adb shell.
Marcin Kraglak [Tue, 5 Nov 2013 13:21:37 +0000 (14:21 +0100)]
android: Pass found uuids to remote_device_properties_cb
Send remote device's uuids in remote_device_properties_cb.
This patch will pack found uuids to buffer containing property
with list of uuids and send it to notification socket.
Marcin Kraglak [Tue, 5 Nov 2013 13:21:36 +0000 (14:21 +0100)]
android: Fetch remote device uuids after pairing
Android framework expects list of bonded device's uuids.
Start sdp query after setting bond state to BOND_STATE_BONBED.
Marcin Kraglak [Tue, 5 Nov 2013 13:21:35 +0000 (14:21 +0100)]
android: Initial implementation of get_remote_services
This patch implements method to retrieve remote device sdp records.
Caching struct is implemented for adding fetched uuids to list.
sdp_req_list will contain list of devices which are asked for records.
Function get_remote_services will check if device is on list, and will
start sdp procedure.
Luiz Augusto von Dentz [Tue, 5 Nov 2013 13:12:20 +0000 (15:12 +0200)]
android/hid: Fix passing wrong adapter address to bt_io_listen
Jerzy Kasenberg [Tue, 5 Nov 2013 11:48:41 +0000 (12:48 +0100)]
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).
Ravi kumar Veeramally [Tue, 5 Nov 2013 11:38:03 +0000 (13:38 +0200)]
android/hid: Add hid event proto mode structure to hal msg headers
Johan Hedberg [Tue, 5 Nov 2013 11:40:10 +0000 (13:40 +0200)]
tools/smp-tester: Add simple success test case
Szymon Janc [Tue, 5 Nov 2013 10:50:13 +0000 (11:50 +0100)]
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]
Luiz Augusto von Dentz [Tue, 5 Nov 2013 10:43:43 +0000 (12:43 +0200)]
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.
Andrei Emeltchenko [Tue, 5 Nov 2013 10:08:48 +0000 (12:08 +0200)]
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.
Jerzy Kasenberg [Tue, 5 Nov 2013 09:56:22 +0000 (10:56 +0100)]
android/client: Change adapter to bluetooth
This fixes all places where adapter should be changed to
bluetooth.
Jerzy Kasenberg [Tue, 5 Nov 2013 09:56:21 +0000 (10:56 +0100)]
android/client: Fix style and typos
Fixes spelling errors and white space style errors.
Andrei Emeltchenko [Tue, 5 Nov 2013 09:46:52 +0000 (11:46 +0200)]
android: Add btmon to Android Makefile
Build btmon for Android image. btmon requires fresh bionic to build.
Johan Hedberg [Tue, 5 Nov 2013 09:33:27 +0000 (11:33 +0200)]
tools: Add smp-tester for automated LE SMP end-to-end tests
Johan Hedberg [Tue, 5 Nov 2013 09:31:19 +0000 (11:31 +0200)]
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.
Ravi kumar Veeramally [Mon, 4 Nov 2013 22:20:06 +0000 (00:20 +0200)]
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.
Ravi kumar Veeramally [Mon, 4 Nov 2013 22:20:05 +0000 (00:20 +0200)]
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.
Szymon Janc [Mon, 4 Nov 2013 15:34:25 +0000 (16:34 +0100)]
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.
Szymon Janc [Mon, 4 Nov 2013 15:34:24 +0000 (16:34 +0100)]
android: Implement scan_mode property in get property command
This will allow to query current state of scan mode property.
Szymon Janc [Mon, 4 Nov 2013 15:34:23 +0000 (16:34 +0100)]
android: Add support for handling get properties commands
When this commands is received all properties shall be reported to HAL.
Andrei Emeltchenko [Mon, 4 Nov 2013 13:22:38 +0000 (15:22 +0200)]
android/client: Fix printing not NULL terminated strings
Android passes not NULL terminated strings.
Andrei Emeltchenko [Mon, 4 Nov 2013 13:22:37 +0000 (15:22 +0200)]
android/daemon: Fix setting adapter name
Android use the full string returned even if we terminate it with '\0'.
Andrei Emeltchenko [Mon, 4 Nov 2013 13:22:36 +0000 (15:22 +0200)]
android/daemon: Clean up get_address name
Make function name consistent with the rest of the code.
Andrei Emeltchenko [Mon, 4 Nov 2013 13:22:35 +0000 (15:22 +0200)]
android/daemon: Implement get adapter name
Use adapter_name_changed for get_property call.
Jerzy Kasenberg [Mon, 4 Nov 2013 11:33:44 +0000 (12:33 +0100)]
android/client: Fix annoying delay in command line
Move fflush(stdout) to after prints and user input.
This removes delay of showing prompt.
Jerzy Kasenberg [Mon, 4 Nov 2013 11:29:39 +0000 (12:29 +0100)]
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.
Luiz Augusto von Dentz [Mon, 4 Nov 2013 10:56:57 +0000 (12:56 +0200)]
android/pan: Add initial code for handling commands
Luiz Augusto von Dentz [Mon, 4 Nov 2013 10:56:56 +0000 (12:56 +0200)]
android: Add initial skeleton for pan in the daemon
Luiz Augusto von Dentz [Mon, 4 Nov 2013 10:56:55 +0000 (12:56 +0200)]
android/a2dp: Add initial code for handling commands
Luiz Augusto von Dentz [Mon, 4 Nov 2013 10:56:54 +0000 (12:56 +0200)]
android: Add initial skeleton for a2dp in the daemon
Giovanni Campagna [Thu, 3 Oct 2013 11:03:49 +0000 (13:03 +0200)]
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.
Jerzy Kasenberg [Mon, 4 Nov 2013 10:06:13 +0000 (11:06 +0100)]
android: Bump PLATFORM_SDK_VERSION to KitKat
This updates PLATFORM_SDK_VERSION to 19 since
bluetooth headers were updated already.
Szymon Janc [Mon, 4 Nov 2013 09:59:59 +0000 (10:59 +0100)]
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.
Jerzy Kasenberg [Mon, 4 Nov 2013 09:55:40 +0000 (10:55 +0100)]
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.
Luiz Augusto von Dentz [Mon, 4 Nov 2013 09:34:58 +0000 (11:34 +0200)]
android: Add the missing HAVE_CONFIG_H check daemon files
Luiz Augusto von Dentz [Mon, 4 Nov 2013 09:34:57 +0000 (11:34 +0200)]
android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible
Marcin Kraglak [Mon, 4 Nov 2013 09:31:38 +0000 (10:31 +0100)]
Fix incorrect result type in set_adapter_name
Marcin Kraglak [Mon, 4 Nov 2013 08:06:48 +0000 (09:06 +0100)]
android: Add stub of get_remote_services command
Marcin Kraglak [Mon, 4 Nov 2013 08:06:47 +0000 (09:06 +0100)]
android/hal: Send get_remote_services cmd
Marcin Kraglak [Mon, 4 Nov 2013 07:30:30 +0000 (08:30 +0100)]
android: Fix typo in get_remote_services command
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)
...