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

Why am I getting a length error (0x09) with this advertisement

Here is the advertisement and scan response:

Advertisement 02, 01, 06, 12, 09, 47, 68, 73, 47, 6C, 75, 63, 6F, 73, 65, 4D, 6F, 6E, 69, 74, 6F, 72, 03, 03, 90, F9, 05, 16, 90, F9, 11, 10
Scan Response 12, 09, 47, 68, 73, 47, 6C, 75, 63, 6F, 73, 65, 4D, 6F, 6E, 69, 74, 6F, 72

Failed to set advertisement data. Error code: 0x09

Which gives me the above error. However this advertisement does not

Advertisement 02, 01, 06, 11, 09, 47, 68, 73, 42, 6C, 6F, 6F, 64, 50, 72, 65, 73, 73, 75, 72, 65, 03, 03, 90, F9, 05, 16, 90, F9, 07, 10
Scan Response 11, 09, 47, 68, 73, 42, 6C, 6F, 6F, 64, 50, 72, 65, 73, 73, 75, 72, 65

neither does this:

Advertisement 02, 01, 06, 0F, 09, 47, 68, 73, 54, 68, 65, 72, 6D, 6F, 6D, 65, 74, 65, 72, 03, 03, 90, F9, 05, 16, 90, F9, 08, 10
Scan Response 0F, 09, 47, 68, 73, 54, 68, 65, 72, 6D, 6F, 6D, 65, 74, 65, 72

I do not see any error in any of the length fields.

The same code is used to generate both sets. The only difference between the two is the name (09) field.

Related