1.更新完协议版本后用GATT_Notification发送通知数据不成功,不知道是不是需要安卓机做什么特殊的操作。(SIMPLEPROFILE_CHAR4)
2.用GATTServApp_ProcessCharCfg()方法是可以发送成功的但是无法指定长度的字节发送。
问题1的代码
nData.len = len;
nData.handle = simpleProfileAttrTbl[11].handle;
osal_memcpy( nData.pValue, value, len );
ret = GATT_Notification( 0, &nData, FALSE );
Viki Shi:
可否用抓包工具看一下,是数据没有发送还是没有正确接收
jiabin liu1:
回复 Viki Shi:
你好:
您看我这个GATT_Notification的通知代码实现方式是否正确的呢?
jiabin liu1:
回复 Viki Shi:
你好
我用的是CC2541不是开发板的那那种,怎么用抓包软甲? 我们是自己做的电路板
mark_xu:
回复 jiabin liu1:
参数的标号是不是11,再检查一下程序
jiabin liu1:
回复 mark_xu:
static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] = { // 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_READ | 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, 0, simpleProfileChar4 },
// 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 },
jiabin liu1:
回复 mark_xu:
您好,方便留个联系方式吗?可以请教你下吗?
jiabin liu1:
回复 Viki Shi:
你好
这个我用抓包工具看了,就没有上传数据每次执行这个GATT_Notification就会与APP断开联接。怎么回事呢?
ZANGk:
回复 jiabin liu1:
1.4.2的通知函数到底怎么回事?从1.3.2移植过来怎么就不能用了,TI技术赶快处理一下,????????????每次都堆出来一堆文档,没有具体的说明;