Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
How to enable BTSpy traces in your BTSDK application
BTSpy is a trace utility available in Modustoolbox that can be used in the BTSDK platforms to view protocol and generic trace messages from the embedded device. Here, I will show you the quick steps to enable the BTSpy traces in your application which will help you while debugging your application.
Step 1: Include header files
Step 2: Variable definitions
In this step, we define the required macros, configure the transport configurations, etc.
Step 3: Initialize and Register callbacks
In this step, we initialize transport configurations, buffer pool and register a callback function to send the traces over transport.
Step 4: View Traces
Program the application to your platform and BTSpy & ClientControl tools available in the IDE/SDK. BTSpy listens on the UDP port 9876 and can receive a specially formatted message from ClientControl. Sample traces will look like as below.
Add below line to the makefile to launch the tool from IDE CY_BT_APP_TOOLS+=BTSpy ClientControl hello_client
Please find the attached sample application and logs.