This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Ble central multi service ble_db_discovery_evt_register

I'm creating a ble central device that receives instructions via UART on which device to connect to and which UUID to write to.

I'm able to connect to a peripheral device.  But all the examples for central require  to run ble_db_discovery_evt_register(UUID) and then handles are assigned to peer_db.

i got sd_ble_gattc_char_value_by_uuid_read to work fine. but now i need to write to characteristic UUID. this requires DB to be setup with handles etc. Is there any way to dynamically assign handles to peer_db without hard coding those values?

I just need a strategy of how to go about discovering and adding handles to the DB without hard coding like that:

 windoor_evt.params.peer_db.state_handle = p_evt->params.discovered_db.charateristics[i].characteristic.handle_value;

hope that makes sense

thanks

Parents Reply Children
No Data
Related