New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 752719 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Email to this user bounced
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Add Bluetooth LE HID autotests

Project Member Reported by alent@google.com, Aug 5 2017

Issue description

Track the progress of implementing Bluetooth Low Energy HID autotests.

Component tasks:
1.) Generalizing the chameleon infrastructure for the current Bluetooth BR/EDR HID tests to also handle Bluetooth LE
2.) Exposing the Bluetooth LE HID peripheral emulator on chameleon to autotest
3.) Generalizing existing autotests, working around limitations in the generalized interface
4.) Adding BLE versions of (read: control files to) existing tests

Design docs:
https://docs.google.com/a/google.com/document/d/1viR-Fr00EtE4xuMUceHQlKpr8KnokfejQ_Wx-_eN_Ow/edit?usp=sharing
https://docs.google.com/a/google.com/document/d/1Nc5f836pttnxe6xZBjyyEBhtQIzYECIjwBCQPJblFFo/edit?usp=sharing
 

Comment 1 by alent@google.com, Aug 8 2017

Components: Test OS>Systems>Bluetooth
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/6c7d95b98d3787c1062541c2191db88e9321811b

commit 6c7d95b98d3787c1062541c2191db88e9321811b
Author: Alexander Lent <alent@google.com>
Date: Wed Aug 16 01:29:21 2017

Remove unused Disconnect method in BluetoothHIDFlow

This method does not appear to be used, and has a name collision
with code in the RN42 class, which we do use.

Flip the method resolution order in BluetoothHIDMouseFlow,
so that if this conflict happens again, we'll be more likely
to catch it when editing the BluetoothHIDMouse hierarchy.

Added a note to help remind future readers that this functionality
exists in case it becomes relevant, as other flows seem to use it.

BUG= chromium:752719 
TEST=Run this code on the Chameleon board:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
and watch them pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Change-Id: Id417203ebbda06178466211bf95e8720479fe0b1
Reviewed-on: https://chromium-review.googlesource.com/609684
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/6c7d95b98d3787c1062541c2191db88e9321811b/chameleond/devices/bluetooth_hid_flow.py

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/7cbd159db0f0e48ae82f41147fa15fdcd3bd9d00

commit 7cbd159db0f0e48ae82f41147fa15fdcd3bd9d00
Author: Alexander Lent <alent@google.com>
Date: Thu Aug 17 18:31:50 2017

Modularize Bluetooth peripheral emulation kits

A BluetoothHID instance will now instantiate a particular kit
implementaton, take ownership of the instance, and redirect all
unhandled attribue accesses onto it. This means that no changes are
necessary to most clients, as in most cases this is indistinguishable
from the kit being the superclass of BluetoothHID. For those cases that
were not handled, notably accessing kit constants as though they were
part of the BluetoothHID class, begin the process of moving them to
the more general class, by redirecting them in BluetoothHID.

The RN42 module still defines part of the interface to the kit, exposed
over Chameleon-Autotest RPC. This approach allows us to swap out the
implementation defined in RN42 for one that uses a different kit, but
deliberately does not handle factoring out code common to all kits.
(The __del__ was removed in BluetoothHID because the kit should clean up
after itself.)

The flow that a client connects to will choose a particular class
that implements the required methods to be a conformant
peripheral emulation kit implementation. (Currently, that means
matching the methods and functionality of the existing RN42 class.)

Ideally, we would refactor the code so that BluetoothHID exposes an
interface to Autotest that is both kit-independent and less specifically
targeted at the Bluetooth BR/EDR case. This will require significant
modifications to the tests, hence it outside the scope of this bug.
Specifically, the refactor should expose methods in BluetoothHID* only,
ensuring that the interface between the kit and BluetoothHID* is
private, so that clients see only a generic Bluetooth HID with a
well-defined interface, with support for checking BR/EDR-specific vs
LE-specific properties.

BUG= chromium:752719 
TEST=Run this code on the Chameleon board:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Change-Id: Id37d960699aa8364654eb9f90e10987a1a3e7c74
Reviewed-on: https://chromium-review.googlesource.com/611251
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Alexander Lent <alent@google.com>

[modify] https://crrev.com/7cbd159db0f0e48ae82f41147fa15fdcd3bd9d00/chameleond/utils/bluetooth_hid.py
[modify] https://crrev.com/7cbd159db0f0e48ae82f41147fa15fdcd3bd9d00/chameleond/devices/bluetooth_hid_flow.py

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/ce006df2a54d60737f14cdf453c7c87d82bb221a

commit ce006df2a54d60737f14cdf453c7c87d82bb221a
Author: Alexander Lent <alent@google.com>
Date: Wed Aug 30 02:37:06 2017

Refactor common functionality in peripheral kits

Separate the RN42-specific functionality and that common to all
peripheral kits. (More or less. This is a first pass.) This refactor
will allow other Bluetooth peripheral emulation kits to duplicate less
code. This is in preparation for adding Bluetooth LE HID peripheral
emulation functionality.

This commit also changes the API slightly to try and make it more
kit-agnostic, and resolves the misunderstandings in EnterCommandMode.
Notably, it preserved the exception handling style, which is re-raising
exceptions, but wrapping them in a kit-specific exception, to make
handling exceptions easier.

Note that the Keyboard/Mouse API is still in flux, and is not handled in
this stage of the refactor, except for a small simplification.

Churn location of constants relating to kits, as the intended location
of BluetoothHID caused cyclic dependency with BluetoothHID using RN42
using PerpheralKit using BluetoothHID. Ideally, we want to eliminate the
RN42 link in BluetoothHID, (possibly moving the self-tests elsewhere,)
but for now, churn the location and add a TODO.

BUG= chromium:752719 
TEST=Run this code on the Chameleon board:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Change-Id: I967b62f780b394079873a5c6d352f14c591611f3
Reviewed-on: https://chromium-review.googlesource.com/602899
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/ce006df2a54d60737f14cdf453c7c87d82bb221a/chameleond/utils/bluetooth_hid.py
[modify] https://crrev.com/ce006df2a54d60737f14cdf453c7c87d82bb221a/chameleond/devices/bluetooth_hid_flow.py
[add] https://crrev.com/ce006df2a54d60737f14cdf453c7c87d82bb221a/chameleond/utils/bluetooth_peripheral_kit.py
[modify] https://crrev.com/ce006df2a54d60737f14cdf453c7c87d82bb221a/chameleond/utils/bluetooth_rn42.py

Comment 5 by alent@google.com, Aug 31 2017

Cc: waihong@chromium.org rjahagir@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/3073c6ea48cb87d2b0a1ac7d965bf49361d5c95a

commit 3073c6ea48cb87d2b0a1ac7d965bf49361d5c95a
Author: Alexander Lent <alent@google.com>
Date: Sat Sep 09 03:04:34 2017

Expose Bluetooth LE HID emulation to Autotest

This patch adds the necessary framework to allow a Bluetooth LE kit to
be used in place of a Bluetooth BR/EDR kit, attempting to follow the
work done when adding a Bluetooth BR/EDR flow as closely as possible.

Note that Chameleon boards may only have one of the current kits
attached at a time, as we have not yet resolved the detection issue.

Also fix existing typo: gaamepad -> gamepad

BUG= chromium:752719 
TEST=First, locate the source for chameleond on a Chameleon board, cd
there, and run the self-test with only a Bluefruit LE kit attached:
$ IFS="^^^";export PS1=`echo $PS1|sed s/w/W/`;unset IFS
$ cd \
/usr/lib/python2.7/site-packages/chameleond-0.0.2-py2.7.egg/chameleond/
$ python utils/bluetooth_bluefruitle.py
Check that it doesn't crash, prints sensible results.

Second, test that current functionality is not broken:
Run this code on the Chameleon board, with only RN-42 attached:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Third, test that this actually WAI with future patches:
Apply CL:602900 and CL:639850 to your chroot.
Execute the non-flaky non-stress tests that use this code,
see that things work as much as possible without Autotest adjustments.
Note that only the Bluefruit LE Friend should be attached.
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.le.mouse \
bluetooth_AdapterPairing.le.mouse.pairing_twice \
bluetooth_AdapterHIDReports.le.mouse

Change-Id: I885c63caf8bb80f9b04f88a736ead8ee8ebf1329
Reviewed-on: https://chromium-review.googlesource.com/611780
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/3073c6ea48cb87d2b0a1ac7d965bf49361d5c95a/chameleond/utils/ids.py
[modify] https://crrev.com/3073c6ea48cb87d2b0a1ac7d965bf49361d5c95a/chameleond/drivers/fpga_tio.py
[modify] https://crrev.com/3073c6ea48cb87d2b0a1ac7d965bf49361d5c95a/chameleond/devices/bluetooth_hid_flow.py

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/edd8d567199b2479d824adec8b99ced246a89536

commit edd8d567199b2479d824adec8b99ced246a89536
Author: Alexander Lent <alent@google.com>
Date: Sat Sep 09 03:04:33 2017

Add Bluefruit LE Friend kit to Chameleon

BluefruitLE should be minimally-equivalent to RN42, with the caveats
mentioned in the class docstring. (The Bluefruit LE Friend has a
higher-level AT command set, with fewer features.) This patch allows the
BluefruitLE kit to be used in tests for pairing, but does not yet add
full keyboard, mouse, or gamepad support.

Note that this kit is not currently hooked up to anything.

Note also that some of the less-sensical API changes in the refactor
were rolled back, and inconsistencies were addressed. In general,
failures should fail loudly now, using exceptions. Hopefully, this will
help diagnose flakes.

BUG= chromium:752719 
TEST=First, locate the source for chameleond on a Chameleon board, cd
there, and run the self-test with only a Bluefruit LE kit attached:
$ IFS="^^^";export PS1=`echo $PS1|sed s/w/W/`;unset IFS
$ cd \
/usr/lib/python2.7/site-packages/chameleond-0.0.2-py2.7.egg/chameleond/
$ python utils/bluetooth_bluefruitle.py
Check that it doesn't crash, prints sensible results.

Second, test that current functionality is not broken:
Run this code on the Chameleon board, with only RN-42 attached:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Third, test that this actually WAI with future patches:
Apply CL:611780, CL:602900, and CL:639850 to your chroot.
Execute the non-flaky non-stress tests that use this code,
see that things work as much as possible without Autotest adjustments.
Note that only the Bluefruit LE Friend should be attached.
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.le.mouse \
bluetooth_AdapterPairing.le.mouse.pairing_twice \
bluetooth_AdapterHIDReports.le.mouse

Change-Id: Ie651cf1d35609b7421cc3d02bce75306cae4ba91
Reviewed-on: https://chromium-review.googlesource.com/625478
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[add] https://crrev.com/edd8d567199b2479d824adec8b99ced246a89536/chameleond/utils/bluetooth_bluefruitle.py
[modify] https://crrev.com/edd8d567199b2479d824adec8b99ced246a89536/chameleond/utils/bluetooth_rn42.py
[modify] https://crrev.com/edd8d567199b2479d824adec8b99ced246a89536/chameleond/utils/bluetooth_peripheral_kit.py
[modify] https://crrev.com/edd8d567199b2479d824adec8b99ced246a89536/chameleond/utils/bluetooth_hid.py

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/30aa2318b8ced018b88dba482590f8893b10d396

commit 30aa2318b8ced018b88dba482590f8893b10d396
Author: Alexander Lent <alent@google.com>
Date: Sat Sep 09 05:08:55 2017

[autotest] Expose Bluetooth LE HID emulation from Chameleon

Add the necessary hooks to use BLE HID emulation on Chameleon from
Autotest. These hooks allow tests to run with a BluetoothHOGFlow instead
of a BluetoothHIDFlow. It explicitly does not configure tests to do so,
that is a separate concern. (That may also require workarounds in
Autotest due to parts of tests that cannot be generalized.)

Also, fix method name typo bluetooh -> bluetooth for BR/EDR.

CQ-DEPEND=CL:611780
BUG= chromium:752719 
TEST=Get Chameleon ready with the latest stable chameleon(d) package.
Plug in RN42 dongle to OTG port (standard test setup).
Run existing tests that use Chameleon's Bluetooth HID emulation,
specifically the non-flaky non-stress ones, and watch them pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse
(This only tests that existing functionality is not broken.)

Change-Id: Idf2184e8a58afd8464eaa0f580a97c3321cf095a
Reviewed-on: https://chromium-review.googlesource.com/602900
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/30aa2318b8ced018b88dba482590f8893b10d396/server/cros/bluetooth/bluetooth_adapter_tests.py
[modify] https://crrev.com/30aa2318b8ced018b88dba482590f8893b10d396/client/cros/chameleon/chameleon.py

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/980519bae39394ae5a01614630153bb8e17086bc

commit 980519bae39394ae5a01614630153bb8e17086bc
Author: Alexander Lent <alent@google.com>
Date: Wed Sep 13 22:12:06 2017

Do kit detection & a bit of cleanup

Each kit now keeps track of its USB VID/PID combination, and uses a new
serial_utils function to find the TTY using VID/PID/driver.

Annoyingly, the flow and the kit find ttys separately, and I don't see a
good way to sync them up without doing another refactor to unify
BluetoothHID and BluetoothHIDFlow.
(This larger refactor is now a bug: http://crbug.com/764055 )

Driver names for Bluetooth are now solely contained in the kits, and we
don't have to specify a string in fpga_tio. (Fixed a TODO.)

Increase BT kit detection timeout from 2 to 5 seconds, and track tuning
in a new bug. http://crbug.com/763504

IMPORTANT: This timeout was increased because the first detection after
enabling the driver was taking too long. This may increase startup times
by ~10+ seconds on Chameleons without a bluetooth kit.

BUG= chromium:752719 
TEST=Run this code on the Chameleon board, with both kits attached:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Change-Id: I8a74fb57b337ea89a6da7ba0955f4d95ba56a5eb
Reviewed-on: https://chromium-review.googlesource.com/636218
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/980519bae39394ae5a01614630153bb8e17086bc/chameleond/utils/bluetooth_bluefruitle.py
[modify] https://crrev.com/980519bae39394ae5a01614630153bb8e17086bc/chameleond/utils/bluetooth_rn42.py
[modify] https://crrev.com/980519bae39394ae5a01614630153bb8e17086bc/chameleond/utils/serial_utils.py
[modify] https://crrev.com/980519bae39394ae5a01614630153bb8e17086bc/chameleond/utils/bluetooth_hid.py
[modify] https://crrev.com/980519bae39394ae5a01614630153bb8e17086bc/chameleond/drivers/fpga_tio.py
[modify] https://crrev.com/980519bae39394ae5a01614630153bb8e17086bc/chameleond/devices/bluetooth_hid_flow.py
[modify] https://crrev.com/980519bae39394ae5a01614630153bb8e17086bc/chameleond/utils/bluetooth_peripheral_kit.py

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/79c0b835512de7449134d302340cd2ec3da59146

commit 79c0b835512de7449134d302340cd2ec3da59146
Author: Alexander Lent <alent@google.com>
Date: Thu Sep 14 02:28:27 2017

Add feature detection for certain kit features

Autotest can now query GetCapabilities to find out what kits can do.

Also, move GetChipName->GetAdvertisedName as it was confusing.

BUG= chromium:752719 
TEST=Run this code on the Chameleon board, with both kits attached:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.{,le.}mouse \
bluetooth_AdapterPairing.{,le.}mouse.pairing_twice \
bluetooth_AdapterHIDReports.{,le.}mouse

Change-Id: I0f5478cb46f6b362f035545e6c67aea1366a7d86
Reviewed-on: https://chromium-review.googlesource.com/658697
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/79c0b835512de7449134d302340cd2ec3da59146/chameleond/utils/bluetooth_bluefruitle.py
[modify] https://crrev.com/79c0b835512de7449134d302340cd2ec3da59146/chameleond/utils/bluetooth_peripheral_kit.py
[modify] https://crrev.com/79c0b835512de7449134d302340cd2ec3da59146/chameleond/utils/bluetooth_rn42.py

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/d7356bc25145b4cb5badbfc49294ffa275ab893b

commit d7356bc25145b4cb5badbfc49294ffa275ab893b
Author: Alexander Lent <alent@google.com>
Date: Fri Sep 15 07:24:05 2017

Refactor Bluetooth HID Mouse API

A nice, new, separated API for emulating a mouse is now here.
Kit redirection is explicit in it, too. This represents the first step
in ridding ourselves of the getattr hack and solving
http://crbug.com/764055 .
RN42 can now keep holding buttons while scrolling, too!

Remove the old HID keyboard/mouse API from the public interface in
PeripheralKit, and remove the pylint silencer on BluefruitLE.

The RN42 no longer clamps values to [-127,127]. The API is no longer
publicly exposed, so we're handling those checks elsewhere.

BUG= chromium:752719 ,chromium:764055
TEST=Run this code on the Chameleon board, with an RN42 attached:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Change-Id: I07b70f0c5fba4abde34f640199f7ccf4c916224d
Reviewed-on: https://chromium-review.googlesource.com/663788
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/d7356bc25145b4cb5badbfc49294ffa275ab893b/chameleond/utils/bluetooth_bluefruitle.py
[modify] https://crrev.com/d7356bc25145b4cb5badbfc49294ffa275ab893b/chameleond/utils/bluetooth_rn42.py
[modify] https://crrev.com/d7356bc25145b4cb5badbfc49294ffa275ab893b/chameleond/utils/bluetooth_peripheral_kit.py
[modify] https://crrev.com/d7356bc25145b4cb5badbfc49294ffa275ab893b/chameleond/utils/bluetooth_hid.py

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/2d277dad118543e971d8eacc38414cd16ea9ef8d

commit 2d277dad118543e971d8eacc38414cd16ea9ef8d
Author: Alexander Lent <alent@google.com>
Date: Fri Sep 15 10:08:28 2017

Add Bluetooth LE Mouse support to Chameleon

This patch implements the Chameleon-side changes that allow the kit to
emulate a Bluetooth LE (HOG) mouse.

BUG= chromium:752719 
TEST=Run this code on the Chameleon board, with a Bluefruit attached:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.le.mouse \
bluetooth_AdapterPairing.le.mouse.pairing_twice \
bluetooth_AdapterHIDReports.le.mouse

Change-Id: Ice7a4267e10f5ea1c6bf6aa6fbdd206a1500498b
Reviewed-on: https://chromium-review.googlesource.com/664419
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/2d277dad118543e971d8eacc38414cd16ea9ef8d/chameleond/utils/bluetooth_bluefruitle.py

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/275d2d4c85efe78996f988e9011475ad2c71c499

commit 275d2d4c85efe78996f988e9011475ad2c71c499
Author: Alexander Lent <alent@google.com>
Date: Fri Sep 15 17:50:31 2017

[autotest] Add Bluetooth LE support to HID tests

Add control files to enable testing with a Bluetooth LE mouse, and make
the changes necessary to support the API changes in Chameleon that made
this possible.

IMPORTANT: These tests will not run until the chameleon:bt_hog label
exists in the lab, so track that in: http://crbug.com/765451

This involves modifying some of the successful/retry logic to allow
certain falsy responses when reasonable.

This depends on API changes in Chameleon to do feature detection, so we
can work around tests that the Bluefruit LE Friend doesn't support.

Also, let's change GetChipName -> GetAdvertisedName while we're changing
things.

Mouse movement support depends on that being implemented in Chameleon,
which isn't done yet. You can watch it fail, though.

BUG= chromium:752719 
CQ-DEPEND=CL:658697,CL:664419
TEST=Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.{,le.}mouse \
bluetooth_AdapterPairing.{,le.}mouse.pairing_twice \
bluetooth_AdapterHIDReports.{,le.}mouse

Change-Id: Ia0929b9e5cea1da92903f2b4fa0a378cf2a67898
Reviewed-on: https://chromium-review.googlesource.com/639850
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[add] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterPairing/control.le.mouse.stress_100
[add] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterPairing/control.le.mouse.stress_500
[modify] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/cros/bluetooth/bluetooth_adapter_tests.py
[modify] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterPairing/bluetooth_AdapterPairing.py
[add] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterHIDReports/control.le.mouse
[add] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterPairing/control.le.mouse
[modify] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterHIDReports/control.mouse
[add] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterPairing/control.le.mouse.pairing_twice
[modify] https://crrev.com/275d2d4c85efe78996f988e9011475ad2c71c499/server/site_tests/bluetooth_AdapterHIDReports/bluetooth_AdapterHIDReports.py

Comment 14 by alent@google.com, Sep 15 2017

Status: Fixed (was: Started)
The mouse support, is, in fact implemented.
I'm going to mark this Fixed, and open/update other bugs for the next steps.
Status: Verified (was: Fixed)

Sign in to add a comment