| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.bluetooth.gatt |
| |
| <p><b>Added:7</b></p> |
| |
| ## **PROTOCOLS** |
| |
| ## Client {#Client} |
| *Defined in [fuchsia.bluetooth.gatt/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/client.fidl;l=221)* |
| |
| ### ConnectToService {#Client.ConnectToService} |
| |
| <p>Connects the RemoteService with the given identifier.</p> |
| |
| #### Request {#Client.ConnectToService_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>service</code></td> |
| <td> |
| <code>request<<a class='link' href='#RemoteService'>RemoteService</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### ListServices {#Client.ListServices} |
| |
| <p>Enumerates services found on the peer that this Client represents. Results |
| can be restricted by specifying a list of UUIDs in <code>uuids</code>. The returned |
| ServiceInfo structures will contain only basic information about each |
| service and the <code>characteristics</code> and <code>includes</code> fields will be null.</p> |
| <p>To further interact with services, clients must obtain a RemoteService |
| handle by calling ConnectToService().</p> |
| |
| #### Request {#Client.ListServices_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>uuids</code></td> |
| <td> |
| <code>vector<string>?</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Client.ListServices_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>services</code></td> |
| <td> |
| <code>vector<<a class='link' href='#ServiceInfo'>ServiceInfo</a>>[65535]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ## LocalService {#LocalService} |
| *Defined in [fuchsia.bluetooth.gatt/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/server.fidl;l=55)* |
| <p>Interface for communicating with a published service.</p> |
| |
| ### NotifyValue {#LocalService.NotifyValue} |
| |
| <p>Sends a notification carrying the <code>value</code> of the characteristic with the |
| given <code>characteristic_id</code> to the device with <code>peer_id</code>.</p> |
| <p>If <code>confirm</code> is true, then this method sends an indication instead. If the |
| peer fails to confirm the indication, the link between the peer and the |
| local adapter will be closed.</p> |
| <p>This method has no effect if the peer has not enabled notifications or |
| indications on the requested characteristic.</p> |
| |
| #### Request {#LocalService.NotifyValue_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>characteristic_id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>peer_id</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerIdString'>PeerIdString</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>confirm</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### RemoveService {#LocalService.RemoveService} |
| |
| <p>Removes the service that this interface instance corresponds to. Does |
| nothing if the service is already removed.</p> |
| |
| #### Request {#LocalService.RemoveService_Request} |
| |
| <EMPTY> |
| |
| |
| ## LocalServiceDelegate {#LocalServiceDelegate} |
| *Defined in [fuchsia.bluetooth.gatt/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/server.fidl;l=9)* |
| <p>Interface for responding to requests on a local service.</p> |
| |
| ### OnCharacteristicConfiguration {#LocalServiceDelegate.OnCharacteristicConfiguration} |
| |
| <p>Notifies the delegate when a remote device with <code>peer_id</code> enables or |
| disables notifications or indications on the characteristic with the given |
| <code>characteristic_id</code>.</p> |
| |
| #### Request {#LocalServiceDelegate.OnCharacteristicConfiguration_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>characteristic_id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>peer_id</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerIdString'>PeerIdString</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>notify</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>indicate</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### OnReadValue {#LocalServiceDelegate.OnReadValue} |
| |
| <p>Called when a remote device issues a request to read the value of the |
| of the characteristic or descriptor with given identifier. The delegate |
| must respond to the request by returning the characteristic value. If the |
| read request resulted in an error it should be returned in <code>error_code</code>. |
| On success, <code>error_code</code> should be set to NO_ERROR and a <code>value</code> should be |
| provided.</p> |
| |
| #### Request {#LocalServiceDelegate.OnReadValue_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#LocalServiceDelegate.OnReadValue_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>?</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='#ErrorCode'>ErrorCode</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### OnWriteValue {#LocalServiceDelegate.OnWriteValue} |
| |
| <p>Called when a remote device issues a request to write the value of the |
| characteristic or descriptor with the given identifier.</p> |
| |
| #### Request {#LocalServiceDelegate.OnWriteValue_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#LocalServiceDelegate.OnWriteValue_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='#ErrorCode'>ErrorCode</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### OnWriteWithoutResponse {#LocalServiceDelegate.OnWriteWithoutResponse} |
| |
| <p>Called when a remote device issues a request to write the value of the |
| characteristic with the given identifier. This can be called on a |
| characteristic with the WRITE_WITHOUT_RESPONSE property.</p> |
| |
| #### Request {#LocalServiceDelegate.OnWriteWithoutResponse_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## RemoteService {#RemoteService} |
| *Defined in [fuchsia.bluetooth.gatt/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/client.fidl;l=17)* |
| |
| ### DiscoverCharacteristics {#RemoteService.DiscoverCharacteristics} |
| |
| <p>Returns the characteristics and characteristic descriptors that belong to |
| this service.</p> |
| |
| #### Request {#RemoteService.DiscoverCharacteristics_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#RemoteService.DiscoverCharacteristics_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>characteristics</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Characteristic'>Characteristic</a>>[32767]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### NotifyCharacteristic {#RemoteService.NotifyCharacteristic} |
| |
| <p>Subscribe or unsubscribe to notifications/indications from the characteristic with |
| the given <code>id</code>. Notifications or indications will be enabled if <code>enable</code> is |
| true or disabled if <code>enable</code> is false and they have been enabled for this |
| client.</p> |
| <p>Either notifications or indications will be enabled depending on |
| characteristic properties. Indications will be preferred if they are |
| supported.</p> |
| <p>This operation fails if the characteristic does not have the "notify" or |
| "indicate" property.</p> |
| <p>A write request will be issued to configure the characteristic for notifications/indications |
| if it contains a Client Characteristic Configuration descriptor. This method fails if an |
| error occurs while writing to the descriptor.</p> |
| <p>On success, the OnCharacteristicValueUpdated event will be sent whenever |
| the peer sends a notification or indication. The local host will |
| automically confirm indications.</p> |
| |
| #### Request {#RemoteService.NotifyCharacteristic_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>enable</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.NotifyCharacteristic_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### OnCharacteristicValueUpdated {#RemoteService.OnCharacteristicValueUpdated} |
| |
| <p>Events: |
| Called when a characteristic value notification or indication is received.</p> |
| |
| |
| #### Response {#RemoteService.OnCharacteristicValueUpdated_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadByType {#RemoteService.ReadByType} |
| |
| <p>Reads characteristics and descriptors with the given <code>uuid</code>. If no values are |
| read, <code>results</code> will be empty. If reading a value results in a permission error, |
| the handle and error will be included in <code>results</code>.</p> |
| <p>NOTE: Values in <code>results</code> will be truncated to <code>MAX_READ_BY_TYPE_VALUE_LENGTH</code> |
| bytes. <code>ReadCharacteristic</code>, <code>ReadLongCharacteristic()</code>, <code>ReadDescriptor</code>, or |
| <code>ReadLongDescriptor()</code> should be used to read the complete values.</p> |
| <p>This method is useful for reading values before discovery has completed, thereby |
| reducing latency.</p> |
| |
| #### Request {#RemoteService.ReadByType_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>uuid</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.ReadByType_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_ReadByType_Result'>RemoteService_ReadByType_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadCharacteristic {#RemoteService.ReadCharacteristic} |
| |
| <p>Reads the value of the characteristic with <code>id</code> and returns it in the |
| reply. If <code>status</code> indicates an error <code>value</code> will be empty.</p> |
| <p>If the characteristic has a long value (i.e. larger than the current MTU) |
| this method will return only the first (MTU - 1) bytes of the value. Use |
| ReadLongCharacteristic() to read larger values or starting at a non-zero |
| offset.</p> |
| |
| #### Request {#RemoteService.ReadCharacteristic_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.ReadCharacteristic_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadDescriptor {#RemoteService.ReadDescriptor} |
| |
| <p>Reads the value of the characteristic descriptor with <code>id</code> and returns it |
| in the reply. If <code>status</code> indicates an error, <code>value</code> can be ignored.</p> |
| <p>If the descriptor has a long value (i.e. larger than the current MTU) |
| this method will return only the first (MTU - 1) bytes of the value. Use |
| ReadLongDescriptor() to read larger values or starting at a non-zero |
| offset.</p> |
| |
| #### Request {#RemoteService.ReadDescriptor_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.ReadDescriptor_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadLongCharacteristic {#RemoteService.ReadLongCharacteristic} |
| |
| <p>Reads the complete value of a characteristic with the given <code>id</code>. This |
| procedure should be used if the characteristic is known to have a value |
| that can not be read in a single request.</p> |
| <p>Returns up to <code>max_bytes</code> octets of the characteristic value starting at |
| the given <code>offset</code>.</p> |
| <p>This may return an error if: |
| a. <code>max_bytes</code> is 0; |
| b. The <code>offset</code> is invalid; |
| c. The characteristic does not have a long value; |
| d. The server does not support the long read procedure.</p> |
| |
| #### Request {#RemoteService.ReadLongCharacteristic_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>max_bytes</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.ReadLongCharacteristic_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadLongDescriptor {#RemoteService.ReadLongDescriptor} |
| |
| <p>Reads the complete value of a characteristic descriptor with the given <code>id</code>. |
| This procedure should be used if the descriptor is known to have a value |
| that can not be read in a single request.</p> |
| <p>Returns up to <code>max_bytes</code> octets of the characteristic value starting at |
| the given <code>offset</code>.</p> |
| <p>This may return an error if: |
| a. <code>max_bytes</code> is 0; |
| b. The <code>offset</code> is invalid; |
| c. The server does not support the long read procedure.</p> |
| |
| #### Request {#RemoteService.ReadLongDescriptor_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>max_bytes</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.ReadLongDescriptor_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteCharacteristic {#RemoteService.WriteCharacteristic} |
| |
| <p>Writes <code>value</code> to the characteristic with <code>id</code>. This operation may return |
| an error if: |
| a. The size of <code>value</code> exceeds the current MTU. |
| b. The characteristic referred to by <code>id</code> does not have the 'write' |
| property.</p> |
| |
| #### Request {#RemoteService.WriteCharacteristic_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.WriteCharacteristic_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteCharacteristicWithoutResponse {#RemoteService.WriteCharacteristicWithoutResponse} |
| |
| <p>Writes <code>value</code> to the characteristic with <code>id</code> without soliciting an |
| acknowledgement from the peer. This method has no response and its delivery |
| cannot be confirmed.</p> |
| |
| #### Request {#RemoteService.WriteCharacteristicWithoutResponse_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### WriteDescriptor {#RemoteService.WriteDescriptor} |
| |
| <p>Writes <code>value</code> to the characteristic descriptor with <code>id</code>. This operation |
| may return an error if: |
| a. The size of <code>value</code> exceeds the current MTU. |
| b. <code>id</code> refers to an internally reserved descriptor type (e.g. the Client |
| Characteristic Configuration descriptor).</p> |
| |
| #### Request {#RemoteService.WriteDescriptor_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.WriteDescriptor_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteLongCharacteristic {#RemoteService.WriteLongCharacteristic} |
| |
| <p>Writes <code>value</code> to the characteristic with <code>id</code>, beginning at <code>offset</code> using |
| the provided <code>write_options</code>.</p> |
| <p>This procedure should be used if the value to be written is too long to |
| fit in a single request or needs to be written at an offset. This may |
| return an error if: |
| a. The <code>offset</code> is invalid; |
| b. The server does not support the long write procedure.</p> |
| <p>Long Writes require multiple messages to the remote service and take longer |
| to execute than Short Writes. It is not recommended to send a short write |
| while a long write is in process to the same id and data range. The order |
| of the responses from this function signify the order in which the remote |
| service received them, not necessarily the order in which it is called.</p> |
| |
| #### Request {#RemoteService.WriteLongCharacteristic_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>write_options</code></td> |
| <td> |
| <code><a class='link' href='#WriteOptions'>WriteOptions</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.WriteLongCharacteristic_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteLongDescriptor {#RemoteService.WriteLongDescriptor} |
| |
| <p>Writes <code>value</code> to the characteristic descriptor with <code>id</code>, beginning at |
| <code>offset</code>. This procedure should be used if the value to be written is too |
| long to fit in a single request or needs to be written at an offset. This |
| may return an error if: |
| a. The <code>offset</code> is invalid; |
| b. The server does not support the long write procedure. |
| c. <code>id</code> refers to an internally reserved descriptor type (e.g. the Client |
| Characteristic Configuration descriptor).</p> |
| <p>Long Writes require multiple messages to the remote service and take longer |
| to execute than Short Writes. It is not recommended to send a short write |
| while a long write is in process to the same id and data range. The order |
| of the responses from this function signify the order in which the remote |
| service received them, not necessarily the order in which it is called.</p> |
| |
| #### Request {#RemoteService.WriteLongDescriptor_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.WriteLongDescriptor_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Server {#Server} |
| *Defined in [fuchsia.bluetooth.gatt/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/server.fidl;l=78)* |
| |
| ### PublishService {#Server.PublishService} |
| |
| <p>Publishes the given service so that it is available to all remote peers. |
| A LocalServiceDelegate must be provided over which to receive service requests.</p> |
| <p>The caller must assign distinct identifiers to the characteristics and |
| descriptors listed in <code>info</code>. These identifiers will be used in requests |
| sent to <code>delegate</code>.</p> |
| <p><code>service</code> can be used to interact with the pubished service. If this |
| service cannot be published then the handle for <code>service</code> will be closed.</p> |
| <p>Returns the success or failure status of the call and a unique identifier |
| that can be used to unregister the service.</p> |
| |
| #### Request {#Server.PublishService_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>info</code></td> |
| <td> |
| <code><a class='link' href='#ServiceInfo'>ServiceInfo</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>delegate</code></td> |
| <td> |
| <code><a class='link' href='#LocalServiceDelegate'>LocalServiceDelegate</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>service</code></td> |
| <td> |
| <code>request<<a class='link' href='#LocalService'>LocalService</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Server.PublishService_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **STRUCTS** |
| |
| ### AttributePermissions {#AttributePermissions data-text="AttributePermissions"} |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=70)* |
| <p>Specifies the access permissions for a specific attribute value.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="AttributePermissions.read"> |
| <td><code>read</code></td> |
| <td> |
| <code><a class='link' href='#SecurityRequirements'>SecurityRequirements</a>?</code> |
| </td> |
| <td><p>Specifies whether or not an attribute has the read permission. If null, |
| then the attribute value cannot be read. Otherwise, it can be read only if |
| the permissions specified in the Permissions struct are satisfied.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="AttributePermissions.write"> |
| <td><code>write</code></td> |
| <td> |
| <code><a class='link' href='#SecurityRequirements'>SecurityRequirements</a>?</code> |
| </td> |
| <td><p>Specifies whether or not an attribute has the write permission. If null, |
| then the attribute value cannot be written. Otherwise, it be written only |
| if the permissions specified in the Permissions struct are satisfied.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="AttributePermissions.update"> |
| <td><code>update</code></td> |
| <td> |
| <code><a class='link' href='#SecurityRequirements'>SecurityRequirements</a>?</code> |
| </td> |
| <td><p>Specifies the security requirements for a client to subscribe to |
| notifications or indications on a characteristic. A characteristic's |
| support for notifications or indiciations is specified using the NOTIFY and |
| INDICATE characteristic properties. If a local characteristic has one of |
| these properties then this field can not be null. Otherwise, this field |
| must be left as null.</p> |
| <p>This field is ignored for Descriptors.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### Characteristic {#Characteristic data-text="Characteristic"} |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=125)* |
| <p>Represents a local or remote GATT characteristic.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Characteristic.id"> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td><p>Uniquely identifies this characteristic within a service.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Characteristic.type"> |
| <td><code>type</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#UuidString'>UuidString</a></code> |
| </td> |
| <td><p>The 128-bit UUID that identifies the type of this characteristic. This is a |
| string in the canonical 8-4-4-4-12 format.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Characteristic.properties"> |
| <td><code>properties</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td><p>The characteristic properties bitfield. See kProperty* above for possible |
| values.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Characteristic.permissions"> |
| <td><code>permissions</code></td> |
| <td> |
| <code><a class='link' href='#AttributePermissions'>AttributePermissions</a>?</code> |
| </td> |
| <td><p>The attribute permissions of this characteristic. For remote |
| characteristics, this value will be null until the permissions are |
| discovered via read and write requests.</p> |
| <p>For local characteristics, this value is mandatory.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Characteristic.descriptors"> |
| <td><code>descriptors</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Descriptor'>Descriptor</a>>[65532]?</code> |
| </td> |
| <td><p>The descriptors of this characteristic.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### Descriptor {#Descriptor data-text="Descriptor"} |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=149)* |
| <p>Represents a local or remote GATT characteristic descriptor.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Descriptor.id"> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td><p>Uniquely identifies this descriptor within the characteristic that it |
| belongs to.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Descriptor.type"> |
| <td><code>type</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#UuidString'>UuidString</a></code> |
| </td> |
| <td><p>The 128-bit UUID that identifies the type of this descriptor. This is a |
| string in the canonical 8-4-4-4-12 format.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="Descriptor.permissions"> |
| <td><code>permissions</code></td> |
| <td> |
| <code><a class='link' href='#AttributePermissions'>AttributePermissions</a>?</code> |
| </td> |
| <td><p>The attribute permissions of this descriptor. For remote |
| descriptors, this value will be null until the permissions are |
| discovered via read and write requests.</p> |
| <p>For local descriptors, this value is mandatory.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### RemoteService_ReadByType_Response {#RemoteService_ReadByType_Response data-text="RemoteService_ReadByType_Response"} |
| *Defined in [fuchsia.bluetooth.gatt/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/client.fidl;l=183)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="RemoteService_ReadByType_Response.results"> |
| <td><code>results</code></td> |
| <td> |
| <code>vector<<a class='link' href='#ReadByTypeResult'>ReadByTypeResult</a>>[189]</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### SecurityRequirements {#SecurityRequirements data-text="SecurityRequirements"} |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=56)* |
| <p>Represents encryption, authentication, and authorization permissions that can |
| be assigned to a specific access permission.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="SecurityRequirements.encryption_required"> |
| <td><code>encryption_required</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>If true, the physical link must be encrypted to access this attribute.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="SecurityRequirements.authentication_required"> |
| <td><code>authentication_required</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>If true, the physical link must be authenticated to access this |
| attribute.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="SecurityRequirements.authorization_required"> |
| <td><code>authorization_required</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>If true, the client needs to be authorized before accessing this |
| attribute.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### ServiceInfo {#ServiceInfo data-text="ServiceInfo"} |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=105)* |
| <p>Represents a local or remote GATT service.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="ServiceInfo.id"> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td><p>Uniquely identifies this GATT service. This value will be ignored for local |
| services. Remote services will always have an identifier.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="ServiceInfo.primary"> |
| <td><code>primary</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>Indicates whether this is a primary or secondary service.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="ServiceInfo.type"> |
| <td><code>type</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#UuidString'>UuidString</a></code> |
| </td> |
| <td><p>The 128-bit UUID that identifies the type of this service. This is a string |
| in the canonical 8-4-4-4-12 format.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="ServiceInfo.characteristics"> |
| <td><code>characteristics</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Characteristic'>Characteristic</a>>[32767]?</code> |
| </td> |
| <td><p>The characteristics of this service.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="ServiceInfo.includes"> |
| <td><code>includes</code></td> |
| <td> |
| <code>vector<uint64>[65535]?</code> |
| </td> |
| <td><p>Ids of other services that are included by this service.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| |
| ## **ENUMS** |
| |
| ### Error [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Error data-text="Error"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=27)* |
| <p>Errors that are returned by bluetooth.gatt methods.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="Error.FAILURE"> |
| <td><h3 id="Error.FAILURE" class="add-link hide-from-toc">FAILURE</h3></td> |
| <td><code>1</code></td> |
| <td><p>A general error occurred that can not be classified as one of the more specific statuses.</p> |
| </td> |
| </tr> |
| <tr id="Error.INVALID_RESPONSE"> |
| <td><h3 id="Error.INVALID_RESPONSE" class="add-link hide-from-toc">INVALID_RESPONSE</h3></td> |
| <td><code>2</code></td> |
| <td><p>Indicates that the response received from the server was invalid.</p> |
| </td> |
| </tr> |
| <tr id="Error.TOO_MANY_RESULTS"> |
| <td><h3 id="Error.TOO_MANY_RESULTS" class="add-link hide-from-toc">TOO_MANY_RESULTS</h3></td> |
| <td><code>3</code></td> |
| <td><p>Indicates that more results were read than can fit in a FIDL response. Consider |
| reading attributes individually.</p> |
| </td> |
| </tr> |
| <tr id="Error.INSUFFICIENT_AUTHORIZATION"> |
| <td><h3 id="Error.INSUFFICIENT_AUTHORIZATION" class="add-link hide-from-toc">INSUFFICIENT_AUTHORIZATION</h3></td> |
| <td><code>4</code></td> |
| <td><p>This attribute requires authorization, but the client is not authorized.</p> |
| </td> |
| </tr> |
| <tr id="Error.INSUFFICIENT_AUTHENTICATION"> |
| <td><h3 id="Error.INSUFFICIENT_AUTHENTICATION" class="add-link hide-from-toc">INSUFFICIENT_AUTHENTICATION</h3></td> |
| <td><code>5</code></td> |
| <td><p>This attribute requires authentication, but the client is not authenticated.</p> |
| </td> |
| </tr> |
| <tr id="Error.INSUFFICIENT_ENCRYPTION_KEY_SIZE"> |
| <td><h3 id="Error.INSUFFICIENT_ENCRYPTION_KEY_SIZE" class="add-link hide-from-toc">INSUFFICIENT_ENCRYPTION_KEY_SIZE</h3></td> |
| <td><code>6</code></td> |
| <td><p>This attribute requires a connection encrypted by a larger encryption key.</p> |
| </td> |
| </tr> |
| <tr id="Error.INSUFFICIENT_ENCRYPTION"> |
| <td><h3 id="Error.INSUFFICIENT_ENCRYPTION" class="add-link hide-from-toc">INSUFFICIENT_ENCRYPTION</h3></td> |
| <td><code>7</code></td> |
| <td><p>This attribute requires encryption, but the connection is not encrypted.</p> |
| </td> |
| </tr> |
| <tr id="Error.READ_NOT_PERMITTED"> |
| <td><h3 id="Error.READ_NOT_PERMITTED" class="add-link hide-from-toc">READ_NOT_PERMITTED</h3></td> |
| <td><code>8</code></td> |
| <td><p>This attribute is not readable.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### ErrorCode [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ErrorCode data-text="ErrorCode"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=10)* |
| <p>Codes that can be returned in the <code>protocol_error_code</code> field of a |
| bluetooth.Error.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="ErrorCode.NO_ERROR"> |
| <td><h3 id="ErrorCode.NO_ERROR" class="add-link hide-from-toc">NO_ERROR</h3></td> |
| <td><code>0</code></td> |
| <td><p>Indicates that the operation was successful.</p> |
| </td> |
| </tr> |
| <tr id="ErrorCode.INVALID_OFFSET"> |
| <td><h3 id="ErrorCode.INVALID_OFFSET" class="add-link hide-from-toc">INVALID_OFFSET</h3></td> |
| <td><code>1</code></td> |
| <td><p>Indicates that the offset used in a read or write request exceeds the |
| bounds of the value.</p> |
| </td> |
| </tr> |
| <tr id="ErrorCode.INVALID_VALUE_LENGTH"> |
| <td><h3 id="ErrorCode.INVALID_VALUE_LENGTH" class="add-link hide-from-toc">INVALID_VALUE_LENGTH</h3></td> |
| <td><code>2</code></td> |
| <td><p>Indicates that the value given in a write request would exceed the maximum |
| length allowed for the destionation characteristic or descriptor.</p> |
| </td> |
| </tr> |
| <tr id="ErrorCode.NOT_PERMITTED"> |
| <td><h3 id="ErrorCode.NOT_PERMITTED" class="add-link hide-from-toc">NOT_PERMITTED</h3></td> |
| <td><code>3</code></td> |
| <td><p>Indicates that a read or write request is not permitted.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReliableMode [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ReliableMode data-text="ReliableMode"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=170)* |
| <p>Represents the reliability mode during long and prepared write operations.</p> |
| <p>If enabled, every value blob is verified against an echo response from the server. |
| The procedure is aborted if a value blob has not been reliably delivered to the peer.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="ReliableMode.DISABLED"> |
| <td><h3 id="ReliableMode.DISABLED" class="add-link hide-from-toc">DISABLED</h3></td> |
| <td><code>1</code></td> |
| <td></td> |
| </tr> |
| <tr id="ReliableMode.ENABLED"> |
| <td><h3 id="ReliableMode.ENABLED" class="add-link hide-from-toc">ENABLED</h3></td> |
| <td><code>2</code></td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| ## **TABLES** |
| |
| ### ReadByTypeResult {#ReadByTypeResult data-text="ReadByTypeResult"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/client.fidl;l=8)* |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="ReadByTypeResult.id"> |
| <td><h3 id="ReadByTypeResult.id" class="add-link hide-from-toc">1</h3></td> |
| <td><code>id</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td><p>Characteristic or descriptor id.</p> |
| </td> |
| </tr> |
| <tr id="ReadByTypeResult.value"> |
| <td><h3 id="ReadByTypeResult.value" class="add-link hide-from-toc">2</h3></td> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[253]</code> |
| </td> |
| <td><p>Truncated value of characteristic or descriptor, if it was read successfully.</p> |
| </td> |
| </tr> |
| <tr id="ReadByTypeResult.error"> |
| <td><h3 id="ReadByTypeResult.error" class="add-link hide-from-toc">3</h3></td> |
| <td><code>error</code></td> |
| <td> |
| <code><a class='link' href='#Error'>Error</a></code> |
| </td> |
| <td><p>Reason the value could not be read, if reading it resulted in an error.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteOptions {#WriteOptions data-text="WriteOptions"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=176)* |
| <p>Represents the supported options to write a characteristic value to a server.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="WriteOptions.reliable_mode"> |
| <td><h3 id="WriteOptions.reliable_mode" class="add-link hide-from-toc">1</h3></td> |
| <td><code>reliable_mode</code></td> |
| <td> |
| <code><a class='link' href='#ReliableMode'>ReliableMode</a></code> |
| </td> |
| <td><p>The reliable mode of the write operation.</p> |
| <p>Defaults to <a class='link' href='../fuchsia.bluetooth.gatt/'>fuchsia.bluetooth.gatt</a>/<a class='link' href='../fuchsia.bluetooth.gatt/#ReliableMode.DISABLED'>ReliableMode.DISABLED</a> if not present.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **UNIONS** |
| |
| ### RemoteService_ReadByType_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RemoteService_ReadByType_Result data-text="RemoteService_ReadByType_Result"} |
| *Defined in [fuchsia.bluetooth.gatt/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/client.fidl;l=183)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="RemoteService_ReadByType_Result.response"> |
| <td><h3 id="RemoteService_ReadByType_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_ReadByType_Response'>RemoteService_ReadByType_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="RemoteService_ReadByType_Result.err"> |
| <td><h3 id="RemoteService_ReadByType_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#Error'>Error</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| |
| ## **CONSTANTS** |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr> |
| <tr id="MAX_ATTRIBUTE_COUNT"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/constants.fidl;l=15">MAX_ATTRIBUTE_COUNT</a></td> |
| <td> |
| <code>65535</code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_CHARACTERISTIC_COUNT"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/constants.fidl;l=30">MAX_CHARACTERISTIC_COUNT</a></td> |
| <td> |
| <code>32767</code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_DESCRIPTOR_COUNT"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/constants.fidl;l=38">MAX_DESCRIPTOR_COUNT</a></td> |
| <td> |
| <code>65532</code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_READ_BY_TYPE_RESULTS"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/constants.fidl;l=9">MAX_READ_BY_TYPE_RESULTS</a></td> |
| <td> |
| <code>189</code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_READ_BY_TYPE_VALUE_LENGTH"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/constants.fidl;l=12">MAX_READ_BY_TYPE_VALUE_LENGTH</a></td> |
| <td> |
| <code>253</code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_SERVICE_COUNT"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/constants.fidl;l=22">MAX_SERVICE_COUNT</a></td> |
| <td> |
| <code><a class='link' href='#MAX_ATTRIBUTE_COUNT'>MAX_ATTRIBUTE_COUNT</a></code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_VALUE_LENGTH"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/constants.fidl;l=6">MAX_VALUE_LENGTH</a></td> |
| <td> |
| <code>512</code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyAuthenticatedSignedWrites"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=100">kPropertyAuthenticatedSignedWrites</a></td> |
| <td> |
| <code>64</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyBroadcast"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=94">kPropertyBroadcast</a></td> |
| <td> |
| <code>1</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td><p>Possible values for the characteristic properties bitfield. These specify the |
| GATT procedures that are allowed for a particular characteristic.</p> |
| </td> |
| </tr> |
| <tr id="kPropertyIndicate"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=99">kPropertyIndicate</a></td> |
| <td> |
| <code>32</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyNotify"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=98">kPropertyNotify</a></td> |
| <td> |
| <code>16</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyRead"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=95">kPropertyRead</a></td> |
| <td> |
| <code>2</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyReliableWrite"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=101">kPropertyReliableWrite</a></td> |
| <td> |
| <code>256</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyWritableAuxiliaries"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=102">kPropertyWritableAuxiliaries</a></td> |
| <td> |
| <code>512</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyWrite"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=97">kPropertyWrite</a></td> |
| <td> |
| <code>8</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="kPropertyWriteWithoutResponse"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt/types.fidl;l=96">kPropertyWriteWithoutResponse</a></td> |
| <td> |
| <code>4</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| </table> |