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

Issue 610238 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Automated Classic Bluetooth HID Tests using Chameleon

Project Member Reported by josephsih@chromium.org, May 9 2016

Issue description

We would like to automate some of the bluetooth HID tests (keyboard, mouse, etc.) using Chameleon.

Please refer to "Automated Bluetooth HID Tests using Chameleon" (https://docs.google.com/document/d/1U5BZAy_WgzkIhHAd1kRuW-Whc-1hAtgff0o_sJPcKVI/edit#heading=h.wtwc1k1jdo8m) for more details.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 17 2016

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

commit 313a6ab51b857011f4abc2ec999f7a885340aee6
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed May 04 11:25:21 2016

Control bluetooth hid devices on Chameleon board

This patch supports to control the bluetooth mouse emulated
by an RN-42 kit. As we have already had bluetooth HID mouse
object to control the kit, it would be cleaner to instantiate
a bluetooth_mouse object in the fpga_tio driver. The
bluetooth_hid_flow module is implemented for the control
interface of the bluetooth mouse.

BUG= chromium:610238 
TEST=Use the commands

Change-Id: I4a6c5906dd2c7e928c7f7d7749de957b74ae0e03
Reviewed-on: https://chromium-review.googlesource.com/343479
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>

[add] https://crrev.com/313a6ab51b857011f4abc2ec999f7a885340aee6/chameleond/utils/bluetooth_hid_flow.py
[modify] https://crrev.com/313a6ab51b857011f4abc2ec999f7a885340aee6/chameleond/chameleon_server.py
[modify] https://crrev.com/313a6ab51b857011f4abc2ec999f7a885340aee6/chameleond/drivers/fpga_tio.py
[modify] https://crrev.com/313a6ab51b857011f4abc2ec999f7a885340aee6/chameleond/utils/ids.py

Project Member

Comment 2 by bugdroid1@chromium.org, May 17 2016

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

commit e93c7792ecd7fa91d914395b7dc03cd7ec836c45
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu May 05 10:54:49 2016

Rename utils/io.py as chameleon_io.py

The "io" module is a python standard module. The chameleond/utils/io.py
is a local io module. This would bring forward a problem while the
local directory is first searched to find an import module.

As an example, chameleond/utils/bluetooth_rn42.py imports the
serial_utils module, which imports the serial package, which imports
the io module. In this case, chameleond/utils/io.py would be actually
imported while the standard /usr/lib/python2.7/io.py is expected.

BUG= chromium:610238 
TEST=None

Change-Id: I0c6fca241c6e28578b15c7d5b13fd344c33edf27
Reviewed-on: https://chromium-review.googlesource.com/343478
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>

[rename] https://crrev.com/e93c7792ecd7fa91d914395b7dc03cd7ec836c45/chameleond/utils/chameleon_io.py
[modify] https://crrev.com/e93c7792ecd7fa91d914395b7dc03cd7ec836c45/chameleond/utils/audio_board.py
[modify] https://crrev.com/e93c7792ecd7fa91d914395b7dc03cd7ec836c45/chameleond/utils/input_flow.py
[modify] https://crrev.com/e93c7792ecd7fa91d914395b7dc03cd7ec836c45/chameleond/utils/edid.py

Project Member

Comment 3 by bugdroid1@chromium.org, May 17 2016

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

commit 144ba4b27831a1d2fa9e50709f60829f50fd3264
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Apr 19 08:55:11 2016

updatable/fpga_tio: enable ftdi_sio and usbserial modules in kernel config

For the chameleon board to be able to control RN-42 emulation
kit through the serial, i.e., port /dev/ttyUSB0, it is required to
mark both CONFIG_USB_SERIAL and CONFIG_USB_SERIAL_FTDI_SIO as
loadable kernel modules.

This patch updates the kernel to support the above two modules.
Refer to Gerrit for the correspond patch on the kernel config:
https://chromium-review.googlesource.com/#/c/343395/

BUG= chromium:610238 
TEST=Use the commands
$ modprobe ftdi_sio
$ lsmod
Change-Id: Ib71fbfb48c513f51a84616e83c8622faf4606aed
Reviewed-on: https://chromium-review.googlesource.com/343477
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>

[modify] https://crrev.com/144ba4b27831a1d2fa9e50709f60829f50fd3264/updatable/fpga_tio/modules.tgz
[modify] https://crrev.com/144ba4b27831a1d2fa9e50709f60829f50fd3264/updatable/fpga_tio/zImage

Project Member

Comment 4 by bugdroid1@chromium.org, May 26 2016

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

commit c92a3361eb4aa9f3b61df66033fcbee5cbf90bee
Author: Joseph Hwang <josephsih@chromium.org>
Date: Fri May 06 08:55:14 2016

server/cros/multimedia: add bluetooth_hid_facade_adapter

This patch adds the support of bluetooth hid facade in the remote
facade factory. With the new facade, it is possible to invoke various
bluetooth related methods of the adapter on a DUT.

BUG= chromium:610238 
TEST=None

Change-Id: I243287f00a08141aaec0c0014798c2a62193c784
Reviewed-on: https://chromium-review.googlesource.com/345370
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>

[modify] https://crrev.com/c92a3361eb4aa9f3b61df66033fcbee5cbf90bee/server/cros/multimedia/remote_facade_factory.py
[add] https://crrev.com/c92a3361eb4aa9f3b61df66033fcbee5cbf90bee/server/cros/multimedia/bluetooth_hid_facade_adapter.py

Project Member

Comment 5 by bugdroid1@chromium.org, May 28 2016

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

commit aad0ff193747d0df43f9e248fb6afd1da08153aa
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue May 10 02:54:47 2016

server/site_tests: add bluetooth_AdapterStandalone test

This test tries to thoroughly verify most of the important work
states of a standalone bluetooth adapter prior to connecting to
other bluetooth peripherals.

The following subtests are aggregated into this test:
- test_start_bluetoothd
- test_stop_bluetoothd
- test_adapter_work_state
- test_power_on_adapter
- test_power_off_adapter
- test_reset_on_adapter
- test_reset_off_adapter
- test_UUIDs: verifies that basic profiles are supported
- test_start_discovery
- test_stop_discovery
- test_discoverable
- test_nondiscoverable
- test_pairable
- test_nonpairable

The _TestLog() decorator could log test information and results
nicely. If the test failed, it would list what subtests failed with
their failure conditions.

BUG= chromium:610238 
TEST=Perform the server test as
(cr) test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP"
$DUT_IP bluetooth_AdapterStandalone

Change-Id: Ia8dd2fe81ec058500944c799d736637eba5f2532
Reviewed-on: https://chromium-review.googlesource.com/345373
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Tom Tam <waihong@google.com>

[add] https://crrev.com/aad0ff193747d0df43f9e248fb6afd1da08153aa/server/site_tests/bluetooth_AdapterStandalone/bluetooth_AdapterStandalone.py
[add] https://crrev.com/aad0ff193747d0df43f9e248fb6afd1da08153aa/server/site_tests/bluetooth_AdapterStandalone/control

Project Member

Comment 6 by bugdroid1@chromium.org, May 28 2016

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

commit 97ff05d2ac4f839e8421f6a7b0bc79a3e460b8a9
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue May 10 08:07:22 2016

cros/bluetooth: rework on bluetooth device control objects

Add more methods to the bluetooth device control objects on the
client side as well as on the server side. Handle exceptions
properly so that autotest could keep track of what tests fail with
proper failure reasons intead of simply throwing out exceptions and
interrupting tests.

BUG= chromium:610238 
TEST=None

Change-Id: I6a40c521971737c4613dd415eb112c46ea3899e3
Reviewed-on: https://chromium-review.googlesource.com/345372
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/97ff05d2ac4f839e8421f6a7b0bc79a3e460b8a9/server/cros/bluetooth/bluetooth_device.py
[modify] https://crrev.com/97ff05d2ac4f839e8421f6a7b0bc79a3e460b8a9/client/cros/bluetooth/bluetooth_device_xmlrpc_server.py

Project Member

Comment 7 by bugdroid1@chromium.org, May 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3440adaf3852580e018d04bc71237ab735a2b70b

commit 3440adaf3852580e018d04bc71237ab735a2b70b
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue May 17 07:08:14 2016

autotest-server-tests: add bluetooth_AdapterStandalone test

Add a server-side bluetooth_AdapterStandalone test.

BUG= chromium:610238 
TEST=None

Change-Id: Ic976c8f00b9f19ffbfe0939927e7dcd12d9c02b5
Reviewed-on: https://chromium-review.googlesource.com/344719
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Tom Tam <waihong@google.com>

[modify] https://crrev.com/3440adaf3852580e018d04bc71237ab735a2b70b/chromeos-base/autotest-server-tests/autotest-server-tests-9999.ebuild

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 13 2016

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

commit 8ac3a4e221598551eb4d423f0ef100447497a338
Author: Joseph Hwang <josephsih@chromium.org>
Date: Mon Jun 06 07:43:25 2016

bluetooth_AdapterStandalone: add suite:bluetooth_sanity

This patch simply adds the test to suite:bluetooth_sanity so that
it would be run automatically nightly and weekly in the test lab.

Specifically, the following subtests are executed in this autotest.
  - test_start_bluetoothd
  - test_stop_bluetoothd
  - test_adapter_work_state
  - test_power_on_adapter
  - test_power_off_adapter
  - test_reset_on_adapter
  - test_reset_off_adapter
  - test_UUIDs
  - test_start_discovery
  - test_stop_discovery
  - test_discoverable
  - test_nondiscoverable
  - test_pairable
  - test_nonpairable

BUG= chromium:610238 
TEST=Observed that bluetooth_AdapterStandalone test is run in the test lab.

Change-Id: Id67db17969973a5b44ab4f222c38c16c424af95e
Reviewed-on: https://chromium-review.googlesource.com/349897
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Tom Tam <waihong@google.com>

[modify] https://crrev.com/8ac3a4e221598551eb4d423f0ef100447497a338/server/site_tests/bluetooth_AdapterStandalone/control

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 13 2016

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

commit 6dc5eb00672c8bfa4b465cde1f31056c51a950e4
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed May 25 04:11:20 2016

bluetooth_Adapter: move all bluetooth adapter subtests to bluetooth_adpater_tests

As more bluetooth_Adapter* tests would be added, it is beneficial to move
all bluetooth adapter subtests to a separate module, bluetooth_adpater_tests,
so that all the subtests could be reused.

This refactoring also makes every bluetooth_Adapter* tests clear and simple.

BUG= chromium:610238 
TEST=None

Change-Id: I0a8d21f286dc1f554ba286afed880d404ffe2499
Reviewed-on: https://chromium-review.googlesource.com/349896
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Tom Tam <waihong@google.com>

[add] https://crrev.com/6dc5eb00672c8bfa4b465cde1f31056c51a950e4/server/cros/bluetooth/bluetooth_adpater_tests.py
[modify] https://crrev.com/6dc5eb00672c8bfa4b465cde1f31056c51a950e4/server/site_tests/bluetooth_AdapterStandalone/bluetooth_AdapterStandalone.py

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 15 2016

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

commit 7ec808155b36a9e802cb378fae44b083a7b3affe
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Wed Jun 08 11:55:29 2016

Revert "Control bluetooth hid devices on Chameleon board"

This reverts commit 313a6ab51b857011f4abc2ec999f7a885340aee6.

We need to fix "import serial" issue first before applying this change.

BUG= chromium:610238 
TEST=check chameleond inits fine.

Change-Id: I158617125bd574babb1300a04ac5a990ef53b438
Reviewed-on: https://chromium-review.googlesource.com/352400
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[delete] https://crrev.com/3511cec58dd8910e87508216e93756cc38b3a332/chameleond/utils/bluetooth_hid_flow.py
[modify] https://crrev.com/7ec808155b36a9e802cb378fae44b083a7b3affe/chameleond/chameleon_server.py
[modify] https://crrev.com/7ec808155b36a9e802cb378fae44b083a7b3affe/chameleond/drivers/fpga_tio.py
[modify] https://crrev.com/7ec808155b36a9e802cb378fae44b083a7b3affe/chameleond/utils/ids.py

Project Member

Comment 11 by bugdroid1@chromium.org, Jun 22 2016

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

commit 41966e7dec3e8d137d31a8e5c0bb0348b26f2504
Author: Joseph Hwang <josephsih@chromium.org>
Date: Mon Jun 06 08:12:34 2016

Add more subtests into bluetooth_adpater_tests

More bluetooth subtests are added into the module. In particular,
these are tests about discovering, pairing/unpairing, connection/disconnection,
and verifying received device properties.

BUG= chromium:610238 
TEST=None

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

[modify] https://crrev.com/41966e7dec3e8d137d31a8e5c0bb0348b26f2504/server/cros/bluetooth/bluetooth_adpater_tests.py

Project Member

Comment 12 by bugdroid1@chromium.org, Jun 22 2016

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

commit f064e0f94901774495f93dae0889ebbaa51e4c2f
Author: Joseph Hwang <josephsih@chromium.org>
Date: Mon May 23 08:46:45 2016

bluetooth_device: add methods for pairing

This patch reworks on bluetooth device control objects on
the server side as well as the client side to support pairing.

BUG= chromium:610238 
TEST=None

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

[modify] https://crrev.com/f064e0f94901774495f93dae0889ebbaa51e4c2f/server/cros/bluetooth/bluetooth_device.py
[modify] https://crrev.com/f064e0f94901774495f93dae0889ebbaa51e4c2f/client/cros/bluetooth/bluetooth_device_xmlrpc_server.py

Project Member

Comment 13 by bugdroid1@chromium.org, Jun 22 2016

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

commit db855fe6a69723d1639ec86c993919ed41b963cd
Author: Joseph Hwang <josephsih@chromium.org>
Date: Fri May 06 07:32:36 2016

client/cros/chameleon: add methods to get bluetooth mouse object

This patch simply adds methods to get the bluetooth mouse object
out the chameleond proxy. With the mouse object, a test could
control the bluetooth mouse to perform various mouse actions.

Specifically, two methods are added. One is to get an existing
mouse object, and the other is to create a new mouse object.
The latter is useful when we want to reconnect to the RN42
emulation kit through the serial port while the kit is
disconnected with an unknown reason sometimes.

BUG= chromium:610238 
TEST=None

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

[modify] https://crrev.com/db855fe6a69723d1639ec86c993919ed41b963cd/client/cros/chameleon/chameleon.py

Project Member

Comment 14 by bugdroid1@chromium.org, Jun 23 2016

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

commit 08486ca8c714216d3e4a680a9df33d31612dc311
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed May 04 11:25:21 2016

Resubmission: Control bluetooth hid devices on Chameleon board

Resubmission of the patch since pyserial package could
be installed on a chameleon board from chroot now.
This patch was reviewed on Reviewed-on:
https://chromium-review.googlesource.com/352400

This patch supports to control the bluetooth mouse emulated
by an RN-42 kit. As we have already had bluetooth HID mouse
object to control the kit, it would be cleaner to instantiate
a bluetooth_mouse object in the fpga_tio driver. The
bluetooth_hid_flow module is implemented for the control
interface of the bluetooth mouse.

BUG= chromium:610238 
TEST=Use the commands

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

[add] https://crrev.com/08486ca8c714216d3e4a680a9df33d31612dc311/chameleond/utils/bluetooth_hid_flow.py
[modify] https://crrev.com/08486ca8c714216d3e4a680a9df33d31612dc311/chameleond/chameleon_server.py
[modify] https://crrev.com/08486ca8c714216d3e4a680a9df33d31612dc311/chameleond/drivers/fpga_tio.py
[modify] https://crrev.com/08486ca8c714216d3e4a680a9df33d31612dc311/chameleond/utils/ids.py

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 23 2016

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

commit 787a9cac99e9a523f037b5fc639e94bf7770d85b
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Jun 07 07:33:51 2016

bluetooth_rn42: check serial connection

Sometimes, the kernel is not stable and the serial connection
would be lost. This patch adds a method to check whether the
serial connection still exists.

BUG= chromium:610238 
TEST=None

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

[modify] https://crrev.com/787a9cac99e9a523f037b5fc639e94bf7770d85b/chameleond/utils/bluetooth_rn42.py

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 23 2016

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

commit d13e5e72fa5512f9edf779faafaa9261d8fa4fac
Author: Joseph Hwang <josephsih@chromium.org>
Date: Mon May 30 10:57:35 2016

bluetooth rn42/hid: add device methods to handle more properties and actions

This patch adds methods to
- get/set class of service
- get/set class of device
- get/set pin code
- do a factory reset of RN-42
- add a dynamic mehtod, Init() to initialize the device on demand
- handle EnterCommandMode in a more fault tolerance way
- get serial port of the device

BUG= chromium:610238 
TEST=None

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

[modify] https://crrev.com/d13e5e72fa5512f9edf779faafaa9261d8fa4fac/chameleond/utils/bluetooth_hid.py
[modify] https://crrev.com/d13e5e72fa5512f9edf779faafaa9261d8fa4fac/chameleond/utils/bluetooth_rn42.py

Project Member

Comment 17 by bugdroid1@chromium.org, Jun 23 2016

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

commit 24ed76a4c908f66ff65799fae74f592f8f51fd75
Author: Joseph Hwang <josephsih@chromium.org>
Date: Fri May 27 05:20:48 2016

bluetooth_hid: disconnect the device only when connected

This patch fixed a problem in the demo code. The disconnection
is only required when the device is previously connected.

BUG= chromium:610238 
TEST=None

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

[modify] https://crrev.com/24ed76a4c908f66ff65799fae74f592f8f51fd75/chameleond/utils/bluetooth_hid.py

Project Member

Comment 18 by bugdroid1@chromium.org, Jun 23 2016

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

commit cc7b62f511d0acc72bc234e3aee63faac5a314bf
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed May 25 10:25:51 2016

bluetooth_rn42: use formal bluetooth address format

The bluetooth adress returned by RN-42 looks like
00066675A96F. It is better to convert it to the
common address format with ":" in it.

BUG= chromium:610238 
TEST=Check the format of bluetooth address
$ python /usr/lib/python2.7/site-packages/chameleond/utils/bluetooth_rn42.py
...
local bluetooth address: 00:06:66:75:A9:6F
...

Verify the existence of ":" in the address.

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

[modify] https://crrev.com/cc7b62f511d0acc72bc234e3aee63faac5a314bf/chameleond/utils/bluetooth_rn42.py

Project Member

Comment 19 by bugdroid1@chromium.org, Jun 23 2016

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

commit c1edefff0e82aebb3832084934c4d12daf6d355b
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed Jun 08 07:38:14 2016

Connect to the serial device only when needed

If the USB serial cable is not connected, BluetoothHIDMouseFlow
would still try to connect to the serial device and incur an
exception. This patch fixes the bug by connecting to the
serial device only when the serial device is actually needed
in an autotest.

BUG= chromium:610238 
TEST=unplug the USB serial cable and observe that
chameleond could be started successfully.

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

[modify] https://crrev.com/c1edefff0e82aebb3832084934c4d12daf6d355b/chameleond/utils/serial_utils.py
[modify] https://crrev.com/c1edefff0e82aebb3832084934c4d12daf6d355b/chameleond/utils/bluetooth_hid.py
[modify] https://crrev.com/c1edefff0e82aebb3832084934c4d12daf6d355b/chameleond/utils/bluetooth_rn42.py
[modify] https://crrev.com/c1edefff0e82aebb3832084934c4d12daf6d355b/chameleond/utils/bluetooth_hid_flow.py

Project Member

Comment 20 by bugdroid1@chromium.org, Jul 19 2016

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

commit 9f0e024c4952a720f9d04cae2115530d196722b7
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed Jun 22 04:50:20 2016

bluetooth_rn42/hid: return True or non-None object

Every public member method of bluetooth_rn42 and bluetooth_hid
classes should return True or non-None object if the execution is
successful, and return False or raising an exception otherwise.
In this way, the caller is easier to determine whether the
method succeeds or not.

BUG= chromium:610238 
TEST=None

Change-Id: I5d6a195ac33f41f4b705d4d5b87d850ab96eb044
Reviewed-on: https://chromium-review.googlesource.com/357683
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/9f0e024c4952a720f9d04cae2115530d196722b7/chameleond/utils/bluetooth_hid.py
[modify] https://crrev.com/9f0e024c4952a720f9d04cae2115530d196722b7/chameleond/utils/bluetooth_rn42.py

Project Member

Comment 21 by bugdroid1@chromium.org, Jul 19 2016

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

commit 1c210e68ceb6e86c2848371f972274dcf20eb199
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed Jun 08 04:04:53 2016

fpga_tio: supports reboot

Sometimes the kernel is not stable and some drivers do not
function properly. In this situation, a method to reboot
the chameleon board is required.

BUG= chromium:610238 
TEST=None

Change-Id: I329583c8f0479b8c3c0f003402951480947e4b5a
Reviewed-on: https://chromium-review.googlesource.com/357682
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/1c210e68ceb6e86c2848371f972274dcf20eb199/chameleond/drivers/fpga_tio.py

Project Member

Comment 22 by bugdroid1@chromium.org, Aug 29 2016

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

commit 49991fc8439a5ed0b46ec98d57f3d7304e4602c6
Author: Joseph Hwang <josephsih@chromium.org>
Date: Fri Jun 17 08:04:19 2016

bluetooth_adpater_tests: use poll_for_condition for test_device_name

Sometimes, it takes a little longer while for an adapter to resolve the
device name. This patch used poll_for_condition to get the device name.
The test_device_name is also postponed after the device is paired and
connected. This significantly improves the test reliability.

BUG= chromium:610238 
TEST=conduct the test with the chameleon board connected to an RN-42 kit
(cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP"
     $DUT_IP bluetooth_AdapterPairing

Observed that there are fewer test fails about test_device_name.

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

[modify] https://crrev.com/49991fc8439a5ed0b46ec98d57f3d7304e4602c6/server/cros/bluetooth/bluetooth_adpater_tests.py
[modify] https://crrev.com/49991fc8439a5ed0b46ec98d57f3d7304e4602c6/server/site_tests/bluetooth_AdapterPairing/bluetooth_AdapterPairing.py

Project Member

Comment 23 by bugdroid1@chromium.org, Aug 29 2016

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

commit 276a2dd3dff274a51f5c8d84c78db7a7d3f76f65
Author: Joseph Hwang <josephsih@chromium.org>
Date: Mon Jun 20 09:34:42 2016

bluetooth_adpater_tests: fixed a bug about CoS/CoD

if device_class is None, the following exception would be raised:
  TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'

When device_class is None, the discovered class of service/class
should just be None.

BUG= chromium:610238 
TEST=None

Change-Id: I42df1d54043564efb54d8f3e59844fd13bf14220
Reviewed-on: https://chromium-review.googlesource.com/359476
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/276a2dd3dff274a51f5c8d84c78db7a7d3f76f65/server/cros/bluetooth/bluetooth_adpater_tests.py

Project Member

Comment 24 by bugdroid1@chromium.org, Aug 29 2016

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

commit 4a3e6154b483dc083aa21b30ec78f12a3ca63790
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Aug 25 09:03:21 2016

chameleon: support reboot method

This patch supports a method to reboot the chameleon board.

BUG= chromium:610238 
TEST=None

Change-Id: I52599db65fb2f2d91d42e516480fa88932c930b4
Reviewed-on: https://chromium-review.googlesource.com/359477
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/4a3e6154b483dc083aa21b30ec78f12a3ca63790/client/cros/chameleon/chameleon.py

Project Member

Comment 25 by bugdroid1@chromium.org, Aug 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/72c2edb1ea2b9eb3a24b62932f7ba4ffdc5eb54c

commit 72c2edb1ea2b9eb3a24b62932f7ba4ffdc5eb54c
Author: Joseph Hwang <josephsih@chromium.org>
Date: Fri Aug 26 09:16:43 2016

autotest-server-tests: add bluetooth_AdapterPairing test

Add a server-side bluetooth_AdapterPairing test.

BUG= chromium:610238 
TEST=None

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

[modify] https://crrev.com/72c2edb1ea2b9eb3a24b62932f7ba4ffdc5eb54c/chromeos-base/autotest-server-tests/autotest-server-tests-9999.ebuild

Project Member

Comment 26 by bugdroid1@chromium.org, Aug 29 2016

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

commit a60dc151413200a1ed65a36fad5b5213fe6d42ea
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Jun 07 10:53:09 2016

bluetooth_adpater_tests: add retry function

It is observed in the field that the chameleon board might sometimes
lose the serial device temporarily. The kernel would re-detect and
reconnect the serial device. After the re-connection, it is possible
that the serial port changes as well, e.g., from /dev/ttyUSB0
to /dev/ttyUSB1. In this case, it is required to reconnect to the
new serial port in order to control the serial device correctly.

It is also possible that the serial device may malfunction in an
unrecoverable state. Removing and modprobing the serial drivers again
cannot resolve the problem when the device falls in the state. The only
way is to reboot the chameleon board. In this case, it is required to
reconnect to the remote server at run time. This has been handled in
a transparent way by chameleond_proxy in ChameleonConnection.

BUG= chromium:610238 
TEST=conduct the test with the chameleon board connected to an RN-42 kit
(cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP"
     $DUT_IP bluetooth_AdapterPairing

A user could unplug the RN-42 kit initially. This would lead to the
reboot of the chameleon board. When the board is being rebooted, plug
in the RN-42 kit again to the chameleon board. Observe that the test
could continue smoothly after rebooting the chameleon board.

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

[modify] https://crrev.com/a60dc151413200a1ed65a36fad5b5213fe6d42ea/server/cros/bluetooth/bluetooth_adpater_tests.py

Project Member

Comment 27 by bugdroid1@chromium.org, Aug 29 2016

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

commit 1865049643bf5923e3155a76b8451f5b497c0fce
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Aug 25 10:29:41 2016

chameleon: auto reconnection

This patch supports auto reconnection to chameleond server.
The mechanism is primarily copied from
third_party/autotest/files/server/cros/faft/rpc_proxy.py

This mechanism is handy when the chameleon host is rebooted.
The chameleond proxy would be reconnected automatically such that
the reboot is transparent to the client side.

BUG= chromium:610238 
TEST=None

Change-Id: I5427d2f7a2a6b472cde1f1500e658d4fc994658c
Reviewed-on: https://chromium-review.googlesource.com/376560
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/1865049643bf5923e3155a76b8451f5b497c0fce/client/cros/chameleon/chameleon.py

Project Member

Comment 28 by bugdroid1@chromium.org, Aug 29 2016

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

commit d3e320059128faad6ac58928ad6121c73e07145d
Author: Joseph Hwang <josephsih@chromium.org>
Date: Fri Aug 26 07:23:08 2016

chameleon_host: pass proxy_generator to ChameleonConnection

This patch embeds rpc_server_tracker.xmlrpc_connect method call
into a proxy_generator as an argument passed to ChameleonConnection
so that a proxy could be re-created on demand when needed, e.g.,
after a chameleon reboot.

BUG= chromium:610238 
TEST=None

Change-Id: I570cc858dafac1fea56fee9e378bd5bf6e5f9450
Reviewed-on: https://chromium-review.googlesource.com/376561
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/d3e320059128faad6ac58928ad6121c73e07145d/server/hosts/chameleon_host.py

Project Member

Comment 29 by bugdroid1@chromium.org, Aug 29 2016

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

commit c0be90b82dc985677adbcda2c35f3ffa9c7e16c4
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Jul 19 05:42:03 2016

bluetooth_AdapterPairing: add more control files for mouse tests

Add control files for various autotest tests including stress tests.

BUG= chromium:610238 
TEST=conduct various autotest tests with the chameleon board connected to
an RN-42 kit
(cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP"
     $DUT_IP bluetooth_AdapterPairing.mouse
(cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP"
     $DUT_IP bluetooth_AdapterPairing.pairing_twice
(cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP"
     $DUT_IP bluetooth_AdapterPairing.stress_100
(cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP"
     $DUT_IP bluetooth_AdapterPairing.stress_500

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

[add] https://crrev.com/c0be90b82dc985677adbcda2c35f3ffa9c7e16c4/server/site_tests/bluetooth_AdapterPairing/control.mouse.pairing_twice
[modify] https://crrev.com/c0be90b82dc985677adbcda2c35f3ffa9c7e16c4/server/site_tests/bluetooth_AdapterPairing/control.mouse
[add] https://crrev.com/c0be90b82dc985677adbcda2c35f3ffa9c7e16c4/server/site_tests/bluetooth_AdapterPairing/control.mouse.stress_100
[add] https://crrev.com/c0be90b82dc985677adbcda2c35f3ffa9c7e16c4/server/site_tests/bluetooth_AdapterPairing/control.mouse.stress_500
[modify] https://crrev.com/c0be90b82dc985677adbcda2c35f3ffa9c7e16c4/server/site_tests/bluetooth_AdapterPairing/bluetooth_AdapterPairing.py

Project Member

Comment 30 by bugdroid1@chromium.org, Aug 30 2016

Labels: merge-merged-fpga-chameleon-4.2
The following revision refers to this bug:
  https://chromium.googlesource.com/linux-fpga-chameleon/+/b7dad171ecdc467f4b977cfa46966b464af7c883

commit b7dad171ecdc467f4b977cfa46966b464af7c883
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Apr 19 08:17:11 2016

ARM: socfpga: enable USB serial kernel modules

This patch configures both CONFIG_USB_SERIAL and
CONFIG_USB_SERIAL_FTDI_SIO into the kernels to enable
the serial modules.

These two modules are required for the chameleon board
to control USB devices through the /dev/ttyUSB* serial ports.

BUG= chromium:610238 
TEST=Use the commands
$ modprobe ftdi_sio
$ lsmod
to verify the existence of both ftdi_sio and usbserial modules.

Change-Id: I0688ab04ef8098f0d5fbf14898a89591a0d371fa

[modify] https://crrev.com/b7dad171ecdc467f4b977cfa46966b464af7c883/arch/arm/configs/socfpga_defconfig

Project Member

Comment 31 by bugdroid1@chromium.org, Sep 2 2016

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

commit eac4431f3b76899ccede19d71c8efe54c8e99b98
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed Aug 31 04:08:38 2016

cros_label: support 'chameleon:bt_hid' label in ChameleonPeripheralsLabel

This patch supports a new 'chameleon:bt_hid' label in
ChameleonPeripheralsLabel. The label is applied when
it is detected that a bluetooth classic HID device is
plugged into the Chameleon board.

BUG= chromium:610238 
TEST=Use logging.info to print out host.get_labels() in an autotest
on a DUT with chameleon board. It should print out something like
  ['bluetooth', 'chameleon', 'chameleon:bt_hid', ...]

Change-Id: I7a462912a2375bd89890cfd9ee08ca52cbfe9dee
Reviewed-on: https://chromium-review.googlesource.com/377849
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/eac4431f3b76899ccede19d71c8efe54c8e99b98/server/hosts/cros_label.py

Project Member

Comment 32 by bugdroid1@chromium.org, Sep 4 2016

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

commit b21333a77077502cea48dcedaf77b556d0335021
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Sep 01 09:20:45 2016

bluetooth_hid: support cursor movement with button status

This patch supports specification of button status in
movement method so that we could emit events for
click and drag gesture.

BUG= chromium:610238 
TEST=None

Change-Id: Ica1f7d8271e5b04158acba0f761399121466dbcd
Reviewed-on: https://chromium-review.googlesource.com/379698
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/b21333a77077502cea48dcedaf77b556d0335021/chameleond/utils/bluetooth_hid.py

Project Member

Comment 33 by bugdroid1@chromium.org, Sep 7 2016

Project Member

Comment 34 by bugdroid1@chromium.org, Sep 7 2016

Status: Fixed (was: Started)
Two bluetooth autotests, bluetooth_AdapterStandalone and bluetooth_AdapterPairing, have been implemented and running in suite:bluetooth_sanity. Let's close this issue. Will create a new issue for every new autotest hereafter.

Comment 36 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 37 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59
Status: Verified (was: Fixed)

Sign in to add a comment