OSDN Git Service

android-x86/external-bluetooth-bluez.git
10 years agoandroid/hal: Add support for handling adapter properties change event
Szymon Janc [Fri, 25 Oct 2013 10:50:09 +0000 (12:50 +0200)]
android/hal: Add support for handling adapter properties change event

10 years agoandroid/hal: Add support for sending adapter SSP reply command
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.

10 years agoandroid: Add missing SSP variant definitions to IPC header
Szymon Janc [Fri, 25 Oct 2013 10:50:07 +0000 (12:50 +0200)]
android: Add missing SSP variant definitions to IPC header

10 years agoandroid: Add missing SSP Variant definitions to IPC document
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.

10 years agoandroid/hal: Add support for sending adapter PIN reply command
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.

10 years agoandroid/hal: Add support for sending adapter remove bond command
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.

10 years agoandroid/hal: Add support for sending cancel bond command
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.

10 years agoandroid/hal: Add support for sending create bond command
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.

10 years agoandroid/hal: Add support for sending adapter get properties command
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.

10 years agoandroid/hal: Add support for sending adapter get property command
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.

10 years agoandroid/hal: Add support for sending adapter set property command
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.

10 years agoandroid: Add properties defines to hal-msg.h
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.

10 years agoandroid: Remove not needed local variable in connect_hal
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.

10 years agoandroid/client: Add processing of .haltestrc
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

10 years agoandroid/client: Add source command to haltest
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.

10 years agoandroid/client: Fix incorrect casts of addresses
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.

10 years agoandroid/client: Fix various coding style issues
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.

10 years agoandroid: Make haltest and bluetoothd depend on HAL lib
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.

10 years agoandroid: Fix debug logs when running on Android
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.

10 years agoandroid: Use adapter index in mgmt functions
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.

10 years agoandroid: Use default adapter in adapter functions
Szymon Janc [Thu, 24 Oct 2013 09:54:23 +0000 (11:54 +0200)]
android: Use default adapter in adapter functions

There is no need to pass pointer to adapter between function as there
is only one adapter in android daemon. Also default_adapter is renamed
to adapter.

There is no need to pass adapter pointer as user data since there is
only one adapter present.

10 years agoandroid: Remove not needed adapter parameter from bt_adapter_ready
Szymon Janc [Thu, 24 Oct 2013 09:54:22 +0000 (11:54 +0200)]
android: Remove not needed adapter parameter from bt_adapter_ready

There is no need to pass adapter pointer in bt_adapter_ready callback
as there is only one present.

10 years agoandroid: Fix bt_adapter_init
Szymon Janc [Thu, 24 Oct 2013 09:54:21 +0000 (11:54 +0200)]
android: Fix bt_adapter_init

Make bt_adapter_init return void and use ready callback for error
reporting. This also fix returning incorrect status and invalid
mgmt_if unref (mgmt_send return 0 on error or >0 on success).

10 years agoandroid: Start command watch after notify channel is connected
Szymon Janc [Thu, 24 Oct 2013 09:54:20 +0000 (11:54 +0200)]
android: Start command watch after notify channel is connected

Daemon should start processing commands only after both communication
channels were connected.

10 years agoandroid/hal-msg: Reduce length of defines and struct names
Luiz Augusto von Dentz [Wed, 23 Oct 2013 11:14:09 +0000 (14:14 +0300)]
android/hal-msg: Reduce length of defines and struct names

The current defines and struct names are way too big and sometimes
incosistent.

10 years agoandroid: Enable AV interface
Andrei Emeltchenko [Thu, 24 Oct 2013 07:10:39 +0000 (10:10 +0300)]
android: Enable AV interface

Include av_interface to get_interface function.

10 years agoandroid: haltest: Enable av interface in test tool
Andrei Emeltchenko [Thu, 24 Oct 2013 07:10:38 +0000 (10:10 +0300)]
android: haltest: Enable av interface in test tool

10 years agoandroid: Add calls to av methods in haltest
Jerzy Kasenberg [Wed, 23 Oct 2013 14:38:25 +0000 (16:38 +0200)]
android: Add calls to av methods in haltest

This patch adds calls to av interface in haltest.

10 years agoandroid: Fix use of invalid service ID in response
Szymon Janc [Wed, 23 Oct 2013 13:46:26 +0000 (15:46 +0200)]
android: Fix use of invalid service ID in response

Adapter should use HAL_SERVICE_ID_BLUETOOTH service ID.

10 years agoandroid/hal: Verify if command response service ID match
Szymon Janc [Wed, 23 Oct 2013 13:46:25 +0000 (15:46 +0200)]
android/hal: Verify if command response service ID match

Received response service ID should match command service ID in
command, abort if it doesn't.

10 years agoandroid: Send notification on adapter power state change
Szymon Janc [Wed, 23 Oct 2013 13:46:24 +0000 (15:46 +0200)]
android: Send notification on adapter power state change

10 years agoandroid/hal: Fix crash while receiving notification
Szymon Janc [Wed, 23 Oct 2013 13:46:23 +0000 (15:46 +0200)]
android/hal: Fix crash while receiving notification

This fix following crash:
Invalid read of size 8
   at 0x408B33: notification_handler (hal-ipc.c:122)
   by 0x4E39E99: start_thread (pthread_create.c:308)
 Address 0x8 is not stack'd, malloc'd or (recently) free'd

10 years agoandroid: Add missing adapter state values to IPC header
Szymon Janc [Wed, 23 Oct 2013 13:46:22 +0000 (15:46 +0200)]
android: Add missing adapter state values to IPC header

10 years agoandroid: Add missing adapter state values to IPC documentation
Szymon Janc [Wed, 23 Oct 2013 13:46:21 +0000 (15:46 +0200)]
android: Add missing adapter state values to IPC documentation

10 years agoandroid: Use helper function for finding headers
Andrei Emeltchenko [Wed, 23 Oct 2013 13:42:17 +0000 (16:42 +0300)]
android: Use helper function for finding headers

Using helper function allows us to overcome possible location
change in future Android releases. This was inspired by
Szymon Janc's comment to my previous patch.

10 years agoandroid: Fix compilation error
Andrei Emeltchenko [Wed, 23 Oct 2013 12:53:05 +0000 (15:53 +0300)]
android: Fix compilation error

The patch fixes errors with undefined symbols EXIT_FAILURE on Android.

10 years agoandroid: Fix build error for Android
Lukasz Rymanowski [Wed, 23 Oct 2013 12:49:19 +0000 (14:49 +0200)]
android: Fix build error for Android

Android uses functions and defines from sys/capability.h which
requires additional include. However file capability.h shows up
in bionic in version Android 4.3, therefore we do check
PLATFORM_SDK_VERSION to no break builds of previous Android versions.
In previous Android version unistd.h contain this functionality.

10 years agoandroid: Make use of Android system headers instead of local one
Andrei Emeltchenko [Wed, 23 Oct 2013 12:44:41 +0000 (15:44 +0300)]
android: Make use of Android system headers instead of local one

Since the headers were copied to android/ folder Android build started
to use those instead of original Android system headers. The patch
puts Android system headers first.

10 years agoandroid: Add convenience variable for adapter bdaddr
Johan Hedberg [Wed, 23 Oct 2013 11:32:03 +0000 (14:32 +0300)]
android: Add convenience variable for adapter bdaddr

10 years agoandroid: Add support for registering and unregistering hid service
Szymon Janc [Wed, 23 Oct 2013 11:04:41 +0000 (13:04 +0200)]
android: Add support for registering and unregistering hid service

10 years agoandroid: Add initial code for socket service
Szymon Janc [Wed, 23 Oct 2013 11:04:40 +0000 (13:04 +0200)]
android: Add initial code for socket service

Only handle register/unregister for now.

10 years agoandroid: Add bt_adapter_get_address function
Szymon Janc [Wed, 23 Oct 2013 11:04:39 +0000 (13:04 +0200)]
android: Add bt_adapter_get_address function

It will be used to obtain adapter address.

10 years agoandroid: Add support for registering "bluetooth" service
Szymon Janc [Wed, 23 Oct 2013 11:04:38 +0000 (13:04 +0200)]
android: Add support for registering "bluetooth" service

10 years agoandroid: Add initial code for services unregister
Szymon Janc [Wed, 23 Oct 2013 11:04:37 +0000 (13:04 +0200)]
android: Add initial code for services unregister

This will be used to disable services on respective HAL cleanup calls.

10 years agoandroid: Add initial code for services register
Szymon Janc [Wed, 23 Oct 2013 11:04:36 +0000 (13:04 +0200)]
android: Add initial code for services register

This will be used to enable services on respective HAL init calls.

10 years agotools/l2cap-tester: Fix command reject expected responses
Johan Hedberg [Wed, 23 Oct 2013 11:10:33 +0000 (14:10 +0300)]
tools/l2cap-tester: Fix command reject expected responses

Invalid CID responses also contain the CID(s) that were invalid.

10 years agoandroid: Check that service is started
Andrei Emeltchenko [Wed, 23 Oct 2013 10:26:38 +0000 (13:26 +0300)]
android: Check that service is started

Add check that we are able to start Bluetooth service in
Android. If service is not started we should not try to connect to it.

10 years agoandroid/hid: Fix service type in error response
Johan Hedberg [Wed, 23 Oct 2013 10:22:18 +0000 (13:22 +0300)]
android/hid: Fix service type in error response

10 years agoandroid: Fix checking return of hal_ipc_cmd
Luiz Augusto von Dentz [Wed, 23 Oct 2013 10:16:17 +0000 (13:16 +0300)]
android: Fix checking return of hal_ipc_cmd

hal_ipc_cmd should never return negative values

10 years agoandroid: Use sock prefix
Luiz Augusto von Dentz [Tue, 22 Oct 2013 13:17:35 +0000 (16:17 +0300)]
android: Use sock prefix

This adds sock prefix for static function and replaces those that had
bt_sock as prefix.

10 years agoandroid: Use pan prefix instead of bt_pan
Luiz Augusto von Dentz [Tue, 22 Oct 2013 13:16:14 +0000 (16:16 +0300)]
android: Use pan prefix instead of bt_pan

This replaces the use of bt_pan as function prefix with pan.

10 years agoandroid/client: Fix various coding style issues
Johan Hedberg [Wed, 23 Oct 2013 10:04:40 +0000 (13:04 +0300)]
android/client: Fix various coding style issues

10 years agoandroid: Add calls to pan methods to haltest
Jerzy Kasenberg [Wed, 23 Oct 2013 08:34:58 +0000 (10:34 +0200)]
android: Add calls to pan methods to haltest

This patch allows to call pan methods in haltest.

10 years agoandroid: Add calls to socket methods in haltest
Jerzy Kasenberg [Wed, 23 Oct 2013 08:34:57 +0000 (10:34 +0200)]
android: Add calls to socket methods in haltest

This patch adds calls to socket methods.

10 years agoandroid: Create header links for lib
Andrei Emeltchenko [Wed, 23 Oct 2013 07:48:21 +0000 (10:48 +0300)]
android: Create header links for lib

BlueZ headers are referring as bluetooth/* for headers which are
located in lib/*. Create symlinks for now until we find better solution.

10 years agoandroid: Add initial code for hidhost set hid information
Ravi kumar Veeramally [Wed, 23 Oct 2013 07:41:59 +0000 (00:41 -0700)]
android: Add initial code for hidhost set hid information

This adds the initial code for hidhost .set_info interface

10 years agoandroid: Add initial code for hidhost send data
Ravi kumar Veeramally [Wed, 23 Oct 2013 07:41:58 +0000 (00:41 -0700)]
android: Add initial code for hidhost send data

This adds the initial code for hidhost .send_data interface

10 years agoandroid: Add initial code for hidhost get and set report
Ravi kumar Veeramally [Wed, 23 Oct 2013 07:41:57 +0000 (00:41 -0700)]
android: Add initial code for hidhost get and set report

This adds the initial code for hidhost .get_report and .set_report
interfaces

10 years agoandroid: Add initial code for hidhost get and set protocol
Ravi kumar Veeramally [Wed, 23 Oct 2013 07:41:56 +0000 (00:41 -0700)]
android: Add initial code for hidhost get and set protocol

This adds the initial code for hidhost .get_protocol and .set_protocol
interfaces

10 years agoandroid: Add initial code for hidhost virtual unplug
Ravi kumar Veeramally [Wed, 23 Oct 2013 07:41:55 +0000 (00:41 -0700)]
android: Add initial code for hidhost virtual unplug

This adds initial code for hidhost .virtual_unplug interface

10 years agoandroid: Return right from hal_ipc_cmd call in hal hid disconnect
Ravi kumar Veeramally [Wed, 23 Oct 2013 07:41:54 +0000 (00:41 -0700)]
android: Return right from hal_ipc_cmd call in hal hid disconnect

Do not print any error message and return from hal_ipc_cmd call in hal
hid disconnect

10 years agoandroid: Return right from hal_ipc_cmd call in hal hid connect
Ravi kumar Veeramally [Wed, 23 Oct 2013 07:41:53 +0000 (00:41 -0700)]
android: Return right from hal_ipc_cmd call in hal hid connect

Do not print any error message and return from hal_ipc_cmd call in hal
hid connect

10 years agoandroid: Fix compilation error for Android 4.2.2
Andrei Emeltchenko [Tue, 22 Oct 2013 10:37:08 +0000 (13:37 +0300)]
android: Fix compilation error for Android 4.2.2

On our current target the tools cannot be compiled.

10 years agoandroid: Move load_link_keys_complete() to a more sensible location
Johan Hedberg [Wed, 23 Oct 2013 07:30:57 +0000 (10:30 +0300)]
android: Move load_link_keys_complete() to a more sensible location

10 years agoandroid: Detect adapter removal in daemon and exit
Johan Hedberg [Wed, 23 Oct 2013 07:20:30 +0000 (10:20 +0300)]
android: Detect adapter removal in daemon and exit

10 years agoandroid: Add stubs for daemon-side HID support
Johan Hedberg [Wed, 23 Oct 2013 07:14:58 +0000 (10:14 +0300)]
android: Add stubs for daemon-side HID support

10 years agomonitor: Add support for decoding keypress notification command
Marcel Holtmann [Tue, 22 Oct 2013 22:27:38 +0000 (15:27 -0700)]
monitor: Add support for decoding keypress notification command

10 years agomonitor: Add support for decoding host flow control command
Marcel Holtmann [Tue, 22 Oct 2013 22:13:30 +0000 (15:13 -0700)]
monitor: Add support for decoding host flow control command

10 years agomonitor: Add support for decoding transmit power level command
Marcel Holtmann [Tue, 22 Oct 2013 21:37:34 +0000 (14:37 -0700)]
monitor: Add support for decoding transmit power level command

10 years agomonitor: Add support for decoding auto flush timeout commands
Marcel Holtmann [Tue, 22 Oct 2013 21:22:57 +0000 (14:22 -0700)]
monitor: Add support for decoding auto flush timeout commands

10 years agomonitor: Add support for num broadcast retransmission command
Marcel Holtmann [Tue, 22 Oct 2013 20:29:49 +0000 (13:29 -0700)]
monitor: Add support for num broadcast retransmission command

10 years agoadapter: Implement adapter enable and disable commands
Szymon Janc [Tue, 22 Oct 2013 16:47:56 +0000 (18:47 +0200)]
adapter: Implement adapter enable and disable commands

This allows HAL to enable and disable adapter.

10 years agoandroid/hal: Use correct service id for adapter commands
Szymon Janc [Tue, 22 Oct 2013 16:47:54 +0000 (18:47 +0200)]
android/hal: Use correct service id for adapter commands

This fix enabling and disabling adapter commands.

10 years agoadapter: Print debug message with IPC message header parameters
Szymon Janc [Tue, 22 Oct 2013 16:47:53 +0000 (18:47 +0200)]
adapter: Print debug message with IPC message header parameters

This is usefull while debugging HAL IPC.

10 years agoandroid: Add initial code for handling adapter commands
Szymon Janc [Tue, 22 Oct 2013 16:47:52 +0000 (18:47 +0200)]
android: Add initial code for handling adapter commands

No commands are handled yet.

10 years agoandroid: Handle mgmt changed events
Andrei Emeltchenko [Tue, 22 Oct 2013 16:47:51 +0000 (18:47 +0200)]
android: Handle mgmt changed events

Add code handling changing adapter settings.

10 years agoandroid: Update bluetooth HAL to match the new hal_ipc_cmd API
Johan Hedberg [Tue, 22 Oct 2013 14:18:56 +0000 (17:18 +0300)]
android: Update bluetooth HAL to match the new hal_ipc_cmd API

10 years agoandroid: Make hal_ipc_command return directly the status
Johan Hedberg [Tue, 22 Oct 2013 14:18:02 +0000 (17:18 +0300)]
android: Make hal_ipc_command return directly the status

10 years agoandroid: Simply exit if hal_ipc_cmd gets an invalid fd
Johan Hedberg [Tue, 22 Oct 2013 14:00:30 +0000 (17:00 +0300)]
android: Simply exit if hal_ipc_cmd gets an invalid fd

10 years agoandroid: Remove not needed include
Szymon Janc [Tue, 22 Oct 2013 13:24:59 +0000 (15:24 +0200)]
android: Remove not needed include

10 years agoandroid/hal: Use notification socket for daemon lifetime tracking
Szymon Janc [Tue, 22 Oct 2013 13:24:58 +0000 (15:24 +0200)]
android/hal: Use notification socket for daemon lifetime tracking

If daemon exited unexpectedly HAL should be stop. With cleanup
procedure command socket is closed as first so use that to distinguish
correct action.

10 years agoadapter/hal: Implement adapter disable call
Szymon Janc [Tue, 22 Oct 2013 13:24:57 +0000 (15:24 +0200)]
adapter/hal: Implement adapter disable call

10 years agoadapter/hal: Implement adapter enable call
Szymon Janc [Tue, 22 Oct 2013 13:24:56 +0000 (15:24 +0200)]
adapter/hal: Implement adapter enable call

10 years agoandroid/hal: Unify HALs callbacks pointers definition
Szymon Janc [Tue, 22 Oct 2013 13:24:55 +0000 (15:24 +0200)]
android/hal: Unify HALs callbacks pointers definition

Those are not suppose to be modified or used outside of each HAL.

10 years agoandroid/hal: Add initial support for handling adapter notifications
Szymon Janc [Tue, 22 Oct 2013 12:46:13 +0000 (14:46 +0200)]
android/hal: Add initial support for handling adapter notifications

Only adapter state callback is handled for now.

10 years agoandroid/hal: Add initial code for notification handling
Szymon Janc [Tue, 22 Oct 2013 12:46:12 +0000 (14:46 +0200)]
android/hal: Add initial code for notification handling

This adds a dedicated thread that will read from notification sockets
and dispatch it to appropriate service notification function.

10 years agoandroid: Define minimum legal notification event ID
Szymon Janc [Tue, 22 Oct 2013 12:46:11 +0000 (14:46 +0200)]
android: Define minimum legal notification event ID

All legal events IDs should be above this value.

10 years agoandroid: Fix non-existing event definition
Szymon Janc [Tue, 22 Oct 2013 12:46:10 +0000 (14:46 +0200)]
android: Fix non-existing event definition

There is no ERROR notification id.

10 years agoandroid: Define helper payload field in hal_msg_hdr
Szymon Janc [Tue, 22 Oct 2013 12:46:09 +0000 (14:46 +0200)]
android: Define helper payload field in hal_msg_hdr

This will allow for convenient access to payload.

10 years agoandroid/hal: Make hal.h self contained
Szymon Janc [Tue, 22 Oct 2013 12:46:08 +0000 (14:46 +0200)]
android/hal: Make hal.h self contained

10 years agoandroid: Use hh prefix instead of bt_hidhost
Luiz Augusto von Dentz [Tue, 22 Oct 2013 13:02:32 +0000 (16:02 +0300)]
android: Use hh prefix instead of bt_hidhost

This replaces the use of bt_hidhost as function prefix with hh.

10 years agoandroid: Add initial code for hidhost
Ravi kumar Veeramally [Tue, 22 Oct 2013 12:16:16 +0000 (05:16 -0700)]
android: Add initial code for hidhost

This adds the initial implementation of .init, .connect and .disconnect

10 years agotools/mgmt-tester: Add a couple of LE-only connectable-off tests
Johan Hedberg [Tue, 22 Oct 2013 12:46:39 +0000 (15:46 +0300)]
tools/mgmt-tester: Add a couple of LE-only connectable-off tests

10 years agoandroid/hal: Fix receiving of commands with no response parameter
Szymon Janc [Tue, 22 Oct 2013 12:03:58 +0000 (14:03 +0200)]
android/hal: Fix receiving of commands with no response parameter

This fix receiving of error response in case command has no reply
parameters.

10 years agoandroid: Add help to hidhost in haltest
Jerzy Kasenberg [Tue, 22 Oct 2013 11:02:27 +0000 (13:02 +0200)]
android: Add help to hidhost in haltest

This patch adds help to methods of hidhost interface.
This also adds tab completion for hidhost.

10 years agoandroid: Add calls to hidhost interface to haltest
Jerzy Kasenberg [Tue, 22 Oct 2013 11:02:26 +0000 (13:02 +0200)]
android: Add calls to hidhost interface to haltest

This patch adds code so hidhost interface can be tested.

10 years agoandroid: Add definition of buffer sizes to haltest
Jerzy Kasenberg [Tue, 22 Oct 2013 11:02:25 +0000 (13:02 +0200)]
android: Add definition of buffer sizes to haltest

This patch adds definition of sizes needed for text representation
of bluetooth address and uuid, this remove usage of magic numbers.

10 years agoandroid: Add hidhost defines and structures to header file
Ravi kumar Veeramally [Tue, 22 Oct 2013 09:07:02 +0000 (02:07 -0700)]
android: Add hidhost defines and structures to header file

10 years agocore: Fix crash while processing SDP records
Luiz Augusto von Dentz [Tue, 22 Oct 2013 09:03:20 +0000 (12:03 +0300)]
core: Fix crash while processing SDP records

This was introduced by commit 073714c3ff70379131be3e19d9ccb8b85fe3f0d9
which attempted to treat the return of sdp_process but caused the crash
bellow because sdp_process actually calls search_completed_cb if it
fails:
Invalid read of size 8
   at 0x44FC93: search_process_cb (sdp-client.c:214)
   by 0x3D46047E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x40A2DF: main (main.c:587)
 Address 0x59febd0 is 16 bytes inside a block of size 72 free'd
   at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x3D4604D9AE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x44FE44: search_completed_cb (sdp-client.c:192)
   by 0x4732E7: sdp_process (sdp.c:4341)
   by 0x44FCD8: search_process_cb (sdp-client.c:206)
   by 0x3D46047E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3D46048559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x40A2DF: main (main.c:587)

10 years agocore: Remove NET_RAW from list of required capabilities
Johan Hedberg [Tue, 22 Oct 2013 08:37:24 +0000 (11:37 +0300)]
core: Remove NET_RAW from list of required capabilities

This is a left-over from times that raw HCI sockets were used. It's not
needed anymore.