Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox Blog

DheerajPK_41
Moderator
Moderator

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

Capture10.JPG

Step 2:  Variable definitions

In this step, we define the required macros, configure the transport configurations, etc.

Capture11.JPG

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.

Capture12.JPG

Capture13.JPG

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.

Capture15.JPG

 

Note: 

  • 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.

 

FYI. Listed few useful links

https://github.com/Infineon/btsdk-utils/tree/master/BTSpy 

https://github.com/Infineon/btsdk-host-apps-bt-ble/tree/master/client_control 

https://github.com/Infineon/CypressAcademy_BT101_Files/blob/master/PDFs/WBT101-05-Debugging.pdf 

0 Likes
Top labels