OSDN Git Service
Johan Hedberg [Mon, 28 Jul 2014 20:01:35 +0000 (23:01 +0300)]
mgmt-tester: Update expected LE Host Supported command parameters
Johan Hedberg [Mon, 28 Jul 2014 10:54:32 +0000 (13:54 +0300)]
core: Default to temporary=true when creating new devices
Since the code that calls Add Device depends on all devices undergoing a
temporary true -> false transition, start off by having them default to
being temporary. This fixes properly calling Add Device when loading
from storage upon bluetoothd startup.
Johan Hedberg [Mon, 28 Jul 2014 10:24:00 +0000 (13:24 +0300)]
tools/btmgmt: Fix grammar for zero items
Arman Uguray [Fri, 25 Jul 2014 22:08:43 +0000 (15:08 -0700)]
shared/gatt: Implement notification/indication helper.
This patch implements bt_gatt_register, which sets up internal callbacks for
incoming notifications and indications, parses the PDU and provides it to the
upper layer. It also automatically sends out a confirmation when an indication
is received.
Arman Uguray [Fri, 25 Jul 2014 22:08:42 +0000 (15:08 -0700)]
shared/gatt: Implement "Write Long Values" procedure.
This patch implements bt_gatt_write_long_value.
Arman Uguray [Fri, 25 Jul 2014 22:08:41 +0000 (15:08 -0700)]
shared/gatt: Implement "Write Value" and "Write Without Response" procedures.
This patch implements the bt_gatt_write_without_response and bt_gatt_write_value
functions.
Arman Uguray [Fri, 25 Jul 2014 22:08:40 +0000 (15:08 -0700)]
shared/gatt: Implement "Read Long Characteristic Values" procedure.
This patch implements bt_gatt_read_long_value.
Arman Uguray [Fri, 25 Jul 2014 22:08:39 +0000 (15:08 -0700)]
shared/gatt: Implement "Read" procedure.
This patch implements bt_gatt_read_value, which can be used to read the value of
a characteristic or descriptor.
Arman Uguray [Fri, 25 Jul 2014 22:08:38 +0000 (15:08 -0700)]
shared/gatt: Implement "Descriptor Discovery" procedure.
This patch implements bt_gatt_discover_descriptors.
Arman Uguray [Fri, 25 Jul 2014 22:08:37 +0000 (15:08 -0700)]
shared/gatt: Implement "Characteristic Discovery" procedures.
This patch implements bt_gatt_discover_characteristics, which can perform the
characteristic discovery procedures "Discover All Characteristics of a Service"
and "Discover Characteristics by UUID".
Arman Uguray [Fri, 25 Jul 2014 22:08:36 +0000 (15:08 -0700)]
shared/gatt: Implement "Discover Primary Service by UUID" procedure.
This patch implements bt_gatt_discover_primary_services for the case when a UUID
is provided.
Arman Uguray [Fri, 25 Jul 2014 22:08:35 +0000 (15:08 -0700)]
shared/gatt: Implement "Discover All Primary Services" procedure.
This patch implements bt_gatt_discover_primary_services for the case when no
UUID is provided.
Arman Uguray [Fri, 25 Jul 2014 22:08:34 +0000 (15:08 -0700)]
shared/gatt: Implement bt_gatt_exchange_mtu.
This patch implements the helper function bt_gatt_exchange_mtu, which performs
an ATT "Exchange MTU" request and resizes the internal buffer based on the
result.
Arman Uguray [Fri, 25 Jul 2014 22:08:33 +0000 (15:08 -0700)]
shared/gatt: Introduce gatt-helpers.h skeleton.
This patch introduces the skeleton for src/shared/gatt-helpers, which defines
helper functions for over-the-air GATT client-side procedures that will be
frequently used by clients. Most of these functions require several sequential
ATT protocol requests and it is useful to abstract these details away from the
upper layer.
Szymon Janc [Fri, 25 Jul 2014 11:10:42 +0000 (13:10 +0200)]
android/cts: Update test results for CTS 4.4 R3
Sebastian Chlad [Fri, 25 Jul 2014 11:01:16 +0000 (13:01 +0200)]
android/pts: Regression tests on SM against PTS 5.2
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:17 +0000 (13:32 +0200)]
android/tester-ng: Fix not freeing porperties value
This fixes 3 valgrind reports like:
8 bytes in 2 blocks are definitely lost in loss record 7 of 47
==8437== at 0x4C2AB80: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8437== by 0x5089610: g_malloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==8437== by 0x50A0B57: g_memdup (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==8437== by 0x40E94E: create_property (tester-main.c:623)
==8437== by 0x40F96C: ssp_request_cb (tester-main.c:741)
==8437== by 0x5F70E5A: notification_handler (hal-ipc.c:125)
==8437== by 0x534B181: start_thread (pthread_create.c:312)
==8437== by 0x565C30C: clone (clone.S:111)
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:16 +0000 (13:32 +0200)]
android/tester-ng: Remove not needed include
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:15 +0000 (13:32 +0200)]
android/tester-ng: Fix not initializing step
This fixes the following vagrind report:
==12708== 4 errors in context 1 of 1:
==12708== Conditional jump or move depends on uninitialised value(s)
==12708== at 0x40E359: verify_step (tester-main.c:416)
==12708== by 0x40E5FD: verify_action (tester-main.c:540)
==12708== by 0x5083CE4: g_main_context_dispatch (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12708== by 0x5084047: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12708== by 0x5084309: g_main_loop_run (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12708== by 0x40D51C: tester_run (tester.c:812)
==12708== by 0x40251E: main (tester-main.c:1496)
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:14 +0000 (13:32 +0200)]
android/tester-ng: Fix structure members constness
It's better to know what actually may change by looking at the structure
definitions. Some api calls can modify their parameters (returning file
descriptor in socket HAL API) but most of them don't.
This patch mostly applies to action_data and test_case structs that defines
the actual test case.
Jakub Tyszkowski [Fri, 25 Jul 2014 11:32:13 +0000 (13:32 +0200)]
android/tester-ng: Fix treating callback as action step
Next action step might pass before the action was even called. This was
possible when not expected callback came. This patch forces check for
callback also on the incomming step and not only on the expected one.
Marcel Holtmann [Fri, 25 Jul 2014 01:37:52 +0000 (03:37 +0200)]
monitor: Print proper LE supported state combination
Johan Hedberg [Thu, 24 Jul 2014 15:26:28 +0000 (18:26 +0300)]
input: Remove broken UHID_FEATURE support
The forward_report function currently assumes that all events it gets
are of UHID_OUTPUT type. Simply remove trying to use it for anything
else until we have a proper patch for UHID_FEATURE handling.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:07 +0000 (10:38 +0200)]
android/tester: Remove old socket HAL test cases
These were already ported to the new testing framework.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:06 +0000 (10:38 +0200)]
android/tester-ng: Add socket connect success cases
Adding socket connect cases requires to set up the the l2cap and
rfcomm servers on the emulated device. For this, the bthost_l2cap_connect_cb
type had to exposed in tester-main.h and pulled some bthost dependencies
along.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:05 +0000 (10:38 +0200)]
android/tester-ng: Fix trying to verify late callbacks
Dont even try to verify late callbacks when test case already ended.
This was triggering confusing message about verifying step N+1 when we
have only N steps in current case.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:04 +0000 (10:38 +0200)]
android/tester-ng: Set scan enable for dual mode devices
This is needed for socket HAL connect test cases.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:03 +0000 (10:38 +0200)]
android/tester-ng: Add various socket connect fail cases
Thiose test verifies socket porofile behaviour in case of invalid
parameters passed to 'connect' command.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:02 +0000 (10:38 +0200)]
android/tester-ng: Add socket double listen fail case
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:01 +0000 (10:38 +0200)]
android/tester-ng: Add socket listen - close than listen case
This checks for another successfull listen after closing previous fd.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:38:00 +0000 (10:38 +0200)]
android/tester-ng: Add socket listen - verify channel case
Jakub Tyszkowski [Thu, 24 Jul 2014 08:37:59 +0000 (10:37 +0200)]
android/tester-ng: Add socket listen - verify fd case
Jakub Tyszkowski [Thu, 24 Jul 2014 08:37:58 +0000 (10:37 +0200)]
android/tester-ng: Add socket listen - invalid channel case
Jakub Tyszkowski [Thu, 24 Jul 2014 08:37:57 +0000 (10:37 +0200)]
android/tester-ng: Add socket listen - invalid param cases
Jakub Tyszkowski [Thu, 24 Jul 2014 08:37:56 +0000 (10:37 +0200)]
android/tester-ng: Expose action step verification function
This is needed for profile specific testers to define step actions
(and verify their results) in their own file and not in tester-main.c
where only core actions, needed by all other testers should be defined.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:37:55 +0000 (10:37 +0200)]
android/tester-ng: Make action calls non recurent
All action steps steps were called recurently if not interleaved with
callbacks steps in test case definition. This could block any potential
callback that was not expected to come, as mainloop was stuck. This could
raise potential stability issues and timeouts when working with file
descriptors and io channels handled in the main loop.
Jakub Tyszkowski [Thu, 24 Jul 2014 08:37:54 +0000 (10:37 +0200)]
doc: Update Android tests coverage
One test case was not ported to new tester framework as it was
considered invalid.
Andrei Emeltchenko [Wed, 23 Jul 2014 11:35:01 +0000 (14:35 +0300)]
android/doc: Add Audio SCO HAL documentation
Andrei Emeltchenko [Wed, 23 Jul 2014 11:35:00 +0000 (14:35 +0300)]
android/client: Check stream before standby() call
Rearrange stop sequence. Fixes following issue:
...
Program received signal SIGSEGV, Segmentation fault.
0x00000000004105b8 in stop_p (argc=<optimized out>, argv=<optimized
out>) at android/client/if-sco.c:483
483 stream_out->common.standby(&stream_out->common);
(gdb) bt
out>) at android/client/if-sco.c:483
...
f stop
Andrei Emeltchenko [Wed, 23 Jul 2014 11:34:59 +0000 (14:34 +0300)]
android/client: Fix crash reading not connected SCO
When SCO is not connected we get -1 from in_read() HAL function.
Andrei Emeltchenko [Wed, 23 Jul 2014 11:34:58 +0000 (14:34 +0300)]
android/client: Fix double close issue
File is closed inside reading thread. Fixes:
...
Error in
`.../bluez/android/haltest':
double free or corruption (!prev): 0x000000000065a5e0 ***
Program received signal SIGABRT, Aborted.
...
Sebastian Chlad [Wed, 23 Jul 2014 10:19:43 +0000 (12:19 +0200)]
android/pts: Add initial PTS files for AVDTP
Marcin Kraglak [Wed, 23 Jul 2014 09:22:25 +0000 (11:22 +0200)]
android/pts: Update PTS results for GATT
Marcin Kraglak [Wed, 23 Jul 2014 09:22:24 +0000 (11:22 +0200)]
android/pts: Update PICS for GATT
Sebastian Chlad [Wed, 23 Jul 2014 07:17:56 +0000 (09:17 +0200)]
android/pts: Update PTS tests for SPP
Grzegorz Kolodziejczyk [Tue, 22 Jul 2014 14:08:57 +0000 (16:08 +0200)]
android/pts: Update PTS files for HOGP
PICS and PIXITs updated to PTS 5.2. Regression done for Android
4.4.4.
Marcel Holtmann [Wed, 23 Jul 2014 22:52:30 +0000 (00:52 +0200)]
doc: Fix minor typo with Cancel Pair Device command
Marcel Holtmann [Wed, 23 Jul 2014 22:48:16 +0000 (00:48 +0200)]
doc: Fix minor typo with Pair Device command
Marcel Holtmann [Wed, 23 Jul 2014 20:37:28 +0000 (22:37 +0200)]
doc: Add more notes of management version 1.4 changes
Marcel Holtmann [Wed, 23 Jul 2014 20:13:48 +0000 (22:13 +0200)]
core: Allow auto-connection only for LE devices and use action 2
Marcel Holtmann [Wed, 23 Jul 2014 20:04:42 +0000 (22:04 +0200)]
doc: Mention the action 2 parameter for Add Device command
Marcel Holtmann [Wed, 23 Jul 2014 17:25:42 +0000 (19:25 +0200)]
emulator: Add support for Get MWS Transport Layer Configuration
Marcel Holtmann [Wed, 23 Jul 2014 17:00:50 +0000 (19:00 +0200)]
emulator: Add support for Read Local Supported Codecs command
Marcel Holtmann [Wed, 23 Jul 2014 16:48:49 +0000 (18:48 +0200)]
doc: Update sections affecting Add Device and Remove Device commands
Marcel Holtmann [Wed, 23 Jul 2014 14:01:22 +0000 (16:01 +0200)]
monitor: Add support for decoding Get MWS Transport Layer Configuration
Marcel Holtmann [Wed, 23 Jul 2014 13:22:30 +0000 (15:22 +0200)]
monitor: Fix minium size for for Read Local Supported Codecs response
Marcel Holtmann [Wed, 23 Jul 2014 13:18:45 +0000 (15:18 +0200)]
monitor: Use extra label parameter for codec information
Marcel Holtmann [Wed, 23 Jul 2014 08:42:33 +0000 (10:42 +0200)]
tools: Fix usage for del-device command
Marcel Holtmann [Tue, 22 Jul 2014 19:23:56 +0000 (21:23 +0200)]
monitor: Add support for decoding Read Local Supported Codecs
Sebastian Chlad [Tue, 22 Jul 2014 08:39:29 +0000 (10:39 +0200)]
android/pts: Initial PTS docs for SPP
PTS tests done on Android 4.4.4 and PTS 5.2
Jakub Tyszkowski [Mon, 21 Jul 2014 13:23:40 +0000 (15:23 +0200)]
android/tester-ng: Minor title fix for core cases
Now with more space for test case's title in the summary, we can use full
"Bluetooth" for all core bluetooth interface test cases.
Jakub Tyszkowski [Mon, 21 Jul 2014 13:23:39 +0000 (15:23 +0200)]
shared/tester: Increase space for test case title
This makes more space for case's title in the summary, and still
retains 80 chars boundary. This fixes column alignment when using
long case titles i.e. in new android-tester.
Andrei Emeltchenko [Tue, 22 Jul 2014 07:42:53 +0000 (10:42 +0300)]
android/client: Rearrange header includes
Use proper order for header includes in if-audio HAL client
Andrei Emeltchenko [Mon, 21 Jul 2014 09:53:03 +0000 (12:53 +0300)]
android/ipc: Rename connect_sco to get_fd
SCO get connected through handsfree HAL and Audio SCO HAL only need to
get SCO socket fd.
Andrei Emeltchenko [Mon, 21 Jul 2014 11:05:16 +0000 (14:05 +0300)]
android/client: Rearrange headers include
Grzegorz Kolodziejczyk [Fri, 18 Jul 2014 11:59:56 +0000 (13:59 +0200)]
android/pts: Update PTS files for HID
PICS and PIXITs updated to PTS 5.2. Regression done for Android
4.4.4.
Sebastian Chlad [Mon, 21 Jul 2014 07:54:15 +0000 (09:54 +0200)]
android/pts: Interim PTS tests results for RFCOMM
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:29 +0000 (09:40 +0200)]
android/tester: Remove old bluetooth core test cases
This removes few last bluetooth cases from the old tester.
All cases were ported to new testing framework.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:28 +0000 (09:40 +0200)]
android/tester-ng: Add more bonding cases
This adds more cases for bond, bond canceling and bond removal.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:27 +0000 (09:40 +0200)]
android/tester-ng: Add ssp confirmation cases
Needed actions were added to properly execute spp procedure. Also
callback data was extended to verify incomming ssp variant, and
action data was extended to pass ssp accept parameters.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:26 +0000 (09:40 +0200)]
android/tester-ng: Add wrong PIN reply test case
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:25 +0000 (09:40 +0200)]
android/tester-ng: Add BREDR pairing with pin test case
This also adds some actions for setting pin the emulated device and
for calling bonding api of bluetooth core.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:24 +0000 (09:40 +0200)]
android/tester-ng: Add pin request and bond state callbacks
To fully verify data passed by these callbacks we reuse existing
device properties verification mechanism. For this, callback argumenents
are repacked to properties array for further verification.
Those are verified against values passed to the callback step definition
macro just like with any other definition of callback step in which
we get device properties.
An alternative would be to extend 'bt_callback_data' struct and add new
fields for bdaddr, name, class of device and other properties, that we
get in callbacks as sepparate values and not as list of props.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:23 +0000 (09:40 +0200)]
android/tester-ng: Add missing check for callback status
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:22 +0000 (09:40 +0200)]
android/tester-ng: Improve variable's names
Some variables are specific to emulator device type and remote device type.
This patch makes names more descriptive.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:21 +0000 (09:40 +0200)]
android/tester-ng: Improve callback defining makro
This makes CALLBACK_DEVICE_PROPS and CALLBACK_DEVICE_FOUND use more
generic CALLBACK_PROPS makro.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:20 +0000 (09:40 +0200)]
android/tester-ng: Improve result print
It might be usefull to print if test involves LE or BREDR adapter and
remotes. Test case title length had to be reduced for better results
format.
Jakub Tyszkowski [Mon, 21 Jul 2014 07:40:19 +0000 (09:40 +0200)]
android/tester-ng: Allow test framework user to choose emu type
This allows to set emulated adapter type for each test case in place
where tests are defined. Previously this was hardcoded in the framework.
Andrei Emeltchenko [Fri, 18 Jul 2014 14:35:30 +0000 (17:35 +0300)]
android/hal-audio: Remove unneeded check
rsp_len cannot be NULL here because of NULL check in the beginning of
the function.
Andrei Emeltchenko [Fri, 18 Jul 2014 14:35:29 +0000 (17:35 +0300)]
android/hal-sco: Remove unneeded check
rsp_len cannot be NULL since it checked for NULL in the beginning of the
function.
Johan Hedberg [Fri, 18 Jul 2014 12:35:18 +0000 (15:35 +0300)]
core: Enable AlwaysPairable on old kernels which need it
Johan Hedberg [Fri, 18 Jul 2014 12:19:19 +0000 (15:19 +0300)]
core: Bundle pairable and discoverable together
When AlwaysPairable is not set it makes sense to simplify our modes and
bind the pairable and discoverable settings together. This means that
all three of connectable, discoverable and pairable are either on or
off.
Johan Hedberg [Fri, 18 Jul 2014 12:22:28 +0000 (15:22 +0300)]
core: Fix triggering PairableTimeout signal only when it changes
Johan Hedberg [Fri, 18 Jul 2014 12:18:43 +0000 (15:18 +0300)]
core: Fix trying to enable discoverable with a timeout
Johan Hedberg [Fri, 18 Jul 2014 12:13:22 +0000 (15:13 +0300)]
core: Move always_pairable check into adapter_set_pairable()
Johan Hedberg [Fri, 18 Jul 2014 12:11:56 +0000 (15:11 +0300)]
core: Disable connectable upon init if kernel whitelist is not in use
Johan Hedberg [Fri, 18 Jul 2014 12:04:14 +0000 (15:04 +0300)]
core: Add convenience API to check for available default agent
Szymon Janc [Fri, 18 Jul 2014 12:11:55 +0000 (14:11 +0200)]
android/tester-ng: Fix timestamp property type
This type is unspecified in HAL API and we currently use uint32_t
for it. This also fix build error on 32bit machines.
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:19 +0000 (12:48 +0300)]
android/hal-sco: Fix error code printing
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:18 +0000 (12:48 +0300)]
android/hal-sco: Fix leaving open socket
Close accepted socket always after poll loop.
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:17 +0000 (12:48 +0300)]
android/hal-audio: Fix leaving open socket
When getting out of the poll loop we shall close socket always.
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:16 +0000 (12:48 +0300)]
android/hal-sco: Fix incorrect assignment
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:15 +0000 (12:48 +0300)]
android/hal-sco: Defer SCO connection to write()
Do not return error when opening output stream if SCO is not connected
yet, we will check it later with actual out_write().
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:14 +0000 (12:48 +0300)]
android/hal-sco: Get SCO audio fd on demand
When SCO fd is not known try to get it from the daemon. SCO is
established via handsfree HAL independently from Audio HAL.
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:13 +0000 (12:48 +0300)]
android/hal-sco: Add stream synchronization
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:12 +0000 (12:48 +0300)]
android/hal-sco: Choose buffer size
For 8k choose buffer size 576 which is multiple from 48 and 64.
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:11 +0000 (12:48 +0300)]
android/hal-sco: Skip resampling for input of 8k
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:10 +0000 (12:48 +0300)]
android/hal-sco: Skip resampling for output stream with 8k
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:09 +0000 (12:48 +0300)]
android/hal-sco: Implement read
Add read and resampling from 8000 to 44100.
Andrei Emeltchenko [Fri, 18 Jul 2014 09:48:08 +0000 (12:48 +0300)]
android/hal-sco: Fix memory leak
Release resampler on exit.