Szymon Janc
a332daeba9
android/hidhost: Use adapter address provided on register
...
There is no need to use bt_adapter_get_address every time local address
is needed.
2013-11-14 14:55:30 +02:00
Szymon Janc
cd1dd51f79
android: Don't use static pointer for storing adapter_ready callback
...
There is no need to keep ready callback for daemon lifetime as it is
not used after reporting adapter being ready. Use mgmt library feature
for passing user data so that static pointer is not needed.
2013-11-14 14:55:30 +02:00
Szymon Janc
e809154eba
android: Move adapter initialization to adapter.c
...
There is no need to handle that in main.c. Also this removes mgmt
interface dependency from adapter API as all mgmt commands are handled
from adapter code.
Startup and shutdown timeouts handling is left in main.c.
2013-11-14 14:55:30 +02:00
Szymon Janc
73e110b5b0
android: Make adapter static
...
Only one controller is used so there is no need to keep it as allocable
structure. This will also make memory management simpler and more
correct eg. adapter was never free.
Elements not directly related to adapter are kept outside of adapter
structure.
2013-11-14 14:55:30 +02:00
Luiz Augusto von Dentz
41599b1d3b
android/a2dp: Add initial implementation of HAL_OP_A2DP_DISCONNECT
2013-11-14 14:25:39 +02:00
Luiz Augusto von Dentz
9cb73c97f8
android/a2dp: Add initial implementation of HAL_OP_A2DP_CONNECT
2013-11-14 14:25:24 +02:00
Luiz Augusto von Dentz
46c8cd97fc
android/a2dp: Add initial implementation of socket handling
...
This adds initial code to handle incoming connection and notifying
connection states.
2013-11-14 14:20:53 +02:00
Luiz Augusto von Dentz
230211cd25
android/hal-a2dp: Add defines for possible connection states
2013-11-14 14:19:11 +02:00
Luiz Augusto von Dentz
cfcbbf8f86
android/hal-a2dp: Add implemention of .cleanup
2013-11-14 14:19:02 +02:00
Luiz Augusto von Dentz
ad5813bcd5
android/hal-a2dp: Add implemention of .init
2013-11-14 14:18:59 +02:00
Luiz Augusto von Dentz
f10e740f21
android/hal-a2dp: Use conn_state instead of connection_state
...
This is shorter and more consistent with other HAL such as HID.
2013-11-14 14:18:51 +02:00
Andrei Emeltchenko
d39e947a1f
android/debug: Move debug functions to hal-utils.c
...
Debug functions will be used by HALs and haltest.
2013-11-14 10:27:15 +02:00
Szymon Janc
7d699101e2
android: Core service should be always registered
...
Core service is used to register other services and shall be always
consider registered.
2013-11-13 19:46:01 +02:00
Szymon Janc
33d823d2ee
android: Shutdown if IPC command for unregistered service is received
...
Sending commands to not registered services is violation of IPC spec
and should result in daemon shutdown.
2013-11-13 19:43:21 +02:00
Andrei Emeltchenko
b17fdd8adb
android/hidhost: Use correct error structure
2013-11-13 16:47:39 +02:00
Andrei Emeltchenko
04a1fc903b
android/hidhost: Fix memory leak
2013-11-13 16:47:38 +02:00
Ravi kumar Veeramally
a7579647d7
android/pan: Handle connection and control state notifications
2013-11-13 13:15:11 +02:00
Ravi kumar Veeramally
fcf2331ada
android/pan: Add notify method to PAN notifications
2013-11-13 11:27:50 +02:00
Ravi kumar Veeramally
ab8a2ab554
android: Fix opcode parameter type from uint16_t to uint8_t
2013-11-13 11:27:46 +02:00
Ravi kumar Veeramally
d95bae6d86
android/hidhost: Set info request from HAL is not supported
...
Data from hal_cmd_hidhost_set_info is usefull only when we create
UHID device. Once device is created all the transactions will be
done through the fd. There is no way to use this information
once device is created with HID internals.
2013-11-13 11:26:38 +02:00
Ravi kumar Veeramally
c1693c614e
android/hidhost: Remove deprecated idle opcode from ipc document
...
Idle time is deprecated in HID_SPEC1_1. So get and set idle time api's
are removed and not implemented. But callback is left out in Android
bt_hh.h. Generally this callback needs to be called when HAL requests
get and set idle time calls with status. So the method calls itself
removed, no point to implement this callback.
Also update GET_REPORT and VIRTUAL_UNPLUG opcode values.
2013-11-13 11:26:38 +02:00
Ravi kumar Veeramally
d69ce902b7
android/hidhost: Handle uhid output and feature events
...
Data read on uhid events output and feature has to be send through
SET_REPORT request to HID device.
2013-11-13 11:26:33 +02:00
Ravi kumar Veeramally
7e673560e5
android/pan: Add PAN cleanup interface implementation
2013-11-12 19:02:19 +02:00
Ravi kumar Veeramally
68255433d6
android/pan: Add PAN related defines and event struct to hsl-msg header
2013-11-12 19:01:12 +02:00
Szymon Janc
51ac375db0
android: Register DeviceID record when adapter is initialized
...
Register DeviceID SDP record and update local UUIDs after DeviceID
information is passed to kernel.
2013-11-12 18:59:30 +02:00
Marcin Kraglak
8612cbc529
android: Add support for getting UUIDs property
...
This method will call adapter_properties_cb with uuids of
adapter. Method is called also when uuid is added or removed.
2013-11-12 18:59:15 +02:00
Marcin Kraglak
498bfa7aa8
android: Clear adapter uuids during initialization
...
Clear adapter uuids during init. We have to do it before
other profiles will be able to register sdp records and add
their uuids.
2013-11-12 18:59:07 +02:00
Szymon Janc
e0e8c7a941
android: Remove not needed include
...
bt_uuid_t is not used so lib/uuid.h doesn't need to be included.
2013-11-12 18:59:02 +02:00
Marcin Kraglak
cab374f7e8
android: Add and remove sdp records and uuids
...
This is api for adding and removing sdp records and uuids
via mgmt interface. Local profiles have to store handle to
own records to remove them in cleanup. Additionally list of
uuids is created in bt_adapter struct.
2013-11-12 18:58:09 +02:00
Ravi kumar Veeramally
fa0ce2cbb4
android/hidhost: Fix error handling issue incase of G_IO_HUP
...
Incase of G_IO_HUP on GIOCondtion when hid device disconnected,
GIOCondition is combination of G_IO_IN and G_IO_HUP. Current code
tries to read as soon as it finds G_IO_IN in condition.
Apparently there is no data to read and loop continues.
2013-11-12 15:26:52 +02:00
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