Showing results for 
Search instead for 
Did you mean: 

How to modify P2P_Server (WB55RG) and P2P_Client (WB55CG USB dongle) to log continuous ADC data from Server while writing command from the dongle side serial.

Associate II

Hello, I am currently working on a project in which I need to log continuous data from the P2P server to USB Dongle (Client) while I send a command to the server from time to time.

Before this project, I successfully opened the BLE custom server to send notifications and write commands through LightBlue App using the STM32WB series. However, I need to log data from the server in real-time now.

These days, I am struggling with this project. Currently, I am modifying the BLE_p2p_server code provided by the ST (actually, I did a similar thing with the custom project on P2P.server.c but failed), however, I don't know how to add a function for a continuous notification and how to change Client code for serial printing received data and write a hex byte from the dongle (Client).

What I want is that just get logging data from the STM32WB with my sensor while I am available to control some of the GPIO_Write functions using BLE.

Is there any good example? (I tried Heartrate, data throughput and more, they were not very helpful as they are not using exact dongle)

Furthermore, I tried to use python (bleak) to do it, but I was available to notify but failed to use the write function together. (as it is asynchrony way, I need to stop notify while I am using Write)

Thank you for reading.

ST Employee


You can look BLE_CableReplacement example available in STM32CubeWB package.

Best Regards