Page 4 of 32
© Cambridge Silicon Radio Limited 2015 CS-320697-ANP3
www.csr.com
CSR µEnergy CSRmesh™ 1.3 Light Application – 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 ...................................................................................................................................... 7
2. Using the Application ......................................................................................................................................... 9
2.1. Demonstration Kit ........................................................................................................................................... 9
3. Application Structure ........................................................................................................................................ 12
3.1. Source Files.................................................................................................................................................. 12
3.2. Header Files ................................................................................................................................................. 13
3.3. Database Files .............................................................................................................................................. 14
4. Code Overview................................................................................................................................................. 15
4.1. Application Entry Points ................................................................................................................................ 15
4.2. Internal State Machine for GATT Connection ............................................................................................... 18
4.3. CSRmesh Association .................................................................................................................................. 19
4.4. CSRmesh Models Supported ....................................................................................................................... 20
4.5. Synchronising with CSRmesh Activity .......................................................................................................... 21
4.6. Bearer State Management ........................................................................................................................... 21
4.7. Application Data Stream Protocol ................................................................................................................. 21
5. NVM Map ......................................................................................................................................................... 23
5.1. Application NVM Version .............................................................................................................................. 23
6. Customising the Application ............................................................................................................................. 24
6.1. Advertisement Timers ................................................................................................................................... 24
6.2. Connection Parameters ................................................................................................................................ 24
6.3. Number of Supported Model Groups ............................................................................................................ 24
6.4. Device Name ................................................................................................................................................ 25
6.5. Device Address ............................................................................................................................................ 25
6.6. Non-Volatile Memory .................................................................................................................................... 25
6.7. Application Features ..................................................................................................................................... 25
6.8. Configuring the CSRmesh Parameters ........................................................................................................ 26
Appendix A CSRmesh Application GATT Database ................................................................................................. 28
Document References ................................................................................................................................................ 31
Terms and Definitions ................................................................................................................................................. 32
Tables, Figures and Equations
Table 1.1: CSRmesh Control Profile Roles ................................................................................................................... 7
Table 1.2: Application Topology .................................................................................................................................... 7
Table 1.3: Role and Responsibilities ............................................................................................................................. 7
Table 2.1: CSRmesh Components ............................................................................................................................... 9
Table 2.2: CSRmesh Development Board User Interface........................................................................................... 10
Table 3.1: Source Files ............................................................................................................................................... 12
Table 3.2: Header Files............................................................................................................................................... 14
Table 3.3: Database Files ........................................................................................................................................... 14