This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reading a subset of data on a BLE server

I am definitely missing something here, but I can't figure out how to specify a subset of data to read from my peripheral.

Here's the setup: my nrf51822 device is a server, publishing a custom service with custom characteristics.

I have in memory is the nrf51822 a long (2048 bytes) list of historical data.

I want to allow a client to be able to read a specific portion of this data rather than having to transfer all 2048 bytes (which I can't anyway).

The SoftDevice handles characteristic reads automatically, but even if I could intercept them I don't see how I can pass parameters to a characteristic read operation.

What is the official BLE way to do what I'm trying to do?

Parents
  • FYI, I would have called the two flavors of reading something like "read static" (your default), and "read dynamic" (where I implement the code to compute the result). This is similar to how you can implement accessors in languages like C#, Java, or Scala. They can be just values, or you can write code to dynamically compute the value.

    Thanks for the suggestion, but one of the core tenets of our API is "use the wordings of the Bluetooth spec whenever possible". The Bluetooth specification uses "authorization" for this particular use case, and hence we adopted the same nomenclature.

Reply
  • FYI, I would have called the two flavors of reading something like "read static" (your default), and "read dynamic" (where I implement the code to compute the result). This is similar to how you can implement accessors in languages like C#, Java, or Scala. They can be just values, or you can write code to dynamically compute the value.

    Thanks for the suggestion, but one of the core tenets of our API is "use the wordings of the Bluetooth spec whenever possible". The Bluetooth specification uses "authorization" for this particular use case, and hence we adopted the same nomenclature.

Children
Related