How to read generic access profile

Been asked for a last minute change to a nrf project that is a the nrf being a client (central device)  that connects to a server and gets info to and from said server. All fine and working. 

However, we now need to access some info in the generic access profile of the server. 

Are there functions for extracting this information or do you have to write your own code to do this. So, along the lines of:

#define SERVICE_GENERIC_ACCESS 0x1800
#define UUID_CHARACTERISTIC_DEVICE_NAME 0x2A00

#define GAP_SERIVCE_VAL BT_UUID_16_ENCODE(SERVICE_GENERIC_ACCESS)
#define DEVICE_NAME_VAL BT_UUID_16_ENCODE(UUID_CHARACTERISTIC_DEVICE_NAME)

#define THE_GAP_SERVICE BT_UUID_DECLARE_16(GAP_SERIVCE_VAL)
#define DEVICE_NAME_CHARARCERISTIC BT_UUID_DECLARE_16(DEVICE_NAME_VAL)

bt_gatt_dm_start
(conn, THE_GAP_SERVICE, &gap_discovery_cb, &gap_struct
);

With gap_struct having to set up all the generic values in GAP.
Then in the gap_discovery_cb callback functions read the information out?

I was expecting and hoping that there would be existing functions to extract this kind of information,
but having spent hours ploughing through loads of info and grepping source code I can't see anything.



Thanks. 

Parents Reply Children
No Data
Related