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

Variable Length Characteristic with Notification

How do I set up a variable length characteristic which is greater than 20 bytes and use notifications with this characteristic?

For example I have several variable length characteristics which are greater than 20 bytes and the goal is these would be read with a long read on the GATT client after the connection was established. Then notifications would be turned on for this characteristic and the data transmitted would <= 20 bytes.

Thanks

Parents
  • Don't really understand the question. You make a characteristic as long as you like, variable length if you want, just as usual, and you notify up to the first 20 bytes of it during a notification, as usual, and if the client wants the rest of it they do another long read to get the rest of it, as usual.

    This is a standard use case for a characteristic.

Reply
  • Don't really understand the question. You make a characteristic as long as you like, variable length if you want, just as usual, and you notify up to the first 20 bytes of it during a notification, as usual, and if the client wants the rest of it they do another long read to get the rest of it, as usual.

    This is a standard use case for a characteristic.

Children
Related