cancel
Showing results for 
Search instead for 
Did you mean: 

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

LChan.5
Associate II

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​

1 ACCEPTED SOLUTION

Accepted Solutions
Remy ISSALYS
ST Employee

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

View solution in original post

1 REPLY 1
Remy ISSALYS
ST Employee

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