Thanks - this looks good. Yes, I think letting the softdevice handle permissions is definitely a really nice addition.
The write causing bonding to initiate definitely seems what I'd expect based on how I've seen other devices working.
Your branch looks great as well - although it might be good to add a check for readVar!=NULL and same for writeVar (maybe just in set_security_mode?). I'm pretty sure this'll work with what you've done, but it'd be nice if you could do just something like:
security: { write: { encrypted: true } },
as a shorthand - so you don't have to mention everything.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks - this looks good. Yes, I think letting the softdevice handle permissions is definitely a really nice addition.
The write causing bonding to initiate definitely seems what I'd expect based on how I've seen other devices working.
Your branch looks great as well - although it might be good to add a check for
readVar!=NULL
and same for writeVar (maybe just in set_security_mode?). I'm pretty sure this'll work with what you've done, but it'd be nice if you could do just something like:as a shorthand - so you don't have to mention everything.