Bluetooth SDP autotest: support for 16, 32, 128 UUIDs
Bluetooth Test Specification document says that the tests shall be performed
using 128 bits UUID, 32 bits UUID and 16 bits UUID. So this CL adds an optional
parameter called preferred_size for Service Search Request method. For every
single UUID, if it fits into preferred_size bits, then this size will be used
for request. Otherwise the UUID will be casted to 128 bits format.
BUG=chromium:329044
TEST=use the following command to run it:
test_that --board ${BOARD} ${HOSTNAME} bluetooth_SDP_ServiceSearchRequestBasic
Probably, 'failed_attempts' variable will always be 0
Change-Id: I3dfb3539578182f933c4c650e564c03a97cd8916
Reviewed-on: https://chromium-review.googlesource.com/182251
Tested-by: Artem Rakhov <arakhov@chromium.org>
Reviewed-by: Scott James Remnant <keybuk@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 d5adbcc..a23f7f5 100644
--- a/server/cros/bluetooth/bluetooth_tester.py
+++ b/server/cros/bluetooth/bluetooth_tester.py
@@ -122,16 +122,18 @@
self._proxy.connect(address)
- def service_search_request(self, uuids, max_rec_cnt):
+ def service_search_request(self, uuids, max_rec_cnt, preferred_size=32):
"""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.
+ @param preferred_size: Preffered size of UUIDs in bits (16, 32, or 128).
@return list of found services' service record handles
"""
- return self._proxy.service_search_request(uuids, max_rec_cnt)
+ return self._proxy.service_search_request(uuids, max_rec_cnt,
+ preferred_size)
def create_host_from(device_host):