This code example demonstrates the implementation of a simple Bluetooth® Immediate Alert Service (IAS)-based Find Me Profile (FMP) using Infineon AIROC™ Wi-Fi & Bluetooth® combo SoC devices and ModusToolbox™ software environment.
Provide feedback on this code example.
- ModusToolbox™ software v3.2 or later (tested with v3.2) with ModusToolbox™.
- Board support package (BSP) minimum required version for : v1.0.0.
- Programming language: C
- Associated parts: CYW955913EVK-01 KIT-CYW55310-EVAL
- GNU Arm® embedded compiler v11.3.1 (
GCC_ARM) - Default value ofTOOLCHAIN
- CYW955913EVK-01 Wi-Fi Bluetooth® Prototyping Kit (
CYW955913EVK-01) - CYW955513EVK-01 Wi-Fi Bluetooth® Prototyping Kit (
CYW955513EVK-01) - KIT-CYW55310-EVAL Bluetooth® Kit(
KIT-CYW55310-EVAL)
This example uses the kit’s default configuration. See the respective kit guide to ensure that the kit is configured correctly.
Note: The CYW955513EVK-01 Wi-Fi Bluetooth® prototyping kit ships with KitProg3 version 2.30 installed. The ModusToolbox™ software requires KitProg3 with latest version 2.50. Before using this code example, make sure that the board is upgraded to KitProg3 2.50. The tool and instructions are available in the Firmware Loader GitHub repository. If you do not upgrade, you will see an error such as "unable to find CMSIS-DAP device" or "KitProg firmware is out of date".
This code example consists of two parts: a locator and a target.
For the locator, download and install the AIROC™ Bluetooth® Connect app for iOS or Android.
You can also use other Android or iOS apps that support the IAS service.
Scan the following QR codes from your mobile phone to download the AIROC™ Bluetooth® Connect app.
Create the project and open it using one of the following:
In Eclipse IDE for ModusToolbox™ software
-
Click the New Application link in the Quick Panel (or, use File > New > ModusToolbox™ Application). This launches the Project Creator tool.
-
Pick a kit supported by the code example from the list shown in the Project Creator - Choose Board Support Package (BSP) dialog.
When you select a supported kit, the example is reconfigured automatically to work with the kit. To work with a different supported kit later, use the Library Manager to choose the BSP for the supported kit. You can use the Library Manager to select or update the BSP and firmware libraries used in this application. To access the Library Manager, click the link from the Quick Panel.
You can also just start the application creation process again and select a different kit.
If you want to use the application for a kit not listed here, you may need to update the source files. If the kit does not have the required resources, the application may not work.
-
In the Project Creator - Select Application dialog, choose the example by enabling the checkbox.
-
(Optional) Change the suggested New Application Name.
-
The Application(s) Root Path defaults to the Eclipse workspace which is usually the desired location for the application. If you want to store the application in a different location, you can change the Application(s) Root Path value. Applications that share libraries should be in the same root path.
-
Click Create to complete the application creation process.
For more details, see the Eclipse IDE for ModusToolbox™ software user guide (locally available at {ModusToolbox™ software install directory}/docs_{version}/mt_ide_user_guide.pdf).
In command-line interface (CLI)
ModusToolbox™ software provides the Project Creator as both a GUI tool and a command line tool, "project-creator-cli". The CLI tool can be used to create applications from a CLI terminal or from within batch files or shell scripts. This tool is available in the {ModusToolbox™ software install directory}/tools_{version}/project-creator/ directory.
Use a CLI terminal to invoke the "project-creator-cli" tool. On Windows, use the command line "modus-shell" program provided in the ModusToolbox™ software installation instead of a standard Windows command-line application. This shell provides access to all ModusToolbox™ software tools. You can access it by typing modus-shell in the search box in the Windows menu. In Linux and macOS, you can use any terminal application.
The "project-creator-cli" tool has the following arguments:
| Argument | Description | Required/optional |
|---|---|---|
--board-id |
Defined in the <id> field of the BSP manifest |
Required |
--app-id |
Defined in the <id> field of the CE manifest |
Required |
--target-dir |
Specify the directory in which the application is to be created if you prefer not to use the default current working directory | Optional |
--user-app-name |
Specify the name of the application if you prefer to have a name other than the example's default name | Optional |
The following example will clone the "Bluetooth® LE Find Me" application with the desired name "LE_Find_Me" configured for the CYW955913EVK-01 BSP into the specified working directory, C:/mtb_projects:
project-creator-cli --board-id CYW955913EVK-01 --app-id mtb-example-btstack-threadx-findme --user-app-name LE_Find_Me --target-dir "C:/mtb_projects"
Note: The project-creator-cli tool uses the git clone and make getlibs commands to fetch the repository and import the required libraries. For details, see the "Project creator tools" section of the ModusToolbox™ software user guide (locally available at {ModusToolbox™ software install directory}/docs_{version}/mtb_user_guide.pdf)
In third-party IDEs
Use one of the following options:
-
Use the standalone Project Creator tool:
-
Launch Project Creator from the Windows Start menu or from {ModusToolbox™ software install directory}/tools_{version}/project-creator/project-creator.exe.
-
In the initial Choose Board Support Package screen, select the BSP and click Next.
-
In the Select Application screen, select the appropriate IDE from the Target IDE drop-down menu.
-
Click Create and follow the instructions printed in the bottom pane to import or open the exported project in the respective IDE.
-
-
Use command-line interface (CLI):
-
Follow the instructions from the In command-line interface (CLI) section to create the application.
-
Export the application to a supported IDE using the
make <ide>command. -
Follow the instructions displayed in the terminal to create or import the application as an IDE project.
-
For a list of supported IDEs and more details, see the "Exporting to IDEs" section of the ModusToolbox™ software user guide (locally available at {ModusToolbox™ software install directory}/docs_{version}/mtb_user_guide.pdf).
-
Connect the board to your PC using the provided USB cable through the KitProg3 USB connector.
-
Use your favorite serial terminal application and connect to the debug COM port. Configure the terminal application to access the serial port using the following settings:
Baud rate: 115200 bps; Data: 8 bits; Parity: None; stop: 1 bit; Flow control: None; New line for receive data: Line Feed(LF) or auto setting
-
Program the board using one of the following:
Using Eclipse IDE for ModusToolbox™ software
- Select the application project in the Project Explorer.
- In the Quick Panel, scroll down, and click <Application Name> Program (LE_Find_me Program(based on app name given by user)).
Using CLI
From the terminal, execute the
make programcommand to build and program the application using the default toolchain to the default target. The default toolchain and target are specified in the application's Makefile but you can override those values manually:make program TARGET=<BSP> TOOLCHAIN=<toolchain>Example:
make program TOOLCHAIN=GCC_ARMNote: Before building the application, ensure that the deps folder contains the BSP file (TARGET_xxx.lib) corresponding to the TARGET. Execute the
make getlibscommand to fetch the BSP contents before building the application. -
After programming, reset the board. Observe the messages on the UART terminal, and wait for the device to make all the required connections. Use the Debug UART COM port to view the Bluetooth® stack and application trace messages in the terminal window. Sample serial window after performing all the steps are given below:
Figure 2. Log messages on Debug COM port
-
To test using the AIROC™ Bluetooth® Connect mobile app, do the following (see equivalent AIROC™ Bluetooth® Connect app screenshots in Figure 3 and Figure 4:
-
Turn ON Bluetooth® on your Android or iOS device.
-
Launch the AIROC™ Bluetooth® Connect app.
-
If it is present on the kit, CYBSP_USER_LED2 will start blinking to indicate that advertising has started. Advertising will stop after 120 seconds if a connection has not been established, and CYBSP_USER_LED2 will turn off.
-
Swipe down on the AIROC™ Bluetooth® Connect app home screen to start scanning for Bluetooth® LE peripherals; your device (“Find Me Target”) appears in the AIROC™ Bluetooth® Connect app home screen. Select your device to establish a Bluetooth® LE connection. Once the connection is established, CYBSP_USER_LED2 changes from blinking state to always ON state.
-
Select the 'Find Me Profile' from the carousel view.
-
Select an Alert Level value on the Find Me Profile screen. Observe the state of CYBSP_USER_LED1 on the device; it changes based on the alert level.
-
For No alert, CYBSP_USER_LED1 shall be OFF. For Mild alert, CYBSP_USER_LED1 shall be blinking. For High alert, CYBSP_USER_LED1 shall be in ON condition.
Figure 3. Testing with the AIROC™ Bluetooth® Connect app on iOS
Figure 4. Testing with the AIROC™ Bluetooth® Connect app on Android
You can debug the example to step through the code. In the IDE, use the <Application Name> Debug (KitProg3_MiniProg4) configuration in the Quick Panel. For more details, see the "Program and debug" section in the Eclipse IDE for ModusToolbox™ software user guide.
Note: Debugging is not supported for now and will be part of next release.
Note: Debugging is of limited value when there is an active Bluetooth® LE connection because as soon as the Bluetooth® LE device stops responding, the connection will get dropped.
Figure 5 shows the implementation of IAS with 'Find Me Locator' (The Bluetooth® LE Central device) as a Bluetooth® LE GATT Client and 'Find Me Target' (Peripheral device) as a Bluetooth® LE GATT Server.
Figure 5. Find Me Profile (FMP) implementation on CYW955913
The Bluetooth® LE Find Me Profile defines what happens when the locating Central device broadcasts a change in the alert level.
The Find Me Locator performs service discovery using the "GATT Discover All Primary Services" procedure. The Bluetooth® LE service characteristic discovery is done by the "Discover All Characteristics of a Service" procedure. When the Find Me Locator wants to cause an alert on the Find Me Target, it writes an alert level in the Alert Level characteristic of the IAS. When the Find Me Target receives an alert level, it indicates the level using the red LED: OFF for no alert, blinking for mild alert, and ON for high alert.
The application code and Bluetooth® stack runs on the Arm® Cortex®-M33 core of the CYW955913 SoC. The important source files relevant for the user application level code for this code example are listed in related resources section.
Figure 6. Find Me Profile (FMP) process flowchart
This section explains the ModusToolbox™ software resources and their configuration as used in this code example. Note that all the configuration explained in this section has already been done in the code example.
-
Device Configurator: ModusToolbox™ software stores the configuration settings of the application in the design.modus file. This file is used by the Device Configurator, which generates the configuration firmware. This firmware is stored in the application’s GeneratedSource folder.
By default, all applications in a workspace share the same design.modus file – i.e., they share the same pin configuration. Each BSP has a default design.modus file in the mtb_shared\TARGET_<bsp name>\<version>\COMPONENT_BSP_DESIGN_MODUS directory. It is not recommended to modify the configuration of a standard BSP directly.
To modify the configuration for a single application or to create a custom BSP, see the ModusToolbox™ user guide. This example uses the default configuration. See the Device Configurator guide.
-
Bluetooth® Configurator: The Bluetooth® peripheral has an additional configurator called the “Bluetooth® Configurator” that is used to generate the Bluetooth® LE GATT database and various Bluetooth® settings for the application. These settings are stored in the file named design.cybt.
Note that unlike the Device Configurator, the Bluetooth® Configurator settings and files are local to each respective application. As explained in the Design and implementation section, the only extra service added is the Immediate Alert Service (IAS). See the Bluetooth® Configurator guide.
Table 1. Application resources
| Resource | Alias/object | Purpose |
|---|---|---|
| UART (HAL) | cy_retarget_io_uart_obj | UART HAL object used by Retarget-IO for Debug UART port |
| GPIO (HAL) | CYBSP_USER_LED1 | Changes the state depending on the alert level |
| GPIO (HAL) | CYBSP_USER_LED2 | Depicts device states |
| PWM (HAL) | adv_led_pwm | PWM HAL object for controlling the advertising LED (CYBSP_USER_LED2) |
| PWM (HAL) | ias_led_pwm | PWM HAL object for controlling the alert level LED (CYBSP_USER_LED1) |
| Resources | Links |
|---|---|
| Application notes | |
| Code examples | Using ModusToolbox™ software on GitHub |
| Device documentation | btsdk-drivers – Bluetooth® SDK drivers library btsdk-mesh – Bluetooth® LE mesh libraries btsdk-ota – Bluetooth® LE OTA libraries btsdk-ble – Bluetooth® LE profile libraries |
| Tools | Eclipse IDE for ModusToolbox™ software – ModusToolbox™ software is a collection of easy-to-use software and tools enabling rapid development with Infineon® MCUs, covering applications from embedded sense and control to wireless and cloud-connected systems using AIROC™ Wi-Fi and Bluetooth® connectivity devices. btsdk-utils – Bluetooth® SDK utilities btsdk-peer-apps-ota – Bluetooth® LE OTA peer applications btsdk-host-peer-apps – Bluetooth® LE mesh host and peer applications btsdk-host-apps-bt-ble – Bluetooth® and Bluetooth® LE host applications |
Infineon provides a wealth of data at www.infineon.com to help you select the right device, and quickly and effectively integrate it into your design.
Document title: CE238786 – Bluetooth® LE Find Me
| Version | Description of change |
|---|---|
| 1.0.0 | New code example |
| 1.1.0 | Support added for KIT-CYW55310-EVAL |
© 2026, Infineon Technologies AG, or an affiliate of Infineon Technologies AG. All rights reserved.
This software, associated documentation and materials ("Software") is owned by Infineon Technologies AG or one of its affiliates ("Infineon") and is protected by and subject to worldwide patent protection, worldwide copyright laws, and international treaty provisions. Therefore, you may use this Software only as provided in the license agreement accompanying the software package from which you obtained this Software. If no license agreement applies, then any use, reproduction, modification, translation, or compilation of this Software is prohibited without the express written permission of Infineon.
Disclaimer: UNLESS OTHERWISE EXPRESSLY AGREED WITH INFINEON, THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ALL WARRANTIES OF NON-INFRINGEMENT OF THIRD-PARTY RIGHTS AND IMPLIED WARRANTIES SUCH AS WARRANTIES OF FITNESS FOR A SPECIFIC USE/PURPOSE OR MERCHANTABILITY. Infineon reserves the right to make changes to the Software without notice. You are responsible for properly designing, programming, and testing the functionality and safety of your intended application of the Software, as well as complying with any legal requirements related to its use. Infineon does not guarantee that the Software will be free from intrusion, data theft or loss, or other breaches (“Security Breaches”), and Infineon shall have no liability arising out of any Security Breaches. Unless otherwise explicitly approved by Infineon, the Software may not be used in any application where a failure of the Product or any consequences of the use thereof can reasonably be expected to result in personal injury.





