代码暂存 蓝牙连接后上报状态
This commit is contained in:
parent
58a2335486
commit
ca43b87897
|
@ -380,6 +380,7 @@ uint16_t Peripheral_ProcessEvent(uint8_t task_id, uint16_t events)
|
|||
// Restart timer
|
||||
if(periodic_upload_block_flag == false && mtu_flag == 1)
|
||||
{
|
||||
logWarning("SBP_PERIODIC_EVT");
|
||||
performPeriodicTask();
|
||||
tmos_start_task(Peripheral_TaskID, SBP_PERIODIC_EVT, SBP_PERIODIC_EVT_PERIOD);
|
||||
}
|
||||
|
@ -491,7 +492,8 @@ static void Peripheral_ProcessTMOSMsg(tmos_event_hdr_t *pMsg)
|
|||
{
|
||||
peripheralMTU = pMsgEvent->msg.exchangeMTUReq.clientRxMTU;
|
||||
mtu_flag = 1;
|
||||
logDebug("****mtu exchange: %d****", pMsgEvent->msg.exchangeMTUReq.clientRxMTU);
|
||||
logWarning("****mtu exchange: %d****", pMsgEvent->msg.exchangeMTUReq.clientRxMTU);
|
||||
performPeriodicTask();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
#define BLE_MEMHEAP_SIZE (1024*6)
|
||||
#endif
|
||||
#ifndef BLE_BUFF_MAX_LEN
|
||||
#define BLE_BUFF_MAX_LEN 27
|
||||
#define BLE_BUFF_MAX_LEN 251 // MTU https://www.cnblogs.com/gscw/p/17896209.html
|
||||
#endif
|
||||
#ifndef BLE_BUFF_NUM
|
||||
#define BLE_BUFF_NUM 5
|
||||
|
|
|
@ -521,7 +521,7 @@ static int BSP_Module_Connect_CtWing_Handle(at_env_t *e)
|
|||
{
|
||||
case 0:
|
||||
logDebug("create device...\r\n");
|
||||
e->println(e, "AT+MIPOPEN=0,\"TCP\",\"112.125.89.8\",42286,,1"); // 8.135.10.183,32994
|
||||
e->println(e, "AT+MIPOPEN=0,\"TCP\",\"112.125.89.8\",42519,,1"); // 8.135.10.183,32994
|
||||
e->reset_timer(e);
|
||||
e->state++;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue