Bluetooth: implement bluetooth_Sanity_Discovery
This test is another example of a Bluetooth test with a separate
tester device (stumpy with testbed-ap profile), and is the mirror of
bluetooth_Sanity_Discoverable.
BUG=chromium:256771
TEST=run_remote_tests
Change-Id: I00142fc5183af8466638ef7b1bc64cae4a6c87fb
Reviewed-on: https://chromium-review.googlesource.com/67010
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Commit-Queue: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
diff --git a/server/cros/bluetooth/bluetooth_tester.py b/server/cros/bluetooth/bluetooth_tester.py
index b055365..b59efb5 100644
--- a/server/cros/bluetooth/bluetooth_tester.py
+++ b/server/cros/bluetooth/bluetooth_tester.py
@@ -54,6 +54,32 @@
return self._proxy.setup(profile)
+ def set_discoverable(self, discoverable, timeout=0):
+ """Set the discoverable state of the controller.
+
+ @param discoverable: Whether controller should be discoverable.
+ @param timeout: Timeout in seconds before disabling discovery again,
+ ignored when discoverable is False, must not be zero when
+ discoverable is True.
+
+ @return True on success, False otherwise.
+
+ """
+ return self._proxy.set_discoverable(discoverable, timeout)
+
+
+ def read_info(self):
+ """Read the adapter information from the Kernel.
+
+ @return the information as a JSON-encoded tuple of:
+ ( address, bluetooth_version, manufacturer_id,
+ supported_settings, current_settings, class_of_device,
+ name, short_name )
+
+ """
+ return json.loads(self._proxy.read_info())
+
+
def discover_devices(self, br_edr=True, le_public=True, le_random=True):
"""Discover remote devices.