This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Confusion regarding ble_gatts_attr_t::p_value

So it points to the ACTUAL value of a characteristic. So why do we need that function "ble_hvx_push()" (forgot its name, sorry, but you know what I mean) for? And what's with the notification and indication, since all I have to do, is to let central or peripheral device write to what it points to?

I'm so confused! Why do we need the fucntion ble_hvx_push()? Does it also write value to ble_gatts_attr_t::p_value only afterwards it notifies the client (let's say a phone), so the phone will know the value has been updated, so it will try to actively look the new value up? This is the only logical explanation I can think of.

And when I use the android API characteristic.setValue, do I also write to ble_gatts_attr_t::p_value?

Or is it that the phone write to one place, the nrf51xxx write to another, and somehow the 2 will be integrated later?

Last question, but not least: is notification/indication the only way to communicate between server and client? Is it prone to problems when communicates continuously for a stream of data, for example, 200 rounds of packets, each with 20 bytes of payload? Is it stable? Is it up to the job?

Related