Hi, 大家好,有个问题想请教一下
———————————————————————————
在SimpleBLEPeripheral项目中,有以下定义:
// Profile Parameters
#define SIMPLEPROFILE_CHAR1 0 // RW uint8 – Profile Characteristic 1 value#define SIMPLEPROFILE_CHAR2 1 // RW uint8 – Profile Characteristic 2 value
#define SIMPLEPROFILE_CHAR3 2 // RW uint8 – Profile Characteristic 3 value
#define SIMPLEPROFILE_CHAR4 3 // RW uint8 – Profile Characteristic 4 value
#define SIMPLEPROFILE_CHAR5 4 // RW uint8 – Profile Characteristic 4 value
// Simple Profile Service UUID
#define SIMPLEPROFILE_SERV_UUID 0xFFF0
// Key Pressed UUID
#define SIMPLEPROFILE_CHAR1_UUID 0xFFF1
#define SIMPLEPROFILE_CHAR2_UUID 0xFFF2
#define SIMPLEPROFILE_CHAR3_UUID 0xFFF3
#define SIMPLEPROFILE_CHAR4_UUID 0xFFF4
#define SIMPLEPROFILE_CHAR5_UUID 0xFFF5
——————————————————-
当修改UUID及读写权限时(见红色文字),如下,在iPad上用Lightblue作为Central连接之后,发现UUID还是修改前的数值,读写权限也没有变化,不知为什么?是否改的不对或是还有其它要修改的地方?
// Simple Profile Service UUID
#define SIMPLEPROFILE_SERV_UUID 0xFFE0
// Key Pressed UUID
#define SIMPLEPROFILE_CHAR1_UUID 0xFFE1
#define SIMPLEPROFILE_CHAR2_UUID 0xFFE2
#define SIMPLEPROFILE_CHAR3_UUID 0xFFE3
#define SIMPLEPROFILE_CHAR4_UUID 0xFFE4
#define SIMPLEPROFILE_CHAR5_UUID 0xFFE5
读写权限的修改:
// Characteristic Value 1
{ { ATT_BT_UUID_SIZE, simpleProfilechar1UUID },
GATT_PERMIT_READ | GATT_PERMIT_WRITE, 0, &simpleProfileChar1 },
改为:
// Characteristic Value 1
{ { ATT_BT_UUID_SIZE, simpleProfilechar1UUID },
GATT_PERMIT_READ, 0, &simpleProfileChar1 },
———————————————-
但是修改数值是可以的,在iPad上可以看到数值已修改:
#define SIMPLEPROFILE_CHAR2 11
———————————————-
望各位高人指点,先谢谢啦。
Nutcracker:
请到蓝牙技术版面询问。