0% found this document useful (0 votes)
55 views29 pages

Ess V1.0.0

Uploaded by

adi pandu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views29 pages

Ess V1.0.0

Uploaded by

adi pandu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Environmental Sensing Service

Bluetooth® Service Specification

Date 2014-Nov-18

Revision V1.0.0

Group Prepared By SF WG

Feedback Email [email protected]

Abstract:
This service exposes measurement data from an environmental sensor intended for sports and fitness
applications. A wide range of environmental parameters is supported.

Bluetooth SIG Proprietary


Environmental Sensing Service
Bluetooth Service Specification

Revision History

Revision Number Date Comments


V1.0.0 2014-11-18 Adopted by the Bluetooth SIG BoD

Contributors

Name Company
Robert D. Hughes Intel Corporation
Tatsuo Arai Casio
Laurence Richardson Cambridge Silicon Radio
V1.0.0

Bluetooth SIG Proprietary Page 2 of 29


Environmental Sensing Service
Bluetooth Service Specification

DISCLAIMER AND COPYRIGHT NOTICE


This disclaimer applies to all draft specifications and final specifications adopted by the Bluetooth SIG Board of Directors (both of
which are hereinafter referred to herein as a Bluetooth “Specification”. Your use of this Specification in any way is subject to your
compliance with all conditions of such use, and your acceptance of all disclaimers and limitations as to such use, contained in this
Specification. Any user of this Specification is advised to seek appropriate legal, engineering or other professional advice regarding
the use, interpretation or effect of this Specification on any matters discussed in this Specification.
Use of Bluetooth Specifications and any related intellectual property is governed by the Promoters Membership Agreement among
the Promoter Members and Bluetooth SIG (the “Promoters Agreement”), certain membership agreements between Bluetooth SIG
and its Adopter and Associate Members, including, but not limited to, the Membership Application, the Bluetooth Patent/Copyright
License Agreement and the Bluetooth Trademark License Agreement (collectively, the “Membership Agreements”) and the
Bluetooth Specification Early Adopters Agreements (1.2 Early Adopters Agreements) among Early Adopter members of the
unincorporated Bluetooth SIG and the Promoter Members (the “Early Adopters Agreement”). Certain rights and obligations of the
Promoter Members under the Early Adopters Agreements have been assigned to Bluetooth SIG by the Promoter Members.
Use of the Specification by anyone who is not a member of Bluetooth SIG or a party to an Early Adopters Agreement (each such
person or party, a “Member”) is prohibited. The use of any portion of a Bluetooth Specification may involve the use of intellectual
property rights ("IPR"), including pending or issued patents, or copyrights or other rights. Bluetooth SIG has made no search or
investigation for such rights and disclaims any undertaking or duty to do so. The legal rights and obligations of each Member are
governed by the applicable Membership Agreements, Early Adopters Agreement or Promoters Agreement. No license, express or
implied, by estoppel or otherwise, to any intellectual property rights are granted herein.
Any use of the Specification not in compliance with the terms of the applicable Membership Agreements, Early Adopters Agreement
or Promoters Agreement is prohibited and any such prohibited use may result in (i) termination of the applicable Membership
Agreements or Early Adopters Agreement and (ii) liability claims by Bluetooth SIG or any of its Members for patent, copyright and/or
trademark infringement claims permitted by the applicable agreement or by applicable law.
THE SPECIFICATION IS PROVIDED “AS IS” WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF
MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, SATISFACTORY QUALITY, OR
REASONABLE SKILL OR CARE, OR ANY WARRANTY ARISING OUT OF ANY COURSE OF DEALING, USAGE, TRADE
V1.0.0

PRACTICE, PROPOSAL, SPECIFICATION OR SAMPLE.


Each Member hereby acknowledges that products equipped with the Bluetooth wireless technology ("Bluetooth Products") may be
subject to various regulatory controls under the laws and regulations of various governments worldwide. Such laws and regulatory
controls may govern, among other things, the combination, operation, use, implementation and distribution of Bluetooth Products.
Examples of such laws and regulatory controls include, but are not limited to, airline regulatory controls, telecommunications
regulations, technology transfer controls and health and safety regulations. Each Member is solely responsible for the compliance
by their Bluetooth Products with any such laws and regulations and for obtaining any and all required authorizations, permits, or
licenses for their Bluetooth Products related to such regulations within the applicable jurisdictions. Each Member acknowledges that
nothing in the Specification provides any information or assistance in connection with securing such compliance, authorizations or
licenses. NOTHING IN THE SPECIFICATION CREATES ANY WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING
SUCH LAWS OR REGULATIONS.
ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS OR FOR
NONCOMPLIANCE WITH LAWS, RELATING TO USE OF THE SPECIFICATION IS EXPRESSLY DISCLAIMED. To the extent not
prohibited by law, in no event will Bluetooth SIG or its Members or their affiliates be liable for any damages, including without
limitation, lost revenue, profits, data or programs, or business interruption, or for special , indirect, consequential, incidental or
punitive damages, however caused and regardless of the theory of liability, arising out of or related to any furnishing, practicing,
modifying, use or the performance or implementation of the contents of this Specification, even if Bluetooth SIG or its Members or
their affiliates have been advised of the possibility of such damages. BY USE OF THE SPECIFICATION, EACH MEMBER
EXPRESSLY WAIVES ANY CLAIM AGAINST BLUETOOTH SIG AND ITS PROMOTER MEMBERS RELATED TO USE OF THE
SPECIFICATION.
If this Specification is an intermediate draft, it is for comment only. No products should be designed based on it for purposes other
than interoperable prototype testing and it does not represent any commitment to release or implement any portion of the
intermediate draft, which may be withdrawn, modified or replaced at any time, in the adopted Specification.
Bluetooth SIG reserves the right to adopt any changes or alterations to the Specification it deems necessary or appropriate.
Copyright © 2013 - 2014. The Bluetooth word mark and logos are owned by Bluetooth SIG, Inc. All copyrights in the Bluetooth
Specifications themselves are owned by Ericsson AB, Lenovo (Singapore) Pte. Ltd., Intel Corporation, Microsoft Corporation,
Motorola Mobility, LLC, Nokia Corporation and Toshiba Corporation. Other third-party brands and names are the property of their
respective owners.

Bluetooth SIG Proprietary Page 3 of 29


Environmental Sensing Service
Bluetooth Service Specification

Document Terminology
The Bluetooth SIG has adopted Section 13.1 of the IEEE Standards Style Manual, which dictates use of
the words “shall”, “should”, “may”, and “can” in the development of documentation, as follows:

The word shall is used to indicate mandatory requirements strictly to be followed in order to conform to
the standard and from which no deviation is permitted (shall equals is required to).

The use of the word must is deprecated and shall not be used when stating mandatory requirements;
must is used only to describe unavoidable situations.

The use of the word will is deprecated and shall not be used when stating mandatory requirements; will is
only used in statements of fact.

The word should is used to indicate that among several possibilities one is recommended as particularly
suitable, without mentioning or excluding others; or that a certain course of action is preferred but not
necessarily required; or that (in the negative form) a certain course of action is deprecated but not
prohibited (should equals is recommended that).

The word may is used to indicate a course of action permissible within the limits of the standard (may
equals is permitted).

The word can is used for statements of possibility and capability, whether material, physical, or causal
(can equals is able to).
V1.0.0

The term Reserved for Future Use (RFU) is used to indicate Bluetooth SIG assigned values that are
reserved by the Bluetooth SIG and are not otherwise available for use by implementations.

Bluetooth SIG Proprietary Page 4 of 29


Environmental Sensing Service
Bluetooth Service Specification

Contents
1 Introduction .......................................................................................................................................... 6
1.1 Conformance .................................................................................................................................. 6
1.2 Service Dependencies .................................................................................................................... 6
1.3 Bluetooth Core Specification Release Compatibility ...................................................................... 6
1.4 GATT Sub-Procedure Requirements ............................................................................................. 7
1.5 Transport Dependencies ................................................................................................................ 7
1.6 Application Error Codes .................................................................................................................. 7
1.7 Byte Transmission Order ................................................................................................................ 8
2 Service Declaration.............................................................................................................................. 9
3 Service Characteristics ..................................................................................................................... 10
3.1 ESS Characteristics ...................................................................................................................... 10
3.1.1 ESS Characteristic Behavior ................................................................................................... 11
3.1.2 Characteristic Descriptors ....................................................................................................... 11
3.1.2.1 ES Measurement Descriptor .......................................................................................... 12
3.1.2.2 ES Trigger Setting Descriptor ........................................................................................ 17
3.1.2.3 ES Configuration Descriptor........................................................................................... 18
3.1.2.4 Characteristic User Description...................................................................................... 20
V1.0.0

3.1.2.5 Valid Range Descriptor .................................................................................................. 21


3.2 Descriptor Value Changed Characteristic .................................................................................... 21
3.2.1 Descriptor Value Changed Characteristic Behavior ................................................................ 22
3.2.1.1 Flags Field ...................................................................................................................... 23
3.2.1.2 Characteristic UUID Field............................................................................................... 23
3.3 Requirements for Time-Sensitive Data......................................................................................... 24
4 SDP Interoperability........................................................................................................................... 25
5 Acronyms and Abbreviations ........................................................................................................... 26
6 References .......................................................................................................................................... 27
Appendix 1 – Example of Use (INFORMATIVE) ..................................................................................... 28

Bluetooth SIG Proprietary Page 5 of 29


Environmental Sensing Service
Bluetooth Service Specification

1 Introduction
The Environmental Sensing Service (ESS) exposes measurement data from an environmental sensor
intended for sports and fitness applications. A wide range of environmental parameters is supported.

The ESS uses a family of characteristics, one characteristic for each type of environmental measurement.
The UUID of the characteristic identifies the environmental parameter that is being measured, as
described in Section 3.1. The service may expose one or more such Environmental Sensing Service
characteristics, referred to generically from now on as “ESS Characteristics”.

Optionally, additional information describing the measurement contained in each ESS Characteristic is
made available to the Client through one or more additional characteristic descriptors:

I. an Environmental Sensing (ES) Measurement descriptor ;


II. one or more ES Trigger Setting descriptors;
III. an ES Configuration descriptor;
IV. a Characteristic User Description descriptor;
V. a Valid Range descriptor.
The behavior of these characteristic descriptors is described in Section 3.1.2.

The full set of ESS Characteristics that may be discovered is listed online in the Environmental Sensing
V1.0.0

Service Characteristics table for this specification [2]. The list may be updated whenever support for
additional environmental parameters is required by adding further ESS Characteristics to those defined
there. To request ESS Characteristics to be added to this table to support new or future ESS applications,
please contact the Sports and Fitness WG ([email protected]). Since all ESS Characteristics are
required to have identical behavioral options, extending the types of environmental parameters in this way
does not require any change to be made to this service specification.

1.1 Conformance
If a device claims conformance to this service, all capabilities indicated as mandatory for this service shall
be supported in the specified manner (process-mandatory). This also applies for all optional and
conditional capabilities for which support is indicated. All mandatory capabilities, and optional and
conditional capabilities for which support is indicated, are subject to verification as part of the Bluetooth
qualification program.

1.2 Service Dependencies


This service is not dependent upon any other services.

1.3 Bluetooth Core Specification Release Compatibility


This specification is compatible with any of the following:

• Bluetooth Core Specification 4.0 with CSA2, CSA3 and CSA4 [1].

• A Bluetooth Core Specification later than 4.0.

Bluetooth SIG Proprietary Page 6 of 29


Environmental Sensing Service
Bluetooth Service Specification

1.4 GATT Sub-Procedure Requirements


Requirements in this section represent a minimum set of requirements for a Server. Other GATT sub-
procedures may be used if supported by both Client and Server.

Table 1.1 summarizes additional GATT sub-procedure requirements beyond those required by all GATT
Servers.

GATT Sub-Procedure Requirements


Notifications C.1
Indications C.2
Read Characteristic Descriptors M
Read Long Characteristic Descriptors C.3
Write Characteristic Descriptors C.4
Write Long Characteristic Descriptors C.5
Table 1.1: GATT Sub-procedure Requirements

C.1: Mandatory if the Server supports the ES Trigger Setting descriptor; excluded otherwise.
C.2: Mandatory if the Descriptor Value Changed characteristic is supported; optional otherwise.
C.3: Mandatory if the Server supports reading a Characteristic User Description descriptor string length that exceeds
the capacity of the default ATT_MTU; optional otherwise.
V1.0.0

C.4: Mandatory if the Server supports the Descriptor Value Changed characteristic or notification of the ESS
Characteristic or writing to the Characteristic User Description descriptor, ES Trigger Setting descriptor or ES
Configuration descriptor; optional otherwise.
C.5: Mandatory if the Server supports writing a Characteristic User Description descriptor string length that exceeds
the capacity of the default ATT_MTU; optional otherwise.

1.5 Transport Dependencies


There are no transport restrictions imposed by this service specification.

The term BR/EDR used throughout this document also includes the optional use of AMP.

1.6 Application Error Codes


This service defines the following Attribute Protocol Application Error code:

Name Error Description


Code
Write Request Rejected 0x80 An attempt was made to write a value to the descriptor that is
invalid or not supported by this Server.
Condition not supported 0x81 An attempt was made to write a value to the Condition field of
the ES Trigger Setting descriptor that is invalid or not
supported by this Server.
Table 1.2: Attribute Protocol Application Error code defined by this service

Bluetooth SIG Proprietary Page 7 of 29


Environmental Sensing Service
Bluetooth Service Specification

1.7 Byte Transmission Order


All characteristics used with this service shall be transmitted with the least significant octet first (i.e., little
endian). The least significant octet is identified in the characteristic definitions in [2].
V1.0.0

Bluetooth SIG Proprietary Page 8 of 29


Environmental Sensing Service
Bluetooth Service Specification

2 Service Declaration
The Environmental Sensing Service is recommended to be instantiated as a «Primary Service».

The service UUID shall be set to «Environmental Sensing» as defined in [2].


V1.0.0

Bluetooth SIG Proprietary Page 9 of 29


Environmental Sensing Service
Bluetooth Service Specification

3 Service Characteristics
The characteristics that may be exposed in the Environmental Sensing Service comprise a family of
characteristics all having the same general structure, each of which shall meet the description of “ESS
Characteristic” given in Table 3.1.

The generic term “ESS Characteristic” means any of the characteristics that are listed in the
Environmental Sensing Service Characteristics table published in [2].

Each type of environmental measurement supported has a characteristic assigned to it. The service may
expose more than one instance of the same ESS Characteristic subject to compliance with the conditions
specified in Section 3.1.

Where a characteristic can be notified, a Client Characteristic Configuration descriptor shall be included in
that characteristic as required by the Bluetooth Core Specification [1].

Characteristic Requirement Mandatory Optional Security


Properties Properties Permissions
ESS Characteristic C.1 Read Notify, None
Extended
Properties
Descriptor Value C.2, C.3 Indicate None
V1.0.0

Changed
Table 3.1: Requirements for each ESS Characteristic

C.1: At least one ESS Characteristic shall be exposed.


C.2: Mandatory if at least one of the following descriptors can be changed by the Server for at least one ESS
Characteristic: ES Measurement, ES Trigger Setting, ES Configuration, Characteristic User Description.
C.3: Mandatory if the Write property is supported for the Characteristic User Description descriptor.
Notes:
1. Properties not listed as Mandatory or Optional are excluded for this version of the service.
2. Security Permissions of “None” means that this version of the service does not impose any requirement.
An example illustrating a typical use of the characteristics and the optional characteristic descriptors used
by this service has been included in Appendix 1.

3.1 ESS Characteristics


The Server shall expose at least one ESS Characteristic.

Each ESS Characteristic is defined in the Environmental Sensing Service Characteristics table in [2].

The Server may expose multiple instances of the same ESS Characteristic (i.e., characteristics with the
same UUID) provided that each instance has an ES Measurement descriptor (see Section 3.1.2.1) and
each ES Measurement descriptor has a unique value to allow the instances to be differentiated by the
Client. This allows a sensor to report its readings in more than one way. For example, a temperature
sensor may provide both instantaneous and daily average readings. In this example, the instantaneous
and average measurements are identified by the ES Measurement descriptor associated with each

Bluetooth SIG Proprietary Page 10 of 29


Environmental Sensing Service
Bluetooth Service Specification

instance of the ESS Characteristic so the Client can discriminate between the characteristic for average
temperature and instantaneous temperature.

3.1.1 ESS Characteristic Behavior


All ESS Characteristics have identical behavioral options as described in this sub-section.

If notification is supported and the ESS Characteristic is configured for notification via the Client
Characteristic Configuration descriptor and a measurement is available, the characteristic may be notified
while in a connection.

However, if the Server supports notifications and they have been enabled, notifications shall be sent only
in accordance with the trigger conditions specified by the value of the ES Trigger Setting descriptor(s) for
the associated ESS Characteristic as described in Section 3.1.2.2.

The ESS Characteristic contains time-sensitive data, thus the requirements for time-sensitive data and
data storage defined in Section 3.3 apply. The Server may attempt to notify a triggered ESS
Characteristic multiple times and at a period that it defines, as long as the requirements in Section 3.3 are
met.

3.1.2 Characteristic Descriptors


With the exception of the ES Trigger Setting descriptor, there shall be no more than one instance of each
descriptor associated with each instance of an ESS Characteristic.
V1.0.0

All descriptor values shall be persistent for bonded Clients, however, if an ESS-related descriptor value
(i.e., a descriptor other than the Client Characteristic Configuration descriptor) is changed by a device
other than the Client itself, the Descriptor Value Changed characteristic shall be used to alert all affected
Client(s). See Section 3.2 for requirements related to this characteristic.

The service has the characteristic descriptor requirements defined in the following table.

Bluetooth SIG Proprietary Page 11 of 29


Environmental Sensing Service
Bluetooth Service Specification

Characteristic Requirement Mandatory Optional Security Permissions


Descriptor Permissions Permissions (Note 2)
(Note 1) (Note 1)
ES Measurement
C.1 Read None None
(See 3.1.2.1)
ES Trigger
Write (C.4) Write: with
Setting C.2 Read
(Note 3) Authorization
(See 3.1.2.2)
ES Configuration Write (C.4) Write: with
C.3 Read
(See 3.1.2.3) (Note 3) Authorization
Characteristic Read: None
Write
User Description O Read Write: with
(Note 4)
(See 3.1.2.4) Authentication
Valid Range
O Read None None
(See 3.1.2.5)
Table 3.2: Environmental Sensing Service Characteristic Descriptors

C.1: Mandatory if multiple instances of an ESS Characteristic with same UUID are supported; optional otherwise.
C.2: Mandatory if notifications are supported; excluded otherwise.
C.3: Mandatory if multiple ES Trigger Setting descriptors are supported; excluded otherwise.
C.4: If the Write permission is supported, it shall be supported for all ES Trigger Setting descriptors and the ES
V1.0.0

Configuration descriptor (if present).


Notes:
1. Permissions not listed as Mandatory or Optional are excluded for this service.
2. Security Permissions of “None” means that this service does not impose any requirement.
3. If Write is supported, bonding is mandatory as described in Section 3.1.2.3.1.
4. Refer to Section 3.1.2.4.1 for details on the use of this descriptor.

3.1.2.1 ES Measurement Descriptor


This optional characteristic descriptor describes the associated ESS Characteristic by providing additional
information pertaining to the value.

The descriptor UUID shall be set to «ES Measurement» as defined in [2].

The definition of the ES Measurement descriptor is shown in Table 3.3.

Bluetooth SIG Proprietary Page 12 of 29


Environmental Sensing Service
Bluetooth Service Specification

Exponent Field
Field Name Format Octets Exponent Unit Resolution
Base Requirement
Flags 16bit 2 N/A N/A unitless Bitfield M
Enumeration
Sampling
UINT8 1 N/A N/A unitless (refer to listing M
Function
below)
Measurement UINT2
3 10 0 second 1 second M
Period 4
Update UINT2
3 10 0 second 1 second M
Interval 4
Enumeration
Application UINT8 1 N/A N/A unitless (refer to listing M
below)
Measurement
UINT8 1 2 -1 percentage 0.5 percent M
Uncertainty
Table 3.3: ES Measurement Descriptor - Structure

The fields in Table 3.3, reading from top to bottom, are shown in the order of LSO to MSO, where LSO =
Least Significant Octet and MSO = Most Significant Octet. For the case of the 16bit bit field, the Least
Significant Octet represents the eight bits numbered 0 to 7.
V1.0.0

3.1.2.1.1 Fields
The ES Measurement descriptor contains the following fields.

3.1.2.1.1.1 Flags

This is a bit field. The flags have been included to support future extensions. In the current version of this
specification, all of the bits are reserved for future use.

Reserved for Future Use (RFU) bits in the Flags fields shall be set to 0.

Bit Definition
0-15 Reserved for Future Use
Table 3.4: ES Measurement Descriptor - Flags

3.1.2.1.1.2 Sampling Function

This field specifies the averaging operation or type of sampling function applying to the value of the ESS
characteristic. For example, this field of the descriptor can identify whether the measurement provided by
the Server is an arithmetic mean value or an instantaneous value. The assigned numbers for this field are
enumerated in Table 3.5.

For cases in which the sampling function is not made available, a special number has been assigned
indicating ‘Unspecified’.

Bluetooth SIG Proprietary Page 13 of 29


Environmental Sensing Service
Bluetooth Service Specification

Value and Description


0x00: Unspecified
0x01: Instantaneous
0x02: Arithmetic Mean
0x03: RMS
0x04: Maximum
0x05: Minimum
0x06: Accumulated
0x07: Count
0x08-0xFF: Reserved for future use
Table 3.5: ES Measurement Descriptor – Sampling Functions

3.1.2.1.1.3 Measurement Period

This field specifies the averaging time span, accumulation time, or measurement period in seconds over
which the measurement is taken. For example, it can specify the length of the period used to obtain an
average reading.

For those cases where a value for the measurement period is not available or not applicable, a special
number has been assigned indicating ‘Not in use’.

Value and Description


V1.0.0

0x000000: Not in use.


0x000001-0xFFFFFF: Time period in seconds
Table 3.6: ES Measurement Descriptor – Measurement Period

3.1.2.1.1.4 Internal Update Interval

The value of the ESS characteristic shall be internally refreshed by the Server at the frequency indicated
in the Internal Update Interval field; for example, a temperature value that is internally updated every 15
minutes. This field allows the Client to determine the interval (in seconds) between updates.

For those cases where a value for the Internal Update Interval is not available or not applicable, a special
number has been assigned indicating ‘Not in use’.

Value and Description


0x000000: Not in use.
0x000001-0xFFFFFF: Time period in seconds
Table 3.7: ES Measurement Descriptor – Internal Update Interval

Note that this interval may be shorter than the Measurement Period if, for example, multiple averaging
periods are overlapped providing a rolling average. This is illustrated in Figure 3.1. A practical example is
described below:

A true wind speed sensor constantly tracks the average wind speed. The sensor makes a new average
available to the client every 15 minutes (i.e., the Internal Update Interval is 900 seconds). However, the
sensor uses an entire hour’s worth of wind speed measurement data to calculate the average value so

Bluetooth SIG Proprietary Page 14 of 29


Environmental Sensing Service
Bluetooth Service Specification

the Measurement Period is 3600 seconds. This is a rolling average with the averaging window moving
forward by 900 seconds at each update.

Period 3
Data being collected

Measurement Period
etc.

Period 2
Data being collected

Measurement Period

Period 1
Data being collected

Measurement Period TUPDATE= Internal


Update Interval

TUPDATE TUPDATE TUPDATE


etc.
V1.0.0

The Server calculates the


average value for Period 3

The Server calculates the


average value for Period 2
Start collecting
measurements The Server calculates the
average value for Period 1

TIME

Figure 3.1: Example showing the relationship between Internal Update Interval and Measurement Period

3.1.2.1.1.5 Application

This field specifies the intended application for which the ESS Characteristic is designed to be used (e.g.,
to differentiate between air pressure versus water pressure or soil temperature versus air temperature).
The assigned numbers for this field are enumerated in Table 3.8.

For those cases where the application is not defined, a special number has been assigned indicating
‘Unspecified’.

Bluetooth SIG Proprietary Page 15 of 29


Environmental Sensing Service
Bluetooth Service Specification

Value and Description


0x00: Unspecified
0x01: Air
0x02: Water
0x03: Barometric
0x04: Soil
0x05: Infrared
0x06: Map Database
0x07: Barometric Elevation Source
0x08: GPS only Elevation Source
0x09: GPS and Map database Elevation Source
0x0A: Vertical datum Elevation Source
0x0B: Onshore
0x0C: Onboard vessel or vehicle
0x0D: Front
0x0E: Back/Rear
0x0F: Upper
0x10: Lower
0x11: Primary
0x12: Secondary
0x13: Outdoor
0x14: Indoor
V1.0.0

0x15: Top
0x16: Bottom
0x17: Main
0x18: Backup
0x19: Auxiliary
0x1A: Supplementary
0x1B: Inside
0x1C: Outside
0x1D: Left
0x1E: Right
0x1F: Internal
0x20: External
0x21: Solar
0x22-0xFF: Reserved for future use
Table 3.8: ES Measurement Descriptor - Applications

3.1.2.1.1.6 Measurement Uncertainty

This field shows the measurement uncertainty of the data provided over the supported range in the value
of the ESS characteristic, expressed as a percentage as defined in Table 3.9.

Where this value includes random contributions to the measurement uncertainty, this assumes a level of
confidence of 95 percent, using a coverage factor as described in National Institute of Standards and
Technology (NIST) Technical Note 1297 [4].

Bluetooth SIG Proprietary Page 16 of 29


Environmental Sensing Service
Bluetooth Service Specification

For those cases where no measurement uncertainty information is available, a special number has been
assigned indicating ‘Information not available’.

In addition, the Valid Range descriptor (see Section 3.1.2.5) may be used to specify upper and lower
bounds (inclusive) for the range to which the declared measurement uncertainty applies.

Value and Description


0x00 – 0xFE: The maximum error from the actual value, expressed as a percentage of the reported
value.
0xFF: Information not available.
Table 3.9: ES Measurement Descriptor – Measurement Uncertainty

3.1.2.1.2 ES Measurement Descriptor Behavior


If the value of the ES Measurement descriptor changes, the Descriptor Value Changed characteristic
shall be indicated as described in Section 3.2.

3.1.2.2 ES Trigger Setting Descriptor


The value of this optional descriptor has two parts: a Condition field and an Operand field. Depending on
the Condition, the Operand field may contain a comparison value with which the relevant characteristic
value is to be compared. The format of the descriptor and the trigger conditions are defined in Table 3.11.

If the Server supports notifications of an ESS Characteristic, it shall expose one or more ES Trigger
V1.0.0

Setting descriptors relating to that ESS Characteristic with no more than three instances of ES Trigger
Setting descriptors permitted per instance of an ESS Characteristic. Otherwise, ES Trigger Setting
descriptors shall not be present for that characteristic.

Requirements associated with multiple instances of the ES Trigger Setting descriptor when associated
with an instance of an ESS Characteristic are described in Section 3.1.2.3.1.

The descriptor UUID shall be set to «ES Trigger Setting» as defined in [2].

The definition of the ES Trigger Setting descriptor is shown in Table 3.10:

LSO MSO
Condition Operand
Octet Order N/A LSO … MSO
Format type UINT8 (Variable - defined per condition)
0 to n octets
Size 1 octet
(defined per condition)
Table 3.10: ES Trigger Setting Descriptor - Structure

The format of the Operand field depends on the Condition value.

The conditions that can be set are enumerated in Table 3.11.

Bluetooth SIG Proprietary Page 17 of 29


Environmental Sensing Service
Bluetooth Service Specification

Condition Condition to trigger data Operand


Value transmission
(Note 1) Format Type Units
0x00 Trigger inactive N/A N/A
0x01 Use a fixed time interval between UINT24 seconds
transmissions
0x02 No less than the specified time between UINT24 seconds
transmissions
0x03 When value changes compared to N/A N/A
previous value
0x04 While less than the specified value Variable - Note 2 Variable - Note 2
0x05 While less than or equal to the specified Variable - Note 2 Variable - Note 2
value
0x06 While greater than the specified value Variable - Note 2 Variable - Note 2
0x07 While greater than or equal to the Variable - Note 2 Variable - Note 2
specified value
0x08 While equal to the specified value Variable - Note 2 Variable - Note 2
0x09 While not equal to the specified value Variable - Note 2 Variable - Note 2
0x0A-0xFF Reserved for future use
V1.0.0

Table 3.11: ES Trigger Setting Descriptor - Conditions

Note 1: The conditions listed in this column refer to the value of the relevant characteristic with which the descriptor is
associated. Note that some conditions are not valid with some ESS Characteristics (e.g. conditions 0x04 – 0x07 are
not valid for enumerations such as Barometric Pressure Trend or ESS Characteristics that hold multiple values such
as Magnetic Flux Density - 2D or Magnetic Flux Density - 3D).
Note 2: When the Condition is not a time-based condition, the format of any Operand depends on the format of the
characteristic to which it applies; the Operand will have the same format, exponent, resolution, and units as the
referenced characteristic value.

3.1.2.2.1 ES Trigger Setting Descriptor Behavior


Since the ES Trigger Setting descriptor and the ES Configuration descriptor work together to define a
singular behavior, this behavior is defined together in Section 3.1.2.3.1.

3.1.2.3 ES Configuration Descriptor


The ES Configuration descriptor shall be present if more than one ES Trigger Setting descriptor is
present for an associated ESS Characteristic. Otherwise it shall not be present for that characteristic.

The ES Configuration descriptor exposes information about the configuration of the Server. The value of
the Trigger Logic field indicates whether a logical AND or logical OR Boolean operator shall be used to
combine the conditions of multiple ES Trigger Setting descriptors, as described in Section 3.1.2.3.1.

The descriptor UUID shall be set to «ES Configuration» as defined in [2].

The definition of the ES Configuration descriptor is shown Table 3.12:

Bluetooth SIG Proprietary Page 18 of 29


Environmental Sensing Service
Bluetooth Service Specification

Field Trigger Logic


Octet Order N/A
Format type UINT8
Size 1 octet
Table 3.12: ES Configuration Descriptor - Structure

The Trigger Logic field is an enumeration. The meaning of each value is as follows:

Trigger Logic Value


0x00: Boolean AND
0x01: Boolean OR
0x02-0xFF: Reserved for future use
Table 3.13: ES Configuration Descriptor – Trigger Logic

3.1.2.3.1 ES Trigger Setting Descriptor and ES Configuration Descriptor Behavior


Where multiple ES Trigger Setting descriptors are present for a given ESS Characteristic, the ES Trigger
Setting descriptor and the ES Configuration descriptor work together to define the conditions under which
the associated ESS Characteristic value can be notified. As such, this combined behavior is defined
together in the same section.
V1.0.0

If more than one ES Trigger Setting descriptor is associated with an instance of the ESS Characteristic,
the relevant Boolean operation (i.e., either a logical AND or a logical OR operation) shall be configured by
using the Trigger Logic field of the ES Configuration descriptor described in Section 3.1.2.3.

The ES Trigger Setting descriptors of each ESS Characteristic share one common Boolean operator
relating to that characteristic; therefore, it is not possible for the Boolean operators to be mixed within the
trigger conditions for an ESS Characteristic.

If the ES Trigger Setting descriptor is writable, an ES Configuration descriptor, if present, shall also be
writable. Conversely, when the ES Trigger Setting descriptor is read-only, an ES Configuration descriptor,
if present, shall also be read-only.

Bonding is mandatory if the ES Trigger Setting descriptor and ES Configuration descriptors are writable
by the Client. Therefore, writing to the ES Trigger Setting and ES Configuration descriptors shall be
subject to authorization as follows: If the Client is a bonded Client and these descriptors are writable, the
Client shall be granted authorization to write to these descriptors. A Server shall not grant authorization to
unbonded Clients. If the descriptors are writable and an unbonded (i.e., unauthorized) Client attempts to
write to any of these descriptors, the Server shall respond with the ATT Error Response “Insufficient
Authorization”.

If the Server allows the Client to control the conditions under which data is notified (i.e., the ES Trigger
Setting descriptor and ES Configuration descriptor, if present, are writable by the Client), it shall allow
separate control for each bonded Client and therefore shall retain a separate value of these descriptors
per bond.

Bluetooth SIG Proprietary Page 19 of 29


Environmental Sensing Service
Bluetooth Service Specification

Either the ES Configuration descriptor and all of the ES Trigger Setting descriptors associated with an
ESS Characteristic shall be writable or all shall be read-only.

In the case where the Server controls the conditions under which data is notified (i.e., the ES Trigger
Setting descriptor is either not writable or not yet initialized by the Client), the Server shall set values in
any ES Trigger Setting descriptors and the ES Configuration descriptor (if present) to enable a Client to
read the notification conditions. If the value of the ES Trigger Setting or ES Configuration descriptors
change at the Server, the Descriptor Value Changed characteristic shall be indicated as described in
Section 3.2.

Note that when a Server is configured to notify data at time intervals (either by itself or by a Client), it
does so on a ‘best effort’ basis and there are no guarantees on the accuracy of time by the Server.

If the value of an ES Trigger Setting descriptor is set to “Trigger inactive”, this effectively disables that
specific ES Trigger Setting descriptor. If there are multiple ES Trigger Setting descriptors and each is set
to “Trigger inactive”, no notifications are possible and the value of the ESS Characteristic can only be
read by the Client. In the case that multiple instances of the ES Trigger Setting descriptor are associated
with an ESS Characteristic and the value of any of those ES Trigger Setting descriptor(s) is “Trigger
inactive”, the trigger conditions shall be determined as if that particular ES Trigger Setting descriptor did
not exist.

If the ES Trigger Setting descriptor and ES configuration descriptor are writable, the Server shall support
all defined trigger conditions and shall support both AND and OR operations respectively. This is to avoid
interoperability issues with Clients requiring specific functionality.
V1.0.0

If the ES Trigger Setting descriptor is writable and a Client attempts to write a Condition Value that is
RFU, the Server shall respond with the Condition not supported Error Code defined in Section 1.6 and
the value of the descriptor shall not be changed.

If the ES Configuration descriptor is writable and a Client attempts to write a value that is RFU, the Server
shall respond with the Write Request Rejected Error Code defined in Section 1.6 and the value of the
descriptor shall not be changed.

If the Client attempts to write an Operand to the ES Trigger Setting descriptor that is outside of the
operating range of the Server (refer to Section 3.1.2.5) or otherwise improperly formatted, the Server shall
respond with the Out of Range Error Code defined in [3] and the value of the descriptor shall not be
changed.

If the Client attempts to write a Fixed Time Interval that is lower than the supported Update Interval of the
Server, the Server may either attempt to send updates on a best effort basis or respond with the Write
Request Rejected Error Code.

3.1.2.4 Characteristic User Description


This optional descriptor can be used to associate a verbose name with a specific ESS characteristic to
allow a human-readable label to be associated with the measurement. This descriptor allows a textual
description to be written as a UTF-8 string of variable size. The text may be defined by the user or by the
manufacturer, depending on the implementation. If it is writable, it enables an authenticated Client to write
a new value to this descriptor during a connection.

Bluetooth SIG Proprietary Page 20 of 29


Environmental Sensing Service
Bluetooth Service Specification

If this descriptor is supported, the user description of the ESS characteristic is global and the Server must
make the same value available to all Clients.

If this descriptor is supported, the Server should support string lengths greater than 20 octets.

3.1.2.4.1 Characteristic User Description Descriptor Behavior


In order for writes to the Characteristic User Description descriptor to be enabled, the Bluetooth Core
Specification [1] requires that the associated characteristic has the Extended Properties property, the
Characteristic Extended Properties descriptor is present, and the Writable Auxiliaries bit of Characteristic
Extended Properties descriptor is set to 1.

If the Characteristic User Description descriptor changes, the Descriptor Value Changed characteristic
shall be indicated as described in Section 3.2.

The rest of this sub-section applies only when the Characteristic User Description descriptor is writable.

The Server shall permit only an authenticated Client to write a new value to the Characteristic User
Description. If pairing has not occurred or only an unauthenticated pairing has occurred, the service
request must be rejected with the ATT error code Insufficient Authentication specified in the Bluetooth
Core Specification [1].

The Server may also choose to reject a write request to the Characteristic User Description if it
determines that the contents of the new value are unsuitable, such as a string containing characters in a
language that the implementation does not support. The criteria by which a requested value may be
V1.0.0

determined to be unsuitable are left to the implementation. The Server may reject such a write request by
responding with the Write Request Rejected Error Code defined in Section 1.6 and the value of the
descriptor shall not be changed.

3.1.2.5 Valid Range Descriptor


The Valid Range descriptor defined in [2] is an optional descriptor that allows a Client to read the upper
and lower bounds (inclusive) of an associated ESS characteristic value that are supported by the Server.
The Server should include the Valid Range descriptor to allow the Client to customize its User Interface
and to avoid Out of Range error responses.

The descriptor UUID shall be set to «Valid Range» as defined in [2].

3.1.2.5.1 Valid Range Descriptor Behavior


The value of the Valid Range descriptor shall be static for the lifetime of the device (either permanently or
until Service Changed is indicated).

3.2 Descriptor Value Changed Characteristic


The Descriptor Value Changed characteristic defined in Table 3.14 is mandatory if any of the following
descriptors can be changed by the Server: ES Measurement, ES Trigger Setting, ES Configuration, or
Characteristic User Description. It is also mandatory if the Server supports the write property for the
Characteristic User Description descriptor.

This enables a Server to alert bonded Clients that the value of one or more ESS-related descriptors for a
given ESS Characteristic have changed and need to be re-read. Included in the characteristic value are a

Bluetooth SIG Proprietary Page 21 of 29


Environmental Sensing Service
Bluetooth Service Specification

Flags field (for showing the source of the change and the affected descriptors) and a Characteristic UUID
field to show which ESS characteristic is affected.

The characteristic UUID shall be set to «Descriptor Value Changed» as defined in [2].

The structure of the Descriptor Value Changed characteristic is defined in Table 3.14:

LSO MSO
Flags Characteristic UUID
Octet Order N/A LSO...MSO
Format type 16bit gatt_uuid
Size 2 octets 2 or 16 octets
Units Unitless Unitless
Table 3.14: Descriptor Value Changed Characteristic - Structure

3.2.1 Descriptor Value Changed Characteristic Behavior


When the Descriptor Value Changed characteristic is configured for indications via the Client
Characteristic Configuration descriptor, the following requirements apply:

For Clients that have a trusted relationship (i.e., bond) with the Server, the attribute cache is valid across
connections. For Clients with a trusted relationship and not in a connection when a value change to a
V1.0.0

relevant descriptor occurs, the Server shall send an indication of the Descriptor Value Changed
characteristic to the Client when it next reconnects to the Server. For Clients with a trusted relationship
that are connected when a value change to a relevant descriptor occurs, the Server shall send an
indication of the Descriptor Value Changed characteristic to the Client. For Clients that do not have a
trusted relationship with the Server, the attribute cache is valid only during the connection. Clients without
a trusted relationship shall receive an indication when the relevant descriptor change occurs only during
the current connection.

A new value becomes available when a descriptor value is changed by either a Client or at the Server
itself (e.g., via the Server UI). Table 3.15 summarizes the required behavior depending on which
descriptor changed and by which device:

Descriptor Value That Was Change Occurred at Server Change Occurred at Other
Changed (Bit 0 of Flags = 0) Client
(Bit 0 of Flags = 1)
ES Trigger Setting and/or Indicate DVC to affected Client N/A
ES Configuration
ES Measurement Indicate DVC to all Clients N/A
Characteristic User Description Indicate DVC to all Clients Indicate DVC to Clients other
than the Client which made the
change.
Table 3.15: Descriptor Value Changed Characteristic - Behavior

Bluetooth SIG Proprietary Page 22 of 29


Environmental Sensing Service
Bluetooth Service Specification

Note that if a value change to a descriptor was made by a Client, the Server shall not send the DVC
indication to the Client that made the change.

When multiple changes are made to descriptors of a single ESS Characteristic, it is recommended to
combine these changes, where possible, by setting multiple bits in a single indication of the Descriptor
Value Changed characteristic. However, if some changes require a different Source of Change value,
these will need to be sent in separate indications.

In some cases, such as when changes are made to descriptors of multiple ESS Characteristics, multiple
indications will also be required.

3.2.1.1 Flags Field


The Flags field shall be included in the Descriptor Value Changed characteristic.

Reserved for Future Use (RFU) bits in the Flags fields shall be set to 0.

The bits of the Flags field and their function are shown in Table 3.16.

Bit Definition
0 Source of Change
0: Server
1: Client
1 Change to one or more ES Trigger Setting Descriptors
V1.0.0

0: False
1: True
2 Change to ES Configuration Descriptor
0: False
1: True
3 Change to ES Measurement Descriptor
0: False
1: True
4 Change to Characteristic User Description Descriptor
0: False
1: True
5-15 Reserved for Future Use
Table 3.16: Descriptor Value Changed Characteristic - Flags

Bit 0 (Source of Change) shall be set according to which device made the change. This allows the Client
to inform the user about the source of change.

Bits 1 to 5 shall be set according to which descriptor(s) were changed. In cases were multiple descriptors
have changed, multiple bits may be set.

3.2.1.2 Characteristic UUID Field


The Characteristic UUID field shall be included in the Descriptor Value Changed characteristic.

The Characteristic UUID field shall be set to the value of the UUID for the affected ESS Characteristic.

Bluetooth SIG Proprietary Page 23 of 29


Environmental Sensing Service
Bluetooth Service Specification

3.3 Requirements for Time-Sensitive Data


ESS Characteristics have been identified as being time-sensitive characteristics and the following
requirements apply:

The Server shall only make the most recent ESS Characteristic value available (i.e., via read or
notifications) and shall not buffer and make older measurements available as this might adversely impact
the user experience.

If a notification attempt is in progress when a new measurement value becomes available that no longer
fulfills the trigger condition, the old value shall be discarded and the Server shall no longer attempt to
notify the characteristic.

Implementations should take into account that, since it is mandatory for all ESS Characteristics to
possess the Read property, an ESS Characteristic value may be read at an unknown time after the value
was last refreshed.
V1.0.0

Bluetooth SIG Proprietary Page 24 of 29


Environmental Sensing Service
Bluetooth Service Specification

4 SDP Interoperability
If this service is exposed over BR/EDR, then it shall have the following SDP record.

Item Definition Type Value Status


Service Class ID
M
List
Service Class #0 UUID «Environmental Sensing Service» M
Protocol Descriptor
M
List
Protocol #0 UUID L2CAP M
Parameter #0 for
PSM Uint16 PSM = ATT M
Protocol #0
Protocol #1 UUID ATT M
Parameter #0 for GATT Start First handle of this service in the
Uint16 M
Protocol #1 Handle GATT database
Parameter #1 for GATT End Last handle of this service in the
Uint16 M
Protocol #1 Handle GATT database
V1.0.0

BrowseGroupList PublicBrowseRoot* M

Table 4.1: SDP Record

* PublicBrowseRoot shall be present; however, other browse UUIDs may also be included in the list.

Bluetooth SIG Proprietary Page 25 of 29


Environmental Sensing Service
Bluetooth Service Specification

5 Acronyms and Abbreviations

Abbreviation or Acronym Meaning


AMP Alternate MAC PHY
ATT Attribute Protocol
BR/EDR Basic Rate / Enhanced Data Rate
ES Environmental Sensing
ESS Environmental Sensing Service
GAP Generic Access Profile
GATT Generic Attribute Profile
LE Low Energy
RFU Reserved for Future Use
SDP Service Discovery Protocol
UI User Interface
UUID Universally Unique Identifier
V1.0.0

Table 5.1: Example Abbreviations and Acronyms

Bluetooth SIG Proprietary Page 26 of 29


Environmental Sensing Service
Bluetooth Service Specification

6 References
[1] Bluetooth Core Specification v4.0 with CSA4 or later version of the Core Specification.
[2] Characteristic and Descriptor descriptions are accessible via the Bluetooth SIG Assigned Numbers.
[3] Supplement to the Bluetooth Core Specification (CSS), Version 3 or later.
[4] National Institute of Standards and Technology Technical Note 1297
V1.0.0

Bluetooth SIG Proprietary Page 27 of 29


Environmental Sensing Service
Bluetooth Service Specification

– Example of Use (INFORMATIVE)


The following example illustrates how the optional descriptors can be used with an ESS Characteristic to
enrich the user experience.

The diagram in Figure A.1 shows an Environmental Sensing Server that is able to report the True Wind
Speed. This may be one of several environmental measurements supported by this Server.

The current true wind speed value is 14.25 m/s.

The Server is also exposing an ES Measurement Descriptor associated with the True Wind Speed
Characteristic and this provides supplementary information: The true wind speed value being reported is
the Maximum wind speed that was sampled during a Measurement Period of 1800 seconds. The
Measurement Period is a rolling window and the value reported is refreshed periodically. The Internal
Update Interval of 600 seconds tells the Client that a new value is calculated and made available by the
Server every 10 minutes. The claimed Measurement Uncertainty for the measurement data is ±12.5%.

The Server is also exposing a Characteristic User Description associated with the same ESS
Characteristic. This shows that the measurement source has been named “Airfield Anemometer No.1”
which enables the user to recognize which sensor the data is coming from easily.

For her application, the user wanted to get notifications of the wind speed only if there was at least a
reasonable breeze blowing so she configured an ES Trigger Setting descriptor to set a trigger when the
V1.0.0

value exceeds 2 m/s. Even when this condition is met, the user has determined that she needs to receive
notifications no more frequently than once every ten minutes so she has configured a second ES Trigger
Setting descriptor to send notifications with an interval of greater than or equal to 600 seconds between
transmissions which will help to minimize power consumption and extend battery life.

Since the user required notifications to be sent only while both of these trigger conditions were satisfied,
she has configured the Trigger Logic value of the ES Configuration Descriptor to specify that the trigger
conditions shall be combined using a Boolean AND operation.

The dashed characteristic boxes in the diagram illustrate that one Server may expose many ESS
Characteristics and each may have its own a set of descriptors associated with it. The service is scalable
- the minimum implementation would expose only the ESS Characteristic(s) without any of the optional
descriptors.

Bluetooth SIG Proprietary Page 28 of 29


Environmental Sensing Service
Bluetooth Service Specification

Environmental Sensing Client


Example values:
Environmental Sensing Server
Value:

14.25 m/s
ESS Characteristic
One of the family of ESS Characteristics
(e.g. <<True Wind Speed>>)

Descriptors

Sampling Function: Maximum


ES Measurement Descriptor Measurement Period: 1800 seconds
(one per ESS Characteristic) Interval: 600 seconds
Application: Air
Measurement Uncertainty: ±12.5%

Characteristic User Description Descriptor


“Airfield Anemometer No.1”
(one per ESS Characteristic)

Legend
ES Trigger Setting Descriptor Notify while the value exceeds 2 m/s

Characteristic (one to three per ESS Characteristic and


AND
per bond)
V1.0.0

Notify greater than or equal to 10 mins


Optional
Descriptor (600 seconds)
ES Configuration Descriptor
(one per ESS Characteristic
and per bond)

Figure A.1: Example of Environmental Sensing Service Use

Notes:
1. The Characteristic Extended Properties descriptor and the Client Characteristic Configuration descriptor are
covered by the GATT specification contained in [1] and have been omitted from the above diagram for clarity.
2. The optional Valid Range descriptor described in Section 3.1.2.5 has not been used in this example.

Bluetooth SIG Proprietary Page 29 of 29

You might also like