How to change the bluetooth name?

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

cross mob
zhch_4550981
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

If the default bluetooth name of BLE is “ABC”, I want to change it to “123”  through UART or mobile APP, which can be changed for many times. How should I achieve this。

How to change the bluetooth name.png

0 Likes
1 Solution

Hi zhch_4550981​,

So it is. The initialization sequence cannot be changed. You need to store your new name in a nonvolatile memory and then restore it when restart the device. PSoC 6 MCUs have a flash module with one block that can be used for EEPROM emulation for longer retention.

Please see CE195313 for details. Also the BLE_PDL Component uses the same section (cy_em_eeprom section) to store bond data. For more information, refer to the Middleware/Cypress Em_EEPROM Middleware section of the PDL documentation.

Best regards,

Liviu

View solution in original post

0 Likes
4 Replies
LiDo_2439176
Level 5
Level 5
First question asked 50 replies posted 50 sign-ins

Use Cy_BLE_SetLocalName to set the device local name. Call this API before the advertisement start so that the device advertises with the new name. Also you can use Cy_BLE_GetLocalName to read the local device name.

0 Likes

Thank you very much indeed

I successfully set the device local name and read it。But when I restart the device, the device local name becomes the original device name!

0 Likes
lock attach
Attachments are accessible only for community members.

set BLE name.png

0 Likes

Hi zhch_4550981​,

So it is. The initialization sequence cannot be changed. You need to store your new name in a nonvolatile memory and then restore it when restart the device. PSoC 6 MCUs have a flash module with one block that can be used for EEPROM emulation for longer retention.

Please see CE195313 for details. Also the BLE_PDL Component uses the same section (cy_em_eeprom section) to store bond data. For more information, refer to the Middleware/Cypress Em_EEPROM Middleware section of the PDL documentation.

Best regards,

Liviu

0 Likes