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

How expensive are characteristics?

I'm planning on having all of the different Device Information Service characteristics (fw_revision, sw_revision etc) with each being just a single integer for version number. Alternatively, I could combine them into one characteristic, i.e. "1.0.1".

With all things considered, would I be gaining anything by combining them (resources, speed), or should I just keep them separate?

  • Combining them could possibly save some RAM spent on the attribute table, in the order of a few bytes. They may also be possible to read faster over the BLE link when combined, but most likely not since you could probably read all of them with the GATT Read Multiple Characteristic Values procedure anyway. You will also probably have more complex code to combine/split these combined values into/from a single characteristic.

    My take is that unless you really really need to reduce the RAM footprint or the reading overhead (and it it is not possible to do so with a GATT Read Multiple Characteristic Values procedure), I recommend not doing it.

Related