Thanks to both of you for hugely helpful answers! Now, the last bit ...
Where is the value -- or the variable, more accurately -- associated with a characteristic defined? So that I know which one to update. :-) dg > On Nov 28, 2016, at 4:30 PM, Christopher Collins <[email protected]> wrote: > > As long as you specify one of the BLE_GATT_CHR_F_NOTIFY or > BLE_GATT_CHR_F_INDICATE flags in the characteristic definition, the > characteristic will be subscribable. > > When a peer subscribes to a characteristic, the stack signals this event > to the application via the GAP event callback associated with the peer. > When a peer unsubscribes, this is signalled via the same mechanism. For > rationale on why the GAP event callback is used here, see this email: > https://lists.apache.org/thread.html/8706f7914d2b716a02c25bdfc57fe942f7c7fca82446dd3523014d43@%3Cdev.mynewt.apache.org%3E > > <https://lists.apache.org/thread.html/8706f7914d2b716a02c25bdfc57fe942f7c7fca82446dd3523014d43@%3Cdev.mynewt.apache.org%3E> > > As Mike indicated, your application tells the stack that a > characteristic's value has changed via the ble_gatts_chr_updated() > function. It is up to the application to actually change the value > prior to calling this function. > > If you are not sure which handle is associated with a particular > characteristic, you can perform a lookup by > service-characteristic-UUID-pair using the ble_gatts_find_chr() > function. -- David G. Simmons (919) 534-5099 Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs> /** Message digitally signed for security and authenticity. * If you cannot read the PGP.sig attachment, please go to * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!! * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/> **/ ♺ This email uses 100% recycled electrons. Don't blow it by printing! There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.
