From 26b66804e96b78395cddc37e195fc36862837d97 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Fri, 14 Aug 2020 15:16:29 +1000 Subject: [PATCH] tests/multi_bluetooth: Update to new config('mac') behaviour. --- tests/multi_bluetooth/ble_characteristic.py | 2 +- tests/multi_bluetooth/ble_gap_advertise.py | 2 +- tests/multi_bluetooth/ble_gap_connect.py | 4 ++-- tests/multi_bluetooth/ble_gap_device_name.py | 2 +- tests/multi_bluetooth/ble_gatt_data_transfer.py | 2 +- tests/multi_bluetooth/ble_gattc_discover_services.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/multi_bluetooth/ble_characteristic.py b/tests/multi_bluetooth/ble_characteristic.py index 0d72c181fd..d918d9aefc 100644 --- a/tests/multi_bluetooth/ble_characteristic.py +++ b/tests/multi_bluetooth/ble_characteristic.py @@ -146,7 +146,7 @@ def instance1(): try: # Connect to peripheral and then disconnect. print("gap_connect") - ble.gap_connect(0, BDADDR) + ble.gap_connect(*BDADDR) if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS): return conn_handle, _, _ = waiting_data diff --git a/tests/multi_bluetooth/ble_gap_advertise.py b/tests/multi_bluetooth/ble_gap_advertise.py index 71a5b58a56..bb6ff8e425 100644 --- a/tests/multi_bluetooth/ble_gap_advertise.py +++ b/tests/multi_bluetooth/ble_gap_advertise.py @@ -36,7 +36,7 @@ def instance1(): def irq(ev, data): nonlocal finished, adv_types, adv_data if ev == _IRQ_SCAN_RESULT: - if data[1] == BDADDR: + if data[0] == BDADDR[0] and data[1] == BDADDR[1]: adv_types.add(data[2]) if adv_data is None: adv_data = bytes(data[4]) diff --git a/tests/multi_bluetooth/ble_gap_connect.py b/tests/multi_bluetooth/ble_gap_connect.py index 8e3ed8b816..ba9c28230d 100644 --- a/tests/multi_bluetooth/ble_gap_connect.py +++ b/tests/multi_bluetooth/ble_gap_connect.py @@ -76,7 +76,7 @@ def instance1(): try: # Connect to peripheral and then disconnect. print("gap_connect") - ble.gap_connect(0, BDADDR) + ble.gap_connect(*BDADDR) if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS): return print("gap_disconnect:", ble.gap_disconnect(waiting_data[0])) @@ -88,7 +88,7 @@ def instance1(): # Connect to peripheral and then let the peripheral disconnect us. print("gap_connect") - ble.gap_connect(0, BDADDR) + ble.gap_connect(*BDADDR) if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS): return wait_for_event(_IRQ_PERIPHERAL_DISCONNECT, TIMEOUT_MS) diff --git a/tests/multi_bluetooth/ble_gap_device_name.py b/tests/multi_bluetooth/ble_gap_device_name.py index dafa367128..92ea94278a 100644 --- a/tests/multi_bluetooth/ble_gap_device_name.py +++ b/tests/multi_bluetooth/ble_gap_device_name.py @@ -97,7 +97,7 @@ def instance1(): # Connect to peripheral. print("gap_connect") - ble.gap_connect(0, BDADDR) + ble.gap_connect(*BDADDR) if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS): return conn_handle, _, _ = waiting_data diff --git a/tests/multi_bluetooth/ble_gatt_data_transfer.py b/tests/multi_bluetooth/ble_gatt_data_transfer.py index dba0c333be..240f048607 100644 --- a/tests/multi_bluetooth/ble_gatt_data_transfer.py +++ b/tests/multi_bluetooth/ble_gatt_data_transfer.py @@ -137,7 +137,7 @@ def instance1(): try: # Connect to peripheral and then disconnect. print("gap_connect") - ble.gap_connect(0, BDADDR) + ble.gap_connect(*BDADDR) if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS): return conn_handle, _, _ = waiting_data diff --git a/tests/multi_bluetooth/ble_gattc_discover_services.py b/tests/multi_bluetooth/ble_gattc_discover_services.py index e746b87458..57f95bf012 100644 --- a/tests/multi_bluetooth/ble_gattc_discover_services.py +++ b/tests/multi_bluetooth/ble_gattc_discover_services.py @@ -85,7 +85,7 @@ def instance1(): try: # Connect to peripheral and then disconnect. print("gap_connect") - ble.gap_connect(0, BDADDR) + ble.gap_connect(*BDADDR) if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS): return conn_handle, _, _ = waiting_data