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

Why is my device name being truncated?

Using SDK 14.0.0 with SD 132 v5, the device name I'm advertising with here is "000000DK". But the advertising module is truncating it to "0000". It will do this if I have too much advertising data, but I don't. I should have 31 bytes and that should be fine. It was fine with SDK 12.1 and an earlier SD version.

image description

I've read this post on the same subject, but it doesn't explain this:

devzone.nordicsemi.com/.../

It looks like it's the appearance that's overflowing me. This was never a problem before and if I now omit any call to sd_ble_gap_appearance_set(), I get 0x0000 as the appearance field, whereas I think I used to get no appearance field at all. How do I remove the appearance and get the same behaviour I used to have with the earlier SDK/SD?

Parents
  • On the picture you have (beside last Device Name AD) three AD objects. They come in Length-Tag-Value form where length counts also Tag. So by simple math 3+2+17+3(length bytes) = 25 bytes which leaves just 6 for whole Device Name AD element to be 31 in total. When you cut Length and Tag you have your 4 bytes so module is having this right. The question is which AD element has changed since previous version (and then by looking to changes in SDK code you should easily spot why and how to fix it).

Reply
  • On the picture you have (beside last Device Name AD) three AD objects. They come in Length-Tag-Value form where length counts also Tag. So by simple math 3+2+17+3(length bytes) = 25 bytes which leaves just 6 for whole Device Name AD element to be 31 in total. When you cut Length and Tag you have your 4 bytes so module is having this right. The question is which AD element has changed since previous version (and then by looking to changes in SDK code you should easily spot why and how to fix it).

Children
Related