docs(vd960DBN): BLE 日志查询交互过程文档 + 协议 V1.01 动态分包 + 周期心跳
- 新增 docs/DLD960_BLE日志查询交互.md: 0x25/0x26/0x27 完整交互示例 (真实日志逐字节解析, 分包规则, 第二分包未发问题记录) - DLD960_BLE协议.md V1.01: 分包上限改为随协商 MTU 动态 (min(MTU-9,94)) - peripheral.c: performPeriodicTask 加 500ms 心跳打印 (确认 TMOS 周期存活 + resp 队列状态, 定位第二分包为何不续传)
This commit is contained in:
@@ -684,6 +684,15 @@ static void peripheralStateNotificationCB(gapRole_States_t newState, gapRoleEven
|
||||
*/
|
||||
static void performPeriodicTask(void)
|
||||
{
|
||||
static uint32_t _dbg_cnt = 0;
|
||||
if(++_dbg_cnt >= 10) /* 500ms heartbeat: confirm TMOS periodic alive */
|
||||
{
|
||||
_dbg_cnt = 0;
|
||||
PRINT("BLE tick: ntf_len=%d ntf_flag=%d resp=%d amt=%d seq=%d off=%d\n",
|
||||
g_notify_buftemp.len, g_notify_buftemp.flag,
|
||||
g_buf_ble_response.flag, g_buf_ble_response.pkg_amount,
|
||||
g_buf_ble_response.pkg_seq, g_buf_ble_response.dat_offset);
|
||||
}
|
||||
if(g_flag_notify_temp){
|
||||
g_flag_notify_temp = 0;
|
||||
peripheralChar4Notify(g_notify_buftemp.buf, g_notify_buftemp.len);
|
||||
|
||||
Reference in New Issue
Block a user