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

Data Size Limit

Hello,

I am using nRF52832 development kit. I used different examples to send data. But i couldn't accomplish to send data packet over 20 byte. The max data size is defined about 500 byte. But when i try it doesn't work. I always get 0x14 data length which is 20 in decimal. Is there any way to make it more than 20 byte? Any help would be appreciated.

Parents
  • If you use GATT layer (which I suppose you do based on your poor description) then you need to respect basic principles:

    • Each GATT Characteristic Value has certain size and you cannot write there more without specific fragmentation/reassembly layer on top (managed by your app).
    • The same applies to GATT Notification/Indication methods but these are also limited by current (G)ATT MTU size negotiated. As default ATT_MTU size is 23B and GATT header consumes 3B it's only 20B left.

    You can overcome both limitations to certain extend (on GATT Server you should be able to create Value handles as long as 512B and ATT_MTU extension is supported by S132 and S140 stacks) but indeed it also depends on the other side of the link. Therefore some people for simplicity - even this means sacrificing some potential throughput - settle down with default ATT_MTU size and simply build fragmentation layer on top.

Reply
  • If you use GATT layer (which I suppose you do based on your poor description) then you need to respect basic principles:

    • Each GATT Characteristic Value has certain size and you cannot write there more without specific fragmentation/reassembly layer on top (managed by your app).
    • The same applies to GATT Notification/Indication methods but these are also limited by current (G)ATT MTU size negotiated. As default ATT_MTU size is 23B and GATT header consumes 3B it's only 20B left.

    You can overcome both limitations to certain extend (on GATT Server you should be able to create Value handles as long as 512B and ATT_MTU extension is supported by S132 and S140 stacks) but indeed it also depends on the other side of the link. Therefore some people for simplicity - even this means sacrificing some potential throughput - settle down with default ATT_MTU size and simply build fragmentation layer on top.

Children
No Data
Related