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

About GATT Server Context in HID mouse/keyboard example

Hi,

Sorry if these are silly questions but I've tried some searchings and still cannot figure out the answers for the questions below

  1. What is GATT Server Context? What is the data inside it specifically?

  2. What is the purpose of saving GATT Server Context to persistent memory for each bonded device and what happens if I lose it?

  3. I see in the example code that both gatts_context and bond_context are saved in persistent memory. And when there is a connect request from a previous bonded device, gatts_context will be loaded (applied) using sd_ble_gatts_sys_attr_set function. So, how about the bond_context (holds encryption info)? I dont see any function to load it.

I'm using Nordic nrf51822 chip with soft device s110 v7.0.0

Thank you for any help!