Project #021: Dynamic GATT Services | Cypress Semiconductor
Project #021: Dynamic GATT Services
In today's example project, we will demonstrate how to enable and disable GATT Services on the fly.
In this example, the BLE Component is configured as a GAP Peripheral with a custom Service to control RGB LEDs on the BLE Pioneer Kit. A UART Component is used to trigger the custom RGB LED Service ON or OFF, via commands sent from a terminal window. For demonstration purposes, we use the CySmart USB Dongle (included with the Bluetooth Low Energy Pioneer Kit) as a GAP Central that our device will connect to. Alternatively, this GAP Central could also be a mobile phone. Once connected, the user can send commands to the Bluetooth Low Energy Pioneer Kit (aka the GAP Peripheral) via a terminal window to enable or disable the RGB LED custom Service. By sending a "D" command via the terminal window, the custom Service is disabled and no longer seen by the GAP Central. By sending an "E" command via the terminal window, the custom Service is re-enabled and can again be observed by the GAP Central.
You can download this PSoC Creator project along with a detailed PDF of instructions, here from GitHub: https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day021_Dynamic_GATT_Service