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

How Can I limit Gatt Data bytes that I write? (Not With Zero-Fill)

I created an characteristic that has MAX_Length = 20 Bytes characteristic.

And When I'm trying to write less than 20bytes on this Characteristic, It Always send with 20Bytes with Zero filled data bytes.

For example, I'd like to write 123456 (6 Bytes) It keeps Send with like 12345600000000000000(20Bytes).

How Can I Cut off the left Zero Filled Bytes and only send with the Real data?
(with SD130, SDK v12.2.0, nrf51422, nrf51-dk)

OR does this Zero Fill send is normal Behaviour?

Related