
© Copyright Sensirion AG, Switzerland
9/11
There is no official profile defined by Bluetooth SIG for Temperature/Humidity sensors and the profile described
here is proprietary. Besides transmitting the live values, the device always logs the sensor values and if needed,
historical data can be retrieved over Bluetooth Low Energy.
Device Behavior:
BLE Advertising: If the button is pressed long enough (>1s) the BLE Advertising is turned on. After
disconnection, the device enters again the advertising mode. The advertise packages are sent every two
seconds. To turn off BLE Advertising, the button has to be pressed again for more than 1s.
Connection parameters: After a connection is established, the device remains for a minute within the
initial connection speed (depending on the used device). If the logger download is not started at this
point, the device requests a slower connection interval (1 second) to save energy. If logged data is
requested, the device requests a faster connection interval again.
Logger: The logger is always running. The physical values are logged separately, whereas the available
memory is shared among them. If you change the logging interval, the memory gets cleared. To retrieve
the data, follow this procedure:
o
Subscribe for notification of the Value-Characteristics of the desired services (e.g. Humidity-
and/or Temperature-Characteristics)
o
Write your (host) current timestamp (64bit, milliseconds) into the SyncTimeMs characteristic.
o
Write or leave zero the OldestTimestampMs Characteristics. If left zero, all logged data is
retrieved. If set to a time between now (=SyncTimeMs) and zero, all available data between
these points in time is retrieved.
o
The host can retrieve the NewestTimestampMs, which contains the timestamp of the latest
logged value calculated back from the SyncTimeMs timestamp. This characteristic gets
updated only after the SyncTimeMs was written. The host can modify this value as well to
retrieve only a certain block of data in the past. After modification the value is adjusted to the
timestamp of the previous available measurement.
o
Write a non-zero value to StartLoggerDownload. The subscribed Value-Characteristics start
notifying the logged values in the following notification format:
i.
first four bytes: sequence number starting from 0 and increasing
ii.
next n*four bytes: logged float32 values where n can be between one and four
Every service’s LoggedValues Characteristic has its own increasing sequence number. They
can be distinguished by their unique handle number and the corresponding UUID.
Following is a simplified visualization of the device’s profile: