# STM32WBA-BLE-Security-Level-Characteristic **Repository Path**: stjinqi/STM32WBA-BLE-Security-Level-Characteristic ## Basic Information - **Project Name**: STM32WBA-BLE-Security-Level-Characteristic - **Description**: This package contains two specific applications to demonstrate Security Level Characteristic feature on STM32WBA55 MCU - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-03 - **Last Updated**: 2025-06-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # STM32WBA-BLE-Security-Levels-Characteristic Demonstrates STM32WBA acting as BLE central and GATT client with BLE_p2pClient_SLC and GAP peripheral and GATT server with BLE_p2pServer_SLC. BLE_p2pClient_SLC application scans and connects to BLE_p2pServer_SLC device. For more information regarding BLE Security Level Characteristic, please visit BLE Security Level Characteristic Wiki documentation (https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WBA_LE_Gatt_Levels_characteristic). ## Setup These applications are running on two **NUCLEO-WBA55CGA boards**. Applications are derived from BLE_p2pClient (BLE_p2pClient_SLC) and BLE_p2pServer (BLE_p2pServer_SLC) applications. Open a VT100 terminal on Central and Peripheral side (ST Link Com Port, @115200 bauds). At startup, devices are initialized. - The peripheral device starts advertising. - B1 on central device starts scanning. Scan is stopped if a BLE_p2pServer_SLC is detected. ## Application description These applications are based on BLE_p2pClient_SLC and BLE_p2pServer_SLC from STM32CubeWBA package v1.6.0. Two STM32WBA nucleo boards are used, one central/client (flashed with BLE_p2pClient_SLC) and one peripheral/server (flashed with BLE_p2pServer_SLC). The GATT server board supports a service with a read/write characteristic that allow to switch on/off server blue led and a read/write characteristic with ENCRY_READ and ENCRY_WRITE permissions that supports notification. The board flashed with BLE_p2pServer_SLC is defined as GAP peripheral. Open a VT100 terminal on Central and Peripheral side (ST Link Com Port, @115200 bauds). At reset application initialization is done. - The peripheral device starts advertising. - Push B1 on central: the central device scans and automatically connects to the peripheral (use of FW_ID_P2P_SERVER_SLC). - After connection: - the client discovers service and characteristics. - the client enables all notification. On client side when connected and paired: - B3 enables notification - B1 starts (blue LED is ON)/stops (blue LED is OFF) write without response. - At reset p2pServer_SLC device starts advertising. - On p2pClient_SLC device, click on button B1 to launch a scan. A connection is initiated if a p2pServer_SLC device is detected. Services and characteristics are discovered, all notifications enabled. LE Security Level Characteristic is read, security level is greater than "no security". So pairing request is sent. Char3 has following permissions: ATTR_PERMISSION_ENCRY_READ and ATTR_PERMISSION_ENCRY_WRITE and following properties: READ, WRITE_WITHOUT_RESPONSE and NOTIFY Before pairing complete char3 notification enabled is not written. - On p2pServer_SLC device, click on button B1 to send a notification message toward connected p2pClient_SLC device, the blue LED on the Client device should switch on/off. - Once the p2pClient application is connected to a p2pServer: "SERVER : CAN'T INFORM CLIENT - NOTIFICATION DISABLED" appears. - On p2pClient_SLC device, click on button B3, char3 notification is enabled. - On p2pServer_SLC device, click on button B1 to send a notification message: INFORM CLIENT BUTTON 1 PUSHED and the blue LED on Client side should switch on/off. - Pressing button B2 while not connected clear the database on both devices. ## Troubleshooting **Caution** : Issues and the pull-requests are **not supported** to submit problems or suggestions related to the software delivered in this repository. The STM32WBA-BLE-Security-Levels-Characteristic example is being delivered as-is, and not necessarily supported by ST. **For any other question** related to the product, the hardware performance or characteristics, the tools, the environment, you can submit it to the **ST Community** on the STM32 MCUs related [page](https://community.st.com/s/topic/0TO0X000000BSqSWAW/stm32-mcus).