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
  • I want this to support arbitrary lengths, so option 1 doesn't really scale well.

    I'm not sure what rd_auth does for me.

    I'm thinking what I'll do is have a separate characteristic that lets me set up the value for the next read, kind of like writing to a read pointer.

    I would still like to get notified after the read happens, so I can increment the pointer and set up the next read. Is there a way to register for read notifications?

Reply
  • I want this to support arbitrary lengths, so option 1 doesn't really scale well.

    I'm not sure what rd_auth does for me.

    I'm thinking what I'll do is have a separate characteristic that lets me set up the value for the next read, kind of like writing to a read pointer.

    I would still like to get notified after the read happens, so I can increment the pointer and set up the next read. Is there a way to register for read notifications?

Children
No Data
Related