Commit Graph

510 Commits

Author SHA1 Message Date
Andrei Emeltchenko
5af8d164ac android: Create debug hal-utils helpers
Create hal-utils helpers which helps to decode packets Android
sends through HAL interface.
2013-11-08 15:40:25 +02:00
Ravi kumar Veeramally
e9c52e40fb android/hid: Add virtual unplug implemention in daemon
Send virtual unplug command to hid device and disconnect and remove
hid device details.
2013-11-08 15:28:59 +02:00
Ravi kumar Veeramally
c5408ef4ac android/hid: Add send data implemention in daemon
Send data on interrupt channel on request from hid host.
2013-11-08 15:28:40 +02:00
Ravi kumar Veeramally
cb54bd85e9 android/hid: Fill send data command struct in hal-hidhost 2013-11-08 15:28:17 +02:00
Ravi kumar Veeramally
bf2e192e3c android/hid: Fix set report data format in daemon
Report data coming to HAL is in ascii format, HAL sends
data in hex to daemon, so convert to binary.
2013-11-08 15:27:36 +02:00
Ravi kumar Veeramally
20a830495f android/hid: Fill send data command struct in hal-hidhost 2013-11-08 15:23:31 +02:00
Jerzy Kasenberg
fcd2812197 android/client: Add ssp key confirmation helper
This patch adds handling of ssp_request_cb that prints prompt
asking user if pass key matches. User does not need to type:
bluetooth ssp_reply address BT_SSP_VARIANT_PASSKEY_CONFIRMATION 1 key
2013-11-08 15:13:06 +02:00
Jerzy Kasenberg
72c31efadf android/client: Add pin handling for bind
This patch ask user for ping in pin_request_cb, which does
what otherwise would be required to manually type
bluetooth pin_reply address pin.
2013-11-08 15:13:04 +02:00
Jerzy Kasenberg
037632dc24 android/client: Add prompting for answer
This patch allows to switch to prompt mode where user will be asked
to supply some information.
2013-11-08 15:13:03 +02:00
Jerzy Kasenberg
b07cff3c6b android/client: Split terminal_process_char
This patch changes the way input characters are handled in function
terminal_process_char from big switch statement to smaller functions.
No functionality is changed in this patch.
Splitting to smaller functions will make easier to change behaviour
of terminal for prompt handling when user will be asked for something
and history substitution or auto completion will not be used.
2013-11-08 15:13:01 +02:00
Jerzy Kasenberg
316ddc8b96 android/client: Add command line arguments
This patch adds command line argument parsing.
Options added:
 -h, --help
 -n, --no-init - disable initialization of interfaces
     --version
2013-11-08 15:13:00 +02:00
Jerzy Kasenberg
df3b6c7dc0 android/client: Initialize all interfaces at start
Patch adds function that initializes all HAL interfaces.
2013-11-08 15:12:58 +02:00
Jerzy Kasenberg
464d9b64af android/client: Add NELEM macro for count elements
NELEM macro will be used in several places.
2013-11-08 15:12:57 +02:00
Jerzy Kasenberg
507c457d3c android/client: Export get_interface_method
This method will be used outside tab completion.c.
2013-11-08 15:12:55 +02:00
Marcin Kraglak
d5932ba1e6 android: Fix PAN service registration
A2DP service was registered instead of PAN.
2013-11-08 12:46:03 +02:00
Ravi kumar Veeramally
290f9826a5 android/hid: Rename virtual unplug define and struct
Renaming virtual unplug define and strcut name from VP to more
meaning full.
2013-11-08 11:17:29 +02:00
Andrei Emeltchenko
79e90ad1b5 android/ipc: Fix crash when sending file descriptor
Since CMSG_FIRSTHDR is defined as shown below:

  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)

it return NULL if msg_controllen is not defined. Accessing
that pointer result in daemon crash.
2013-11-08 11:00:49 +02:00
Ravi kumar Veeramally
c7d4ffd327 android/hid: Handle virtual unplug notification in HID HAL 2013-11-08 10:37:39 +02:00
Ravi kumar Veeramally
70a7c773c8 android/hid: Add hid event virtual unplug structure to HAL msg headers 2013-11-08 10:30:26 +02:00
Ravi kumar Veeramally
3e60caf677 android/hid: Add missing parameters in send data struct in HAL headers 2013-11-08 10:29:37 +02:00
Ravi kumar Veeramally
f180e868c4 android/hid: Add missing hid send data parameters in ipc document 2013-11-08 10:29:21 +02:00
Ravi kumar Veeramally
9f35898555 android/hid: Remove fixed number of hid set report data length in ipc doc
HAL receives data in ascii format but it should be in hex format. So remove
fixed size of report data length and depend on report length parameter.
2013-11-08 10:29:06 +02:00
Johan Hedberg
49f051b6b6 android: Remove unnecessary allocations of fixed-size buffers 2013-11-07 22:39:26 +02:00
Jakub Tyszkowski
5965a309ea android: Fix sending remote device name property
Android use the full string returned even if terminated with '\0'.
2013-11-07 21:50:14 +02:00
Jakub Tyszkowski
229d416ed6 android: Remove redundant command complete callback
This patch removes command complete callback used only for verbose error
reporting.
2013-11-07 21:49:09 +02:00
Szymon Janc
bdbe86efab android/hal: Use hidhost instead of hh in hidhost HAL
Match functions names to HAL name. Where not needed hh prefix is
removed.
2013-11-07 18:45:06 +02:00
Szymon Janc
a54747586e android: Rename hid.c to hidhost.c
Name of daemon implementation will match Android HAL name. This will
make code navigation easier as daemon part and HAL library implementation
will be in foo.c and hal-foo.c respectively.
2013-11-07 18:44:57 +02:00
Szymon Janc
5ca1face1a android: Rename hidhost HAL related IPC API to match service name
Use 'Android HAL name' string from IPC doc as base for names.
2013-11-07 18:44:35 +02:00
Lukasz Rymanowski
d0da2fb3d8 android: Add set/get for discovery timeout
Android handles discoverable timeout in Settings app, however still
expects BT stack to maintain this value so we should do it as well.
Otherwise we will get some unexpected behaviour. For now we keep
discovery_timeout only during runtime, but we need to move it to some
local storage once we will have it.

Note: That since Android Settings up handles timer there is no reason to
use discovery timer we have in kernel.
2013-11-07 18:42:10 +02:00
Szymon Janc
931eb9f16d android/hal: Use a2dp instead of av in a2dp HAL
Match functions names to HAL name. Where not needed av prefix is
removed.
2013-11-07 17:59:01 +02:00
Szymon Janc
f42a2bafa3 android/hal: Rename hal-av.c to hal-a2dp.c
Name of HAL implementation will match Android HAL name. This will make
code navigation easier as daemon part and HAL library implementation
will be in foo.c and hal-foo.c respectively.
2013-11-07 17:58:54 +02:00
Szymon Janc
d842e88a47 android: Rename a2dp HAL related IPC API to match service name
Use 'Android HAL name' string from IPC doc as base for names.
2013-11-07 17:58:39 +02:00
Andrei Emeltchenko
14924cd24b android/ipc: Fix receiving file descriptors
It does make sense iterate over !NULL controll headers. This fixes
the bug that file descriptors cannot be send over IPC.
2013-11-07 17:14:15 +02:00
Lukasz Rymanowski
817177ef1d android: Use BASELEN define for property changed 2013-11-07 17:07:24 +02:00
Szymon Janc
fd02ec9d91 android: Use payload member to access message data
This make it similar to other places in code.
2013-11-07 17:06:05 +02:00
Szymon Janc
fb1e40d65c android: Remove includes from adapter.h
This is internal header and dependencies should be included in
respective .c files.
2013-11-07 17:05:57 +02:00
Szymon Janc
052e481adc android: Pass notification socket fd to service handlers
IPC helpers were converted to accept socket, not GIOChannel so there
is no need of passing former to handlers.
2013-11-07 17:05:47 +02:00
Szymon Janc
32f29761bf android: Make IPC helpers accept file descriptor
There is no need to pass GIOChannel as writes are done immediately.
2013-11-07 17:05:07 +02:00
Andrei Emeltchenko
718032446a android/hal: Rename hal_op_sock_listen to hal_cmd_sock_listen
This makes structures consistent with the rest of the code.
2013-11-07 10:09:54 +02:00
Andrei Emeltchenko
20002d0a37 android/hal-sock: Check socket type in connect
Only RFCOMM sockets are supported in Android.
2013-11-07 10:09:40 +02:00
Lukasz Rymanowski
dfe8ac32fd android: Change name for get_disc_timeout
Change name to get_discoverable_timeout. Previous name could be
confusing with disconnection timeout.
2013-11-07 10:08:05 +02:00
Johan Hedberg
48eb05b0b0 android: Remove useless device.{c,h} files 2013-11-06 16:39:55 +02:00
Marcin Kraglak
645da8e857 android: Implement class of device property callback
This will send adapter property with class of device
to notification socket.
2013-11-06 13:32:07 +02:00
Johan Hedberg
63d32200d3 android: Fix struct variable alignments in IPC header 2013-11-06 10:35:58 +02:00
Johan Hedberg
9d4ec54095 android/hid: Fix unnecessary second check for cmd->buf_size value 2013-11-06 10:33:31 +02:00
Johan Hedberg
b8bc9c1b27 android/hid: Fix get report buffer size variable name 2013-11-06 10:31:31 +02:00
Johan Hedberg
9af81f5b9e android/hid: Fix camelcase variable names 2013-11-06 10:29:25 +02:00
Ravi kumar Veeramally
ff8dad2942 android/hid: Align hal hid struct variables properly 2013-11-06 10:27:10 +02:00
Ravi kumar Veeramally
8c7daf5389 android/hid: Handle uhid events
Handling few uhid events and described scenarios. OUTPUT and
FEATURE events are not yet handled.
2013-11-06 10:26:58 +02:00
Ravi kumar Veeramally
1aee093b3e android/hid: Handle invalid parameters in HAL 2013-11-06 10:26:36 +02:00
Ravi kumar Veeramally
aac7c55133 android/hid: Replace header checking magic number with defines 2013-11-06 10:26:25 +02:00
Ravi kumar Veeramally
62fe761a72 android/hid: Handle get report notification in HAL 2013-11-06 10:26:16 +02:00
Ravi kumar Veeramally
a74dec7475 android/hid: Implement hid set report in daemon
This patch requests hid device to set report.
2013-11-06 10:25:13 +02:00
Ravi kumar Veeramally
93f04d5a33 android/hid: Add missing set report parameters to ipc document 2013-11-06 10:24:43 +02:00
Ravi kumar Veeramally
e8b0c8f13d android/hid: Implement hid get report in daemon
This patch requests hid device report and reads reply
message and sends notification to HAL.
2013-11-06 10:18:01 +02:00
Ravi kumar Veeramally
125099108f android/hid: Add hid event get report structure to HAL msg headers 2013-11-06 10:17:52 +02:00
Ravi kumar Veeramally
868e069fc1 android/hid: Handle protocol mode notification in HAL 2013-11-06 10:17:23 +02:00
Ravi kumar Veeramally
bf0031a50b 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.
2013-11-06 10:16:41 +02:00
Ravi kumar Veeramally
176ac66b0c android/hid: Implement hid get protocol in daemon
This patch requests hid device protocol mode and reads reply
message and sends notification to HAL.
2013-11-06 10:15:46 +02:00
Johan Hedberg
80a2ea61f2 android: Use more common 'failed' label instead of 'error' 2013-11-06 10:12:13 +02:00
Szymon Janc
40fb9b2032 android: Add option to specify controller index to use
This will be usefull while testing on Linux where more controllers
can be present.
2013-11-06 10:10:14 +02:00
Szymon Janc
6dc9321e2e 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.
2013-11-06 10:08:15 +02:00
Szymon Janc
8a98e083b8 android: Stop mainloop if reading version failed
If reading mgmt version failed or kernel supported version is to old
mainloop should be stopped.
2013-11-06 10:07:54 +02:00
Szymon Janc
81c0c34ef6 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.
2013-11-06 10:07:47 +02:00
Szymon Janc
9d89bb121b android: Require at least 1.3 version of mgmt interface
Android daemon is not providing old kernels compatibility features.
2013-11-06 10:07:37 +02:00
Marcin Kraglak
c17cf38ecf 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.
2013-11-05 18:23:03 +02:00
Marcin Kraglak
4b9e1d80a9 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.
2013-11-05 18:22:40 +02:00
Marcin Kraglak
1ee0b2f9f9 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.
2013-11-05 18:20:46 +02:00
Luiz Augusto von Dentz
cd8bbd29f4 android/hid: Fix passing wrong adapter address to bt_io_listen 2013-11-05 15:21:27 +02:00
Jerzy Kasenberg
ef0609cc15 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).
2013-11-05 14:55:37 +02:00
Ravi kumar Veeramally
5de2f26a11 android/hid: Add hid event proto mode structure to hal msg headers 2013-11-05 14:52:34 +02:00
Szymon Janc
762a2ef434 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]
2013-11-05 13:04:00 +02:00
Luiz Augusto von Dentz
b01319a33f 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.
2013-11-05 12:43:43 +02:00
Andrei Emeltchenko
324ba2b35f 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.
2013-11-05 12:32:53 +02:00
Jerzy Kasenberg
126aad3a5d android/client: Change adapter to bluetooth
This fixes all places where adapter should be changed to
bluetooth.
2013-11-05 12:31:27 +02:00
Jerzy Kasenberg
c73ddc609b android/client: Fix style and typos
Fixes spelling errors and white space style errors.
2013-11-05 12:31:25 +02:00
Andrei Emeltchenko
6886d16e6c android: Add btmon to Android Makefile
Build btmon for Android image. btmon requires fresh bionic to build.
2013-11-05 12:30:40 +02:00
Ravi kumar Veeramally
c5ca292eb6 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.
2013-11-05 10:19:15 +02:00
Ravi kumar Veeramally
34492997bf 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.
2013-11-05 10:18:51 +02:00
Szymon Janc
d2064df699 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.
2013-11-04 21:31:27 +02:00
Szymon Janc
556c5ceb71 android: Implement scan_mode property in get property command
This will allow to query current state of scan mode property.
2013-11-04 21:31:20 +02:00
Szymon Janc
a880b227bd android: Add support for handling get properties commands
When this commands is received all properties shall be reported to HAL.
2013-11-04 21:31:16 +02:00
Andrei Emeltchenko
8baa84b767 android/client: Fix printing not NULL terminated strings
Android passes not NULL terminated strings.
2013-11-04 21:17:50 +02:00
Andrei Emeltchenko
5af8a574eb android/daemon: Fix setting adapter name
Android use the full string returned even if we terminate it with '\0'.
2013-11-04 21:15:58 +02:00
Andrei Emeltchenko
2dda637c83 android/daemon: Clean up get_address name
Make function name consistent with the rest of the code.
2013-11-04 21:15:46 +02:00
Andrei Emeltchenko
c98ce8a67b android/daemon: Implement get adapter name
Use adapter_name_changed for get_property call.
2013-11-04 21:15:37 +02:00
Jerzy Kasenberg
fe552a1a5d android/client: Fix annoying delay in command line
Move fflush(stdout) to after prints and user input.
This removes delay of showing prompt.
2013-11-04 21:14:35 +02:00
Jerzy Kasenberg
180bc6dbd8 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.
2013-11-04 21:13:52 +02:00
Luiz Augusto von Dentz
1ca4c658d9 android/pan: Add initial code for handling commands 2013-11-04 21:13:05 +02:00
Luiz Augusto von Dentz
8e955dfd82 android: Add initial skeleton for pan in the daemon 2013-11-04 21:12:40 +02:00
Luiz Augusto von Dentz
00e69a7570 android/a2dp: Add initial code for handling commands 2013-11-04 21:12:25 +02:00
Luiz Augusto von Dentz
5daffcb642 android: Add initial skeleton for a2dp in the daemon 2013-11-04 21:12:23 +02:00
Jerzy Kasenberg
bd75bd816e android: Bump PLATFORM_SDK_VERSION to KitKat
This updates PLATFORM_SDK_VERSION to 19 since
bluetooth headers were updated already.
2013-11-04 12:15:45 +02:00
Szymon Janc
3c82cea914 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.
2013-11-04 12:15:04 +02:00
Jerzy Kasenberg
6807460f1b 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.
2013-11-04 12:14:18 +02:00
Luiz Augusto von Dentz
d661ba725c android: Add the missing HAVE_CONFIG_H check daemon files 2013-11-04 12:10:31 +02:00
Luiz Augusto von Dentz
f18bb68ba5 android/hid: Use BT_IO_OPT_SOURCE_BDADDR whenever possible 2013-11-04 12:10:29 +02:00
Marcin Kraglak
992f3f669f Fix incorrect result type in set_adapter_name 2013-11-04 12:07:47 +02:00
Marcin Kraglak
c304a4c963 android: Add stub of get_remote_services command 2013-11-04 10:20:28 +02:00
Marcin Kraglak
5658fadf26 android/hal: Send get_remote_services cmd 2013-11-04 10:20:07 +02:00
Marcin Kraglak
ef4e9a8884 android: Fix typo in get_remote_services command 2013-11-04 09:37:13 +02:00
Andrei Emeltchenko
f2782699e8 android/daemon: Add logs to trace failed cmd 2013-11-04 09:33:19 +02:00
Andrei Emeltchenko
be06afd877 android/hal: Add extra logs to HAL
Use exported functions from hal test tool to print properties.
2013-11-04 09:29:09 +02:00
Andrei Emeltchenko
5ad3530e8b android/haltest: Fix print device name 2013-11-04 09:28:49 +02:00
Andrei Emeltchenko
2563307c2d 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.
2013-11-04 09:28:33 +02:00
Andrei Emeltchenko
59dcd70722 android/haltest: Export print property
Export property printing debug function.
2013-11-04 09:28:16 +02:00
Luiz Augusto von Dentz
bcbbe2d1f3 android/socket: Log not implemented HAL functions
This makes it easier to spot which functions the HAL is calling.
2013-11-01 16:40:40 +02:00
Luiz Augusto von Dentz
da48ebbe18 android/hid: Log not implemented HAL functions
This makes it easier to spot which functions the HAL is calling.
2013-11-01 16:40:38 +02:00
Luiz Augusto von Dentz
bb7f3b6304 android/adapter: Log not implemented properties
This makes it easier to stop which functions the HAL is calling.
2013-11-01 16:40:35 +02:00
Andrei Emeltchenko
33323282cd android/daemon: Add handler for device disconnected
Send event to callback thread which shall call acl state change callback.
2013-11-01 16:39:07 +02:00
Andrei Emeltchenko
c70142b3f4 android/hal: Add debug prints for every HAL callback
This allows us to trace callbacks to Java.
2013-11-01 16:39:07 +02:00
Andrei Emeltchenko
2a33a44431 android/daemon: Add debug handlers for unhandled mgmt event
Add debug prints to some mgmt events.
2013-11-01 16:39:07 +02:00
Andrei Emeltchenko
981b04355e android/hal: Handle acl_state_changed event 2013-11-01 16:39:07 +02:00
Andrei Emeltchenko
6554000ab7 android/daemon: Implement mgmt device connected event
Send HAL_EV_ACL_STATE_CHANGED event to HAL through IPC.
2013-11-01 16:39:07 +02:00
Andrei Emeltchenko
789ed3dbcb android/ipc: Update HAL IPC header
Add ACL states to the header.
2013-11-01 16:39:07 +02:00
Marcel Holtmann
33c400b88b android: Fix up the GATT client to handle KitKat API changes 2013-11-01 06:25:30 -07:00
Marcel Holtmann
97b1deec59 android: Copy the KitKat Bluetooth hardware headers 2013-11-01 06:24:55 -07:00
Luiz Augusto von Dentz
5e1e3a097d android/hid: Add handling of HAL_EV_HID_INFO 2013-11-01 15:23:26 +02:00
Luiz Augusto von Dentz
a05dcf3e53 android/hal-hidhost: Add implemention of .hid_info_cb 2013-11-01 15:23:26 +02:00
Luiz Augusto von Dentz
e01894ce63 android/hid: Fix passing vendor id as version to uHID 2013-11-01 15:23:26 +02:00
Luiz Augusto von Dentz
65ec172c2b android/hid: Rename hdev vars to dev 2013-11-01 15:23:26 +02:00
Marcel Holtmann
194d97df9d android: Make system-emulator start daemon only once 2013-11-01 06:07:42 -07:00
Andrei Emeltchenko
a3b0003409 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
...
2013-11-01 14:07:06 +02:00
Marcel Holtmann
22eb024fe9 android: Add support for device id information 2013-11-01 03:53:56 -07:00
Marcel Holtmann
629447a588 android: Add the missing HAVE_CONFIG_H check to adapter.c 2013-11-01 03:51:46 -07:00
Marcel Holtmann
3ac9589731 android: Run through valgrind with the system-emulator 2013-11-01 03:40:05 -07:00
Marcel Holtmann
86691b3a57 android: Allow connect() for property_set to fail 2013-11-01 03:18:47 -07:00
Ravi kumar Veeramally
46a977c7a0 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
2013-11-01 11:13:10 +02:00
Ravi kumar Veeramally
8e423452a2 android/hid: Fetch record before attempting to connect
This patch fetch HID record and store the information needed by uHID.
2013-11-01 11:13:07 +02:00
Andrei Emeltchenko
2b81efe25b 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)
...
2013-11-01 09:45:47 +02:00
Marcel Holtmann
86eb638a46 android: Monitor child process termination 2013-10-31 14:56:35 -07:00
Marcel Holtmann
d98c7855f4 android: Disable connectable and discoverable before power on 2013-10-31 13:21:48 -07:00
Marcel Holtmann
47142caf95 android: Switch controller off when shutting the daemon down 2013-10-31 12:42:22 -07:00
Marcel Holtmann
aab3d0a838 android: Power off controller when daemon gets killed 2013-10-31 12:36:09 -07:00
Marcel Holtmann
86267e88a5 android: Don't use abort() for exit 2013-10-31 12:36:09 -07:00
Grzegorz Kolodziejczyk
2da233c69d android: Add support for setting adapters name 2013-10-31 21:31:00 +02:00
Marcel Holtmann
8dadd1165d android: No need for volatile sig_atomic_t when using signalfd 2013-10-31 12:14:16 -07:00
Marcel Holtmann
ff153bce22 android: Exit daemon if no controller is found within 5 seconds 2013-10-31 12:06:18 -07:00
Marcel Holtmann
2978367ae0 android: Add system-emulator for wrapping daemon start 2013-10-31 09:51:29 -07:00
Andrei Emeltchenko
4ae7735196 android/hid: Add error message to error print 2013-10-31 16:58:09 +02:00
Andrei Emeltchenko
89dc0b402d 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
...
2013-10-31 16:57:58 +02:00
Jakub Tyszkowski
928162d185 android: Add support for remote device name confirmation 2013-10-31 16:51:49 +02:00
Jakub Tyszkowski
06325fef7c android: Add device found notifications passing
This patch adds remote device found and remote device properties changed
notifications passing using IPC.
2013-10-31 16:48:44 +02:00
Jakub Tyszkowski
b332aa7487 android: Add name property length define
Add define for adapter and remote device name property.
2013-10-31 16:48:42 +02:00
Jakub Tyszkowski
509ca56c47 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.
2013-10-31 16:47:35 +02:00
Jakub Tyszkowski
2cf38bce89 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.
2013-10-31 16:46:18 +02:00
Jerzy Kasenberg
c6c6ef6898 android/client: Add GATT server methods
This patch implements GATT server method calls.
2013-10-31 16:02:23 +02:00
Jerzy Kasenberg
5ebab55cda android/client: Add GATT server callbacks code
This patch adds callbacks code for GATT server interface.
2013-10-31 16:02:05 +02:00
Jerzy Kasenberg
5b21d9d67b android/client: Add tab completion to GATT client
This patch adds tab completion to GATT client methods.
2013-10-31 16:01:47 +02:00
Jerzy Kasenberg
ed3e26b591 android/client: Add GATT complex type parsing
This patch adds code to parse: UUID, service ID, characteristic ID,
and general hex string filed.
2013-10-31 16:01:06 +02:00