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