| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.bluetooth.gatt2 |
| |
| <div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div> |
| |
| |
| ## **PROTOCOLS** |
| |
| ## CharacteristicNotifier {#CharacteristicNotifier} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=32)* |
| <p>Listens to characteristic notifications & indications.</p> |
| |
| |
| ### OnNotification {#CharacteristicNotifier.OnNotification} |
| |
| <p>Called when a characteristic value notification or indication is |
| received from the server.</p> |
| <ul> |
| <li>request <code>value</code> the value of the updated characteristic.</li> |
| </ul> |
| <ul> |
| <li>response An empty response should be sent immediately as an |
| acknowledgement that the notification was received (for flow control).</li> |
| </ul> |
| |
| |
| |
| #### Request {#CharacteristicNotifier.OnNotification_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code><a class='link' href='#ReadValue'>ReadValue</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#CharacteristicNotifier.OnNotification_Response} |
| |
| <EMPTY> |
| |
| ## Client {#Client} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=188)* |
| |
| |
| ### ConnectToService {#Client.ConnectToService} |
| |
| <p>Connects the RemoteService with the given identifier. Only 1 connection |
| per service is allowed.</p> |
| <p><code>service</code> will be closed on error, with an epitaph that provides a |
| reason.</p> |
| <ul> |
| <li>error Returns a <code>ZX_ERR_INVALID_ARGS</code> if <code>handle</code> is invalid.</li> |
| <li>error Returns a <code>ZX_ERR_NOT_FOUND</code> if the service is not found.</li> |
| <li>error Returns a <code>ZX_ERR_CONNECTION_RESET</code> if the service is removed.</li> |
| <li>error Returns a <code>ZX_ERR_NOT_CONNECTED</code> if the peer disconnects.</li> |
| <li>error Returns a <code>ZX_ERR_ALREADY_EXISTS</code> if the service is already connected.</li> |
| </ul> |
| |
| |
| |
| #### Request {#Client.ConnectToService_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#ServiceHandle'>ServiceHandle</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>service</code></td> |
| <td> |
| <code>server_end<<a class='link' href='#RemoteService'>RemoteService</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### WatchServices {#Client.WatchServices} |
| |
| <p>Enumerates services found on the peer that this Client represents.</p> |
| <p>Results can be filtered by specifying a list of UUIDs in <code>uuids</code>. This |
| method follows the hanging get pattern. On the initial request, a |
| complete snapshot will be returned. Subsequent calls with the same set |
| of <code>uuids</code> receive a response only when one or more services have been |
| added, modified, or removed from the entries reported since the most |
| recent call. Calls with new values of <code>uuids</code> will reset the filter and |
| receive a complete snapshot.</p> |
| <p>Handles may be reused across services, so a handle may be in both |
| <code>updated</code> and <code>removed</code>. For this reason, it is recommended to process |
| removed services before updated services.</p> |
| <p>To further interact with services, clients must obtain a RemoteService |
| protocol by calling ConnectToService().</p> |
| <ul> |
| <li>request <code>uuids</code> the UUID allowlist. If empty, all services will be |
| returned.</li> |
| </ul> |
| <ul> |
| <li>response <code>updated</code> the services that have been added or modified since |
| WatchServices() was last called. The returned ServiceInfo tables will |
| contain only basic information about each service and the |
| <code>characteristics</code> and <code>includes</code> fields will be null. If a service has |
| been added/modified and then removed since the last call, it will only |
| be present in <code>removed</code>, not <code>updated</code>.</li> |
| <li>response <code>removed</code> the handles of the services that have been removed |
| since the last call to WatchServices().</li> |
| </ul> |
| |
| |
| |
| #### Request {#Client.WatchServices_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>uuids</code></td> |
| <td> |
| <code>vector<<a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Client.WatchServices_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>updated</code></td> |
| <td> |
| <code>vector<<a class='link' href='#ServiceInfo'>ServiceInfo</a>>[65535]</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>removed</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Handle'>Handle</a>>[65535]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ## LocalService {#LocalService} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=36)* |
| <p>Interface for serving a local GATT service. Closing the server_end of this protocol causes the |
| GATT service to be removed from the local GATT database. Similarly, closure of the client_end |
| of this protocol means the Bluetooth stack has removed this service from its GATT database.</p> |
| |
| |
| ### CharacteristicConfiguration {#LocalService.CharacteristicConfiguration} |
| |
| <p>This notifies the current configuration of a particular characteristic/descriptor for a |
| particular peer. It will be called when the peer GATT client changes the configuration.</p> |
| <p>The Bluetooth stack maintains the state of each peer's configuration across reconnections. |
| As such, this method will also be called when a peer connects for each characteristic with |
| the initial, persisted state of the newly-connected peer's configuration. However, clients |
| should not rely on this state being persisted indefinitely by the Bluetooth stack.</p> |
| <ul> |
| <li>request <code>peer_id</code> The PeerId of the GATT client associated with this particular CCC.</li> |
| <li>request <code>handle</code> The handle of the characteristic associated with the <code>notify</code> and |
| <code>indicate</code> parameters.</li> |
| <li>request <code>notify</code> True if the client has enabled notifications, false otherwise.</li> |
| <li>request <code>indicate</code> True if the client has enabled indications, false otherwise.</li> |
| </ul> |
| <ul> |
| <li>response empty Returns nothing to acknowledge the characteristic configuration.</li> |
| </ul> |
| |
| |
| |
| #### Request {#LocalService.CharacteristicConfiguration_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></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/#PeerId'>PeerId</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</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> |
| |
| |
| #### Response {#LocalService.CharacteristicConfiguration_Response} |
| |
| <EMPTY> |
| |
| ### OnIndicateValue {#LocalService.OnIndicateValue} |
| |
| <p>This event is used to send an indication to a peer. Indications should be used instead of |
| notifications when the service <em>does</em> require peer confirmation of the update.</p> |
| <p>Indications should not be sent to peers which have not enabled indications on a particular |
| characteristic - if they are sent, they will not be propagated. The Bluetooth stack will |
| track this configuration for the lifetime of the service.</p> |
| <p>LocalServices must keep track of available credit provided by the <code>ValueChangedCredit</code> |
| method and send at most that many <code>OnNotifyValue</code> and <code>OnIndicateValue</code> events. If more |
| events are sent than available credits, or the parameters are invalid, the protocol will be |
| closed.</p> |
| <ul> |
| <li>request <code>update</code> The parameters associated with the changed characteristic.</li> |
| <li>request <code>confirmation</code> When all peers that will be updated have confirmed the indication, |
| <code>confirmation</code> is signalled with ZX_EVENTPAIR_SIGNALLED. <code>confirmation</code> will be closed if |
| indicating any peer fails, such as if the peer hasn't configured indications, is not |
| connected, or does not confirm within the ATT transaction timeout of 30 seconds (Bluetooth |
| 5.3 Vol. 3 Part F 3.3.3). To track indication confirmation on a per-peer basis, the |
| implementation can send this event with a single ID in <code>update.peer_ids</code>.</li> |
| </ul> |
| |
| |
| |
| |
| #### Response {#LocalService.OnIndicateValue_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>update</code></td> |
| <td> |
| <code><a class='link' href='#ValueChangedParameters'>ValueChangedParameters</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>confirmation</code></td> |
| <td> |
| <code>handle<eventpair></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### OnNotifyValue {#LocalService.OnNotifyValue} |
| |
| <p>This event is used to send a notification to a peer. Notifications should be used instead of |
| indications when the service does <em>not</em> require peer confirmation of the update.</p> |
| <p>Notifications should not be sent to peers which have not enabled notifications on a |
| particular characteristic - if they are sent, they will not be propagated. The Bluetooth |
| stack will track this configuration for the lifetime of the service.</p> |
| <p>LocalServices must keep track of available credit provided by the <code>ValueChangedCredit</code> |
| method and send at most that many <code>OnNotifyValue</code> and <code>OnIndicateValue</code> events. If more |
| events are sent than available credits, or the parameters are invalid, the protocol will be |
| closed.</p> |
| |
| |
| |
| |
| #### Response {#LocalService.OnNotifyValue_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>payload</code></td> |
| <td> |
| <code><a class='link' href='#ValueChangedParameters'>ValueChangedParameters</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### OnSuppressDiscovery {#LocalService.OnSuppressDiscovery} |
| |
| <p>After this event, new peers will no longer be able to discover the service, although peers |
| which have already discovered this service may still access it. This should be sent once per |
| service lifetime; sending more than once closes the protocol and disconnects GATT clients.</p> |
| |
| |
| |
| |
| #### Response {#LocalService.OnSuppressDiscovery_Response} |
| |
| <EMPTY> |
| |
| ### PeerUpdate {#LocalService.PeerUpdate} |
| |
| <p>Called to provide GATT information specific to a peer. PeerUpdate will not be called unless |
| the prior invocation received a response. As such, the implementation can simply ignore the |
| first invocation if they are not interested in any PeerUpdate fields.</p> |
| <p>A PeerUpdate will be made before propagating any other interaction from the peer to the |
| LocalService (Write/ReadValue, CharacteristicConfiguration) on a best-effort basis, as long |
| as all preceding PeerUpdates were acknowledged.</p> |
| <ul> |
| <li>request <code>peer_id</code> The PeerId the update pertains to. Always present.</li> |
| <li>request <code>mtu</code> The maximum number of bytes that fit in a notification/indication to this |
| peer. Any bytes past this limit are silently truncated. Most clients need not concern |
| themselves with this unless they are using notifications/indications for high throughput. |
| Optional.</li> |
| </ul> |
| <ul> |
| <li>response An empty response to acknowledge that the update was received.</li> |
| </ul> |
| |
| |
| |
| #### Request {#LocalService.PeerUpdate_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>payload</code></td> |
| <td> |
| <code><a class='link' href='#LocalServicePeerUpdateRequest'>LocalServicePeerUpdateRequest</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#LocalService.PeerUpdate_Response} |
| |
| <EMPTY> |
| |
| ### ReadValue {#LocalService.ReadValue} |
| |
| <p>Called when a peer requests to read the value of a characteristic or descriptor. It is |
| guaranteed that the peer satisfies the permssions associated with this attribute.</p> |
| <ul> |
| <li>request <code>peer_id</code> The PeerId of the GATT client making the read request.</li> |
| <li>request <code>handle</code> The handle of the requested descriptor/characteristic.</li> |
| <li>request <code>offset</code> The offset at which to start reading the requested value.</li> |
| </ul> |
| <ul> |
| <li>response <code>value</code> The value of the characteristic.</li> |
| </ul> |
| <ul> |
| <li>error See <code>gatt2.Error</code> documentation for possible errors.</li> |
| </ul> |
| |
| |
| |
| #### Request {#LocalService.ReadValue_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></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/#PeerId'>PeerId</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>offset</code></td> |
| <td> |
| <code>int32</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#LocalService.ReadValue_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#LocalService_ReadValue_Result'>LocalService_ReadValue_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ValueChangedCredit {#LocalService.ValueChangedCredit} |
| |
| <p>Add credit for sending indications/notifications. Implementors are defined to start out with |
| INITIAL_VALUE_CHANGED_CREDITS credits before this method is called. Implementors must keep |
| track of the available credit they have. The implementor can send exactly one OnNotifyValue |
| or OnIndicateValue event for each credit. Note that <code>ValueChangedCredit</code> will only be called |
| if at least one indication/notification has been sent since the prior call. </p> |
| |
| |
| |
| #### Request {#LocalService.ValueChangedCredit_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>additional_credit</code></td> |
| <td> |
| <code>uint8</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### WriteValue {#LocalService.WriteValue} |
| |
| <p>Called when a peer issues a request to write the value of a characteristic or descriptor. It |
| is guaranteed that the peer satisfies the permissions associated with this attribute.</p> |
| <ul> |
| <li>request <code>peer_id</code> The PeerId of the GATT client making the write request. Always present.</li> |
| <li>request <code>handle</code> The handle of the requested descriptor/characteristic. Always present.</li> |
| <li>request <code>offset</code> The offset at which to start writing the value. If the offset is 0, any |
| existing value should be overwritten by the new value. Otherwise, the existing value from |
| offset:(offset + len(value)) should be changed to <code>value</code>. Always present.</li> |
| <li>request <code>value</code> The new value for the descriptor/characteristic. Always present, but may |
| be the empty string.</li> |
| </ul> |
| <ul> |
| <li>response The implementation must send an empty response once the value has been updated |
| as confirmation.</li> |
| </ul> |
| <ul> |
| <li>error See <code>gatt2.Error</code> documentation for possible errors.</li> |
| </ul> |
| |
| |
| |
| #### Request {#LocalService.WriteValue_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>payload</code></td> |
| <td> |
| <code><a class='link' href='#LocalServiceWriteValueRequest'>LocalServiceWriteValueRequest</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#LocalService.WriteValue_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#LocalService_WriteValue_Result'>LocalService_WriteValue_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ## RemoteService {#RemoteService} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=44)* |
| |
| |
| ### 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>characteristics</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Characteristic'>Characteristic</a>>[32767]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadByType {#RemoteService.ReadByType} |
| |
| <p>Reads characteristics and descriptors with the given <code>uuid</code>.</p> |
| <p>This method is useful for reading values before discovery has completed, |
| thereby reducing latency.</p> |
| <ul> |
| <li>request <code>uuid</code> The UUID of the characteristics/descriptors to read.</li> |
| </ul> |
| <ul> |
| <li>response <code>results</code> The results of the read. May be empty if no |
| matching values are read. If reading a value results in a |
| permission error, the handle and error will be included.</li> |
| </ul> |
| <ul> |
| <li>error Returns <code>INVALID_PARAMETERS</code> if <code>uuid</code> refers to an internally |
| reserved descriptor type (e.g. the Client Characteristic |
| Configuration descriptor).</li> |
| <li>error Returns <code>TOO_MANY_RESULTS</code> if more results were read than can fit |
| in a FIDL response. Consider reading characteristics/descriptors |
| individually after performing discovery.</li> |
| <li>error Returns <code>FAILURE</code> if the server returns an error not specific to |
| a single result.</li> |
| </ul> |
| |
| |
| |
| #### 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 a characteristic with the given <code>handle</code>.</p> |
| <ul> |
| <li>request <code>handle</code> The characteristic handle to read.</li> |
| <li>request <code>options</code> Options that apply to the read.</li> |
| </ul> |
| <ul> |
| <li>response <code>value</code> The value of the characteristic.</li> |
| </ul> |
| <ul> |
| <li>error Returns <code>INVALID_HANDLE</code> if <code>handle</code> is invalid.</li> |
| <li>error Returns <code>INVALID_PARAMETERS</code> if <code>options</code> is invalid.</li> |
| <li>error Returns <code>READ_NOT_PERMITTED</code> or <code>INSUFFICIENT_*</code> if the server |
| rejects the read request.</li> |
| <li>error Returns <code>FAILURE</code> if the server returns an error.</li> |
| </ul> |
| |
| |
| |
| #### Request {#RemoteService.ReadCharacteristic_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>options</code></td> |
| <td> |
| <code><a class='link' href='#ReadOptions'>ReadOptions</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.ReadCharacteristic_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_ReadCharacteristic_Result'>RemoteService_ReadCharacteristic_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadDescriptor {#RemoteService.ReadDescriptor} |
| |
| <p>Reads the value of the characteristic descriptor with <code>handle</code> and |
| returns it in the reply.</p> |
| <ul> |
| <li>request <code>handle</code> The descriptor handle to read.</li> |
| <li>request <code>options</code> Options that apply to the read.</li> |
| </ul> |
| <ul> |
| <li>response <code>value</code> The value of the descriptor.</li> |
| </ul> |
| <ul> |
| <li>error Returns <code>INVALID_HANDLE</code> if <code>handle</code> is invalid.</li> |
| <li>error Returns <code>INVALID_PARAMETERS</code> if <code>options</code> is invalid.</li> |
| <li>error Returns <code>READ_NOT_PERMITTED</code> or <code>INSUFFICIENT_*</code> if the server |
| rejects the read request.</li> |
| <li>error Returns <code>FAILURE</code> if the server returns an error.</li> |
| </ul> |
| |
| |
| |
| #### Request {#RemoteService.ReadDescriptor_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>options</code></td> |
| <td> |
| <code><a class='link' href='#ReadOptions'>ReadOptions</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.ReadDescriptor_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_ReadDescriptor_Result'>RemoteService_ReadDescriptor_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### RegisterCharacteristicNotifier {#RemoteService.RegisterCharacteristicNotifier} |
| |
| <p>Subscribe to notifications & indications from the characteristic with |
| the given <code>handle</code>.</p> |
| <p>Either notifications or indications will be enabled depending on |
| characteristic properties. Indications will be preferred if they are |
| supported. 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 <code>notifier</code> protocol can be used to be notified when |
| the peer sends a notification or indication. Indications are |
| automatically confirmed. When the protocol is dropped, the subscription |
| may end if no other local client is receiving notifications.</p> |
| <ul> |
| <li>request <code>handle</code> the characteristic handle.</li> |
| <li>request <code>notifier</code> the protocol used for notifications.</li> |
| </ul> |
| <ul> |
| <li>response An empty response will be sent immediately if registration |
| succeeds.</li> |
| </ul> |
| <ul> |
| <li>error Returns a <code>FAILURE</code> if the characteristic does not support |
| notifications or indications.</li> |
| <li>error Returns a <code>INVALID_HANDLE</code> if <code>handle</code> is invalid.</li> |
| <li>error Returns a <code>WRITE_NOT_PERMITTED</code> or <code>INSUFFICIENT_*</code>for a |
| descriptor write error.</li> |
| </ul> |
| |
| |
| |
| #### Request {#RemoteService.RegisterCharacteristicNotifier_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>notifier</code></td> |
| <td> |
| <code><a class='link' href='#CharacteristicNotifier'>CharacteristicNotifier</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.RegisterCharacteristicNotifier_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_RegisterCharacteristicNotifier_Result'>RemoteService_RegisterCharacteristicNotifier_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteCharacteristic {#RemoteService.WriteCharacteristic} |
| |
| <p>Writes <code>value</code> to the characteristic with <code>handle</code> using the provided |
| <code>options</code>.</p> |
| <p>It is not recommended to send additional writes while a write is already |
| in progress (the server may receive simultaneous writes in any order).</p> |
| <ul> |
| <li>request <code>handle</code> The characteristic to be written to.</li> |
| <li>request <code>value</code> The value to be written.</li> |
| <li>request <code>options</code> Options that apply to the write.</li> |
| </ul> |
| <ul> |
| <li>response An empty response will be sent when a success response is |
| received from the server (or immediately if |
| <code>options.with_response</code> is false)</li> |
| </ul> |
| <ul> |
| <li>error Returns <code>INVALID_HANDLE</code> if <code>handle</code> is invalid.</li> |
| <li>error Returns <code>INVALID_PARAMETERS</code> if <code>options</code> is invalid.</li> |
| <li>error Returns <code>WRITE_NOT_PERMITTED</code> or <code>INSUFFICIENT_*</code>if the server |
| rejects the write request with a reason.</li> |
| <li>error Returns <code>FAILURE</code> if the server returns an error.</li> |
| </ul> |
| |
| |
| |
| #### Request {#RemoteService.WriteCharacteristic_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>options</code></td> |
| <td> |
| <code><a class='link' href='#WriteOptions'>WriteOptions</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.WriteCharacteristic_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_WriteCharacteristic_Result'>RemoteService_WriteCharacteristic_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteDescriptor {#RemoteService.WriteDescriptor} |
| |
| <p>Writes <code>value</code> to the characteristic descriptor with <code>handle</code>. |
| It is not recommended to send additional writes while a write is already |
| in progress (the server may receive simultaneous writes in any order).</p> |
| <ul> |
| <li>request <code>handle</code> The descriptor handle to written to.</li> |
| <li>request <code>value</code> The value to be written.</li> |
| <li>request <code>options</code> Options that apply to the write.</li> |
| </ul> |
| <ul> |
| <li>response An empty response will be sent when a success response is |
| received from the server (or immediately if |
| <code>options.with_response</code> is false)</li> |
| </ul> |
| <ul> |
| <li>error Returns <code>INVALID_HANDLE</code> if <code>handle</code> is invalid or refers to an |
| internally reserved descriptor type (e.g. the Client |
| Characteristic Configuration descriptor).</li> |
| <li>error Returns <code>INVALID_PARAMETERS</code> if <code>options</code> is invalid.</li> |
| <li>error Returns <code>WRITE_NOT_PERMITTED</code> or <code>INSUFFICIENT_*</code> if the server |
| rejects the write with a reason.</li> |
| <li>error Returns <code>FAILURE</code> if the server returns an error.</li> |
| </ul> |
| |
| |
| |
| #### Request {#RemoteService.WriteDescriptor_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>options</code></td> |
| <td> |
| <code><a class='link' href='#WriteOptions'>WriteOptions</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#RemoteService.WriteDescriptor_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_WriteDescriptor_Result'>RemoteService_WriteDescriptor_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Server {#Server} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=171)* |
| |
| |
| ### PublishService {#Server.PublishService} |
| |
| <p>Publishes the given <code>service</code> so that it is available to all remote peers. Upon publication, |
| the service is defined to have INITIAL_VALUE_CHANGED_CREDITS credits available for sending |
| indications/notifications.</p> |
| <p>The caller must assign distinct handles to the characteristics and descriptors listed in |
| <code>info</code>. These identifiers will be used in requests sent to <code>service</code>.</p> |
| <ul> |
| <li>request <code>info</code> Defines the structure of the GATT service. Includes characteristics and |
| descriptors that will be made available to peers, as well as the service handle, which is |
| required to be unique across all services published to this Server.</li> |
| <li>request <code>service</code> Provides the implementation of the service per the documented behavior |
| of a <code>LocalService</code>.</li> |
| </ul> |
| <ul> |
| <li>response An empty response indicates the service was successfully published.</li> |
| </ul> |
| <ul> |
| <li>error See <code>gatt2.PublishServiceError</code> for possible failure modes.</li> |
| </ul> |
| |
| |
| |
| #### 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>service</code></td> |
| <td> |
| <code><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>result</code></td> |
| <td> |
| <code><a class='link' href='#Server_PublishService_Result'>Server_PublishService_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **STRUCTS** |
| |
| ### Handle {#Handle data-text="Handle"} |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=154)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Handle.value"> |
| <td><code>value</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### LocalService_ReadValue_Response {#LocalService_ReadValue_Response data-text="LocalService_ReadValue_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=70)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="LocalService_ReadValue_Response.value"> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### LocalService_WriteValue_Response {#LocalService_WriteValue_Response data-text="LocalService_WriteValue_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=92)* |
| |
| <EMPTY> |
| |
| ### RemoteService_ReadByType_Response {#RemoteService_ReadByType_Response data-text="RemoteService_ReadByType_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=70)* |
| |
| <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>>[65535]</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### RemoteService_ReadCharacteristic_Response {#RemoteService_ReadCharacteristic_Response data-text="RemoteService_ReadCharacteristic_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=87)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="RemoteService_ReadCharacteristic_Response.value"> |
| <td><code>value</code></td> |
| <td> |
| <code><a class='link' href='#ReadValue'>ReadValue</a></code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### RemoteService_ReadDescriptor_Response {#RemoteService_ReadDescriptor_Response data-text="RemoteService_ReadDescriptor_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=128)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="RemoteService_ReadDescriptor_Response.value"> |
| <td><code>value</code></td> |
| <td> |
| <code><a class='link' href='#ReadValue'>ReadValue</a></code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### RemoteService_RegisterCharacteristicNotifier_Response {#RemoteService_RegisterCharacteristicNotifier_Response data-text="RemoteService_RegisterCharacteristicNotifier_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=185)* |
| |
| <EMPTY> |
| |
| ### RemoteService_WriteCharacteristic_Response {#RemoteService_WriteCharacteristic_Response data-text="RemoteService_WriteCharacteristic_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=112)* |
| |
| <EMPTY> |
| |
| ### RemoteService_WriteDescriptor_Response {#RemoteService_WriteDescriptor_Response data-text="RemoteService_WriteDescriptor_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=153)* |
| |
| <EMPTY> |
| |
| ### Server_PublishService_Response {#Server_PublishService_Response data-text="Server_PublishService_Response"} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=190)* |
| |
| <EMPTY> |
| |
| ### ServiceHandle {#ServiceHandle data-text="ServiceHandle"} |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=159)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="ServiceHandle.value"> |
| <td><code>value</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### ShortReadOptions {#ShortReadOptions data-text="ShortReadOptions"} |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=323)* |
| <p>Represents the options for reading a short characteristic or descriptor |
| value from a server. Short values are those that fit in a single message, |
| which is at least 22 bytes. This is an empty placeholder for now, as there |
| are no options.</p> |
| |
| <EMPTY> |
| |
| |
| ## **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.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=18)* |
| <p>Errors that are returned by bluetooth.gatt2.* methods.</p> |
| <p>The values correspond with those in Bluetooth 5.2 Vol. 3 Part G Table 3.4, |
| and Supplement to the Bluetooth Core Specification v9 Part B Table 1.1, |
| but this is for ease of reference only. Clients should <em>not</em> rely on these |
| values remaining constant. Omitted values from the spec are handled |
| internally and will not be returned to clients.</p> |
| <p>Only certain errors can be returned by LocalService methods. Those are noted |
| in comments.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="Error.INVALID_HANDLE"> |
| <td><h3 id="Error.INVALID_HANDLE" class="add-link hide-from-toc">INVALID_HANDLE</h3></td> |
| <td><code>1</code></td> |
| <td><p>The attribute indicated by the handle is invalid. It may have been removed.</p> |
| <p>This may be returned by a LocalService method.</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>2</code></td> |
| <td><p>This attribute is not readable.</p> |
| </td> |
| </tr> |
| <tr id="Error.WRITE_NOT_PERMITTED"> |
| <td><h3 id="Error.WRITE_NOT_PERMITTED" class="add-link hide-from-toc">WRITE_NOT_PERMITTED</h3></td> |
| <td><code>3</code></td> |
| <td><p>This attribute is not writable.</p> |
| </td> |
| </tr> |
| <tr id="Error.INVALID_PDU"> |
| <td><h3 id="Error.INVALID_PDU" class="add-link hide-from-toc">INVALID_PDU</h3></td> |
| <td><code>4</code></td> |
| <td><p>Indicates that the response received from the server was invalid.</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.INVALID_OFFSET"> |
| <td><h3 id="Error.INVALID_OFFSET" class="add-link hide-from-toc">INVALID_OFFSET</h3></td> |
| <td><code>7</code></td> |
| <td><p>Indicates that the offset used in a read or write request exceeds the |
| bounds of the value.</p> |
| <p>This may be returned by a LocalService method.</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>8</code></td> |
| <td><p>This attribute requires authorization, but the client is not authorized.</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>12</code></td> |
| <td><p>This attribute requires a connection encrypted by a larger encryption key.</p> |
| </td> |
| </tr> |
| <tr id="Error.INVALID_ATTRIBUTE_VALUE_LENGTH"> |
| <td><h3 id="Error.INVALID_ATTRIBUTE_VALUE_LENGTH" class="add-link hide-from-toc">INVALID_ATTRIBUTE_VALUE_LENGTH</h3></td> |
| <td><code>13</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> |
| <p>This may be returned by a LocalService method.</p> |
| </td> |
| </tr> |
| <tr id="Error.UNLIKELY_ERROR"> |
| <td><h3 id="Error.UNLIKELY_ERROR" class="add-link hide-from-toc">UNLIKELY_ERROR</h3></td> |
| <td><code>14</code></td> |
| <td><p>A general error occurred that can not be classified as one of the more |
| specific errors.</p> |
| <p>This may be returned by a LocalService method.</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>15</code></td> |
| <td><p>This attribute requires encryption, but the connection is not encrypted.</p> |
| </td> |
| </tr> |
| <tr id="Error.INSUFFICIENT_RESOURCES"> |
| <td><h3 id="Error.INSUFFICIENT_RESOURCES" class="add-link hide-from-toc">INSUFFICIENT_RESOURCES</h3></td> |
| <td><code>17</code></td> |
| <td><p>The server had insufficient resources to complete the task.</p> |
| <p>This may be returned by a LocalService method.</p> |
| </td> |
| </tr> |
| <tr id="Error.VALUE_NOT_ALLOWED"> |
| <td><h3 id="Error.VALUE_NOT_ALLOWED" class="add-link hide-from-toc">VALUE_NOT_ALLOWED</h3></td> |
| <td><code>19</code></td> |
| <td><p>The value was not allowed.</p> |
| <p>This may be returned by a LocalService method.</p> |
| </td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_80"> |
| <td><h3 id="Error.APPLICATION_ERROR_80" class="add-link hide-from-toc">APPLICATION_ERROR_80</h3></td> |
| <td><code>128</code></td> |
| <td><p>Application Errors. The uses of these are specified at the application |
| level.</p> |
| <p>These may all be returned by a LocalService method.</p> |
| </td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_81"> |
| <td><h3 id="Error.APPLICATION_ERROR_81" class="add-link hide-from-toc">APPLICATION_ERROR_81</h3></td> |
| <td><code>129</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_82"> |
| <td><h3 id="Error.APPLICATION_ERROR_82" class="add-link hide-from-toc">APPLICATION_ERROR_82</h3></td> |
| <td><code>130</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_83"> |
| <td><h3 id="Error.APPLICATION_ERROR_83" class="add-link hide-from-toc">APPLICATION_ERROR_83</h3></td> |
| <td><code>131</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_84"> |
| <td><h3 id="Error.APPLICATION_ERROR_84" class="add-link hide-from-toc">APPLICATION_ERROR_84</h3></td> |
| <td><code>132</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_85"> |
| <td><h3 id="Error.APPLICATION_ERROR_85" class="add-link hide-from-toc">APPLICATION_ERROR_85</h3></td> |
| <td><code>133</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_86"> |
| <td><h3 id="Error.APPLICATION_ERROR_86" class="add-link hide-from-toc">APPLICATION_ERROR_86</h3></td> |
| <td><code>134</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_87"> |
| <td><h3 id="Error.APPLICATION_ERROR_87" class="add-link hide-from-toc">APPLICATION_ERROR_87</h3></td> |
| <td><code>135</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_88"> |
| <td><h3 id="Error.APPLICATION_ERROR_88" class="add-link hide-from-toc">APPLICATION_ERROR_88</h3></td> |
| <td><code>136</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_89"> |
| <td><h3 id="Error.APPLICATION_ERROR_89" class="add-link hide-from-toc">APPLICATION_ERROR_89</h3></td> |
| <td><code>137</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_8A"> |
| <td><h3 id="Error.APPLICATION_ERROR_8A" class="add-link hide-from-toc">APPLICATION_ERROR_8A</h3></td> |
| <td><code>138</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_8B"> |
| <td><h3 id="Error.APPLICATION_ERROR_8B" class="add-link hide-from-toc">APPLICATION_ERROR_8B</h3></td> |
| <td><code>139</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_8C"> |
| <td><h3 id="Error.APPLICATION_ERROR_8C" class="add-link hide-from-toc">APPLICATION_ERROR_8C</h3></td> |
| <td><code>140</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_8D"> |
| <td><h3 id="Error.APPLICATION_ERROR_8D" class="add-link hide-from-toc">APPLICATION_ERROR_8D</h3></td> |
| <td><code>141</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_8E"> |
| <td><h3 id="Error.APPLICATION_ERROR_8E" class="add-link hide-from-toc">APPLICATION_ERROR_8E</h3></td> |
| <td><code>142</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_8F"> |
| <td><h3 id="Error.APPLICATION_ERROR_8F" class="add-link hide-from-toc">APPLICATION_ERROR_8F</h3></td> |
| <td><code>143</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_90"> |
| <td><h3 id="Error.APPLICATION_ERROR_90" class="add-link hide-from-toc">APPLICATION_ERROR_90</h3></td> |
| <td><code>144</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_91"> |
| <td><h3 id="Error.APPLICATION_ERROR_91" class="add-link hide-from-toc">APPLICATION_ERROR_91</h3></td> |
| <td><code>145</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_92"> |
| <td><h3 id="Error.APPLICATION_ERROR_92" class="add-link hide-from-toc">APPLICATION_ERROR_92</h3></td> |
| <td><code>146</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_93"> |
| <td><h3 id="Error.APPLICATION_ERROR_93" class="add-link hide-from-toc">APPLICATION_ERROR_93</h3></td> |
| <td><code>147</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_94"> |
| <td><h3 id="Error.APPLICATION_ERROR_94" class="add-link hide-from-toc">APPLICATION_ERROR_94</h3></td> |
| <td><code>148</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_95"> |
| <td><h3 id="Error.APPLICATION_ERROR_95" class="add-link hide-from-toc">APPLICATION_ERROR_95</h3></td> |
| <td><code>149</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_96"> |
| <td><h3 id="Error.APPLICATION_ERROR_96" class="add-link hide-from-toc">APPLICATION_ERROR_96</h3></td> |
| <td><code>150</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_97"> |
| <td><h3 id="Error.APPLICATION_ERROR_97" class="add-link hide-from-toc">APPLICATION_ERROR_97</h3></td> |
| <td><code>151</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_98"> |
| <td><h3 id="Error.APPLICATION_ERROR_98" class="add-link hide-from-toc">APPLICATION_ERROR_98</h3></td> |
| <td><code>152</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_99"> |
| <td><h3 id="Error.APPLICATION_ERROR_99" class="add-link hide-from-toc">APPLICATION_ERROR_99</h3></td> |
| <td><code>153</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_9A"> |
| <td><h3 id="Error.APPLICATION_ERROR_9A" class="add-link hide-from-toc">APPLICATION_ERROR_9A</h3></td> |
| <td><code>154</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_9B"> |
| <td><h3 id="Error.APPLICATION_ERROR_9B" class="add-link hide-from-toc">APPLICATION_ERROR_9B</h3></td> |
| <td><code>155</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_9C"> |
| <td><h3 id="Error.APPLICATION_ERROR_9C" class="add-link hide-from-toc">APPLICATION_ERROR_9C</h3></td> |
| <td><code>156</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_9D"> |
| <td><h3 id="Error.APPLICATION_ERROR_9D" class="add-link hide-from-toc">APPLICATION_ERROR_9D</h3></td> |
| <td><code>157</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_9E"> |
| <td><h3 id="Error.APPLICATION_ERROR_9E" class="add-link hide-from-toc">APPLICATION_ERROR_9E</h3></td> |
| <td><code>158</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.APPLICATION_ERROR_9F"> |
| <td><h3 id="Error.APPLICATION_ERROR_9F" class="add-link hide-from-toc">APPLICATION_ERROR_9F</h3></td> |
| <td><code>159</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.WRITE_REQUEST_REJECTED"> |
| <td><h3 id="Error.WRITE_REQUEST_REJECTED" class="add-link hide-from-toc">WRITE_REQUEST_REJECTED</h3></td> |
| <td><code>252</code></td> |
| <td><p>Write request was rejected at the profile or service level.</p> |
| </td> |
| </tr> |
| <tr id="Error.CCC_DESCRIPTOR_IMPROPERLY_CONFIGURED"> |
| <td><h3 id="Error.CCC_DESCRIPTOR_IMPROPERLY_CONFIGURED" class="add-link hide-from-toc">CCC_DESCRIPTOR_IMPROPERLY_CONFIGURED</h3></td> |
| <td><code>253</code></td> |
| <td><p>The Client Characteristic Configuration Descriptor was improperly |
| configured.</p> |
| </td> |
| </tr> |
| <tr id="Error.PROCEDURE_ALREADY_IN_PROGRESS"> |
| <td><h3 id="Error.PROCEDURE_ALREADY_IN_PROGRESS" class="add-link hide-from-toc">PROCEDURE_ALREADY_IN_PROGRESS</h3></td> |
| <td><code>254</code></td> |
| <td><p>Profile or service procedure already in progress.</p> |
| </td> |
| </tr> |
| <tr id="Error.OUT_OF_RANGE"> |
| <td><h3 id="Error.OUT_OF_RANGE" class="add-link hide-from-toc">OUT_OF_RANGE</h3></td> |
| <td><code>255</code></td> |
| <td><p>A value was out of range at the profile or service level.</p> |
| </td> |
| </tr> |
| <tr id="Error.INVALID_PARAMETERS"> |
| <td><h3 id="Error.INVALID_PARAMETERS" class="add-link hide-from-toc">INVALID_PARAMETERS</h3></td> |
| <td><code>257</code></td> |
| <td><p>One or more of the FIDL call parameters are invalid. See the parameter |
| documentation.</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>258</code></td> |
| <td><p>Indicates that more results were read than can fit in a FIDL response. |
| Consider reading attributes individually.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### PublishServiceError [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PublishServiceError data-text="PublishServiceError"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=141)* |
| <p>Errors that can occur during service publication.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="PublishServiceError.INVALID_SERVICE_HANDLE"> |
| <td><h3 id="PublishServiceError.INVALID_SERVICE_HANDLE" class="add-link hide-from-toc">INVALID_SERVICE_HANDLE</h3></td> |
| <td><code>1</code></td> |
| <td><p>The service handle is invalid or already in use on the Server publishing the service.</p> |
| </td> |
| </tr> |
| <tr id="PublishServiceError.INVALID_UUID"> |
| <td><h3 id="PublishServiceError.INVALID_UUID" class="add-link hide-from-toc">INVALID_UUID</h3></td> |
| <td><code>2</code></td> |
| <td><p>Invalid service UUID provided.</p> |
| </td> |
| </tr> |
| <tr id="PublishServiceError.INVALID_CHARACTERISTICS"> |
| <td><h3 id="PublishServiceError.INVALID_CHARACTERISTICS" class="add-link hide-from-toc">INVALID_CHARACTERISTICS</h3></td> |
| <td><code>3</code></td> |
| <td><p>The <code>ServiceInfo.characteristics</code> field was formatted invalidly or missing. If the service |
| is meant to be empty, the vector should be empty, but present.</p> |
| </td> |
| </tr> |
| <tr id="PublishServiceError.UNLIKELY_ERROR"> |
| <td><h3 id="PublishServiceError.UNLIKELY_ERROR" class="add-link hide-from-toc">UNLIKELY_ERROR</h3></td> |
| <td><code>4</code></td> |
| <td><p>A general error occurred that can not be classified as one of the more specific errors.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### ServiceKind [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ServiceKind data-text="ServiceKind"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=164)* |
| <p>The kind ("type") of a GATT Service as outlined in Bluetooth Core Spec v5.3 Vol. 1 Part A 6.5.1.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="ServiceKind.PRIMARY"> |
| <td><h3 id="ServiceKind.PRIMARY" class="add-link hide-from-toc">PRIMARY</h3></td> |
| <td><code>1</code></td> |
| <td><p>A "service that provides functionality of a device that can be used on its own" (Ibid)</p> |
| </td> |
| </tr> |
| <tr id="ServiceKind.SECONDARY"> |
| <td><h3 id="ServiceKind.SECONDARY" class="add-link hide-from-toc">SECONDARY</h3></td> |
| <td><code>2</code></td> |
| <td><p>A "service that provides additional functionality [...] in association with a primary |
| service and is included from at least one primary service" (Ibid)</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteMode [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#WriteMode data-text="WriteMode"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=340)* |
| <p>Represents the supported write modes for writing characteristics & |
| descriptors to the server.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="WriteMode.DEFAULT"> |
| <td><h3 id="WriteMode.DEFAULT" class="add-link hide-from-toc">DEFAULT</h3></td> |
| <td><code>1</code></td> |
| <td><p>In <code>DEFAULT</code> mode, wait for a response from the server before returning |
| and do not verify the echo response. |
| Supported for both characteristics and descriptors.</p> |
| </td> |
| </tr> |
| <tr id="WriteMode.RELIABLE"> |
| <td><h3 id="WriteMode.RELIABLE" class="add-link hide-from-toc">RELIABLE</h3></td> |
| <td><code>2</code></td> |
| <td><p>In <code>RELIABLE</code> mode, 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. |
| Only supported for characteristics.</p> |
| </td> |
| </tr> |
| <tr id="WriteMode.WITHOUT_RESPONSE"> |
| <td><h3 id="WriteMode.WITHOUT_RESPONSE" class="add-link hide-from-toc">WITHOUT_RESPONSE</h3></td> |
| <td><code>3</code></td> |
| <td><p>In <code>WITHOUT_RESPONSE</code> mode, delivery will not be confirmed before |
| returning. Writing without a response is only supported for short |
| characteristics with the <code>WRITE_WITHOUT_RESPONSE</code> property. The value |
| must fit into a single message. It is guaranteed that at least 20 bytes |
| will fit into a single message. If the value does not fit, a <code>FAILURE</code> |
| error will be produced. The value will be written at offset 0. |
| Only supported for characteristics.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **TABLES** |
| |
| ### AttributePermissions {#AttributePermissions data-text="AttributePermissions"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=189)* |
| <p>Specifies the access permissions for a specific attribute value.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="AttributePermissions.read"> |
| <td><h3 id="AttributePermissions.read" class="add-link hide-from-toc">1</h3></td> |
| <td><code>read</code></td> |
| <td> |
| <code><a class='link' href='#SecurityRequirements'>SecurityRequirements</a></code> |
| </td> |
| <td><p>Specifies whether an attribute has the read permission. If not present, |
| the attribute value cannot be read. Otherwise, it can be read only if the |
| permissions specified in the SecurityRequirements table are satisfied.</p> |
| </td> |
| </tr> |
| <tr id="AttributePermissions.write"> |
| <td><h3 id="AttributePermissions.write" class="add-link hide-from-toc">2</h3></td> |
| <td><code>write</code></td> |
| <td> |
| <code><a class='link' href='#SecurityRequirements'>SecurityRequirements</a></code> |
| </td> |
| <td><p>Specifies whether an attribute has the write permission. If not present, |
| the attribute value cannot be written. Otherwise, it can be written only |
| if the permissions specified in the SecurityRequirements table are satisfied.</p> |
| </td> |
| </tr> |
| <tr id="AttributePermissions.update"> |
| <td><h3 id="AttributePermissions.update" class="add-link hide-from-toc">3</h3></td> |
| <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 must be present. Otherwise, this field |
| must not be present.</p> |
| <p>This field is ignored for Descriptors.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### Characteristic {#Characteristic data-text="Characteristic"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=256)* |
| <p>Represents a local or remote GATT characteristic.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="Characteristic.handle"> |
| <td><h3 id="Characteristic.handle" class="add-link hide-from-toc">1</h3></td> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| <td><p>Uniquely identifies this characteristic within a service. |
| For local characteristics, the specified handle must be unique across |
| all characteristic and descriptor handles in this service.</p> |
| <p>Always present. For local characteristics, this value is mandatory.</p> |
| </td> |
| </tr> |
| <tr id="Characteristic.type"> |
| <td><h3 id="Characteristic.type" class="add-link hide-from-toc">2</h3></td> |
| <td><code>type</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code> |
| </td> |
| <td><p>The UUID that identifies the type of this characteristic. |
| Always present. Mandatory for local characteristics.</p> |
| </td> |
| </tr> |
| <tr id="Characteristic.properties"> |
| <td><h3 id="Characteristic.properties" class="add-link hide-from-toc">3</h3></td> |
| <td><code>properties</code></td> |
| <td> |
| <code><a class='link' href='#CharacteristicPropertyBits'>CharacteristicPropertyBits</a></code> |
| </td> |
| <td><p>The characteristic properties bitfield. |
| Always present. Mandatory for local characteristics.</p> |
| </td> |
| </tr> |
| <tr id="Characteristic.permissions"> |
| <td><h3 id="Characteristic.permissions" class="add-link hide-from-toc">4</h3></td> |
| <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 not be present until the permissions are |
| discovered via read and write requests.</p> |
| <p>For local characteristics, this value is mandatory.</p> |
| </td> |
| </tr> |
| <tr id="Characteristic.descriptors"> |
| <td><h3 id="Characteristic.descriptors" class="add-link hide-from-toc">5</h3></td> |
| <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. |
| Present only if non-empty. Optional for local characteristics.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### Descriptor {#Descriptor data-text="Descriptor"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=285)* |
| <p>Represents a local or remote GATT characteristic descriptor.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="Descriptor.handle"> |
| <td><h3 id="Descriptor.handle" class="add-link hide-from-toc">1</h3></td> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| <td><p>Uniquely identifies this descriptor within a service. |
| For local descriptors, the specified handle must be unique |
| across all characteristic and descriptor handles in this service.</p> |
| <p>Always present. For local descriptors, this value is mandatory.</p> |
| </td> |
| </tr> |
| <tr id="Descriptor.type"> |
| <td><h3 id="Descriptor.type" class="add-link hide-from-toc">2</h3></td> |
| <td><code>type</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code> |
| </td> |
| <td><p>The UUID that identifies the type of this descriptor. |
| Always present. For local descriptors, this value is mandatory.</p> |
| </td> |
| </tr> |
| <tr id="Descriptor.permissions"> |
| <td><h3 id="Descriptor.permissions" class="add-link hide-from-toc">3</h3></td> |
| <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 not be present until the permissions are |
| discovered via read and write requests.</p> |
| <p>For local descriptors, this value is mandatory.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### LocalServicePeerUpdateRequest {#LocalServicePeerUpdateRequest data-text="LocalServicePeerUpdateRequest"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=109)* |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="LocalServicePeerUpdateRequest.peer_id"> |
| <td><h3 id="LocalServicePeerUpdateRequest.peer_id" class="add-link hide-from-toc">1</h3></td> |
| <td><code>peer_id</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerId'>PeerId</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="LocalServicePeerUpdateRequest.mtu"> |
| <td><h3 id="LocalServicePeerUpdateRequest.mtu" class="add-link hide-from-toc">2</h3></td> |
| <td><code>mtu</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### LocalServiceWriteValueRequest {#LocalServiceWriteValueRequest data-text="LocalServiceWriteValueRequest"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=87)* |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="LocalServiceWriteValueRequest.peer_id"> |
| <td><h3 id="LocalServiceWriteValueRequest.peer_id" class="add-link hide-from-toc">1</h3></td> |
| <td><code>peer_id</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerId'>PeerId</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="LocalServiceWriteValueRequest.handle"> |
| <td><h3 id="LocalServiceWriteValueRequest.handle" class="add-link hide-from-toc">2</h3></td> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="LocalServiceWriteValueRequest.offset"> |
| <td><h3 id="LocalServiceWriteValueRequest.offset" class="add-link hide-from-toc">3</h3></td> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="LocalServiceWriteValueRequest.value"> |
| <td><h3 id="LocalServiceWriteValueRequest.value" class="add-link hide-from-toc">4</h3></td> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### LongReadOptions {#LongReadOptions data-text="LongReadOptions"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=308)* |
| <p>Represents the supported options to read a long characteristic or descriptor |
| value from a server. Long values are those that may not fit in a single |
| message (longer than 22 bytes).</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="LongReadOptions.offset"> |
| <td><h3 id="LongReadOptions.offset" class="add-link hide-from-toc">1</h3></td> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| <td><p>The byte to start the read at. Must be less than the length of the value. |
| Optional. |
| Default: 0</p> |
| </td> |
| </tr> |
| <tr id="LongReadOptions.max_bytes"> |
| <td><h3 id="LongReadOptions.max_bytes" class="add-link hide-from-toc">2</h3></td> |
| <td><code>max_bytes</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| <td><p>The maximum number of bytes to read. |
| Optional. |
| Default: <code>MAX_VALUE_LENGTH</code></p> |
| </td> |
| </tr> |
| </table> |
| |
| ### ReadByTypeResult {#ReadByTypeResult data-text="ReadByTypeResult"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=22)* |
| <p>A result returned by <code>RemoteService.ReadByType</code>.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="ReadByTypeResult.handle"> |
| <td><h3 id="ReadByTypeResult.handle" class="add-link hide-from-toc">1</h3></td> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| <td><p>Characteristic or descriptor handle.</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><a class='link' href='#ReadValue'>ReadValue</a></code> |
| </td> |
| <td><p>The value of the 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> |
| |
| ### ReadValue {#ReadValue data-text="ReadValue"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=9)* |
| <p>Wrapper around a possible truncated value received from the server.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="ReadValue.handle"> |
| <td><h3 id="ReadValue.handle" class="add-link hide-from-toc">1</h3></td> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| <td><p>Characteristic or descriptor handle. Always present.</p> |
| </td> |
| </tr> |
| <tr id="ReadValue.value"> |
| <td><h3 id="ReadValue.value" class="add-link hide-from-toc">2</h3></td> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| <td><p>The value of the characteristic or descriptor. Always present.</p> |
| </td> |
| </tr> |
| <tr id="ReadValue.maybe_truncated"> |
| <td><h3 id="ReadValue.maybe_truncated" class="add-link hide-from-toc">3</h3></td> |
| <td><code>maybe_truncated</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>True if <code>value</code> might be truncated (the buffer was completely filled |
| by the server). <code>ReadCharacteristic</code> or <code>ReadDescriptor</code> should be used |
| to read the complete value. |
| Always present.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### SecurityRequirements {#SecurityRequirements data-text="SecurityRequirements"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=174)* |
| <p>Represents encryption, authentication, and authorization permissions that can |
| be assigned to a specific access permission.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="SecurityRequirements.encryption_required"> |
| <td><h3 id="SecurityRequirements.encryption_required" class="add-link hide-from-toc">1</h3></td> |
| <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. If not present or |
| false, this attribute permits unencrypted access.</p> |
| </td> |
| </tr> |
| <tr id="SecurityRequirements.authentication_required"> |
| <td><h3 id="SecurityRequirements.authentication_required" class="add-link hide-from-toc">2</h3></td> |
| <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. If not present or |
| false, this attribute permits unauthenticated access.</p> |
| </td> |
| </tr> |
| <tr id="SecurityRequirements.authorization_required"> |
| <td><h3 id="SecurityRequirements.authorization_required" class="add-link hide-from-toc">3</h3></td> |
| <td><code>authorization_required</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>If true, the client needs to be authorized to access this attribute. If not present or |
| false, this attribute permits access without authorization.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### ServiceInfo {#ServiceInfo data-text="ServiceInfo"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=226)* |
| <p>Represents a local or remote GATT service.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="ServiceInfo.handle"> |
| <td><h3 id="ServiceInfo.handle" class="add-link hide-from-toc">1</h3></td> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#ServiceHandle'>ServiceHandle</a></code> |
| </td> |
| <td><p>Unique identifier for this GATT service. |
| Always present if this represents a remote service, in which case this is unique across the |
| Client that returned this ServiceInfo. |
| Required for local services, in which case this must be unique across all services published |
| to a single Server instance. Can be used in the <code>ServiceInfo.includes</code> of other |
| PublishService calls to the Server where this service is published.</p> |
| </td> |
| </tr> |
| <tr id="ServiceInfo.kind"> |
| <td><h3 id="ServiceInfo.kind" class="add-link hide-from-toc">2</h3></td> |
| <td><code>kind</code></td> |
| <td> |
| <code><a class='link' href='#ServiceKind'>ServiceKind</a></code> |
| </td> |
| <td><p>Indicates whether this is a primary or secondary service. |
| Always present for remote services. Optional for local services |
| Default: ServiceKind::PRIMARY</p> |
| </td> |
| </tr> |
| <tr id="ServiceInfo.type"> |
| <td><h3 id="ServiceInfo.type" class="add-link hide-from-toc">3</h3></td> |
| <td><code>type</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code> |
| </td> |
| <td><p>The UUID that identifies the type of this service. |
| There may be multiple services with the same UUID. |
| Always present for remote services. Required for local services.</p> |
| </td> |
| </tr> |
| <tr id="ServiceInfo.characteristics"> |
| <td><h3 id="ServiceInfo.characteristics" class="add-link hide-from-toc">4</h3></td> |
| <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. |
| Required for local services. Never present for remote services.</p> |
| </td> |
| </tr> |
| <tr id="ServiceInfo.includes"> |
| <td><h3 id="ServiceInfo.includes" class="add-link hide-from-toc">5</h3></td> |
| <td><code>includes</code></td> |
| <td> |
| <code>vector<<a class='link' href='#ServiceHandle'>ServiceHandle</a>>[65535]</code> |
| </td> |
| <td><p>Handles of other services that are included by this service. |
| Optional for local services. Never present for remote services. |
| TODO(fxbug.dev/685): This is not currently supported for local services.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### ValueChangedParameters {#ValueChangedParameters data-text="ValueChangedParameters"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=14)* |
| <p>The parameters used to signal a characteristic value change from a LocalService to a peer.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="ValueChangedParameters.handle"> |
| <td><h3 id="ValueChangedParameters.handle" class="add-link hide-from-toc">1</h3></td> |
| <td><code>handle</code></td> |
| <td> |
| <code><a class='link' href='#Handle'>Handle</a></code> |
| </td> |
| <td><p>The handle of the characteristic value being signalled. |
| Mandatory.</p> |
| </td> |
| </tr> |
| <tr id="ValueChangedParameters.value"> |
| <td><h3 id="ValueChangedParameters.value" class="add-link hide-from-toc">2</h3></td> |
| <td><code>value</code></td> |
| <td> |
| <code>vector<uint8>[512]</code> |
| </td> |
| <td><p>The updated value of the characteristic. |
| Note for clients using indications/notifications for high-throughput (not recommended): |
| While statically constrained to <code>MAX_VALUE_LENGTH</code>, the real limit depends on the specific |
| peer's configuration as notified by <code>LocalService.PeerUpdate</code>. Any bytes exceeding that |
| limit are truncated internally by the stack. |
| Mandatory.</p> |
| </td> |
| </tr> |
| <tr id="ValueChangedParameters.peer_ids"> |
| <td><h3 id="ValueChangedParameters.peer_ids" class="add-link hide-from-toc">3</h3></td> |
| <td><code>peer_ids</code></td> |
| <td> |
| <code>vector<<a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerId'>PeerId</a>></code> |
| </td> |
| <td><p>Only signal a subset of peers.<br /> |
| If not present or empty, all peers that can be updated are signaled. |
| If included, only the set of peers in this list will be signaled.<br /> |
| Peers are only signaled if they have configured updates or notifications per <code>LocalService.</code> |
| <code>CharacteristicConfiguration</code>; other peers in <code>peer_ids</code> will be ignored.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### WriteOptions {#WriteOptions data-text="WriteOptions"} |
| |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=362)* |
| <p>Represents the supported options to write a characteristic/descriptor value |
| to a server.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="WriteOptions.write_mode"> |
| <td><h3 id="WriteOptions.write_mode" class="add-link hide-from-toc">1</h3></td> |
| <td><code>write_mode</code></td> |
| <td> |
| <code><a class='link' href='#WriteMode'>WriteMode</a></code> |
| </td> |
| <td><p>The mode of the write operation. For descriptors, only |
| <a class='link' href='#WriteMode.DEFAULT'>WriteMode.DEFAULT</a> is supported |
| Optional. |
| Default: <a class='link' href='#WriteMode.DEFAULT'>WriteMode.DEFAULT</a></p> |
| </td> |
| </tr> |
| <tr id="WriteOptions.offset"> |
| <td><h3 id="WriteOptions.offset" class="add-link hide-from-toc">2</h3></td> |
| <td><code>offset</code></td> |
| <td> |
| <code>uint16</code> |
| </td> |
| <td><p>Request a write starting at the byte indicated. |
| Must be missing or 0 if <code>write_mode</code> is <a class='link' href='#WriteMode.WITHOUT_RESPONSE'>WriteMode.WITHOUT_RESPONSE</a>. |
| Optional. |
| Default: 0</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **UNIONS** |
| |
| ### LocalService_ReadValue_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#LocalService_ReadValue_Result data-text="LocalService_ReadValue_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=70)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="LocalService_ReadValue_Result.response"> |
| <td><h3 id="LocalService_ReadValue_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#LocalService_ReadValue_Response'>LocalService_ReadValue_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="LocalService_ReadValue_Result.err"> |
| <td><h3 id="LocalService_ReadValue_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> |
| |
| ### LocalService_WriteValue_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#LocalService_WriteValue_Result data-text="LocalService_WriteValue_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=92)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="LocalService_WriteValue_Result.response"> |
| <td><h3 id="LocalService_WriteValue_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#LocalService_WriteValue_Response'>LocalService_WriteValue_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="LocalService_WriteValue_Result.err"> |
| <td><h3 id="LocalService_WriteValue_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> |
| |
| ### ReadOptions [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ReadOptions data-text="ReadOptions"} |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=327)* |
| <p>Represents the supported options to read a characteristic or descriptor |
| value from a server.</p> |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ReadOptions.short_read"> |
| <td><h3 id="ReadOptions.short_read" class="add-link hide-from-toc">1</h3></td> |
| <td><code>short_read</code></td> |
| <td> |
| <code><a class='link' href='#ShortReadOptions'>ShortReadOptions</a></code> |
| </td> |
| <td><p>Perform a short read, which may be truncated (as indicated by the |
| maybe_truncated in the result) |
| Most reads in GATT services are short reads (<= 22 bytes).</p> |
| </td> |
| </tr> |
| <tr id="ReadOptions.long_read"> |
| <td><h3 id="ReadOptions.long_read" class="add-link hide-from-toc">2</h3></td> |
| <td><code>long_read</code></td> |
| <td> |
| <code><a class='link' href='#LongReadOptions'>LongReadOptions</a></code> |
| </td> |
| <td><p>If present, perform a long read using the indicated options. |
| Optional. |
| Default: A short read will be performed.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### 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.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=70)* |
| <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> |
| |
| ### RemoteService_ReadCharacteristic_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RemoteService_ReadCharacteristic_Result data-text="RemoteService_ReadCharacteristic_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=87)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="RemoteService_ReadCharacteristic_Result.response"> |
| <td><h3 id="RemoteService_ReadCharacteristic_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_ReadCharacteristic_Response'>RemoteService_ReadCharacteristic_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="RemoteService_ReadCharacteristic_Result.err"> |
| <td><h3 id="RemoteService_ReadCharacteristic_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> |
| |
| ### RemoteService_ReadDescriptor_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RemoteService_ReadDescriptor_Result data-text="RemoteService_ReadDescriptor_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=128)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="RemoteService_ReadDescriptor_Result.response"> |
| <td><h3 id="RemoteService_ReadDescriptor_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_ReadDescriptor_Response'>RemoteService_ReadDescriptor_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="RemoteService_ReadDescriptor_Result.err"> |
| <td><h3 id="RemoteService_ReadDescriptor_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> |
| |
| ### RemoteService_RegisterCharacteristicNotifier_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RemoteService_RegisterCharacteristicNotifier_Result data-text="RemoteService_RegisterCharacteristicNotifier_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=185)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="RemoteService_RegisterCharacteristicNotifier_Result.response"> |
| <td><h3 id="RemoteService_RegisterCharacteristicNotifier_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_RegisterCharacteristicNotifier_Response'>RemoteService_RegisterCharacteristicNotifier_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="RemoteService_RegisterCharacteristicNotifier_Result.err"> |
| <td><h3 id="RemoteService_RegisterCharacteristicNotifier_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> |
| |
| ### RemoteService_WriteCharacteristic_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RemoteService_WriteCharacteristic_Result data-text="RemoteService_WriteCharacteristic_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=112)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="RemoteService_WriteCharacteristic_Result.response"> |
| <td><h3 id="RemoteService_WriteCharacteristic_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_WriteCharacteristic_Response'>RemoteService_WriteCharacteristic_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="RemoteService_WriteCharacteristic_Result.err"> |
| <td><h3 id="RemoteService_WriteCharacteristic_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> |
| |
| ### RemoteService_WriteDescriptor_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RemoteService_WriteDescriptor_Result data-text="RemoteService_WriteDescriptor_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/client.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/client.fidl;l=153)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="RemoteService_WriteDescriptor_Result.response"> |
| <td><h3 id="RemoteService_WriteDescriptor_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#RemoteService_WriteDescriptor_Response'>RemoteService_WriteDescriptor_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="RemoteService_WriteDescriptor_Result.err"> |
| <td><h3 id="RemoteService_WriteDescriptor_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> |
| |
| ### Server_PublishService_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Server_PublishService_Result data-text="Server_PublishService_Result"} |
| *Defined in [fuchsia.bluetooth.gatt2/server.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=190)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="Server_PublishService_Result.response"> |
| <td><h3 id="Server_PublishService_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#Server_PublishService_Response'>Server_PublishService_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Server_PublishService_Result.err"> |
| <td><h3 id="Server_PublishService_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#PublishServiceError'>PublishServiceError</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| ## **BITS** |
| |
| ### CharacteristicPropertyBits [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#CharacteristicPropertyBits} |
| Type: <code>uint16</code> |
| |
| *Defined in [fuchsia.bluetooth.gatt2/types.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/types.fidl;l=213)* |
| <p>Possible values for the characteristic properties bitfield. These specify the |
| GATT procedures that are allowed for a particular characteristic.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="CharacteristicPropertyBits.BROADCAST"> |
| <td><h3 id="CharacteristicPropertyBits.BROADCAST" class="add-link hide-from-toc">BROADCAST</h3></td> |
| <td>1</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.READ"> |
| <td><h3 id="CharacteristicPropertyBits.READ" class="add-link hide-from-toc">READ</h3></td> |
| <td>2</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.WRITE_WITHOUT_RESPONSE"> |
| <td><h3 id="CharacteristicPropertyBits.WRITE_WITHOUT_RESPONSE" class="add-link hide-from-toc">WRITE_WITHOUT_RESPONSE</h3></td> |
| <td>4</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.WRITE"> |
| <td><h3 id="CharacteristicPropertyBits.WRITE" class="add-link hide-from-toc">WRITE</h3></td> |
| <td>8</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.NOTIFY"> |
| <td><h3 id="CharacteristicPropertyBits.NOTIFY" class="add-link hide-from-toc">NOTIFY</h3></td> |
| <td>16</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.INDICATE"> |
| <td><h3 id="CharacteristicPropertyBits.INDICATE" class="add-link hide-from-toc">INDICATE</h3></td> |
| <td>32</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.AUTHENTICATED_SIGNED_WRITES"> |
| <td><h3 id="CharacteristicPropertyBits.AUTHENTICATED_SIGNED_WRITES" class="add-link hide-from-toc">AUTHENTICATED_SIGNED_WRITES</h3></td> |
| <td>64</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.RELIABLE_WRITE"> |
| <td><h3 id="CharacteristicPropertyBits.RELIABLE_WRITE" class="add-link hide-from-toc">RELIABLE_WRITE</h3></td> |
| <td>256</td> |
| <td></td> |
| </tr> |
| <tr id="CharacteristicPropertyBits.WRITABLE_AUXILIARIES"> |
| <td><h3 id="CharacteristicPropertyBits.WRITABLE_AUXILIARIES" class="add-link hide-from-toc">WRITABLE_AUXILIARIES</h3></td> |
| <td>512</td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| ## **CONSTANTS** |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr> |
| <tr id="INITIAL_VALUE_CHANGED_CREDITS"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/server.fidl;l=11">INITIAL_VALUE_CHANGED_CREDITS</a></td> |
| <td> |
| <code>10</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td><p>The amount of credits defined to be available for sending indications/notifications when a |
| LocalService is first published.</p> |
| </td> |
| </tr> |
| <tr id="MAX_ATTRIBUTE_COUNT"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.gatt2/constants.fidl;l=11">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.gatt2/constants.fidl;l=26">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.gatt2/constants.fidl;l=34">MAX_DESCRIPTOR_COUNT</a></td> |
| <td> |
| <code>65532</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.gatt2/constants.fidl;l=18">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.gatt2/constants.fidl;l=8">MAX_VALUE_LENGTH</a></td> |
| <td> |
| <code>512</code> |
| </td> |
| <td><code>uint16</code></td> |
| <td></td> |
| </tr> |
| </table> |