SWRU580 April 2021 CC2564C , CC2564MODA , CC2564MODN
This section provides a description of how to use the demo application to connect two configured boards and communicate over bluetooth. Bluetooth CSCP is a simple Client-Server connection process. We will setup one of the boards as a Server and the other board as a Client. We will then initiate a connection from the Client to the Server. Once connected, we can transmit data between the two devices over bluetooth.
Server setup on the demo application
Figure 21-2 CSCP Demo CSCS
Register
Figure 21-3 CSCP Demo STM32 Set
Supported Features Usage
Figure 21-4 CSCP Demo CSCS Set
Supported Sensor Location Bit Mask Usage
Figure 21-5 CSCP Demo CSCS
Features and Location
Figure 21-6 CSCP Demo STM32 Start
Scanning
Figure 21-7 CSCP Demo STM32 Client
Connect LENow we have a connection established and both devices are ready to send data to each other. Before Cycle Speed and Cadence information can be sent we must first initialize commands in the Client terminal.
Figure 21-8 CSCP Demo STM32
Discover CSCS
Figure 21-9 CSCP Demo STM32 Get
Remote Features
Figure 21-10 CSCP Demo STM32
Configure Remote Enable Now we have a connection established and both devices configured and are ready to send data to each other.
We can now notify from the Sensor (Jump to paragraph t) or we can send SC Control Point Command to the sensor from the collector (next paragraph).
In Client Terminal:
Figure 21-11 CSCP Demo STM32 Set
Wheel Circumference
Figure 21-12 CSCP Demo STM32 Set SC
Control Point Usage
Figure 21-13 CSCP Demo Set SC
Control Point
Figure 21-14 CSCP Demo STM32
Display Available Locations
Figure 21-15 CSCP Demo STM32 Set SC
Control Point 2
Figure 21-16 CSCP Demo STM32 Set CS
Control Point 3
Figure 21-17 CSCP Demo STM32 Query
Location
Figure 21-18 CSCP Demo STM32 Notify
Usage
Figure 21-19 CSCP Demo
STM32 Notify Speed[cm/(s/1024)] = (Difference in two successive Cumulative Wheel Revolution values * Wheel Circumference) / (Difference in two successive Last Wheel Event Time values) In order to receive Speed[km/h] we need to multiple the result with (3.6*1024/100) - The Demo is doing the calculation for us when we use DISPLAY_DEBUG definitions in the environment
Cadence[r/(s/1024)] = (Difference in two successive Cumulative Crank Revolution values) / (Difference in two successive Last Crank Event Time values) In order to receive Cadence[rpm] we need to multiple the result with (60*1024) - The Demo is doing the calculation for us when we use DISPLAY_DEBUG definitions in the environment
Figure 21-20 CSCP Demo STM32 Notify
Client
Figure 21-21 CSCP Demo
STM32 Notify 2
Figure 21-22 CSCP Demo STM32 Notify
Client 2