Are you programmatically modifying the length/size of the name when you update it? I believe the string data should have a length value associated with it. If you only change the string and not the length as well, then the name will only display the first "length" characters of the new name.
Thanks for the help.
I am setting the local name with:
/* Start the BLE Component and register the generic event handler */
How do I set the length?
Looking at the comments/documentation for the CyBle_GapSetLocalName(), it is stated that the code will cut the name to the same size as the name specified in the component customizer. The maximum name length possible is 248 bytes with a NULL character to signify the end of the string.
Hmmm, if you want more control, then you will need to dig into the code a little bit:
Look at the source code running in the CyBle_GapSetLocalName() and CyBle_ChangeAdLocalName() functions; The advertisement name is limited in size to the 31 byte length of the advertisement packet, but the scan response packet can be longer I think.
The simplest way to get a longer name would be to set the name as being much longer in the component customizer (top design GUI), and then shorten/write it on code startup to what you want to "initialize" with. Then, it will allow you to shorten and lengthen dynamically the way you want. Otherwise, you would need to allocate memory for the name to allow for dynamically lengthening the name past what the static buffer allocates in the component customizer.
Ok, I thought the length was parameter in the API somewhere. I will do as you suggest and leave spaces in the gui allocate space. Clunky but seems the least convoluted.
Thanks for the help
Unfortunately not :(
For most of the hardware/barebones customization you tend to need to write software to handle the underlying stack interactions with the BLE stack/module. Unfortunately, this is also pretty confusing/complicated at parts and thus why I suggested the name change in the component creator to speed it up.