OSDN Git Service
Szymon Janc [Thu, 19 Dec 2013 12:38:29 +0000 (13:38 +0100)]
android/bluetooth: Add initial support for permanent storage
This patch adds initial support for storing adapter configuration.
Currently stored data is address, name and discoverable timeout.
Since Android daemon storage format is to be simpler than Linux check
if correct adapter is used before going operational. This is
a precaution to avoid e.g. using linkkeys generated for different
controller.
Luiz Augusto von Dentz [Fri, 20 Dec 2013 10:59:26 +0000 (12:59 +0200)]
android/AVDTP: Duplicate fd passed to avdtp_new
This use dup to create a new fd to be used by AVDTP session leaving the
caller free to close the original fd. Note that even if the caller
decides to keep the original fd it will still be notified when
avdtp_shutdown is called since it uses shutdown.
Marcin Kraglak [Fri, 20 Dec 2013 10:53:47 +0000 (11:53 +0100)]
emulator/bthost: Remove not used bthost_set_server_psm
This function is not needed and has been replaced with bthost_add_l2cap_server.
Marcin Kraglak [Fri, 20 Dec 2013 10:53:46 +0000 (11:53 +0100)]
android/android-tester: Remove not necessary bthost_set_server_psm
Replace this function with bthost_add_l2cap_server().
Marcin Kraglak [Fri, 20 Dec 2013 10:53:45 +0000 (11:53 +0100)]
tools/l2cap-tester: Remove not necessary bthost_set_server_psm
This function can be replaced with bthost_add_l2cap_server().
Szymon Janc [Fri, 20 Dec 2013 10:25:40 +0000 (11:25 +0100)]
android/bluetooth: Add stubs for missing commands
This adds stubs for commands that were introduced by BT HAL changes
in Android 4.3+.
Szymon Janc [Fri, 20 Dec 2013 10:25:39 +0000 (11:25 +0100)]
android/hal-bluetooth: Add support for device service record property
This allows to correctly handle device service record property.
Szymon Janc [Fri, 20 Dec 2013 10:25:38 +0000 (11:25 +0100)]
android/hal-bluetooth: Add support for remote version info property
This allows to correctly handle remote version info property. Although
this property is marked as get/set in HAL only get is implemented as
I fail to see how this property could be settable.
Szymon Janc [Fri, 20 Dec 2013 10:25:37 +0000 (11:25 +0100)]
android/hal-bluetooth: Add support for enabling HCI snoop dump
This allows to enable HCI SNOOP dump from HAL. This requires that
service named 'bluetoothd_snoop' be available in Android system.
Szymon Janc [Fri, 20 Dec 2013 10:25:36 +0000 (11:25 +0100)]
android/hal-bluetooth: Add support for sending LE_TEST_MODE command
This allows to send LE_TEST_MODE command introduced in Android 4.3.
Marcin Kraglak [Fri, 20 Dec 2013 09:30:29 +0000 (10:30 +0100)]
tools/l2cap-tester: Fix memory leak
Set close_on_unref on new created GIOChannel and don't close
its file descriptor.
126 (120 direct, 6 indirect) bytes in 1 blocks aredefinitely
lost in loss record 24 of 28
at 0x4A06409: malloc (in/usr/lib64/valgrind/vgpreload_memcheck
-amd64-linux.so)
by 0x3C9564D88E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3C956881F4: g_io_channel_unix_new (in/usr/lib64/libglib-
2.0.so.0.3600.3)
by 0x402A5A: l2cap_listen_cb (l2cap-tester.c:774)
by 0x3C95647DF5: g_main_context_dispatch (in/usr/lib64/
libglib-2.0.so.0.3600.3)
by 0x3C95648147: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3C95648549: g_main_loop_run
(in/usr/lib64/libglib-2.0.so.0.3600.3)
by 0x40A67C: tester_run (tester.c:784)
by 0x4026A9: main (l2cap-tester.c:991)
Johan Hedberg [Fri, 20 Dec 2013 08:29:28 +0000 (10:29 +0200)]
tools/l2cap-tester: Fix checking for read() return values
Johan Hedberg [Fri, 20 Dec 2013 08:26:18 +0000 (10:26 +0200)]
tools/l2cap-tester: Fix checking for write() return values
Marcin Kraglak [Thu, 19 Dec 2013 14:29:04 +0000 (15:29 +0100)]
tools/l2cap_tester: Add write server test case
These test case send data from local server to remote client.
Marcin Kraglak [Thu, 19 Dec 2013 14:29:03 +0000 (15:29 +0100)]
tools/l2cap_tester: Add read server test case
This test checks data transfer from remote client to server.
Marcin Kraglak [Thu, 19 Dec 2013 14:29:02 +0000 (15:29 +0100)]
tools/l2cap_tester: Add write client test case
This test case write data from client to remote server.
Marcin Kraglak [Thu, 19 Dec 2013 14:29:01 +0000 (15:29 +0100)]
tools/l2cap_tester: Add read client test case
This test case send data from remote device to client.
It verifies if data is passed corerctly through L2CAP socket.
Johan Hedberg [Fri, 20 Dec 2013 07:37:00 +0000 (09:37 +0200)]
emulator/bthost: Remove double lookup with bthost_find_l2cap_cb_by_psm
Johan Hedberg [Fri, 20 Dec 2013 07:35:33 +0000 (09:35 +0200)]
emulator/bthost: Make bthost_add_l2cap_conn return the added struct for convenience
Marcin Kraglak [Thu, 19 Dec 2013 14:29:00 +0000 (15:29 +0100)]
emulator: Add new method for adding l2cap server
This method allow user to add l2cap server and register
connect callback. If no callback is specified, it will behave
like bthost_set_server_psm() method.
Luiz Augusto von Dentz [Thu, 19 Dec 2013 15:15:56 +0000 (17:15 +0200)]
android/A2DP: Fix disconnecting after AVDTP session creation
Once the connection is handover to AVDTP code the GIOChannel can be
unref but it should not close the connection.
Luiz Augusto von Dentz [Thu, 19 Dec 2013 15:15:55 +0000 (17:15 +0200)]
android/AVDTP: Add avdtp_shutdown
avdtp_shutdown can be used to disconnect closing all existing stream
properly.
Luiz Augusto von Dentz [Thu, 19 Dec 2013 15:15:54 +0000 (17:15 +0200)]
android/A2DP: Use avdtp_add_disconnect_cb to cleanup on disconnect
This replaces the use of g_io_add_watch with avdtp_add_disconnect_cb so
connection tracking stay within AVDTP code.
Luiz Augusto von Dentz [Thu, 19 Dec 2013 15:15:53 +0000 (17:15 +0200)]
android/AVDTP: Add avdtp_add_disconnect_cb and avdtp_remove_disconnect_cb
With these functions the user application can detect when the AVDTP has
been disconnected and cleanup properly.
Szymon Janc [Thu, 19 Dec 2013 21:19:25 +0000 (22:19 +0100)]
android/bluetooth: Fix sending invalid RSSI device property
RSSI property is of int32_t type but int8_t was send in durring
remote devices discovery.
Jakub Tyszkowski [Thu, 19 Dec 2013 12:42:26 +0000 (13:42 +0100)]
android/tester: Add start device discovery done test case
This tests device discovery start being reported as done because of
ongoing discovery.
Jakub Tyszkowski [Thu, 19 Dec 2013 12:42:25 +0000 (13:42 +0100)]
android/tester: Add device discovery cancel success test case
Test for successfull discovery canceling after it was started.
Jakub Tyszkowski [Thu, 19 Dec 2013 12:42:24 +0000 (13:42 +0100)]
android/tester: Add stop device discovery done test case
Add test case for stopping device discovery when it wasn't started.
Jakub Tyszkowski [Thu, 19 Dec 2013 12:42:23 +0000 (13:42 +0100)]
android/tester: Add start device discovery success test case
Add test case for starting device discovery with success.
Jakub Tyszkowski [Thu, 19 Dec 2013 12:42:22 +0000 (13:42 +0100)]
android/tester: Fix bluetooth disable success test case
This fixes not checking for proper status on bluetooth disable.
Jakub Tyszkowski [Thu, 19 Dec 2013 12:42:21 +0000 (13:42 +0100)]
android/tester: Fix for not checking for BT_STATUS_SUCCESS
For BT_STATUS_SUCCESS no checks were done as it is 0 in bt_status_t
enum. Valid status for no status expected should be STATUS_NOT_EXPECTED.
Sebastian Chlad [Thu, 19 Dec 2013 12:53:15 +0000 (13:53 +0100)]
android/build: Add l2test to Android.mk
Enable l2test tool for the Android target.
Luiz Augusto von Dentz [Thu, 19 Dec 2013 13:08:39 +0000 (15:08 +0200)]
audio/AVRCP: Fix check for values out of range in SetAbsoluteVolume
Volume is 7 bits since the 8 bit should be ignored as it is reserved it
should never be > 127. Futhermore the value passed to
media_transport_update_device_volume should be the stored in volume as
it ignores the reserved bits properly.
Sebastian Chlad [Thu, 19 Dec 2013 12:26:41 +0000 (13:26 +0100)]
android/pts: Add PICS, PIXITs and PTS for L2CAP
This allows better tracking of the current state of implementation
Marcin Kraglak [Thu, 19 Dec 2013 09:30:01 +0000 (10:30 +0100)]
emulator: Add L2CAP PSM handling to bthost
Store the PSM of L2CAP connections. We retrieve the PSM from the
connection request frame.
Andrei Emeltchenko [Thu, 19 Dec 2013 08:51:40 +0000 (10:51 +0200)]
android/socket: Handle Android events for server socket
Add watch for tracking events from Android framework for server socket.
Android might want to close server connection, in this case we close
our listening socket and cleaning up rfsock structure. Glib watch is
added with high priority to avoid races.
Andrei Emeltchenko [Thu, 19 Dec 2013 08:51:39 +0000 (10:51 +0200)]
android/tester: Add Socket test close and listen
This test the situation when Android close file descriptor we passed to
it and try to listen() again.
Andrei Emeltchenko [Thu, 19 Dec 2013 08:49:20 +0000 (10:49 +0200)]
android/tester: Test that connect call returns channel number
The test connects to emulated bthost and read channel number
Andrei Emeltchenko [Thu, 19 Dec 2013 08:49:19 +0000 (10:49 +0200)]
android/socket: Connect directly to RFCOMM channel if uuid is zero
Check uuid and connect to specified RFCOMM channel directly if uuid is
zeroed.
Andrei Emeltchenko [Thu, 19 Dec 2013 08:49:18 +0000 (10:49 +0200)]
android/socket: Refactor connect to allow directly connect to rfcomm
Since Socket HAL allows us to specify RFCOMM channel number and directly
connect refactor send function to allow connect directly is uuid is zero
and channel number is specified.
Ravi kumar Veeramally [Wed, 18 Dec 2013 14:53:11 +0000 (16:53 +0200)]
android/pan: Change local_role to NONE only when device list is empty
Ravi kumar Veeramally [Wed, 18 Dec 2013 14:53:10 +0000 (16:53 +0200)]
android/pan: Free device after sending diconnected notification
Luiz Augusto von Dentz [Wed, 18 Dec 2013 12:29:43 +0000 (14:29 +0200)]
android/AVDTP: Fix not removing start_timer source
It is possible that stream->start_timer can be set on stream_free which
should then should take care of remove it properly otherwise it can
trigger which would very likely cause a crash.
Thanks to Hannu Mallat <hannu.mallat@jolla.com> for reporting it.
Grzegorz Kolodziejczyk [Wed, 18 Dec 2013 11:54:37 +0000 (12:54 +0100)]
android/tester: Add bluetooth HAL test case - name prefix
This add prefix for bluetooth HAL test case names. Bluetooth HAL test
cases now can be easily distinguished. Now Bluetooth HAL test cases
can be run separately.
Grzegorz Kolodziejczyk [Wed, 18 Dec 2013 11:54:36 +0000 (12:54 +0100)]
android/tester: Move Bluetooth HAL functions before socket HAL
This patch move bluetooth HAL test functions before socket
HAL functions. This make it more readable for future test cases growth.
Johan Hedberg [Wed, 18 Dec 2013 10:39:01 +0000 (12:39 +0200)]
android/tester: Fix expected_property_len value for bdname test
Johan Hedberg [Wed, 18 Dec 2013 10:32:01 +0000 (12:32 +0200)]
android/tester: Fix whitespace wrt braces
Andrei Emeltchenko [Wed, 18 Dec 2013 08:55:13 +0000 (10:55 +0200)]
android/tester: Enable bthost after device is enabled
This puts bthost to connectible mode allowing us to use powered setup
for connect to emulated device.
Andrei Emeltchenko [Wed, 18 Dec 2013 08:55:12 +0000 (10:55 +0200)]
android/tester: Check return status for enable()
Use check_expected_status helper for test for returned status in
enable() HAL call.
Andrei Emeltchenko [Wed, 18 Dec 2013 08:55:11 +0000 (10:55 +0200)]
android/tester: Check status returned from HAL calls
In test setup phase check status returned from enable() call.
Grzegorz Kolodziejczyk [Wed, 18 Dec 2013 09:53:13 +0000 (10:53 +0100)]
android/tester: Add SERVICE_RECORD set prop fail test case
This adds SERVICE_RECORD set property fail test case due to only
get possibility.
Grzegorz Kolodziejczyk [Wed, 18 Dec 2013 09:53:12 +0000 (10:53 +0100)]
android/tester: Add RSSI set prop fail test case
This adds RSSI set property fail test case due to be only remote device
property.
Grzegorz Kolodziejczyk [Wed, 18 Dec 2013 09:53:11 +0000 (10:53 +0100)]
android/tester: Add TOD set prop fail test case
This adds TYPE_OF_DEVICE set property fail test case due to only
get possibility.
Grzegorz Kolodziejczyk [Wed, 18 Dec 2013 09:53:10 +0000 (10:53 +0100)]
android/tester: Add COD set prop fail test case
This adds CLASS_OF_DEVICE set property fail test case due to only
get possibility.
Grzegorz Kolodziejczyk [Wed, 18 Dec 2013 09:53:09 +0000 (10:53 +0100)]
android/tester: Add UUIDS set prop fail test case
This adds UUIDS set property fail test case due to only get
possibility.
Luiz Augusto von Dentz [Tue, 17 Dec 2013 16:05:50 +0000 (18:05 +0200)]
unit/AVDTP: Add /TP/SIG/FRA/BV-02-C test
Verify ithat the IUT (SNK) is able to receive streaming media data on an
established stream.
Luiz Augusto von Dentz [Tue, 17 Dec 2013 15:26:16 +0000 (17:26 +0200)]
unit/AVDTP: Add /TP/SIG/FRA/BV-01-C test
Verify that the IUT (INT and ACP) fragments the signaling messages that
cannot fit in a single L2CAP packet.
Andrei Emeltchenko [Tue, 17 Dec 2013 14:17:33 +0000 (16:17 +0200)]
android/tester: Fix not returning in failure
Szymon Janc [Mon, 16 Dec 2013 14:37:31 +0000 (15:37 +0100)]
bluetooth/hidhost: Fix using feature event as output event
Rename handle_uhid_event to handle_uhid_output and make it handle only
output events.
Grzegorz Kolodziejczyk [Tue, 17 Dec 2013 12:37:49 +0000 (13:37 +0100)]
android/tester: Check adapter cb irrespective of receiving order
This patch change checking of expected callbacks from static order to
dynamic. For example properties can be received in different order
than now.
Grzegorz Kolodziejczyk [Tue, 17 Dec 2013 12:37:48 +0000 (13:37 +0100)]
android/tester: Fix enum and define coding style
This changes all enums values and defines to uppercase instead of
lowercase according to coding style.
Jakub Tyszkowski [Tue, 17 Dec 2013 10:53:53 +0000 (11:53 +0100)]
android/pts: Add PTS test results for MAP
Stock Bluedroid PTS results.
Jakub Tyszkowski [Tue, 17 Dec 2013 10:53:52 +0000 (11:53 +0100)]
android/pts: Add PTS PICS and PIXIT for MAP
Add PICS and PIXIT targetting Android 4.4 and PTS version 5.0.
Johan Hedberg [Tue, 17 Dec 2013 11:00:16 +0000 (13:00 +0200)]
tools/smp-tester: Prefer tester_warn() over fprintf
Andrei Emeltchenko [Mon, 16 Dec 2013 14:52:47 +0000 (16:52 +0200)]
android/tester: Add missing break
Lukasz Rymanowski [Thu, 5 Dec 2013 13:59:54 +0000 (14:59 +0100)]
android/audio: Add audio-hal initial skeleton
This patch adds audio module for A2DP.
Also adds empty callbacks for stream_out, stream_in and hw_device
methods.
Lukasz Rymanowski [Thu, 5 Dec 2013 13:59:53 +0000 (14:59 +0100)]
android/audio: Add kitkat audio headers
This patch add audio headers required to implement A2DP audio module
Note that from all of these files #include <cutils/bitops.h> has been
removed. The only function used from this include is popcount() and it
is used in system/audio.h. Instead of this function we can use GCC
builtin function __builtin_popcount() which does what is needed.
Luiz Augusto von Dentz [Fri, 13 Dec 2013 12:26:11 +0000 (14:26 +0200)]
android: Add initial Android Bluetooth Audio protocol API doc
This IPC is used to communicate Android BlueZ daemon and AudioFlinger
plugin.
Andrei Emeltchenko [Mon, 16 Dec 2013 08:57:42 +0000 (10:57 +0200)]
hciemu: Print error in case hci_vhci is not loaded
Error message should indicate that module is not loaded:
Opening /dev/vhci failed: No such file or directory
Andrei Emeltchenko [Mon, 16 Dec 2013 08:57:40 +0000 (10:57 +0200)]
hciemu: Make code consistent
It is enough to check for zero in __sync_sub_and_fetch(). This makes
code consistent like shown below:
./src/shared/mgmt.c: if (__sync_sub_and_fetch(&mgmt->ref_count, 1))
./src/shared/pcap.c: if (__sync_sub_and_fetch(&pcap->ref_count, 1))
./src/shared/btsnoop.c: if (__sync_sub_and_fetch(&btsnoop->ref_count, 1))
./src/shared/hciemu.c: if (__sync_sub_and_fetch(&hciemu->ref_count, 1))
Andrei Emeltchenko [Mon, 16 Dec 2013 08:57:38 +0000 (10:57 +0200)]
btmgmt: Remove unneeded code
Andrei Emeltchenko [Mon, 16 Dec 2013 08:38:57 +0000 (10:38 +0200)]
android/tester: Add Socket test invalid bdaddr
Test for zero bluetooth address in connect().
Andrei Emeltchenko [Mon, 16 Dec 2013 08:38:56 +0000 (10:38 +0200)]
android/tester: Add Socket test invalid chan and uuid
At least one of parameters: channel or uuid shouldn't be zero.
Andrei Emeltchenko [Mon, 16 Dec 2013 08:38:55 +0000 (10:38 +0200)]
android/tester: Add Socket test read channel number after listen
After listen() call Bluedroid sends channel number as (int) through file
descriptor.
Andrei Emeltchenko [Mon, 16 Dec 2013 08:03:25 +0000 (10:03 +0200)]
android/tester: Fix syntax of test cases
Remove "Test" from every test message print and correct typo.
Szymon Janc [Sun, 15 Dec 2013 19:55:48 +0000 (20:55 +0100)]
emulator/bthost: Fix use after free in bthost_destroy
cmd was dereferenced after free. Use temp pointer for freeing.
Sebastian Chlad [Sun, 15 Dec 2013 11:47:49 +0000 (12:47 +0100)]
build: Add missing test scripts to Makefile.tools
Szymon Janc [Fri, 13 Dec 2013 14:20:41 +0000 (15:20 +0100)]
android/bluetooth: Add support for getting remote device UUIDs property
This allows to query for remote device UUIDs property.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:25 +0000 (13:44 +0100)]
android/tester: Add bdname get prop success test case
This adds bdname set property success test case. First bdname is set and
then is read.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:24 +0000 (13:44 +0100)]
android/tester: Add bdaddr get prop success test case
This adds bdaddr set property success test case.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:23 +0000 (13:44 +0100)]
android/tester: Add discovery timeout set prop success test case
This adds discovery timeout set property success test case.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:22 +0000 (13:44 +0100)]
android/tester: Add scan mode set prop success test case
This adds scan mode set property success test case.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:21 +0000 (13:44 +0100)]
android/tester: Add property check and bdname set success test case
This adds handling of property check, bdname set property success.
Szymon Janc [Fri, 13 Dec 2013 12:38:11 +0000 (13:38 +0100)]
android/bluetooth: Fix missing property change notification
After setting new discoverable timeout property change notification
with new value should be send.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:54 +0000 (17:17 +0200)]
android/hal-sock: Fix returning incorrect error code
For socket type 0 we shall return BT_STATUS_PARM_INVALID.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:53 +0000 (17:17 +0200)]
android/tester: Add Socket test connect invalid sock_type L2CAP
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:52 +0000 (17:17 +0200)]
android/tester: Add Socket test connect() invalid sock_type
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:51 +0000 (17:17 +0200)]
android/socket: Do not close fd on unref
We close file descriptors in cleanup_rfsock() and leaving the default
value gives us glib warnings if we close fd already and got G_IO_NVAL in
server_cb from bt_io.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:50 +0000 (17:17 +0200)]
android/tester: Add Socket test success with valid fd
Check that Socket listen() returns valid file descriptor
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:49 +0000 (17:17 +0200)]
android/tester: trivial: Make test cases prints look nice
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:48 +0000 (17:17 +0200)]
android/tester: Check that fd is valid for Success case
For the successful test case check that file descriptor is valid through
fcntl which is cheap way.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:47 +0000 (17:17 +0200)]
android/tester: Add Socket test invalid params: chan and uuid
For the socket listen() call parameters channel and uuid cannot be both
zeroes.
Johan Hedberg [Fri, 13 Dec 2013 10:28:18 +0000 (12:28 +0200)]
btiotest: Add missing source type to bt_io_connect calls
Johan Hedberg [Fri, 13 Dec 2013 10:19:25 +0000 (12:19 +0200)]
btio: Update to support sockopts for LE CoC sockets
Bastien Nocera [Thu, 12 Dec 2013 16:16:28 +0000 (17:16 +0100)]
sixaxis: Fix device detection
After searching past the end of the structure, the loop sometimes
found matches in the daemon's address space...
This fixes the loop to end after the elements have been exhausted.
Szymon Janc [Thu, 12 Dec 2013 15:38:57 +0000 (16:38 +0100)]
android/pts: Add PTS test results for PBAP
This will allow for better tracking of current state of implementation.
Szymon Janc [Thu, 12 Dec 2013 15:38:56 +0000 (16:38 +0100)]
android/pts: Add PTS test results for OPP
This will allow for better tracking of current state of implementation.
Szymon Janc [Thu, 12 Dec 2013 13:35:40 +0000 (14:35 +0100)]
android/pts: Add PTS test results for HID
This will allow for better tracking of current state of implementation.
Szymon Janc [Thu, 12 Dec 2013 13:35:39 +0000 (14:35 +0100)]
android/pts: Add PTS test results for GAP
This will allow for better tracking of current state of implementation.
Luiz Augusto von Dentz [Fri, 13 Dec 2013 08:38:34 +0000 (10:38 +0200)]
android/tester: Fix failing tests
Two new adapter properties were indroduced in the daemon which broke
some tests.