Ravi kumar Veeramally
ff9e27b9de
android/hidhost: Fix uhid create failure case
...
If uhid open or create fails then notify state and free the device.
Otherwise it replies bogus success return value on connect request.
2013-11-12 15:26:52 +02:00
Lukasz Rymanowski
19f49964b5
android: Update HAL with device info on incoming connection
...
Make sure Android have information about connecting remote device. This
is needed for example to show device name on incoming bonding request.
2013-11-12 15:05:09 +02:00
Ravi kumar Veeramally
651522716f
android/hid: Handle virtual unplug event from hid device
...
If hid host receives the virtual unplug event from hid device
recipient shall destroy or invalidate all bluetooth bonding and
virtual cable information
2013-11-11 10:30:37 +02:00
Andrei Emeltchenko
69a33fbf2a
android/hal-utils: Make hal-utils functions return const string
2013-11-08 16:21:41 +02:00
Andrei Emeltchenko
bec0539ba9
androi/haltest: Make debug functions return const string
2013-11-08 16:21:14 +02:00
Szymon Janc
0d45c38c00
android: Fix error handling in adapter_ready
...
On error negative value is passed to adapter_ready callback. This fix
passing negative error code to strerror.
2013-11-08 16:15:06 +02:00
Andrei Emeltchenko
c93a3fc89f
android/hal-sock: Add UUID debug print in socket HAL
...
Socket HAL uses uint8_t * strings which are of size bt_uuid_t.
2013-11-08 15:57:26 +02:00
Andrei Emeltchenko
d18c36e232
android/debug: Convert uuid helper to use uint8_t buffer
...
At this moment Android uses uint8_t * and bt_uuid_t for representing
UUID for different HALs. Convert debug helper to use uint8_t * string.
2013-11-08 15:57:25 +02:00
Johan Hedberg
97a5801394
android/hidhost: Fix up error logs to contain exact error
2013-11-08 15:46:31 +02:00
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