Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Writable Variables

I have a working application based on one of the examples in the dev kit. It was quite a struggle, and shouldn't be that hard. I would have expected simply a table of variables to expose on BLE, along with attributes such as size and preferred display format (most of which would already be covered by the various groups of UUIDs in the BLE spec), and pointers to a function to call when the variable is read or written. That said, I've slogged my way thru the examples and the official BLE specs, and have an application running nicely, wherein a variable is read from hardware and the value periodically updated on the nRF Connect display.

Now I need to add a variable that can be written via nRF Connect, a simple integer value. I am attempting to use the BLE defined Analog I/O type, and running into no end of strange compiler warnings as I try to build a scaffolding to match that very shaky conglomeration in the BLE example in the dev kit. I think I have everything in place that I need, except that I can't get the event handler hooked up for a write to the variable. Can anyone point me to an example in one of the provided examples that would give me some guidance? I have looked extensively and all I find is examples going in the other direction - reading values from the nRF52 via BLE to display on nRF Connect.

Help?!?

Parents Reply Children
No Data
Related