Omron 2JCIE-BL01, 2JCIE-BL01-P1 User Manual

Environment Sensor
Environment Sensor
User’s Manual
A278-E1-01
2JCIE-BL01
2JCIE-BL01 Environment Sensor User’s Manual (A278)
1
Table of Contents
1. Introduction ............................................................................................................................ 3
Scope ................................................................................................................................. 3 1.1.
Communication Interface ................................................................................................... 3
1.2.
Operation flow.................................................................................................................... 4
1.3.
1.3.1 With Data Recording mode ............................................................................................. 5
1.3.2 Without Data Recording mode ........................................................................................ 5
1.3.3 Flash memory for data recording ................................................................................... 6
2. GATT Services .......................................................................................................................... 7
Sensor Service (Service UUID: 0x3000) .............................................................................. 8 2.1.
2.1.1 Latest data (Characteristics UUID: 0x3001) ................................................................... 9
2.1.2 Latest page (Characteristics UUID: 0x3002) ................................................................. 10
2.1.3 Request page (Characteristics UUID: 0x3003) .............................................................. 11
2.1.4 Response flag (Characteristics UUID: 0x3004) ............................................................. 11
2.1.5 Response data (Characteristics UUID: 0x3005) ............................................................ 12
2.1.6 Event flag (Characteristics UUID: 0x3006) ................................................................... 14
Setting Service (Service UUID: 0x3010) ........................................................................... 15 2.2.
2.2.1 Measurement interval (Characteristics UUID: 0x3011) ................................................. 15
2.2.2 Temperature (Characteristics UUID: 0x3013) ............................................................... 16
2.2.3 Relative humidity (Characteristics UUID: 0x3014) ........................................................ 17
2.2.4 Ambient light (Characteristics UUID: 0x3015) .............................................................. 18
2.2.5 UV Index (Characteristics UUID: 0x3016) .................................................................... 19
2.2.6 Pressure (Characteristics UUID: 0x3017) ..................................................................... 20
2.2.7 Sound Noise (Characteristics UUID: 0x3018) ............................................................... 21
2.2.8 Discomfort index (Characteristics UUID: 0x3019) ........................................................ 22
2.2.9 Heat stroke (Characteristics UUID: 0x301A)................................................................. 23
Control Service (Service UUID: 0x3030) ........................................................................... 24 2.3.
2.3.1 Time information (Characteristics UUID: 0x3031) ........................................................ 24
2.3.2 LED on duration (Characteristics UUID: 0x3032) .......................................................... 24
2.3.3 Error status (Characteristics UUID: 0x3033) ................................................................ 25
2.3.4 Trigger (Characteristics UUID: 0x3034) ....................................................................... 25
Parameter Service (Service UUID: 0x3040) ...................................................................... 26 2.4.
2.4.1 UUIDs (Characteristics UUID: 0x3041) ......................................................................... 26
2.4.2 ADV setting (Characteristics UUID: 0x3042) ................................................................ 27
DFU Service (Service UUID: 0x3050) ................................................................................ 29 2.5.
Generic Access Service (Service UUID: 0x1800) ................................................................ 30
2.6.
2.6.1 Device Name (Characteristics UUID: 0x2A00) .............................................................. 30
2.6.2 Appearance (Characteristics UUID: 0x2A01) ................................................................ 31
2.6.3 Peripheral Preferred Connection Parameters (Characteristics UUID: 0x2A04) ............... 31
Device Information Service (Service UUID: 0x180A) ......................................................... 32 2.7.
2.7.1 Model Number String (Characteristics UUID: 0x2A24) .................................................. 32
2.7.2 Serial Number String (Characteristics UUID: 0x2A25) .................................................. 33
2.7.3 Firmware Revision String (Characteristics UUID: 0x2A26) ............................................ 33
2.7.4 Hardware Revision String (Characteristics UUID: 0x2A27) ........................................... 33
2.7.5 Manufacturer Name String (Characteristics UUID: 0x2A29) .......................................... 34
2JCIE-BL01 Environment Sensor User’s Manual (A278)
2
3. Advertise format .................................................................................................................... 35
(A) Beacon ....................................................................................................................... 36 3.1.
(B) Connection Advertise 1 ............................................................................................... 37
3.2.
3.2.1 Advertise (ADV_IND) ................................................................................................... 37
3.2.2 Scan Response (SCAN_RSP) ......................................................................................... 38
(C) Connection Advertise 2 (ADV_IND) ............................................................................. 39 3.3.
(D) Sensor ADV 1 (ADV_IND) ........................................................................................... 40
3.4.
(E) Sensor ADV 2 (ADV_IND) ........................................................................................... 41
3.5.
2JCIE-BL01 Environment Sensor User’s Manual (A278)
3
1. Introduction
Scope 1.1.
This Communication I/F Manual applies to Environment Sensor type 2JCIE-BL01.
Communication Interface 1.2.
Environment sensor communicates with a smartphone, tablet, etc. via Bluetooth® low energy.
Table 1. GAP Role
GAP Role
Environment Sensor
Peripheral
Smartphone, Tablet or others
Central
2JCIE-BL01 Environment Sensor User’s Manual (A278)
4
Operation flow 1.3.
According to set Beacon Mode, there are two operation patterns with and without measured data recording. The sensor data measurement and recording to flash memory are carried out regardless of whether they are connected or disconnected to/from the Central device. Further details of Beacon Mode are described in 3. Advertise format.
Initialize
Time
information
Timer?
Sensor
Measur ement
Data Recording
Row No.?
Save to
Flash Memo r y
Update row No.
New page
True
False
Set
Cleared
Update
Latest data
=12
< 12
Start
Initialize
Timer?
Sensor
Measur ement
Update
Latest data
Update
Sequence No.
True
False
Start
With Data Recording
Without Data Recording
Figure 1 Operation flow
2JCIE-BL01 Environment Sensor User’s Manual (A278)
5
1.3.1 With Data Recording mode
The following Beacon Modes operate with data recording to the flash memory. To activate data recording, 2.3.1 Time Information must be set from the Central device first. Time information is cleared to zero (0) again when the Measurement Interval is changed, Beacon Mode is changed, battery is exchanged or power is reset. In these cases, it is necessary to set Time Information again to restart data recording
Table 2. List of Beacon Mode with Data Recording
Beacon Mode
Name
Shortened Device Name
Device Name
0x00
Event Beacon (SCAN RSP)
Env
EnvSensor-BL01
0x01
Standard Beacon
Env
EnvSensor-BL01
0x07
Alternate Beacon
Env
EnvSensor-BL01
0x08
Event Beacon (ADV)
Env
EnvSensor-BL01
1.3.2 Without Data Recording mode
Since the measured data is not recorded to the flash memory in the following Beacon Modes, only Latest Data is updated
Table 3. List of Beacon Mode without Data Recording
Beacon Mode
Name
Shortened Device Name
Device Name
0x02
General Broadcaster 1
IM
IM-BL01
0x03
Limited Broadcaster 1
IM
IM-BL01
0x04
General Broadcaster 2
EP
EP-BL01
0x05
Limited Broadcaster 2
EP
EP-BL01
2JCIE-BL01 Environment Sensor User’s Manual (A278)
6
1.3.3 Flash memory for data recording
The flash memory consists of 2048 pages in total (from Page 0 to Page 2047), and the content of single page consists of UNIX TIME and 13 rows of measured data. The UNIX TIME indicates the measurement time at the first row of the page (Row 0), and from the first line onwards, it is possible to calculate the measurement time by adding the measurement interval to the UNIX TIME. When data is stored 13 times (from Row 0 to Row 12) in single page, a new page is created for the next measurement
Table 4. Example of Memory contents: Page 1
Items
Contents
Remarks
UNIX TIME
0x5685C180 (1451606400)
2016/1/1 0:00:00
Measurement Interval
0x12C (300sec)
5 min. interval
Row 0
Sensor data
2016/1/1 0:00:00
Row 1
Sensor data
2016/1/1 0:05:00
Row 2
Sensor data
2016/1/1 0:10:00
… … …
Row 12
Sensor data
2016/1/1 1:00:00
Table 5. Example of Memory contents: Page 2
Items
Contents
Remarks
UNIX TIME
0x5685D0BC (1451610300)
2016/1/1 1:05:00
Measurement Interval
0x12C (300sec)
5 min. interval
Row 0
Sensor data
2016/1/1 1:05:00
Row 1
Sensor data
2016/1/1 1:10:00
… … …
2JCIE-BL01 Environment Sensor User’s Manual (A278)
7
2. GATT Services
UUIDs of supported GATT services are shown below. Except public services defined by Bluetooth specification, full UUIDs of all the CUSTOM services and characteristics are based on the same Base UUID as follows
Base UUID: 0C4CXXXX-7700-46F4-AA96D5E974E32A54
Table 6. List of supported GATT Services
Service UUID
Service name
Number of Characteristics
0x3000
Sensor Service
6
0x3010
Setting Service
9
0x3030
Control Service
4
0x3040
Parameter Service
2
0x3050
DFU Service
3
0x1800 (Public)
Generic Access Service
3
0x1801 (Public)
Generic Attribute Service
1
0x180A (Public)
Device Information Service
5
2JCIE-BL01 Environment Sensor User’s Manual (A278)
8
Sensor Service (Service UUID: 0x3000) 2.1.
Sensor Service is the service for the sensor data acquisition.
Table 7. List of Characteristics in Sensor Service
Characteristics
UUID
Characteristics
Properties
Byte
R W N I 0x3001
Latest data
19
0x3002
Latest page
9
0x3003
Request page
3
0x3004
Response flag
5
0x3005
Response data
19
0x3006
Event flag
9
*PropertiesR : ReadW : WriteN : NotifyIIndicate
2JCIE-BL01 Environment Sensor User’s Manual (A278)
9
2.1.1 Latest data (Characteristics UUID: 0x3001)
Measured sensor data is updated every measurement interval and reflected in Latest data. The measurement interval can be changed in 2.2.1 Measurement interval. In addition to regular update in set measurement interval, when sensor is disconnected from Central devices, the measurement is immediately carried out then the contents of this characteristics is updated. However, in case of immediate data measurement, this measured data is not saved to the memory and row number is not updated.
Table 8. Latest data format
*1 In the operation with data recording mode, the value is always zero unless Time information is set.
*2 Discomfort Index, Heatstroke risk factorWBGT approximationare calculated only by temperature
and humidity. These information is just a rough indication and for referential use only.
Byte
Field
Format
Contents
0 Row number / Sequence number UInt8
With Data Recording: Range012 *1
Without Data Recording: Range:0~255
1
Temperature
L
SInt16 Unit0.01 degC
2 H 3
Relative Humidity
L
SInt16 Unit0.01 %RH
4
H
5
Light
L
SInt16 Unit1 lx
6 H 7
UV Index
L
SInt16 Unit0.01
8 H 9
Barometric Pressure
L
SInt16 Unit0.1 hPa
10 H 11
Sound noise
L
SInt16 Unit0.01 dB
12 H 13
Discomfort Index *2
L
SInt16 Unit0.01
14 H 15
Heatstroke risk factor *2
L
SInt16 Unit0.01 degC
16 H 17
Battery voltage
L
UInt16 Unit1 mV
18
H
2JCIE-BL01 Environment Sensor User’s Manual (A278)
10
2.1.2 Latest page (Characteristics UUID: 0x3002)
The Latest page shows the latest page and row information of the memory as the progress status of data recording. The Central device can acquire the past memory data by referring to the difference between the page information at the previous data retrieving and this latest page information
Table 9. Latest page format
Byte
Field
Format
Contents
0
UNIX TIME
0
UInt32
Created time of the latest page. Unit1 sec Range1970/1/1 0:00:012106/2/7 6:28:15
1 1 2 2 3 3 4
Measurement interval
L
UInt16
Unit1 sec
Range:1~3600 sec
5 H 6
Latest page
L
UInt16 Range02047
7 H 8
Latest row
UInt8
Range:0~12
2JCIE-BL01 Environment Sensor User’s Manual (A278)
11
2.1.3 Request page (Characteristics UUID: 0x3003)
Specify the page number to retrieve the measured data from the flash memory. The result of retrieving from the memory for the page specified in this Characteristic will be set in
2.1.4 Response flag and the past measured data will be set in 2.1.5 Response data. * Note: Memory recording of measured data is not started unless 2.3.1 Time information is set.
Table 10. Request page format
Byte
Field
Format
Contents
0
Requesting Page No.
L
UInt16 Range02047
1 H 2
Requesting Row No.
UInt8
Range:0~12
2.1.4 Response flag (Characteristics UUID: 0x3004)
When requesting page and row number is set in 2.1.3 Request page, 2.1.5 Response Data will be updated with retrieved measured data. Whether the update is successfully completed or not can be known by the Update flag of this Characteristic. In addition, updating of this Characteristic is done in the page basis, confirmation in the row basis is unnecessary. * Note: Memory recording of measured data is not started unless 2.3.1 Time information is set
Table 11. Response flag format
Byte
Field
Format
Contents
0 Update flag UInt8
0x00: Retrieving 0x01: Completed
0x02: Failed to retrieve data
1
UNIX TIME
0
UInt32
Created time of this page. Unit1 sec Range1970/1/1 0:00:012106/2/7 6:28:15
2 1 3 2 4
3
2JCIE-BL01 Environment Sensor User’s Manual (A278)
12
2.1.5 Response data (Characteristics UUID: 0x3005)
Retrieved memory data in the page and row specified in 2.1.3 Request page will be updated in this characteristic. Correct data acquisition can be made after the update flag becomes "Completed" in
2.1.5 Response flag. Also, by reading this Characteristic, the data of the next row in the same page is automatically set to this Characteristic (descending order Row 12 to Row 0).
Therefore, it is unnecessary to specify 2.1.3 Request page for each row, and all row in the same page can be read by continuous Read of this Characteristic. However, since automatic retrieving across pages is not performed, when moving to the next page, it is necessary to specify the page number again to 2.1.3 Request page and confirm the 2.1.4 Response flag each time.
* Note: Memory recording of measured data is not started unless 2.3.1 Time information is set
Table 12. Response data format
Byte
Field
Format
Contents
0
Row number
UInt8
Range:0~12
1
Temperature
L
SInt16 Unit0.01 degC
2 H 3
Relative Humidity
L
SInt16 Unit0.01 %RH
4 H 5
Light
L
SInt16 Unit1 lx
6 H 7
UV Index
L
SInt16 Unit0.01
8 H 9
Barometric Pressure
L
SInt16 Unit0.1 hPa
10 H 11
Sound noise
L
SInt16 Unit0.01 dB
12 H 13
Discomfort Index
L
SInt16 Unit0.01
14 H 15
Heatstroke risk factor
L
SInt16 Unit0.01 degC
16 H 17
Battery voltage
L
UInt16 Unit1 mV
18
H
2JCIE-BL01 Environment Sensor User’s Manual (A278)
13
Operation flow of data retrieving from flash memory is shown below.
*1 The information of the latest page can be acquire from 2.1.2 Latest page or the page information
in advertisement data.
*2. While the result of reading Response flag is 0x00: Retrieving, try reading Response flag until
updating is completed.
*3. If the result of reading Response flag is 0x02: Fail and updating is not completed after 3 times of
retry, the data in the flash memory may be corrupted. In this case, skip the corresponding page
and obtain the data of the next page.
Read
Latest page
Row No.?
Start
Write
Request page
Response
flag
Read
Response flag
0x00
Retrieving
0x02
Failed to update
0x01
Completed
Read
Response data
End
Next Page
= 0
> 0
No
Yes
Figure 2 Operation flow of data retrieving from flash memory
Loading...
+ 30 hidden pages