diff options
| author | Jim Mussared | 2020-07-17 15:18:32 +1000 |
|---|---|---|
| committer | Damien George | 2020-07-18 14:34:44 +1000 |
| commit | b7698841b20cd20a6729ba9d9f19a93f4fd33a5c (patch) | |
| tree | 991576913f98d1c5cb99d785f3586db973ee243b /extmod | |
| parent | 89a95b7c85cd90967020b80a0a4649b2f745bea8 (diff) | |
docs/library: Add gatts_indicate() doc to ubluetooth.rst.
Also clarify behavior of `gatts_notify` and add some TODOs about adding an
event for indication acknowledgement.
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/btstack/modbluetooth_btstack.c | 2 | ||||
| -rw-r--r-- | extmod/nimble/modbluetooth_nimble.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/extmod/btstack/modbluetooth_btstack.c b/extmod/btstack/modbluetooth_btstack.c index 5b2aec67d..b114275b6 100644 --- a/extmod/btstack/modbluetooth_btstack.c +++ b/extmod/btstack/modbluetooth_btstack.c @@ -814,6 +814,8 @@ int mp_bluetooth_gatts_indicate(uint16_t conn_handle, uint16_t value_handle) { size_t len = 0; mp_bluetooth_gatts_db_read(MP_STATE_PORT(bluetooth_btstack_root_pointers)->gatts_db, value_handle, &data, &len); + // TODO: Handle ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE to generate acknowledgment event. + // Attempt to send immediately, will copy buffer. MICROPY_PY_BLUETOOTH_ENTER int err = att_server_indicate(conn_handle, value_handle, data, len); diff --git a/extmod/nimble/modbluetooth_nimble.c b/extmod/nimble/modbluetooth_nimble.c index 2e9468513..b859213aa 100644 --- a/extmod/nimble/modbluetooth_nimble.c +++ b/extmod/nimble/modbluetooth_nimble.c @@ -603,6 +603,8 @@ int mp_bluetooth_gatts_indicate(uint16_t conn_handle, uint16_t value_handle) { if (!mp_bluetooth_is_active()) { return ERRNO_BLUETOOTH_NOT_ACTIVE; } + // TODO: catch BLE_GAP_EVENT_NOTIFY_TX to raise an event for completed + // indication transaction. return ble_hs_err_to_errno(ble_gattc_indicate(conn_handle, value_handle)); } |
