Commit Graph

538 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
e40bfde22e android: Add copy of current AVDTP implemention
These files are not added to any makefile on purpose because they still
have external dependencies.
2013-11-25 15:59:28 +02:00
Andrei Emeltchenko
a7f01b2e1b android/socket: Add error printing possible close() failure 2013-11-25 15:37:17 +02:00
Andrei Emeltchenko
407789abea android/socket: Use default sec_level for listen
Set default security level low for OPP and SPP and medium for PBAP and MAS.
Default security level would be low for listening without profile.
2013-11-25 15:36:25 +02:00
Andrei Emeltchenko
1c2efb5093 android/hal-utils: Fix possible NULL pointer dereference 2013-11-25 15:34:15 +02:00
Andrei Emeltchenko
ed7452fbbf android/socket: Refactor socket send_fd function
Make code cleaner and initialize local cmsg buffer to zeroes.
2013-11-25 15:32:31 +02:00
Andrei Emeltchenko
b975a903fb android/hal-sock: Print bdaddr on connect 2013-11-25 15:32:14 +02:00
Andrei Emeltchenko
d84ffb05e3 android/socket: Support listen() with supplied chan number
No profile is assigned in this case. There is a possibility to use
Serial Port Profile.
2013-11-25 15:32:07 +02:00
Andrei Emeltchenko
27d036281a android/socket: Add SPP SDP record 2013-11-25 15:30:42 +02:00
Andrei Emeltchenko
980ffed8d7 android/socket: Add PBAP SDP record
This adds SDP service record like shown below:

Service Name: OBEX Phonebook Access Server
Service RecHandle: 0x10002
Service Class ID List:
  "Phonebook Access - PSE" (0x112f)
Protocol Descriptor List:
  "RFCOMM" (0x0003)
    Channel: 15
  "OBEX" (0x0008)
Profile Descriptor List:
  "Phonebook Access" (0x1130)
    Version: 0x0100
2013-11-25 15:30:33 +02:00
Andrei Emeltchenko
58ab9edb8a android/socket: Add SPP uuid to profile table 2013-11-25 15:30:24 +02:00
Andrei Emeltchenko
b1e23ebd37 android/socket: Add MAS uuid to profile table 2013-11-25 15:30:13 +02:00
Andrei Emeltchenko
30d49b2b3a android/socket: Add OPP SDP record
This adds SDP record for OPP shown below:

Service Name: OBEX Object Push
Service RecHandle: 0x10002
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "RFCOMM" (0x0003)
    Channel: 9
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100
2013-11-25 15:29:58 +02:00
Andrei Emeltchenko
181158d8e6 android/socket: Add general service create/remove function
create_record function from profile is used to create SDP service record.
The record is removed from rfsock cleanup function.
2013-11-25 15:29:15 +02:00
Andrei Emeltchenko
cb2fdb2f53 android/socket: Close file descriptor after sending 2013-11-25 15:28:29 +02:00
Andrei Emeltchenko
7a9c4622e4 android/socket: Send connect signal to Android framework
Android framework expects connect signal to be sent when
remote device is connected.
2013-11-25 15:28:01 +02:00
Andrei Emeltchenko
c8226366a8 android/socket: Send RFCOMM channel to framework
Framework expects channel to be send.
2013-11-25 15:27:00 +02:00
Andrei Emeltchenko
a1deeaf589 android/socket: Implement HAL connect call
HAL connect uses similar event handlers like listen call.
2013-11-25 15:26:03 +02:00
Andrei Emeltchenko
9b33ebad23 android/socket: Parse SDP response and connect
Parse SDP response, find RFCOMM channel and connect.
2013-11-25 15:25:52 +02:00
Andrei Emeltchenko
044baf78ef android/bluetooth: Fix memory leak 2013-11-25 14:51:08 +02:00
Jakub Tyszkowski
47536a57a9 android/pics: Add PTS PICS for DID
PTS PICS for DID, targeting Android 4.4.
2013-11-25 14:47:40 +02:00
Jakub Tyszkowski
9942252e00 android/pics: Add PTS PICS for PAN
PTS PICS for PAN, targeting Android 4.4.
2013-11-25 14:47:40 +02:00
Szymon Janc
034e30e642 android/hal-bluetooth: Use static memory for enum convertion
There is no need to use dynamic allocation for enum properties
convertion. Each property type can be present only once in properties
callback so using static allocation is safe. This also remove need
for cleanup properties after HAL callback is called making code
simpler.
2013-11-25 14:45:59 +02:00
Andrei Emeltchenko
71e455c8b9 android/haltest: Zero initialize cmsg buffer 2013-11-21 16:43:40 +02:00
Andrei Emeltchenko
e73bd888be android/ipc: Zero initialize cmsg buffer
This fixes valgrind warnings:
...
Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)
...
2013-11-21 16:43:38 +02:00
Luiz Augusto von Dentz
ee750796da android/a2dp: Cleanup devices on unregister
This cleanup any existing devices in bt_a2dp_unregister
2013-11-21 10:15:51 +02:00
Andrei Emeltchenko
7ee3686348 android/socket: Implement socket connect HAL method
First step is to query remote device for RFCOMM channel.
2013-11-20 15:10:53 +02:00
Andrei Emeltchenko
002a64f595 android/socket: Notify channel to Android framework
Android framework expects to receive channel number as int.
2013-11-20 15:10:45 +02:00
Andrei Emeltchenko
34c4ae9ad8 android/socket: Send accept signal to Android framework
Android expects to get accept signal over file descriptor which was
set during listen HAL call.
2013-11-20 15:10:17 +02:00
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