Truncated Device Name

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

The default device name is "BLE_Serial"  which counts out to 10 characters.   When I modify the string to something greater than 10 characters, like "this is a test", the string gets truncated to 10 characters so I only see "this is a" on my cell phone.    The cyBle_discoveryData.advDataLen does not seem to change its value no matter how long I make the name.  Where do I over-ride the customizer length value?

0 Likes
1 Solution
Anonymous
Not applicable

Under the BLE component, Gap Settings, Peripheral Role->Advertisement Packet: Local Name should be checked to enable the local name being advertised, and you can tell it to use the "Complete" name or "Shortened" with specified name length in the "Shortened" option.

   

If you are manually updating the name/info using software running on the chip, then you will need to adjust the length data value byte (first byte of each "service" being advertised) to match the amount of data following it for the service; in this case, it is the name, and thus should be the length of the name + 1 for the "Local Name" byte following the length byte.

View solution in original post

0 Likes
2 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

   

The total length of a complete Advertising packet cannot exceed 31 bytes.Can you try disabling other data in advertisement packet other than the device name.

   

Thanks,

   

Hima

0 Likes
Anonymous
Not applicable

Under the BLE component, Gap Settings, Peripheral Role->Advertisement Packet: Local Name should be checked to enable the local name being advertised, and you can tell it to use the "Complete" name or "Shortened" with specified name length in the "Shortened" option.

   

If you are manually updating the name/info using software running on the chip, then you will need to adjust the length data value byte (first byte of each "service" being advertised) to match the amount of data following it for the service; in this case, it is the name, and thus should be the length of the name + 1 for the "Local Name" byte following the length byte.

0 Likes