BluetoothTester: add support for basic SDP methods
BluetoothTester and BluetoothTesterXmlRpcDelegate classes are used to
expose tester-side bluetooth functionality (BluetoothSocket) so that it
could be accessed in autotests. BluetoothTester runs on the server and
basically represents the tester as an object for autotests.
BluetoothTesterXmlRpcDelegate runs on the tester and is generally a
proxy for BluetoothTester.
This CL adds connect() and service_search_request() methods to these
classes.
BUG=none
TEST=use added methods in autotests
Change-Id: I28671d2ad76d7a3e95f299c9622a6856a41ed941
Reviewed-on: https://chromium-review.googlesource.com/179167
Tested-by: Artem Rakhov <arakhov@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Artem Rakhov <arakhov@chromium.org>
diff --git a/server/cros/bluetooth/bluetooth_tester.py b/server/cros/bluetooth/bluetooth_tester.py
index fa351d7..d5adbcc 100644
--- a/server/cros/bluetooth/bluetooth_tester.py
+++ b/server/cros/bluetooth/bluetooth_tester.py
@@ -113,6 +113,27 @@
self.host.close()
+ def connect(self, address):
+ """Connect to device with the given address
+
+ @param address: Bluetooth address.
+
+ """
+ self._proxy.connect(address)
+
+
+ def service_search_request(self, uuids, max_rec_cnt):
+ """Send a Service Search Request
+
+ @param uuids: List of UUIDs (in 32-bit format) to look for.
+ @param max_rec_cnt: Maximum count of returned service records.
+
+ @return list of found services' service record handles
+
+ """
+ return self._proxy.service_search_request(uuids, max_rec_cnt)
+
+
def create_host_from(device_host):
"""Creates a host object for the Tester associated with a DUT.