diff options
Diffstat (limited to 'docs/library/bluetooth.rst')
| -rw-r--r-- | docs/library/bluetooth.rst | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/docs/library/bluetooth.rst b/docs/library/bluetooth.rst index f110bfb19..7ab4d6e88 100644 --- a/docs/library/bluetooth.rst +++ b/docs/library/bluetooth.rst @@ -485,10 +485,14 @@ writes from a client to a given characteristic, use Reads the local value for this handle (which has either been written by :meth:`gatts_write <BLE.gatts_write>` or by a remote client). -.. method:: BLE.gatts_write(value_handle, data, /) +.. method:: BLE.gatts_write(value_handle, data, send_update=False, /) Writes the local value for this handle, which can be read by a client. + If *send_update* is ``True``, then any subscribed clients will be notified + (or indicated, depending on what they're subscribed to and which operations + the characteristic supports) about this write. + .. method:: BLE.gatts_notify(conn_handle, value_handle, data=None, /) Sends a notification request to a connected client. @@ -499,17 +503,20 @@ writes from a client to a given characteristic, use Otherwise, if *data* is ``None``, then the current local value (as set with :meth:`gatts_write <BLE.gatts_write>`) will be sent. -.. method:: BLE.gatts_indicate(conn_handle, value_handle, /) + **Note:** The notification will be sent regardless of the subscription + status of the client to this characteristic. - Sends an indication request to a connected client. +.. method:: BLE.gatts_indicate(conn_handle, value_handle, /) - **Note:** This does not currently support sending a custom value, it will - always send the current local value (as set with :meth:`gatts_write - <BLE.gatts_write>`). + Sends an indication request containing the characteristic's current value to + a connected client. On acknowledgment (or failure, e.g. timeout), the ``_IRQ_GATTS_INDICATE_DONE`` event will be raised. + **Note:** The indication will be sent regardless of the subscription + status of the client to this characteristic. + .. method:: BLE.gatts_set_buffer(value_handle, len, append=False, /) Sets the internal buffer size for a value in bytes. This will limit the |
