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

Discovery DIS


I use nrf52840-dk as central_hr and nrf52833-dk as peripheral_hr, examples from NRF Connect SDK.

It works well, but I want to implement reading Device Information like Model Number String on my central device.

I can read it on my phone, using nRF Connect, so peripheral device is ok

So, what I did:

1. Added CONFIG_BT_GATT_DM=y to prj.conf to use Discovery manager

2.Added CONFIG_HEAP_MEM_POOL_SIZE=2048 to prj.conf, because Discovery manager uses k_malloc

3.I call 

err = bt_gatt_dm_start(conn, BT_UUID_DIS, &discovery_cb, NULL);

when connected, and I get into discovery_completed_cb, but I don't understand how to check if Model Number String or Manufacturer Number String exists,

how to check could I read it, write or notify and how to read the value.

Comparing to central_bas example, they use functions like bt_bas_notify_supported(&bas),

and they have special structure for BAS 

static struct bt_bas_client bas;

I didn't find something like this for DIS.

Thank you,