In Espruino on a Puck.js, I want to implement a BLE application that works as follows:
I have not found an onRead event in the NRF.setServices properties (like the onWrite that is available) or any event in Espruino that I can use to implement the above logic. Am I missing something in the docs that might allow this? Is there an approach I can use with Espruino? I could write to the characteristic to remove the queue entry in the Puck but I'd like to avoid doing this. I'm not looking for a workaround, just a method of knowing, in the Espruino code, when a characteristic is being or was read.
Edit 1: I understand that the Nordic SoftDevice does not provide an API to check if a characteristic has been read but there is a security event that I can watch so am wondering if I set up the characteristic in such a way that I'll get a security event on every read. I've tried the combinations supported according to the Espruino hardware reference but still luck on getting the security event on read to fire.
© Espruino, powered by microcosm.
Report a problem