From a2a2f325a64d27677fb4fec51bd7c573721b4d70 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 24 Aug 2016 22:17:35 +0000 Subject: [PATCH] Deploy to GitHub Pages: 9c9c4bc1260614aebbd748876d0b94c32ab53233 --- index.html | 413 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 231 insertions(+), 182 deletions(-) diff --git a/index.html b/index.html index 2c10fc2..dd39e25 100644 --- a/index.html +++ b/index.html @@ -1504,9 +1504,10 @@

Table of Contents

  • 5.1 GATT Information Model
      -
    1. 5.1.1 The Bluetooth cache -
    2. 5.1.2 Navigating the Bluetooth Hierarchy -
    3. 5.1.3 Identifying Services, Characteristics, and Descriptors +
    4. 5.1.1 Persistence across connections +
    5. 5.1.2 The Bluetooth cache +
    6. 5.1.3 Navigating the Bluetooth Hierarchy +
    7. 5.1.4 Identifying Services, Characteristics, and Descriptors
  • 5.2 BluetoothRemoteGATTServer
  • 5.3 BluetoothRemoteGATTService @@ -3037,14 +3038,23 @@

    Characteristic.

    -

    5.1.1. The Bluetooth cache

    +

    5.1.1. Persistence across connections

    +

    The Bluetooth Attribute Caching system allows bonded clients + to save references to attributes from one connection to the next. + Web Bluetooth treats websites as not bonded to devices they have permission to access: BluetoothRemoteGATTService, BluetoothRemoteGATTCharacteristic, + and BluetoothRemoteGATTDescriptor objects + become invalid on disconnection, + and the site must retrieved them again when it re-connects.

    +
    +
    +

    5.1.2. The Bluetooth cache

    The UA MUST maintain a Bluetooth cache of the hierarchy of Services, Characteristics, and Descriptors it has discovered on a device. The UA MAY share this cache between multiple origins accessing the same device. Each potential entry in the cache is either known-present, known-absent, or unknown. The cache MUST NOT contain two entries that are for the same attribute. - Each known-present entry in the cache is associated with an optional Promise<BluetoothRemoteGATTService>, Promise<BluetoothRemoteGATTCharacteristic>, - or Promise<BluetoothRemoteGATTDescriptor> instance + Each known-present entry in the cache is associated with an optional Promise<BluetoothRemoteGATTService>, Promise<BluetoothRemoteGATTCharacteristic>, + or Promise<BluetoothRemoteGATTDescriptor> instance for each Bluetooth instance.

    For example, if a user calls the serviceA.getCharacteristic(uuid1) function with an initially empty Bluetooth cache, @@ -3107,17 +3117,17 @@

    BluetoothDevice
    obj.[[representedDevice]] -
    BluetoothRemoteGATTService +
    BluetoothRemoteGATTService
    obj.[[representedService]] -
    BluetoothRemoteGATTCharacteristic +
    BluetoothRemoteGATTCharacteristic
    obj.[[representedCharacteristic]] -
    BluetoothRemoteGATTDescriptor +
    BluetoothRemoteGATTDescriptor
    obj.[[representedDescriptor]]

    - +

    To GetGATTChildren(attribute: GATT Attribute,
    single: boolean,
    uuidCanonicalizer: function,
    uuid: optional (DOMString or unsigned int),
    allowedUuids: optional ("all" or Array<DOMString>),
    child type: GATT declaration type),

    the UA MUST perform the following steps:

      @@ -3132,9 +3142,9 @@

    Algorithms need to fail if - their BluetoothRemoteGATTServer was disconnected while they were running, + their BluetoothRemoteGATTServer was disconnected while they were running, even if the UA stays connected the whole time - and the BluetoothRemoteGATTServer is subsequently re-connected before they finish. + and the BluetoothRemoteGATTServer is subsequently re-connected before they finish. We wrap the returned Promise to accomplish this.

    To create a gattServer-connection-checking wrapper around a Promise promise, the UA MUST:

    1. If gattServer.connected is true, - add promise to gattServer.[[activeAlgorithms]]. + add promise to gattServer.[[activeAlgorithms]].
    2. Return the result of transforming promise with fulfillment and rejection handlers that perform the following steps:
      fulfillment handler
        -
      1. If promise is in gattServer.[[activeAlgorithms]], +
      2. If promise is in gattServer.[[activeAlgorithms]], remove it and return the first argument.
      3. Otherwise, throw a NetworkError. Because gattServer was disconnected during the execution of the main algorithm. @@ -3292,7 +3299,7 @@

        rejection handler
          -
        1. If promise is in gattServer.[[activeAlgorithms]], +
        2. If promise is in gattServer.[[activeAlgorithms]], remove it and throw the first argument.
        3. Otherwise, throw a NetworkError. Because gattServer was disconnected during the execution of the main algorithm. @@ -3323,35 +3330,35 @@

          5.3. BluetoothRemoteGATTService

          -

          BluetoothRemoteGATTService represents a GATT Service, +

          BluetoothRemoteGATTService represents a GATT Service, a collection of characteristics and relationships to other services that encapsulate the behavior of part of a device.

          -
          interface BluetoothRemoteGATTService {
          +
          interface BluetoothRemoteGATTService {
             readonly attribute BluetoothDevice device;
             readonly attribute UUID uuid;
             readonly attribute boolean isPrimary;
          -  Promise<BluetoothRemoteGATTCharacteristic>
          +  Promise<BluetoothRemoteGATTCharacteristic>
               getCharacteristic(BluetoothCharacteristicUUID characteristic);
          -  Promise<sequence<BluetoothRemoteGATTCharacteristic>>
          +  Promise<sequence<BluetoothRemoteGATTCharacteristic>>
               getCharacteristics(optional BluetoothCharacteristicUUID characteristic);
          -  Promise<BluetoothRemoteGATTService>
          +  Promise<BluetoothRemoteGATTService>
               getIncludedService(BluetoothServiceUUID service);
          -  Promise<sequence<BluetoothRemoteGATTService>>
          +  Promise<sequence<BluetoothRemoteGATTService>>
               getIncludedServices(optional BluetoothServiceUUID service);
           };
          -BluetoothRemoteGATTService implements EventTarget;
          -BluetoothRemoteGATTService implements CharacteristicEventHandlers;
          -BluetoothRemoteGATTService implements ServiceEventHandlers;
          +BluetoothRemoteGATTService implements EventTarget;
          +BluetoothRemoteGATTService implements CharacteristicEventHandlers;
          +BluetoothRemoteGATTService implements ServiceEventHandlers;
           
          - +

          device is the BluetoothDevice representing the remote peripheral that the GATT service belongs to.

          uuid is the UUID of the service, e.g. '0000180d-0000-1000-8000-00805f9b34fb' for the Heart Rate service.

          isPrimary indicates whether the type of this service is primary or secondary.

          -

          Instances of BluetoothRemoteGATTService are created with the internal slots described in the following table:

          +

          Instances of BluetoothRemoteGATTService are created with the internal slots described in the following table:

          @@ -3369,7 +3376,7 @@

          To create a BluetoothRemoteGATTService representing a Service service, the UA must return a new promise promise and run the following steps in parallel.

            -
          1. Let result be a new instance of BluetoothRemoteGATTService with its [[representedService]] slot initialized to service. +
          2. Let result be a new instance of BluetoothRemoteGATTService with its [[representedService]] slot initialized to service.
          3. Get the BluetoothDevice representing the device in which service appears, and let device be the result.
          4. If the previous step threw an error, reject promise with that error and abort these steps. @@ -3408,25 +3415,25 @@

            5.4. BluetoothRemoteGATTCharacteristic

            -

            BluetoothRemoteGATTCharacteristic represents a GATT Characteristic, which is a basic data element that provides further information about a peripheral’s service.

            -
            interface BluetoothRemoteGATTCharacteristic {
            -  readonly attribute BluetoothRemoteGATTService service;
            +     

            BluetoothRemoteGATTCharacteristic represents a GATT Characteristic, which is a basic data element that provides further information about a peripheral’s service.

            +
            interface BluetoothRemoteGATTCharacteristic {
            +  readonly attribute BluetoothRemoteGATTService service;
               readonly attribute UUID uuid;
               readonly attribute BluetoothCharacteristicProperties properties;
               readonly attribute DataView? value;
            -  Promise<BluetoothRemoteGATTDescriptor> getDescriptor(BluetoothDescriptorUUID descriptor);
            -  Promise<sequence<BluetoothRemoteGATTDescriptor>>
            +  Promise<BluetoothRemoteGATTDescriptor> getDescriptor(BluetoothDescriptorUUID descriptor);
            +  Promise<sequence<BluetoothRemoteGATTDescriptor>>
                 getDescriptors(optional BluetoothDescriptorUUID descriptor);
               Promise<DataView> readValue();
               Promise<void> writeValue(BufferSource value);
            -  Promise<BluetoothRemoteGATTCharacteristic> startNotifications();
            -  Promise<BluetoothRemoteGATTCharacteristic> stopNotifications();
            +  Promise<BluetoothRemoteGATTCharacteristic> startNotifications();
            +  Promise<BluetoothRemoteGATTCharacteristic> stopNotifications();
             };
            -BluetoothRemoteGATTCharacteristic implements EventTarget;
            -BluetoothRemoteGATTCharacteristic implements CharacteristicEventHandlers;
            +BluetoothRemoteGATTCharacteristic implements EventTarget;
            +BluetoothRemoteGATTCharacteristic implements CharacteristicEventHandlers;
             
            - +

            service is the GATT service this characteristic belongs to.

            uuid is the UUID of the characteristic, e.g. '00002a37-0000-1000-8000-00805f9b34fb' for the Heart Rate Measurement characteristic.

            @@ -3434,7 +3441,7 @@

            value is the currently cached characteristic value. This value gets updated when the value of the characteristic is read or updated via a notification or indication.

            -

            Instances of BluetoothRemoteGATTCharacteristic are created with the internal slots described in the following table:

            +

            Instances of BluetoothRemoteGATTCharacteristic are created with the internal slots described in the following table:

          @@ -3452,9 +3459,9 @@

          To create a BluetoothRemoteGATTCharacteristic representing a Characteristic characteristic, the UA must return a new promise promise and run the following steps in parallel.

            -
          1. Let result be a new instance of BluetoothRemoteGATTCharacteristic with its [[representedCharacteristic]] slot initialized to characteristic. +
          2. Let result be a new instance of BluetoothRemoteGATTCharacteristic with its [[representedCharacteristic]] slot initialized to characteristic.
          3. Initialize result.service from - the BluetoothRemoteGATTService instance representing + the BluetoothRemoteGATTService instance representing the Service in which characteristic appears.
          4. Initialize result.uuid from the UUID of characteristic. @@ -3491,7 +3498,7 @@

          5. If this.uuid is blacklisted for reads, return a promise rejected with a SecurityError and abort these steps. -
          6. If this.service.device.gatt.connected is false, +
          7. If this.service.device.gatt.connected is false, return a promise rejected with a NetworkError and abort these steps.
          8. Let characteristic be this.[[representedCharacteristic]].
          9. If characteristic is null, @@ -3510,7 +3517,7 @@

            Queue a task to perform the following steps:
              -
            1. If promise is not in this.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps. +
            2. If promise is not in this.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps.
            3. Let buffer be an ArrayBuffer holding the retrieved value, and assign new DataView(buffer) to this.value.
            4. Fire an event named characteristicvaluechanged with its bubbles attribute initialized to true at this. @@ -3529,7 +3536,7 @@

              If bytes is more than 512 bytes long (the maximum length of an attribute value, per Long Attribute Values) return a promise rejected with an InvalidModificationError and abort these steps. -
            5. If this.service.device.gatt.connected is false, +
            6. If this.service.device.gatt.connected is false, return a promise rejected with a NetworkError and abort these steps.
            7. Let characteristic be this.[[representedCharacteristic]].
            8. If characteristic is null, @@ -3548,7 +3555,7 @@

              Queue a task to perform the following steps:
                -
              1. If promise is not in this.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps. +
              2. If promise is not in this.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps.
              3. Set this.value to a new DataView wrapping a new ArrayBuffer containing bytes.
              4. Resolve promise with undefined. @@ -3574,7 +3581,7 @@

                If neither of the Notify or Indicate bits are set in characteristic’s properties, reject promise with a NotSupportedError and abort these steps.
              5. If characteristic’s active notification context set contains navigator.bluetooth, resolve promise with this and abort these steps. -
              6. If this.service.device.gatt.connected is false, reject promise with a NetworkError and abort these steps. +
              7. If this.service.device.gatt.connected is false, reject promise with a NetworkError and abort these steps.
              8. Use any of the Characteristic Descriptors procedures to ensure that one of the Notification or Indication bits in characteristic’s Client Characteristic Configuration descriptor is set, matching the constraints @@ -3613,7 +3620,7 @@

                5.4.1. BluetoothCharacteristicProperties

                -

                Each BluetoothRemoteGATTCharacteristic exposes its characteristic properties through a BluetoothCharacteristicProperties object. +

                Each BluetoothRemoteGATTCharacteristic exposes its characteristic properties through a BluetoothCharacteristicProperties object. These properties express what operations are valid on the characteristic.

                interface BluetoothCharacteristicProperties {
                   readonly attribute boolean broadcast;
                @@ -3690,9 +3697,9 @@ 

                5.5. BluetoothRemoteGATTDescriptor

                -

                BluetoothRemoteGATTDescriptor represents a GATT Descriptor, which provides further information about a Characteristic’s value.

                -
                interface BluetoothRemoteGATTDescriptor {
                -  readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
                +     

                BluetoothRemoteGATTDescriptor represents a GATT Descriptor, which provides further information about a Characteristic’s value.

                +
                interface BluetoothRemoteGATTDescriptor {
                +  readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
                   readonly attribute UUID uuid;
                   readonly attribute DataView? value;
                   Promise<DataView> readValue();
                @@ -3700,14 +3707,14 @@ 

                - +

                characteristic is the GATT characteristic this descriptor belongs to.

                uuid is the UUID of the characteristic descriptor, e.g. '00002902-0000-1000-8000-00805f9b34fb' for the Client Characteristic Configuration descriptor.

                value is the currently cached descriptor value. This value gets updated when the value of the descriptor is read.

                -

                Instances of BluetoothRemoteGATTDescriptor are created with the internal slots described in the following table:

                +

                Instances of BluetoothRemoteGATTDescriptor are created with the internal slots described in the following table:

          @@ -3725,9 +3732,9 @@

          To create a BluetoothRemoteGATTDescriptor representing a Descriptor descriptor, the UA must return a new promise promise and run the following steps in parallel.

            -
          1. Let result be a new instance of BluetoothRemoteGATTDescriptor with its [[representedDescriptor]] slot initialized to descriptor. +
          2. Let result be a new instance of BluetoothRemoteGATTDescriptor with its [[representedDescriptor]] slot initialized to descriptor.
          3. Initialize result.characteristic from - the BluetoothRemoteGATTCharacteristic instance representing + the BluetoothRemoteGATTCharacteristic instance representing the Characteristic in which descriptor appears.
          4. Initialize result.uuid from the UUID of descriptor.
          5. Initialize result.value to null. @@ -3743,7 +3750,7 @@

          6. If this.uuid is blacklisted for reads, return a promise rejected with a SecurityError and abort these steps. -
          7. If this.characteristic.service.device.gatt.connected is false, +
          8. If this.characteristic.service.device.gatt.connected is false, return a promise rejected with a NetworkError and abort these steps.
          9. Let descriptor be this.[[representedDescriptor]].
          10. If descriptor is null, @@ -3760,7 +3767,7 @@

            Queue a task to perform the following steps:
              -
            1. If promise is not in this.characteristic.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps. +
            2. If promise is not in this.characteristic.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps.
            3. Let buffer be an ArrayBuffer holding the retrieved value, and assign new DataView(buffer) to this.value.
            4. Resolve promise with this.value. @@ -3778,7 +3785,7 @@

              If bytes is more than 512 bytes long (the maximum length of an attribute value, per Long Attribute Values) return a promise rejected with an InvalidModificationError and abort these steps. -
            5. If this.characteristic.service.device.gatt.connected is false, +
            6. If this.characteristic.service.device.gatt.connected is false, return a promise rejected with a NetworkError and abort these steps.
            7. Let descriptor be this.[[representedDescriptor]].
            8. If descriptor is null, @@ -3795,7 +3802,7 @@

              Queue a task to perform the following steps:
                -
              1. If promise is not in this.characteristic.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps. +
              2. If promise is not in this.characteristic.service.device.gatt.[[activeAlgorithms]], reject promise with a NetworkError and abort these steps.
              3. Set this.value to a new DataView wrapping a new ArrayBuffer containing bytes.
              4. Resolve promise with undefined. @@ -3809,25 +3816,25 @@

                5.6

                5.6.1. Bluetooth Tree

                navigator.bluetooth and - objects implementing the BluetoothDevice, BluetoothRemoteGATTService, BluetoothRemoteGATTCharacteristic, or BluetoothRemoteGATTDescriptor interface participate in a tree, + objects implementing the BluetoothDevice, BluetoothRemoteGATTService, BluetoothRemoteGATTCharacteristic, or BluetoothRemoteGATTDescriptor interface participate in a tree, simply named the Bluetooth tree.

                @@ -3838,22 +3845,22 @@

                BluetoothDevice when an advertising event is received from that device.
                characteristicvaluechanged -
                Fired on a BluetoothRemoteGATTCharacteristic when its value changes, +
                Fired on a BluetoothRemoteGATTCharacteristic when its value changes, either as a result of a read request, or a value change notification/indication.
                gattserverdisconnected
                Fired on a BluetoothDevice when an active GATT connection is lost.
                serviceadded -
                Fired on a new BluetoothRemoteGATTService when it has been discovered on a remote device, +
                Fired on a new BluetoothRemoteGATTService when it has been discovered on a remote device, just after it is added to the Bluetooth tree.
                servicechanged -
                Fired on a BluetoothRemoteGATTService when its state changes. +
                Fired on a BluetoothRemoteGATTService when its state changes. This involves any characteristics and/or descriptors that get added or removed from the service, as well as Service Changed indications from the remote device.
                serviceremoved -
                Fired on a BluetoothRemoteGATTService when it has been removed from its device, +
                Fired on a BluetoothRemoteGATTService when it has been removed from its device, just before it is removed from the Bluetooth tree. @@ -3867,13 +3874,27 @@

              5. If deviceObj.[[representedDevice]] is not the same device as device, abort these steps. -
              6. If !deviceObj.gatt.connected, +
              7. If !deviceObj.gatt.connected, abort these steps. -
              8. Set deviceObj.gatt.connected to false. -
              9. Clear deviceObj.gatt.[[activeAlgorithms]]. +
              10. Clean up the disconnected device deviceObj. +
              + +
              +

              To clean up the disconnected device deviceObj, the UA must:

              +
                +
              1. Set deviceObj.gatt.connected to false. +
              2. Clear deviceObj.gatt.[[activeAlgorithms]]. +
              3. Let context be deviceObj.[[context]]. +
              4. Remove all entries from context.[[attributeInstanceMap]] whose keys are inside deviceObj.[[representedDevice]]. +
              5. For each BluetoothRemoteGATTService service in deviceObj’s realm, + set service.[[representedService]] to null. +
              6. For each BluetoothRemoteGATTCharacteristic characteristic in deviceObj’s realm, + set characteristic.[[representedCharacteristic]] to null. +
              7. For each BluetoothRemoteGATTDescriptor descriptor in deviceObj’s realm, + set descriptor.[[representedDescriptor]] to null.
              8. - Fire an event named gattserverdisconnected with its bubbles attribute initialized to true at deviceObj. -

                This event is not fired at the BluetoothRemoteGATTServer.

                + Fire an event named gattserverdisconnected with its bubbles attribute initialized to true at deviceObj. +

                This event is not fired at the BluetoothRemoteGATTServer.

              @@ -3887,9 +3908,9 @@

              bluetoothGlobal in the Characteristic’s active notification context set, queue a task on the event loop of the script settings object of bluetoothGlobal to do the following sub-steps:
                -
              1. Let characteristicObject be the BluetoothRemoteGATTCharacteristic in +
              2. Let characteristicObject be the BluetoothRemoteGATTCharacteristic in the Bluetooth tree rooted at bluetoothGlobal that represents the Characteristic. -
              3. If characteristicObject.service.device.gatt.connected is false, +
              4. If characteristicObject.service.device.gatt.connected is false, abort these sub-steps.
              5. Set characteristicObject.value to a new DataView wrapping a new ArrayBuffer holding @@ -3902,7 +3923,7 @@

                5.6.5. Responding to Service Changes

                -

                The Bluetooth Attribute Caching system allows clients +

                The Bluetooth Attribute Caching system allows clients to track changes to Services, Characteristics, and Descriptors. Before discovering any of these attributes for the purpose of exposing them to a web page the UA MUST subscribe to Indications from the Service Changed characteristic, if it exists. @@ -3928,18 +3949,18 @@

                environment settings object settings in the UA, queue a task on its responsible event loop to do the following sub-steps:
                  -
                1. For each BluetoothRemoteGATTService service whose relevant settings object is settings, - if service.[[representedService]] is in invalidatedAttributes, - set service.[[representedService]] to null. -
                2. For each BluetoothRemoteGATTCharacteristic characteristic whose relevant settings object is settings, - if characteristic.[[representedCharacteristic]] is in invalidatedAttributes, - set characteristic.[[representedCharacteristic]] to null. -
                3. For each BluetoothRemoteGATTDescriptor descriptor whose relevant settings object is settings, - if descriptor.[[representedDescriptor]] is in invalidatedAttributes, - set descriptor.[[representedDescriptor]] to null. +
                4. For each BluetoothRemoteGATTService service whose relevant settings object is settings, + if service.[[representedService]] is in invalidatedAttributes, + set service.[[representedService]] to null. +
                5. For each BluetoothRemoteGATTCharacteristic characteristic whose relevant settings object is settings, + if characteristic.[[representedCharacteristic]] is in invalidatedAttributes, + set characteristic.[[representedCharacteristic]] to null. +
                6. For each BluetoothRemoteGATTDescriptor descriptor whose relevant settings object is settings, + if descriptor.[[representedDescriptor]] is in invalidatedAttributes, + set descriptor.[[representedDescriptor]] to null.
                7. Let global be settingsglobal object.
                8. Remove every entry - from global.navigator.bluetooth.[[attributeInstanceMap]] that represents an attribute that + from global.navigator.bluetooth.[[attributeInstanceMap]] that represents an attribute that is in invalidatedAttributes.
              6. Let changedServices be a set of Services, initially empty. @@ -3959,17 +3980,17 @@

                For each Service service in removedAttributes:
                  -
                1. If no remaining Service in deviceObj.[[representedDevice]] has the same UUID as service, +
                2. If no remaining Service in deviceObj.[[representedDevice]] has the same UUID as service, remove the UUID from deviceObj.[[unfilteredUuids]]. -
                3. If deviceObj.[[allowedServices]] is "all" or contains the Service’s UUID, fire an event named serviceremoved with its bubbles attribute initialized to true at the BluetoothRemoteGATTService representing the Service. -
                4. Remove this BluetoothRemoteGATTService from the Bluetooth tree. +
                5. If deviceObj.[[allowedServices]] is "all" or contains the Service’s UUID, fire an event named serviceremoved with its bubbles attribute initialized to true at the BluetoothRemoteGATTService representing the Service. +
                6. Remove this BluetoothRemoteGATTService from the Bluetooth tree.
              7. For each Service in addedAttributes, add the Service’s UUID to deviceObj.[[unfilteredUuids]]. If deviceObj.[[allowedServices]] is "all" or contains the Service’s UUID, - add the BluetoothRemoteGATTService representing this Service to the Bluetooth tree and then fire an event named serviceadded with its bubbles attribute initialized to true at the BluetoothRemoteGATTService. + add the BluetoothRemoteGATTService representing this Service to the Bluetooth tree and then fire an event named serviceadded with its bubbles attribute initialized to true at the BluetoothRemoteGATTService.
              8. For each Service in changedServices, - if deviceObj.[[allowedServices]] is "all" or contains the Service’s UUID, fire an event named servicechanged with its bubbles attribute initialized to true at the BluetoothRemoteGATTService representing the Service. + if deviceObj.[[allowedServices]] is "all" or contains the Service’s UUID, fire an event named servicechanged with its bubbles attribute initialized to true at the BluetoothRemoteGATTService representing the Service.

            @@ -3987,7 +4008,7 @@

            attribute EventHandler ongattserverdisconnected; }; -

            ongattserverdisconnected is an Event handler IDL attribute for the gattserverdisconnected event type.

            +

            ongattserverdisconnected is an Event handler IDL attribute for the gattserverdisconnected event type.

            [NoInterfaceObject]
             interface ServiceEventHandlers {
               attribute EventHandler onserviceadded;
            @@ -4374,6 +4395,8 @@ 

          +
        4. Definitions + (defines bond)
        5. Attribute Protocol (ATT) @@ -4778,6 +4801,7 @@

          BluetoothServiceUUID, in §6.1
        6. Bluetooth Tree, in §5.6
        7. BluetoothUUID, in §6.1 +
        8. bond, in §9
        9. broadcast, in §5.4.1
        10. Broadcaster, in §9
        11. [[cachedAllowedServices]], in §4.2 @@ -4797,6 +4821,7 @@

          Characteristic Value Notification, in §9
        12. Characteristic Value Read, in §9
        13. Characteristic Value Write, in §9 +
        14. clean up the disconnected device, in §5.6.3
        15. Client Characteristic Configuration, in §9
        16. connect(), in §5.2
        17. connected, in §5.2 @@ -4871,7 +4896,7 @@

          getDescriptor(descriptor), in §5.4
        18. getDescriptor(name), in §6.1
        19. getDescriptors(descriptor), in §5.4 -
        20. GetGATTChildren, in §5.1.2 +
        21. GetGATTChildren, in §5.1.3
        22. getIncludedService(service), in §5.3
        23. getIncludedServices(service), in §5.3
        24. getPrimaryServices(), in §5.2 @@ -4925,7 +4950,7 @@

          parsing the blacklist, in §7
        25. Passive Scanning, in §9
        26. Peripheral, in §9 -
        27. populate the Bluetooth cache, in §5.1.1 +
        28. populate the Bluetooth cache, in §5.1.2
        29. Primary Service Discovery, in §9
        30. Privacy Feature, in §9
        31. Private address, in §9 @@ -4935,7 +4960,7 @@

          properties, in §5.4
        32. Public Bluetooth Address, in §9
        33. Public Device Address, in §9 -
        34. query the Bluetooth cache, in §5.1.1 +
        35. query the Bluetooth cache, in §5.1.2
        36. query the "bluetooth" permission, in §3.1
        37. read, in §5.4.1
        38. Read BD_ADDR Command, in §9 @@ -4953,7 +4978,7 @@

          [[referringDevice]], in §3
        39. Relationship Discovery, in §9
        40. reliableWrite, in §5.4.1 -
        41. Represented, in §5.1.1 +
        42. Represented, in §5.1.2
        43. [[representedCharacteristic]], in §5.4
        44. [[representedDescriptor]], in §5.5
        45. [[representedDevice]], in §4.2 @@ -4971,7 +4996,7 @@

          dict-member for BluetoothAdvertisingEventInit, in §4.2.1
        46. attribute for BluetoothAdvertisingEvent, in §4.2.1 -
        47. same attribute, in §5.1.3 +
        48. same attribute, in §5.1.4
        49. same Bluetooth device, in §4.1
        50. same device, in §4.1
        51. scan for devices, in §3 @@ -5446,7 +5471,7 @@

          2.1. Device access is powerful
        52. 3. Device Discovery (2) (3) (4) (5) (6)
        53. 4.2. BluetoothDevice (2) (3) -
        54. 5.1.1. The Bluetooth cache +
        55. 5.1.2. The Bluetooth cache
        56. 5.4. BluetoothRemoteGATTCharacteristic
        57. 8. Extensions to the Navigator Interface @@ -5505,8 +5530,9 @@

          #dom-bluetooth-attributeinstancemap-slotReferenced in: @@ -5925,20 +5952,20 @@

          #populate-the-bluetooth-cacheReferenced in: @@ -5962,36 +5989,36 @@

          4.2. BluetoothDevice (2)
        58. 5.1. GATT Information Model (2) -
        59. 5.2. BluetoothRemoteGATTServer (2) (3) (4) (5) (6) (7) (8) (9) (10) -
        60. 5.6.3. Responding to Disconnection +
        61. 5.2. BluetoothRemoteGATTServer (2) (3) (4) (5) (6) (7) (8) (9) +
        62. 5.6.3. Responding to Disconnection @@ -6067,15 +6096,16 @@

          #dom-bluetoothremotegattservice-representedservice-slotReferenced in: @@ -6152,15 +6184,16 @@

          #dom-bluetoothremotegattcharacteristic-representedcharacteristic-slotReferenced in: + + @@ -6853,7 +6902,7 @@

          #discover-characteristics-by-uuidReferenced in: