Gatt Scan Configuration Service Workflow - Texas Instruments DLP NIRscan User Manual

Table of Contents

Advertisement

Bluetooth Client App Workflow
5.3.2.4
Bluetooth Client GATT Scan Configuration Service
Once the GATT Scan Configuration Service is enumerated, the Bluetooth Client can prompt DLP NIRscan
Nano to download stored scan configurations. These parameters must to be downloaded whenever a new
DLP NIRscan Nano is connected to a Bluetooth Client and before a scan is initiated. To read the stored
scan configuration, the Bluetooth Client must perform the following steps:
Read the number of stored configurations.
Subscribe to the notification of the characteristic that returns stored configuration list.
Issue a request for stored configuration list and wait for the notification to read the stored configuration
list.
Subscribe to the notification of the characteristic that returns scan configuration data.
Read each scan configuration data by writing the scan configuration ID to the characteristic that
returns the scan configuration data, wait for the notification, and then read the serialized scan
configuration data returned. The DLP Spectrum Library provides a routine to interpret this serialized
data: dlpspec_deserialize. Repeat this step for each stored scan configuration.
Set the active scan configuration by writing to the scan configuration ID to the active scan configuration
characteristic.
Figure 5-10
depicts the workflow for this service.
GATT Scan Configuration
Service enumerated?
No
Deserialize data
using DLP Spectrum
Library
dlpspec_deserialize
5.3.2.5
Bluetooth Client GATT Scan Data Service
Once the GATT Scan Data Service is enumerated, the Bluetooth Client can prompt DLP NIRscan Nano to
download stored scan data or perform a scan. To read the stored scan data, the Bluetooth Client must
perform the following steps:
Read the number of stored scans.
Subscribe to the notification of the characteristic that returns stored scan indices list.
Issue a request to read stored configuration list, wait for the notification to read the stored configuration
list.
42
DLP NIRscan Nano Software
Yes
Read
Number of
Stored
Configurations
DLP NIRscan
Nano returns
requested scan
configuration in
serialized data
format
No
Yes
Read all stored scan
configurations?
Figure 5-10. GATT Scan Configuration Service Workflow
Copyright © 2015, Texas Instruments Incorporated
DLP NIRscan
Subscribe to
Nano returns the
Return Stored
number of stored
Configurations
List
scan
configurations
notification
Write scan
Subscribe to
configuration ID
Return Scan
to
Configuration
Return Scan
Data
Configuration
notification
Data
Write to
Active Scan
Configuration
to set an active
configuration for
future scans
DLPU030B – June 2015 – Revised July 2015
www.ti.com
Write to
Request Stored
Configuration
List
DLP NIRscan
Nano returns
stored
configurations
Submit Documentation Feedback

Advertisement

Table of Contents
loading

Table of Contents