summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2023-03-10 00:55:26 +1100
committerJim Mussared <jim.mussared@gmail.com>2023-04-26 11:37:20 +1000
commitf9b60a240a8b10a823923a95bff10453761c6f82 (patch)
tree22b1c9851ccfdfe16d7ac6aab0888ea158bd581f
parenta2df439dd302625ff49d4bb81b4ff7acadbb678c (diff)
tests/multi_bluetooth/ble_subscribe: Use end_handle in desc discovery.
Obtaining the end_handle was added in cacc96d9. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-rw-r--r--tests/multi_bluetooth/ble_subscribe.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/multi_bluetooth/ble_subscribe.py b/tests/multi_bluetooth/ble_subscribe.py
index 7cbcc6319..e80c18263 100644
--- a/tests/multi_bluetooth/ble_subscribe.py
+++ b/tests/multi_bluetooth/ble_subscribe.py
@@ -51,10 +51,10 @@ def irq(event, data):
elif event == _IRQ_PERIPHERAL_DISCONNECT:
print("_IRQ_PERIPHERAL_DISCONNECT")
elif event == _IRQ_GATTC_CHARACTERISTIC_RESULT:
- # conn_handle, def_handle, value_handle, properties, uuid = data
+ # conn_handle, end_handle, value_handle, properties, uuid = data
if data[-1] == CHAR_UUID:
print("_IRQ_GATTC_CHARACTERISTIC_RESULT", data[-1])
- waiting_events[event] = data[2]
+ waiting_events[event] = (data[2], data[1])
else:
return
elif event == _IRQ_GATTC_CHARACTERISTIC_DONE:
@@ -179,11 +179,11 @@ def instance1():
# Discover characteristics.
ble.gattc_discover_characteristics(conn_handle, 1, 65535)
- value_handle = wait_for_event(_IRQ_GATTC_CHARACTERISTIC_RESULT, TIMEOUT_MS)
+ value_handle, end_handle = wait_for_event(_IRQ_GATTC_CHARACTERISTIC_RESULT, TIMEOUT_MS)
wait_for_event(_IRQ_GATTC_CHARACTERISTIC_DONE, TIMEOUT_MS)
# Discover CCCD.
- ble.gattc_discover_descriptors(conn_handle, value_handle, value_handle + 5)
+ ble.gattc_discover_descriptors(conn_handle, value_handle, end_handle)
cccd_handle = wait_for_event(_IRQ_GATTC_DESCRIPTOR_RESULT, TIMEOUT_MS)
wait_for_event(_IRQ_GATTC_DESCRIPTOR_DONE, TIMEOUT_MS)