Page 1 of 40
© Cambridge Silicon Radio Limited 2012-2014 CS-227334-ANP7
www.csr.com
Health Thermometer
Application Note
Issue 7
CSR µEnergy
®
Page 2 of 40
© Cambridge Silicon Radio Limited 2012-2014 CS-227334-ANP7
www.csr.com
CSR µEnergy Health Thermometer Application Note
Document History
Revision
Date
History
1
14 JUN 12
Original publication of this document
2
08 FEB 13
Updated to reference CSR101x devices and for SDK 2.1
3
19 FEB 13
Updated current consumption values
4
10 MAY 13
Updated for SDK 2.2; connection parameter update
5
03 FEB 14
Updated to new CSR branding and changes to connection parameter
update
6
02 JUL 14
Updated for SDK 2.4; added support for OTA Update Application Service
7
10 NOV 14
Updated USB dongle information and OTA Update to v6
Contacts
General information www.csr.com
Information on this product sales@csr.com
Customer support for this product www.csrsupport.com
More detail on compliance and standards product.compliance@csr.com
Help with this document comments@csr.com
Page 3 of 40
© Cambridge Silicon Radio Limited 2012-2014 CS-227334-ANP7
www.csr.com
CSR µEnergy Health Thermometer Application Note
Trademarks, Patents and Licences
Unless otherwise stated, words and logos marked with ™ or ® are trademarks registered or owned by CSR plc
and/or its affiliates.
Bluetooth® and the Bluetooth logos are trademarks owned by Bluetooth SIG, Inc. and licensed to CSR.
Other products, services and names used in this document may have been trademarked by their respective owners.
The publication of this information does not imply that any licence is granted under any patent or other rights owned
by CSR plc or its affiliates.
CSR reserves the right to make technical changes to its products as part of its development programme.
While every care has been taken to ensure the accuracy of the contents of this document, CSR cannot accept
responsibility for any errors.
Use of this document is permissible only in accordance with the applicable CSR licence agreement.
Safety-critical Applications
CSR’s products are not designed for use in safety-critical devices or systems such as those relating to: (i) life
support; (ii) nuclear power; and/or (iii) civil aviation applications, or other applications where injury or loss of life could
be reasonably foreseeable as a result of the failure of a product. The customer agrees not to use CSR's products (or
supply CSR's products for use) in such devices or systems.
Performance and Conformance
Refer to www.csrsupport.com for compliance and conformance to standards information.
Page 4 of 40
© Cambridge Silicon Radio Limited 2012-2014 CS-227334-ANP7
www.csr.com
CSR µEnergy Health Thermometer Application Note
Contents
Document History ......................................................................................................................................................... 2
Contacts ........................................................................................................................................................................ 2
Trademarks, Patents and Licences .............................................................................................................................. 3
Safety-critical Applications ............................................................................................................................................ 3
Performance and Conformance .................................................................................................................................... 3
Contents ....................................................................................................................................................................... 4
Tables, Figures and Equations ..................................................................................................................................... 4
1. Introduction ........................................................................................................................................................ 6
1.1. Application Overview ...................................................................................................................................... 6
2. Using the Application ....................................................................................................................................... 10
2.1. Demonstration Kit ......................................................................................................................................... 10
2.2. Demonstration Procedure ............................................................................................................................. 14
3. Application Structure ........................................................................................................................................ 18
3.1. Source Files.................................................................................................................................................. 18
3.2. Header Files ................................................................................................................................................. 18
3.3. Database Files .............................................................................................................................................. 20
4. Code Overview................................................................................................................................................. 21
4.1. Application Entry Points ................................................................................................................................ 21
4.2. Internal State Machine .................................................................................................................................. 23
5. NVM Memory Map ........................................................................................................................................... 26
6. Customising the Application ............................................................................................................................. 27
6.1. Advertising Parameters ................................................................................................................................ 27
6.2. Advertisement Timers ................................................................................................................................... 27
6.3. Connection Parameters ................................................................................................................................ 27
6.4. Connection Parameter Update ..................................................................................................................... 28
6.5. Device Name ................................................................................................................................................ 29
6.6. Buzzer .......................................................................................................................................................... 29
6.7. Measurement Transmission Interval ............................................................................................................. 30
6.8. Non-Volatile Memory .................................................................................................................................... 30
6.9. Enabling the CSR OTA Update Application Service ..................................................................................... 30
7. Current Consumption ....................................................................................................................................... 31
Appendix A Definitions .............................................................................................................................................. 32
Appendix B GATT Database .................................................................................................................................... 33
Appendix C Advertising/Scan Response Data .......................................................................................................... 37
Appendix D Known Issues or Limitations .................................................................................................................. 38
Document References ................................................................................................................................................ 39
Terms and Definitions ................................................................................................................................................. 40
Tables, Figures and Equations
Table 1.1: Health Thermometer Profile Roles ............................................................................................................... 6
Table 1.2: Application Topology .................................................................................................................................... 7
Table 1.3: Responsibilities ............................................................................................................................................ 7
Table 2.1: Demonstration Components ...................................................................................................................... 10
Table 3.1: Source Files ............................................................................................................................................... 18
Table 3.2: Header Files............................................................................................................................................... 19
Table 3.3: Database Files ........................................................................................................................................... 20
Table 5.1: NVM Memory Map for Application ............................................................................................................. 26
Page 5 of 40
© Cambridge Silicon Radio Limited 2012-2014 CS-227334-ANP7
www.csr.com
CSR µEnergy Health Thermometer Application Note
Table 5.2: NVM Memory Map for GAP Service .......................................................................................................... 26
Table 5.3: NVM Memory Map for Health Thermometer Service ................................................................................. 26
Table 5.4: NVM Memory Map for Battery Service ....................................................................................................... 26
Table 6.1: Advertisement Parameters......................................................................................................................... 27
Table 6.2: Advertisement Timers ................................................................................................................................ 27
Table 6.3: Connection Parameters (Default) ............................................................................................................... 27
Table 6.4: Preferred Connection Parameters for Apple Products ............................................................................... 28
Table 6.5: Measurement Transmission Interval .......................................................................................................... 30
Table 7.1: Current Consumption Values ..................................................................................................................... 31
Table A.1: Definitions .................................................................................................................................................. 32
Table B.1: Battery Service Database .......................................................................................................................... 33
Table B.2: CSR OTA Update Application Service Database ...................................................................................... 33
Table B.3: Device Information Service Database ....................................................................................................... 34
Table B.4: GAP Service Database .............................................................................................................................. 35
Table B.5: GATT Service Database ............................................................................................................................ 35
Table B.6: Health Thermometer Service Database .................................................................................................... 36
Table C.1: Advertising Data Field ............................................................................................................................... 37
Figure 1.1: Health Thermometer Profile ........................................................................................................................ 6
Figure 1.2: Primary Services ......................................................................................................................................... 8
Figure 2.1: CSR1010 Development Board.................................................................................................................. 10
Figure 2.2: Device Behaviour ...................................................................................................................................... 11
Figure 2.3: CSR µEnergy Bluetooth USB Dongle ....................................................................................................... 12
Figure 2.4: CSR µEnergy Profile Demonstrator .......................................................................................................... 13
Figure 2.5: Health Thermometer Device Discovered .................................................................................................. 14
Figure 2.6: Device Connected .................................................................................................................................... 15
Figure 2.7: Battery Level ............................................................................................................................................. 16
Figure 2.8: Device Information Service ....................................................................................................................... 16
Figure 2.9: Over-the-Air Update Service Tab .............................................................................................................. 17
Figure 4.1: Internal State Machine Diagram ............................................................................................................... 23
Figure 6.1: Accept Connection Parameters ................................................................................................................ 28
Figure 6.2: Connection Parameter Update Procedure ................................................................................................ 29
Figure B.1: Temperature Measurement Data Format ................................................................................................. 36