
CE217646 - BLE Wireless Power Transfer
with PSoC
6 MCU with BLE Connectivity
www.cypress.com Document No. 002-17646 Rev.** 1
Objective
This example demonstrates the Wireless Power Transfer service in the Power Transmitter Unit and Power Receiver Unit role.
Overview
The design demonstrates the Wireless Power Transfer Profile operation of the BLE Component. The example consists of two
projects: the Wireless Power Transmitter (GATT Client) and Wireless Power Receiver (GATT Server).
This example demonstrates the communication between Power Receiver Unit (PRU) and Power Transmitter Unit (PTU) in the
Wireless Power Transfer systems. The PTU Central device supports connection with up to four PRU Peripheral devices. The
PRU simulates the power receiver data and reports the simulated data to a PTU using the Wireless Power Transfer Service
(WPTS).
Requirements
Tool: PSoC Creator™ 4.2
Programming Language: C (Arm® GCC 5.4-2016-q2-update)
Associated Parts: All PSoC 6 BLE parts
Related Hardware: CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit
Hardware Setup
This example uses the kit’s default configuration. Refer to the kit guide to ensure the kit is configured correctly.
1. Connect the BLE Pioneer Kit to the computer’s USB port.
2. Connect the BLE Dongle to one of the USB ports on the computer.
LED Behavior
If the V
DDD
voltage is set to less than 2.7 V in the DWR settings System tab, only the red LED is used. The red LED blinks to
indicate that the device is advertising. The red LED is OFF when a device is connected to a peer device. When the device is in
Hibernate mode, the red LED stays ON.
LED behavior for V
DDD
Voltage > 2.7 volts is described in Operation section.
Software Setup
BLE Host Emulation Tool
This example requires the CySmart application. Download and install either the CySmart Host Emulation Tool PC application or
the CySmart app for iOS or Android. You can test behavior with any of the two options, but the CySmart app is simpler. Scan
one of the following QR codes from your mobile phone to download the CySmart app.

BLE Wireless Power Transfer with PSoC 6 MCU with BLE Connectivity
www.cypress.com Document No. 002-17646 Rev.** 2
Terminal Tool
This example uses a terminal window. You must have terminal software, such as Tera Term, or PuTTY.
Operation
The Wireless Power Receiver device (PRU) can be connected to any BLE (4.0 or later) - compatible device configured as GAP
Central role and GATT Client which supports the Wireless Power Profile. The green LED blinks while the device is advertising.
The red LED is turned ON after disconnection to indicate that no Client is connected to the device. When the Client connects
successfully, the red and green LEDs are turned OFF. When a Client enables charging, the blue LED turns ON.
The project simulates voltage changes at the charge/battery port (Vrect) and writes the result to the PRU Dynamic Parameter
characteristic. It increases when the charger is enabled by the PTU and decreases when charging is complete. Press the SW2
button to increase the simulation step. The simulation interval value is set to 1 second.
The Wireless Power Transmitter project (PTU) automatically connects to the PRU devices. The PTU uses the WPT Service
handle from the advertising packet for quick PRU discovery instead of the classic device discovery procedure.
When a connection is established, the PTU automatically initiates a basic information exchange procedure, i.e., sends a read
request to the PRU Static Parameter characteristic, a write request to PTU Static Parameter characteristic, enables notification
of the Alert characteristic, and enables charging. A read request to PRU Dynamic Parameter characteristic is sent every second.
The red LED blinks while the device is scanning. The red LED is turned ON after disconnection to indicate that no Peripheral is
connected to the device. When the device connects successfully with any Peripheral, the red LED is turned OFF.
Advertising packets received during the scanning procedure from Peripheral devices are parsed and filtered. Only packets with
WPT service-specific data are handled and showed in the debug terminal.
The example project uses the UART Component for displaying debug information and for sending commands through a terminal
emulator app. The commands are the procedures, which the user can perform.
Table 1. List of Commands
Start discovery procedure.
Enable notifications for the Alert characteristic.
Enable indications for the Alert characteristic.
Disable notifications and indications for the Alert characteristic.
Send Read request for the PRU Static Parameter characteristic.
Send Read request for the PRU Dynamic Parameter characteristic.
Send “Enable Charging” command to the PRU control characteristic.
Send “Disable Charging” command to the PRU Control characteristic.
Enable sequential read of the PRU Dynamic Parameter characteristic.
Disable sequential read of the PRU Dynamic Parameter characteristic.
The above list is prompted to the terminal emulator when ‘h’ is entered in the app.
Use the ‘6’ and ‘7’ commands to send the Enable and Disable Charging commands to the PRU Control characteristic. The
PRU device will indicate charging with the blue LED.
Operation Steps
1. Plug the CY8CKIT-062-BLE kit board into your computer’s USB port.
2. Open a terminal window and perform following configuration: Baud rate – 115200, Parity – None, Stop bits – 1, Flow control
– XON/XOFF. These settings must match the configuration of the PSoC Creator UART Component in the project.
3. Build the Wireless Power Receiver project and program it into the PSoC 6 MCU device. Choose Debug > Program. For
more information on device programming, see PSoC Creator Help. Flash for both CPUs is programmed in a single program
operation.

BLE Wireless Power Transfer with PSoC 6 MCU with BLE Connectivity
www.cypress.com Document No. 002-17646 Rev.** 3
4. Observe the blue LED blinks while the device is advertising, and the output in the terminal window.
5. Do the following to test example, using the CySmart Host Emulation Tool application:
a. Connect the BLE Dongle to your Windows PC. Wait for the driver installation to complete, if necessary.
b. Launch the CySmart Host Emulation Tool by right-clicking on the BLE Component and selecting Launch CySmart.
Alternatively, you can launch the tool by navigating to Start > Programs > Cypress and clicking on CySmart.
c. CySmart automatically detects the BLE dongle connected to the PC. Click Refresh if the BLE dongle does not appear
in the Select BLE Dongle Target pop-up window. Click Connect, as shown in Figure 1.
Figure 1. CySmart BLE Dongle Selection
Note: If the dongle firmware is outdated, you will be alerted with an appropriate message. You must upgrade the
firmware before you can complete this step. Follow the instructions in the window to update the dongle firmware.
d. Select Configure Master Settings and then click Restore Defaults, as Figure 2 shows. Then click OK.
Figure 2. CySmart Master Settings Configuration
e. Set the Duplicate Filter Policy = Disable duplicate filtering in the Master Configuration > Scan parameters
window. See Figure 3.

BLE Wireless Power Transfer with PSoC 6 MCU with BLE Connectivity
www.cypress.com Document No. 002-17646 Rev.** 4
Figure 3. Master Configuration Scan Parameters
f. Press the reset switch on the Pioneer Kit to start BLE advertisement if no device is connected or device is in Hibernate
mode (red LED is on). Otherwise, skip this step.
g. On the CySmart Host Emulation Tool, click Start Scan. Your device name (configured as Power Receiver Unit) should
appear in the Discovered devices list, as Figure 4 shows. Select the device and click Connect to establish a BLE
connection between the CySmart Host Emulation Tool and your device.
Figure 4. CySmart Device Discovery and Connection
h. Once connected, switch to the ‘Power Receiver Unit’ device tab and ‘Discover all Attributes’ on your design from
the CySmart Host Emulation Tool, as shown in Figure 5.

BLE Wireless Power Transfer with PSoC 6 MCU with BLE Connectivity
www.cypress.com Document No. 002-17646 Rev.** 5
Figure 5. CySmart Attribute Discovery
i. Click Pair after discovery finishes, then Enable All Notifications and Read All Characteristics. Observe the received
characteristic values as shown in Figure 6.
Figure 6. CySmart Enable All Notification and Read All Characteristics
j. Select the PRU Dynamic Parameter characteristic and press Read Value to observe the simulated values. Refer to
the A4WP Wireless Power Transfer System Baseline System Specification for details on characteristic structure.
Figure 7. CySmart Windows App
k. Select the PRU Control characteristic, write the 0x40 value (charge enable) to the first byte and press Write Byte.
Observe that the blue LED indicates that the PRU device received the command.

BLE Wireless Power Transfer with PSoC 6 MCU with BLE Connectivity
www.cypress.com Document No. 002-17646 Rev.** 6
l. After some time, observe the Notification of the Alert characteristic received with value 0x08 (Charge Complete). Read
the PRU Dynamic Parameter characteristic and observe the same value in the PRU Alert position (17th byte):
Figure 8. CySmart Windows App
m. If you have some problems with the usage of the CySmart app, refer to the CySmart User Guide.
6. The CySmart mobile app (Android/iOS) does not have Wireless Power Service implementation, but still can be used in
GATT Data Base mode for test this example. You can repeat test flow for CySmart mobile app in step 5. Refer to Android
and iOS CySmart User Guide.
7. The code example ships with the UART debug port enabled. To disable it, set the macro DEBUG_UART_ ENABLED in
common.h to DISABLED and rebuild the code.
8. The BLE Wireless Power Transmitter project is intended to work in a pair with BLE Wireless Power Receiver. Do the
following to test Wireless Power Receiver project, using Wireless Power Transmitter project:
a. Plug the CY8CKIT-062-BLE kit board into your computer’s USB port.
b. Open a terminal window and perform following configuration: Baud rate – 115200, Parity – None, Stop bits – 1, Flow
control – XON/XOFF. These settings must match the configuration of the PSoC Creator UART Component in the
project.
c. Build the BLE Wireless Power Transmitter project and program it into the PSoC 6 MCU device. Choose Debug >
Program. For more information on device programming, see PSoC Creator Help. Flash for both CPUs is programmed
in a single program operation.
d. Plug the CY8CKIT-062-BLE kit board into your computer’s USB port.
e. Open a terminal window and perform following configuration: Baud rate – 115200, Parity – None, Stop bits – 1, Flow
control – XON/XOFF. These settings must match the configuration of the PSoC Creator UART Component in the
project.
f. Build the BLE Wireless Power Receiver project and program it into the PSoC 6 MCU device. Choose Debug >
Program. For more information on device programming, see PSoC Creator Help. Flash for both CPUs is programmed
in a single program operation.