Commit Graph

15834 Commits

Author SHA1 Message Date
Johan Hedberg
09da9e2fbb tools/mgmt-tester: Add basic BR/EDR limited discoverable on test cases 2013-10-30 15:10:25 +02:00
Johan Hedberg
f83187dd40 tools/mgmt-tester: Fix sending right set_discoverable parameters in setup 2013-10-30 14:47:46 +02:00
Johan Hedberg
20c2fedb79 tools/mgmt-tester: Fix calling test_setup twice 2013-10-30 14:43:47 +02:00
Jakub Tyszkowski
ef4f77e680 android: Add missing discovery state definitions to IPC header 2013-10-30 12:12:14 +02:00
Jakub Tyszkowski
ccfc207b4f android/hal: Add device state changed event handler
This is used to report property change of already reported remote
device.
2013-10-30 12:11:55 +02:00
Jakub Tyszkowski
56f12d1a33 android/hal: Add device found event handler
This is called when new remote device is found.
2013-10-30 12:11:46 +02:00
Jakub Tyszkowski
66f9de59f3 android/hal: Extract bt property repacking code for further reuse
This extracted part of code can be reused for repacking remote device
properties.
2013-10-30 12:11:33 +02:00
Jakub Tyszkowski
2cbbb5bbb6 android/hal: Add support for handling discovery state change event 2013-10-30 12:11:24 +02:00
Jakub Tyszkowski
98f4e39831 android/hal: Add support for start/cancel device discovery commands 2013-10-30 12:11:13 +02:00
Szymon Janc
b95fba99cf 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.
2013-10-30 12:09:05 +02:00
Szymon Janc
0f8e15cb67 android: Add common place for adding compiler flags in Android.mk
This will contain CFLAGS common for all BlueZ code.
2013-10-30 12:09:03 +02:00
Jerzy Kasenberg
c26309164b 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.
2013-10-30 12:06:45 +02:00
Szymon Janc
5ff30dbe65 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.
2013-10-30 11:15:21 +02:00
Luiz Augusto von Dentz
89f484014c 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.
2013-10-30 09:39:25 +02:00
Szymon Janc
556507b49d android/hal: Add support for handling SSP request event 2013-10-29 15:06:08 +02:00
Szymon Janc
10e7618ca5 android/hal: Add support for handling pin request event 2013-10-29 15:05:15 +02:00
Andrei Emeltchenko
4e7e340b15 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.
...
2013-10-29 15:04:41 +02:00
Szymon Janc
b201633af3 android/hal: Add support for handling bond state change event 2013-10-29 14:11:42 +02:00
Szymon Janc
d9cbe6cacc 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.
2013-10-29 14:11:34 +02:00
Szymon Janc
4360ee9b6b 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.
2013-10-29 14:11:27 +02:00
Szymon Janc
806721a4cb build: Move Makefile.android to android/Makefile.am
This will keep all Android related changes within android directory.
2013-10-29 14:06:35 +02:00
Szymon Janc
2abdd0364c 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)
2013-10-29 14:03:39 +02:00
Ravi kumar Veeramally
c9902d2b50 android: Add initial HID disconnect implementation.
Implemented basic HID disconnect method. Host disconnects
with bt device at L2CAP level.
2013-10-29 13:14:05 +02:00
Ravi kumar Veeramally
508e048e66 android: Add initial HID connect implementation
Implemented basic HID connect method. Host connects to
bt device at L2CAP level.
2013-10-29 13:13:01 +02:00
Szymon Janc
fe74c46d11 android: Use helper function to convert bdaddr to android format
This will make easier to understand why swap is needed.
2013-10-28 16:10:42 +02:00
Szymon Janc
11bdfcae84 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.
2013-10-28 16:10:42 +02:00
Szymon Janc
d4453aeb8d android: Remove bogus hal_rsp_register_module structure
Core service Register ID command doesn't return any parameter.
2013-10-28 15:04:18 +02:00
Szymon Janc
7bf6940813 android: Fix HAL_OP_REMOVE_BOND value
This is a copy-and-paste mistake.
2013-10-28 15:04:09 +02:00
Szymon Janc
2a974c6341 android: Rename send_adapter_name to send_adapter_address
Make function name match what it acctually does.
2013-10-28 14:58:53 +02:00
Jerzy Kasenberg
5b5f62794e android/client: Add clear screen on Cltr-L
This patch allows to clear screen on Ctrl-L.
2013-10-28 14:57:56 +02:00
Luiz Augusto von Dentz
3c10d4e015 android/hal-pan: Add implementation of .disconnect 2013-10-28 14:43:24 +02:00
Luiz Augusto von Dentz
ca999716d9 android/hal-pan: Add implementation of .connect 2013-10-28 14:42:55 +02:00
Luiz Augusto von Dentz
209f302f7b android/hal-pan: Add implementation of .get_local_role 2013-10-28 14:42:38 +02:00
Luiz Augusto von Dentz
ab2a0efba8 android/hal-pan: Add implementation of .enable 2013-10-28 14:42:28 +02:00
Luiz Augusto von Dentz
1e8089a41a android/hal-pan: Add implementation of .init 2013-10-28 14:42:20 +02:00
Jerzy Kasenberg
c8fea98cba android/client: Add completion for hf methods
This patch adds completion functions to handsfree methods.
2013-10-28 14:41:23 +02:00
Jerzy Kasenberg
dcd6c057e0 android/client: Add code for handsfree methods
This patch adds implementation of handsfree methods to haltest.
2013-10-28 14:41:23 +02:00
Jerzy Kasenberg
ff1e7c076a android/client: Add code for handsfree callbacks
This adds implementation for handsfree callbacks.
2013-10-28 14:41:23 +02:00
Jerzy Kasenberg
e0895c15cd android/client: Add skeleton for handsfree calls
This patch adds skeleton for all methods of handsfree along with
all callbacks.
2013-10-28 14:41:23 +02:00
Luiz Augusto von Dentz
d15f317bd6 android/hal-av: Fix command struct names
The command struct names should start with hal_cmd as the others.
2013-10-28 12:58:56 +02:00
Grzegorz Kolodziejczyk
5a5158bb0f android/hal: Add support for send av disconnect command
This allows HAL to send av disconnect command
2013-10-28 11:52:03 +02:00
Grzegorz Kolodziejczyk
11410bf9bb android/hal: Add support for send av connect command
This allows HAL to send av connect command
2013-10-28 11:50:52 +02:00
Grzegorz Kolodziejczyk
c737af9301 android/hal: Add support for handling av audio state event 2013-10-28 11:48:55 +02:00
Grzegorz Kolodziejczyk
7bca531f62 android/hal: Add support for handling av connection state event 2013-10-28 11:47:47 +02:00
Grzegorz Kolodziejczyk
9b67ebb0e6 android/hal: Add skeleton for handling av notifications
Only default case is handled in skeleton
2013-10-28 11:24:12 +02:00
Grzegorz Kolodziejczyk
e2f41f5bde android/hal: Fix typo in A2DP HAL service name
A2DP was misspelled as AD2P
2013-10-28 11:24:12 +02:00
Luiz Augusto von Dentz
c23b54e379 android: Rename setting_powered_changed to powered_changed 2013-10-27 13:57:11 +02:00
Szymon Janc
d21050de66 android: Add support for notifying HAL about scan mode change
If connectable or discoverable setting changes property change is send
to HAL.
2013-10-27 13:52:33 +02:00
Szymon Janc
3676715fd5 android: Always set adapter to pairable on init
There is no operation to enable/disable pairable mode in Android HAL.
2013-10-27 13:23:35 +02:00
Szymon Janc
9be3bd6609 android: Add support for setting adapter scan mode
This allows to set all modes defined: none, connectable and
'connectable and discoverable'.
2013-10-27 13:23:35 +02:00