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

DEVNAME maximum length

Hello,

I am working on a project with STM32 master and nRF51822 slave connecting to Android/iOS mobile apps.

I send the advertising parameters from STM32 to my nRF51822 (the name is one of the parameters and I am sure I get the whole name in my nRF51822).

Based on some discussions found here I set the BLE_GAP_DEVNAME_MAX_LEN to the max "31" and my DEVNAME is "31" bytes lengh too. but while advertising I got missing advertising name with "22" bytes lengh only.

1/ Why I keep getting only "22" bytes DEVNAME ?

2/ How can I get at least a "23" DEVNAME advertizing ?

Thanks

Parents
  • Show us whole payload of ADV_xxx packet (and I guess you will find the answer when you will be pasting it here). Note that limit of 31 Bytes doesn't apply to effective payload (like device name string) but to overall data. At least 2 Bytes get lost on GAP AD header (Length and Tag bytes) and in your case there are probably other AD objects (e.g. like Flags AD which are mandatory by BT SIG GAP layer specification). So no, you won't be able to fit 31-byte device name string into BLE GAP formatted advertisement packet, at least not in BT SIG Core specification v4.0-4.2.

Reply
  • Show us whole payload of ADV_xxx packet (and I guess you will find the answer when you will be pasting it here). Note that limit of 31 Bytes doesn't apply to effective payload (like device name string) but to overall data. At least 2 Bytes get lost on GAP AD header (Length and Tag bytes) and in your case there are probably other AD objects (e.g. like Flags AD which are mandatory by BT SIG GAP layer specification). So no, you won't be able to fit 31-byte device name string into BLE GAP formatted advertisement packet, at least not in BT SIG Core specification v4.0-4.2.

Children
Related