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

Nrf beacon example packet size

Can we increase the packet size in Nrf52 Beacon example ? I want to send UUID=16 Bytes + Major=4 Bytes, Minor= 4 Bytes + RSSI= 1 Byte i.e Total =25 Bytes. I am using SDK13.

  • Hello,

    You may not increase the advertising packet size over its 31 byte limit. You should also keep in mind that there are 2 byte overhead with each bitfield, that you must also send.
    Please see this previous ticket on the subject - it is old, but still relevant.
    Or, could it be that you are asking about Advertising extension?

    Best regards,
    Karl

  • What are all  included in those 31 bytes ?

  • I am not sure I understand what you are asking here.
    The contents of the advertising packets must be defined by yourself, and may not exceed 31 bytes - which is my answer to your original question of "can we increase the packet size".

    Each bit field must have both a type and length byte, in addition to their contents - this is what makes up their "2 byte overhead".
    As an example, a 16-bit UUID will require 4 bytes of advertising packet space, since there is 1 type byte, 1 length byte and 2 UUID content bytes.
    You might find the discussion in this ticket useful to have a look at.

    Could you share the code snippet where you generate your advertising data, and perhaps also any errors you are encountering?

    I highly recommend this tutorial by my colleague, for familiarizing with BLE advertising.

    Best regards,
    Karl

  • I know that the packet size should not exceed 31 bytes. But my question is can we remove few fields liked flags and increase the major and minor size ?

1 2