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

How to make a Characteristic with 2 or 3 custom attributes?

Here I´m again,

Maybe sound a little bit silly but I´m not able to find a way or a solution to make simply a Characteristic with more than one attribute. Something similar I was able to make with the advertising data, making an array and not so much trouble with that. But I´m not able to find a way with a custom service->Characteristic.

If you could give me some tips or put me on the way to a good solution will be great.

Thanks

Parents
  • Hi Alvaro

    You can't have more than one value attribute in each characteristic, so all the data has to be put into that one attribute. You can change the length of the value attribute though, from 1-20 bytes normally.

    You can have several descriptor attributes in each characteristic, but the descriptors only contain metadata describing the actual data in the characteristic value.

    In other words, if you need several different values you will have to create separate characteristics.

    It's also possible to create long attributes that can be larger than 20 bytes, but it is a bit limited what you can do with long attributes (for instance you can't use notifications or indications with long attributes).

  • Thanks one more time. I think i would make something like that.

Reply Children
No Data
Related