Commit Graph

510 Commits

Author SHA1 Message Date
Andrei Emeltchenko
cfc5e2ae33 android/socket: Implement RFCOMM events
Copy data from RFCOMM socket to Android framework. Consider splice
in the future.
2013-11-20 15:10:03 +02:00
Andrei Emeltchenko
601cfc775e android/socket: Implement Android RFCOMM stack events
Handle events from Android framework. Write everything to real RFCOMM
socket. Consider splice() in the future.
2013-11-20 15:09:02 +02:00
Andrei Emeltchenko
1698ccf997 android/socket: Implement socket accepted event
When we get accepted event we create rfcomm slot and start listening
for events from Android framework and from RFCOMM real socket.
2013-11-20 15:08:03 +02:00
Andrei Emeltchenko
9795183df9 android/socket: Implement listen on RFCOMM socket
Handle HAL socket listen call. Create RFCOMM socket and wait for events.
2013-11-20 15:07:35 +02:00
Andrei Emeltchenko
7c44d6a7c7 android/socket: Add get RFCOMM default channel
RFCOMM default channel is the same like in other BlueZ code, it is
defined in src/profile.c
2013-11-20 15:03:36 +02:00
Ravi kumar Veeramally
52ce60f4c9 android/hal-pan: Fix order of event handler registration
IPC message handler determines handler offset with
opcode = msg->opcode - HAL_MINIMUM_EVENT. But here order is misplaced.
2013-11-20 09:41:38 +02:00
Ravi kumar Veeramally
eb53ab4746 android/hal-a2dp: Fix expected size of A2DP events 2013-11-20 09:40:23 +02:00
Johan Hedberg
23200acf0a android: Fix expected size of hal_ev_ssp_request 2013-11-19 22:35:47 +02:00
Johan Hedberg
356d103644 android/build: Add PICS files to EXTRA_DIST 2013-11-19 18:34:19 +02:00
Johan Hedberg
031bd3f56e android/pics: Fix line lengths 2013-11-19 18:33:10 +02:00
Jakub Tyszkowski
4c67683a34 android: Add PTS PICS for HID
PTS PICS for HID, targeting Android 4.4.
2013-11-19 18:30:49 +02:00
Jakub Tyszkowski
64e07b2233 android: Add PTS PICS for GAP
PTS PICS for GAP, targeting Android 4.4.
2013-11-19 18:30:47 +02:00
Szymon Janc
3e0b74007b android/hal-bluetooth: Remove not needed check in get_adapter_property
Properties types are verified on daemon side and proper error is
returned on wrong type. No need to double check that on HAL side.
2013-11-19 18:26:46 +02:00
Szymon Janc
2399cd19e6 android/hal-bluetooth: Remove not needed check in set_adapter_property
Properties types are verified on daemon side and proper error is
returned on wrong type. No need to double check that on HAL side.
2013-11-19 18:24:49 +02:00
Szymon Janc
d090b7b8e5 android/hal-bluetooth: Handle dut mode receive event
Pass received data to callback if it is present.
2013-11-19 18:24:34 +02:00
Szymon Janc
a293f0e8f4 android/hal-bluetooth: Remove not needed __func__ from debug print
DBG macro already adds function name to print output.
2013-11-19 18:24:12 +02:00
Szymon Janc
697405ef01 android/hal-bluetooth: Add support for dut mode send command
This is used to send test HCI commands when DUT mode is enabled.
2013-11-19 18:22:43 +02:00
Szymon Janc
2fcb0e3903 android/hal-bluetooth: Add support for dut mode configure command
This command is used to enter or exit DUT mode.
2013-11-19 18:22:33 +02:00
Szymon Janc
b43aac26d2 android/hal-bluetooth: Add support for get remote service record cmd 2013-11-19 18:21:57 +02:00
Szymon Janc
d99a0d216f android/hal-bluetooth: Add support for set remote device property cmd
This command is used to set remote device property of specified type.
2013-11-19 18:21:22 +02:00
Szymon Janc
598f60cbd3 android/hal-bluetooth: Add support for get remote device properties cmd
This command is used to get all properties of remote device.
2013-11-19 18:21:11 +02:00
Szymon Janc
c916ed5ff2 android/hal-bluetooth: Add support for get remote device property cmd
This command is used to get remote device property of specifided type.
2013-11-19 18:20:48 +02:00
Johan Hedberg
497bbf94d0 android/hidhost: Fix misuse of errno 2013-11-19 18:20:13 +02:00
Ravi kumar Veeramally
a3d66e91fa android/hidhost: Handle error case properly in interrupt_connect_cb
In case of conn_err in interrupt_connect_cb, device is freed but
connection status is not notified. Declared a local variable and
handled error case properly in case of conn_err and uhid failures.
Now connection status notified before freeing device.
2013-11-19 18:18:39 +02:00
Ravi kumar Veeramally
b3132fe966 android/hidhost: Free all connected devices in profile cleanup call
This can be easily verified with haltest tool.
2013-11-19 18:15:37 +02:00
Ravi kumar Veeramally
b32461d42d android: Handle multiple init(register) and cleanup(unregister) calls properly
This can be tested with haltest.
2013-11-19 18:15:37 +02:00
Ravi kumar Veeramally
699c946daf android/hal-pan: Return error in case of unsupported PAN roles 2013-11-19 18:15:37 +02:00
Szymon Janc
d00e259514 android/hal: Check if command socket was shutdown by peer
This will allow to print proper error before exiting.
2013-11-19 16:42:02 +02:00
Szymon Janc
bf8c55f3de android/hal-a2dp: Use generic IPC message handling for events
Register handlers on service init and unregister on cleanup.
2013-11-19 16:42:02 +02:00
Szymon Janc
8fd569476b android/hal-pan: Use generic IPC message handling for events
Register handlers on service init and unregister on cleanup.
2013-11-19 16:42:02 +02:00
Szymon Janc
a54c1e9259 android/hal-hidhost: Use generic IPC message handling for events
Register handlers on service init and unregister on cleanup.
2013-11-19 16:42:01 +02:00
Szymon Janc
c58070eb1e android/hal-bluetooth: Register IPC message handlers
Register handlers on service init. Since this requires all handlers to
be registered (unknown opcode is considered IPC error) missing handlers
stubs are provided.
2013-11-19 16:42:01 +02:00
Szymon Janc
d7f2a7916f android/hal: Add initial code for IPC message handlers
This will allow to register and unregister handlers for IPC messages
Basic sanity check will be done in common code. Commands with variable
length will be verified against minimum size only.
2013-11-19 16:42:01 +02:00
Andrei Emeltchenko
07ff7758fd android/hal-sock: Print bdaddr string instead of pointer 2013-11-19 16:06:13 +02:00
Ravi kumar Veeramally
0a5ae04d8e android/pan: Fix wrong struct parameter in disconnect function call 2013-11-19 15:23:20 +02:00
Andrei Emeltchenko
e818990935 android/A2DP: Use sdp_data_free for freeing sdp data types 2013-11-19 12:15:51 +02:00
Andrei Emeltchenko
fafd7c20b1 android/A2DP: trivial: Use NULL for zero pointer 2013-11-19 12:15:19 +02:00
Andrei Emeltchenko
2022b92090 android: trivial: Add comment making code consistent 2013-11-19 11:16:11 +02:00
Andrei Emeltchenko
bde65270e3 android/socket: Add connect signal to socket
Connect signal is used to pass information to framework that socket
is accepted.
2013-11-19 11:15:49 +02:00
Szymon Janc
5a8313a473 android/hal: Verify command status response before processing
This makes HAL IPC code verify error reply before processing it. It
also verify if success status was reported according to IPC spec.
2013-11-18 15:17:24 +02:00
Szymon Janc
fc10c55498 android: Improve IPC helper to not send invalid status response
This fix issue with sending invalid success response from several
places where ipc_send_rsp was used for reporting success. Instead of
using using ipc_send for success response, make helper handle that.
2013-11-18 15:17:22 +02:00
Andrei Emeltchenko
f9d15c95af android/a2dp: Use NULL for zero pointer 2013-11-18 13:04:22 +02:00
Andrei Emeltchenko
7d777eda20 android/socket: Use static local adapter address 2013-11-18 10:42:37 +02:00
Andrei Emeltchenko
e94a667739 android/hal-sock: Add debug flag printing 2013-11-18 10:42:18 +02:00
Szymon Janc
2e86eac876 android: Refactor update_found_device function
This makes function flow easier to follow and understand. Besides that
it also fix issue with sending to many bytes if some prop were not
present in EIR.
2013-11-16 20:22:03 +02:00
Szymon Janc
51012a0104 android: Fix sending invalid remote device property event
Remote device property event has variable length, pass whole event
length to ipc_send, not only header.
2013-11-16 20:22:01 +02:00
Szymon Janc
ff7246fb8f android: Fix sending remote device property if name is not present
This fix missing bdaddr to string convertion if name was NULL. This
was resulting in using undefined dst value.
2013-11-16 20:21:59 +02:00
Lukasz Rymanowski
ba310d7f90 android: Change TODO with explaining comment 2013-11-15 20:23:38 +02:00
Lukasz Rymanowski
e623075212 android: Update bond state on auth and connect failed 2013-11-15 20:22:23 +02:00
Lukasz Rymanowski
818d532ba3 android: Cache device name on device list. 2013-11-15 20:20:51 +02:00