1. Peer to Peer Profile
The Peer to Peer Profile is a Generic Attribute Profile (GATT) based low-energy profile defined by STMicroelectronics with proprietary UUIDs(128 bits)
The Peer to Peer Profile, widely used for direct connection, defines the communication between a GATT-server of a Peer to Peer Server device, and a GATT-client Collector device, such as a smartphone, STM32WBA Peer to Peer Client or Peer to Peer Router devices.
- The Peer to Peer Server:
- Contains the P2P Service, which expose two characteristics (Notification & Write) in order to create a bi-direction data communication.
- Is the GATT server.
- The Collector:
- Accesses the information exposed by Peer to Peer Server, controls it with the Write characteristics, receives Notification from it.
- Is the GATT client.
This wiki page is the description of the Peer to Peer Server and Peer to Peer Client projects provided within the STM32CubeWBA MCU Package[1]
Follow this "link" for Peer to Peer Router project explanation.
Bluetooth® LE Peer to Peer Profile & STM32WBA |
---|
1.1. STM32WBA Peer to Peer Server application
The table below describes the structure of Peer to Peer service:
Bluetooth® LE Peer to Peer Service specification | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Peer To Peer Server is exported as a Service
- LED characteristic:
- Used to control LED1 (Blue) on STM32WBA platform by remote device .
Peer to Peer Service - LED Characteristic | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
- SWITCH Characteristic:
- Used to switch LED or Lamp on Collector device.
Peer to Peer Service - SWITCH Characteristic | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
Example of flow diagram between STM32WBA & ST BLE Toolbox |
---|
At start up, Peer To Peer Server application starts Advertising including the Manufacturer Advertising Elements as described below:
0 | 1 | 2-3 | 4 | 5 | 6 | 7 | 8 | 9 | 10-15 | |
---|---|---|---|---|---|---|---|---|---|---|
Length | Manufacturer ID | Company | BlueSTSDK Version | Device ID | Firmware ID | Option 1 | Option 2 | Option 3 | Device Address | |
P2P Server | 0x0F | 0xFF | 0x0030 STMicro | 0x02 | 0x8B Nucleo-WBA | 0x83 | 0x00 | 0x00 | 0x00 | 0x08E12Axxxx |
Advertising is stopped after 30s, pressing B1 restart it.
1.2. STM32WBA Peer to Peer Client application
2. Requirements
2.1. Software and system requirements
The software required are the following (minimum IDEs version):
- IAR Embedded Workbench for ARM (EWARM) toolchain V??
- RealView Microcontroller Development Kit (MDK-ARM) toolchain V??
- STM32CubeIDE toolchain V?? [2].
Programmer:
- STM32CubeProgrammer[3] : To flash the board with an already generated binary
2.2. Hardware requirements
NUCLEO-WBA5 [4] is necessary to install the application.
Hardware platform illustration |
---|
|
2.3. Collector applications compatible
The STM32CubeWBA Health Thermometer Sensor project is compatible with the following collector:
3. References