Skip to main content
LChan.5
Associate II
July 15, 2022
Solved

[STM32WB55] how to detect/debug read_event in BLE_p2pServer of P-NUCLEO-WB55.Nucleo sample code

  • July 15, 2022
  • 1 reply
  • 1390 views

Hi Sir,

I'm developing project using STM32WB55 and start from STM32Cube_FW_WB_V1.14.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_p2pServer.

everything setup fine with LightBlue Android APP. When I trace and debug code, I cannot hit break if I use "READ" from lightBlue APP. I can hit point if send notify/subscribe and write. Please kindly guide me where I can hit READ EVENT in code. thank you.

btw, I also try STM32Cube_FW_WB_V1.13.0 and other Android BLE APP. The result is same.

Best regards,

Chang​

This topic has been closed for replies.
Best answer by Remy ISSALYS

Hello,

Basic read is managed by the BLE stack. If you want to have the read event on application side, you should used the following GATT event mask when you add the characteristic (see aci_gatt_add_char) GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP. Then, you have to track this event ACI_GATT_READ_PERMIT_REQ_VSEVT_CODE, you should add a case in PeerToPeer_Event_Handler function. When you received this event, you should send the aci_gatt_allow_read command to indicate to the stack that it can send the response to the client.

Best Regards

1 reply

Remy ISSALYS
Remy ISSALYSBest answer
ST Technical Moderator
August 24, 2022

Hello,

Basic read is managed by the BLE stack. If you want to have the read event on application side, you should used the following GATT event mask when you add the characteristic (see aci_gatt_add_char) GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP. Then, you have to track this event ACI_GATT_READ_PERMIT_REQ_VSEVT_CODE, you should add a case in PeerToPeer_Event_Handler function. When you received this event, you should send the aci_gatt_allow_read command to indicate to the stack that it can send the response to the client.

Best Regards