BLE multi-connection can let an embedded device exchange data with several clients through a single Bluetooth Low Energy interface. A PSoC 6 MCU example illustrates this arrangement by configuring the MCU as a peripheral and GATT server that can connect to as many as four central devices. For automation engineers and embedded developers, the design is a useful reference for understanding how multiple client connections, GATT services, firmware tasks, and low-power operation fit together.
The example is a demonstration design rather than a complete industrial application. Its value lies in showing the relationships between BLE roles and services, and how application functions such as sensor readings and LED control can be exposed to connected clients.
How the BLE multi-connection architecture works
In this design, the PSoC 6 advertises its availability and acts as a peripheral. A connected PC or mobile device acts as a central. At the GATT layer, the PSoC 6 is the server: it hosts a database of services and characteristics. Each central is a GATT client that can discover and access those attributes.
The example supports up to four central devices connected to the same PSoC 6 BLE device. All connected clients can access the server’s GATT database. This makes the example relevant when evaluating a device that needs to make common data or controls available to more than one client, while keeping the embedded device in the peripheral/server role.
The design provides five services:
- Device Information Service for manufacturer or vendor information.
- Health Thermometer Service for temperature information.
- RGB LED service for color and intensity control.
- Custom read/write service for transferring 128-bit data.
- Custom notification service for reporting changes made to characteristics.
GATT services connect application functions to clients
GATT organizes BLE data into services and characteristics. A service groups related functionality, while characteristics hold values that clients may read, write, or receive through notifications. In the example, a client can use the RGB LED characteristic to change the onboard LED, or access the custom characteristic to read or write 128-bit data.
The notification service provides a compact way to inform connected devices that a characteristic has changed. Its two-byte payload identifies the device associated with the change and the characteristic category. The first byte represents a device identifier: zero is the default, and values one through four identify devices. The second byte identifies the characteristic category: zero is the default, one indicates the custom service, and two indicates RGB LED data.
This is a specific implementation choice, not a general BLE convention. In a production design, engineers should define the meaning and handling of notifications carefully, especially where multiple clients can make changes. The example demonstrates notifying connected devices when GATT data changes; application requirements determine how clients interpret and act on those updates.
Firmware tasks coordinate BLE, sensing, and indicators
The code uses FreeRTOS and separates responsibilities into tasks. A BLE task handles BLE operation and events, while other tasks manage the RGB LED, status LEDs, temperature measurement, and optional UART debug output. Queues pass commands and data between parts of the application. This structure helps keep BLE event handling distinct from application functions, rather than placing all behavior in one execution path.
The example also uses PSoC 6’s dual-core architecture: the CM0+ core starts the BLE controller and enables the CM4 core, while the main application entry point on CM4 sets up tasks and starts the RTOS scheduler. For teams adapting the design, this division is a reminder to review core responsibilities, task communication, and event handling together when extending a multi-connection application.
Sensor input and low-power operation
Temperature measurement is based on a thermistor circuit. The ADC scans two differential channels measuring voltages across the thermistor and a series reference resistor, and averages multiple samples without CPU intervention. The resulting temperature information is made available through the Health Thermometer Service.
Low-power operation is also part of the design. It uses Deep Sleep with the MCWDT and GPIO interrupts in support of tickless idle operation. Board LEDs indicate key states: the orange LED blinks during BLE advertising, while the red LED is on when the device is in Hibernate mode. These indicators help users observe the example’s operating state during testing.
Testing the multi-client behavior
The example can be tested with the CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit and the CySmart mobile application or PC host emulation tool. After programming the board and starting advertising, a user scans for the peripheral, connects, and discovers its GATT attributes. Additional central devices can repeat the connection process until the four-connection limit is reached.
Testing can include reading device information and temperature, changing RGB LED values, and reading or writing the custom 128-bit characteristic. The UART debug port is disabled by default; enabling its configuration macro allows debug messages to be viewed in a serial terminal. The documented development environment includes PSoC Creator 4.2 and Peripheral Driver Library 3.0.3, details that matter when reproducing this particular code example.
Practical implications for embedded designs
This PSoC 6 BLE example shows how a single peripheral can host several central connections while presenting a shared GATT database and multiple application services. It also demonstrates the supporting firmware patterns: task separation, queued communication, ADC-based sensing, change notifications, and low-power behavior.
For system designers, the key takeaway is to treat multi-connection support as an end-to-end design concern. Connection roles, GATT access, notification semantics, task coordination, and power-state behavior all need to work together. The example provides a concrete starting point for evaluating those interactions, while application-specific requirements must guide any adaptation for an automation product.