基于SerialBLEbridge V1.4.1实现BLE和UART透传功能,读和写都通实现透传了,但修改simpleProfileAttrTbl属性表,去掉Characteristic 1到Characteristic 3后影响到了Characteristic 4,Characteristic 4的通知功能失效,Characteristic 4的写数据没问题,读数据是在通知是侦听的,通知失效后读数据就失效了。
static gattAttribute_t simpleProfileAttrTbl[] =
{
// Simple Profile Service
{
{ ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */
GATT_PERMIT_READ, /* permissions */
0, /* handle */
(uint8 *)&simpleProfileService /* pValue */
},
// // Characteristic 1 Declaration
// {
// { ATT_BT_UUID_SIZE, characterUUID },
// GATT_PERMIT_READ,
// 0,
// &simpleProfileChar1Props
// },
//
// // Characteristic Value 1
// {
// { ATT_BT_UUID_SIZE, simpleProfilechar1UUID },
// GATT_PERMIT_READ | GATT_PERMIT_WRITE,
// 0,
// &simpleProfileChar1
// },
//
// // Characteristic 1 User Description
// {
// { ATT_BT_UUID_SIZE, charUserDescUUID },
// GATT_PERMIT_READ,
// 0,
// simpleProfileChar1UserDesp
// },
//
// // Characteristic 2 Declaration
// {
// { ATT_BT_UUID_SIZE, characterUUID },
// GATT_PERMIT_READ,
// 0,
// &simpleProfileChar2Props
// },
//
// // Characteristic Value 2
// {
// { ATT_BT_UUID_SIZE, simpleProfilechar2UUID },
// GATT_PERMIT_READ,
// 0,
// &simpleProfileChar2
// },
//
// // Characteristic 2 User Description
// {
// { ATT_BT_UUID_SIZE, charUserDescUUID },
// GATT_PERMIT_READ,
// 0,
// simpleProfileChar2UserDesp
// },
//
// // Characteristic 3 Declaration
// {
// { ATT_BT_UUID_SIZE, characterUUID },
// GATT_PERMIT_READ,
// 0,
// &simpleProfileChar3Props
// },
//
// // Characteristic Value 3
// {
// { ATT_BT_UUID_SIZE, simpleProfilechar3UUID },
// GATT_PERMIT_WRITE,
// 0,
// simpleProfileChar3
// },
//
// // Characteristic 3 User Description
// {
// { ATT_BT_UUID_SIZE, charUserDescUUID },
// GATT_PERMIT_READ,
// 0,
// simpleProfileChar3UserDesp
// },
// Characteristic 4 Declaration
{
{ ATT_BT_UUID_SIZE, characterUUID },
GATT_PERMIT_READ,
0,
&simpleProfileChar4Props
},
// Characteristic Value 4
{
{ ATT_BT_UUID_SIZE, simpleProfilechar4UUID },
//0,
GATT_PERMIT_READ | GATT_PERMIT_WRITE, //modified by xsh 2017.05.19
0,
//&simpleProfileChar4
simpleProfileChar4 //modified by xsh 2017.05.19
},
// Characteristic 4 configuration
{
{ ATT_BT_UUID_SIZE, clientCharCfgUUID },
GATT_PERMIT_READ | GATT_PERMIT_WRITE,
0,
(uint8 *)&simpleProfileChar4Config
},
// Characteristic 4 User Description
{
{ ATT_BT_UUID_SIZE, charUserDescUUID },
GATT_PERMIT_READ,
0,
simpleProfileChar4UserDesp
},
// // Characteristic 5 Declaration
// {
// { ATT_BT_UUID_SIZE, characterUUID },
// GATT_PERMIT_READ,
// 0,
// &simpleProfileChar5Props
// },
//
// // Characteristic Value 5
// {
// { ATT_BT_UUID_SIZE, simpleProfilechar5UUID },
// GATT_PERMIT_AUTHEN_READ,
// 0,
// simpleProfileChar5
// },
//
// // Characteristic 5 User Description
// {
// { ATT_BT_UUID_SIZE, charUserDescUUID },
// GATT_PERMIT_READ,
// 0,
// simpleProfileChar5UserDesp
// },
};
请问是哪里出了问题?