This is what I believe, of course, my beliefs are flawed, so please DO point my errors out:
-
There is this attribute table on server/peripheral devices. The actual location is not important but if you have to ask, it can be designated by function like sd_ble_gatts_characteristic_add() in a memory managed by the softdevice.
-
Among these attributes, lie the things we want: characteristics.
-
Within a characteristic, lies something we care the most: values.
-
The value resides inside a section of SD managed memory, and is usually accessed by a pointer, the point is, it gets read into the central/client device altogether the first time. You can provide it with a default value, and you can not.
-
When you use functions like sd_ble_gatts_hvx() to "push" messages from server to client, the mcu don't actually send the new content (let's say heartrate) to the client/central yet, it updates that aforementioned value inside the attribute table. And then, it sends out a notification/indication telling the client that the value has just been updated. And subsequently, the client will look up the new values on that notification/indication.
Now, how many things did I get completely wrong?