广播名称设置3种:
无广播名称,长广播名称,短广播名称
以下是2种广播名称设置
广播名称
#define DEVICE_NAME “Nordic_Template” /**< Name of device. Will be included in the advertising data. */
1.广播设置长名称:
APP显示效果:
2.广播设置短名称:
APP显示效果:
此时连接上可以获取通过服务主动获取name
测试芯片:nrf52832
3.中文名称显示:
步骤如下:
重建一个.h文件,定义中文广播名称,以UTF-8格式保存文件。
#define DEVICE_NAME “蓝牙5.0” /**< Name of device. Will be included in the advertising data. */
添加keil设置
4.图标显示:
设置图标:
启用图标显示:
app效果: