CyBle_GapSetLocalName (const char8 name) API should be used before the device starts advertising. So what you can do is to stop advertisement, call this API and then start advertisement.
There is another method wherein you use the CyBle_GapUpdateAdvData () API to update the advertisement data but the CyBle_GapUpdateAdvData () should be called when the BLESS state is in CYBLE_BLESS_STATE_EVENT_CLOSE.
There is a forum post with the same question and it has been answered. Posting the link here:
Hope this helps!
Problem of this forum that not exist FAQ and search is very difficulty.
Chaplin, you are quite right!
Searching for "change device name" (without the quotes) give more than 1200 results.
Searching for "change device name" (with quotes) give only 3 results, one is your post and the other two have no relevance.
@yssu: So how to find the prior thread you mention?
For Device Name I assigned Custom Characteristic with type utf8s but PSOC Creator have only char. It mean I need read value from BLE char by char or exist better method ?
@Bob: I don't quite understand your question.
@Chaplin: You can increase the length of the characteristic in the configuration window and you can treat the data as an array.
Sorry, when I was not quite clear with my question.
I remembered to had seen that similar thread you showed up, but I wasn't able to find it. So my question was
With which keywords have you been able to find that thread again (or did you just know that)?
I don`t understand why in BLE custom characteristic I can define a lot of types but CyBle_GattsWriteAttributeValue receive ONLY array /** Pointer to the value to be packed */ uint8* val;
Cypress always send users to 100_Projects_in_100_Days but exist only 52 ! Where is all others examples ?
May be you can create number 53 with libraries of converters from all this types to uint8* val ?
@chaplin: Say you have a variable "char name" and handle pair CYBLE_GATT_HANDLE_VALUE_PAIR_T "handleValuePair". All you have to do is set handleValuePair.value.val=(uint8 *)name. Why we use pointers is because it makes definition of structures easier, or else there would have to be structures for every variable type.
Coming to the 100_Projects_in_100_Days, we will try to add more projects. We are working on it.
@Bob: I already knew it :)
I know it and I use it but it`s not comfortable. I talk about something like exist in other tool :
Usually a combination of pointers and typecasting is used to make these assignments. I believe this is why there are no functions explicitly for conversion. Anyway, we will check if such functions can be included.