diff --git a/APP/peripheral.c b/APP/peripheral.c index 7937cc5..3e85afd 100644 --- a/APP/peripheral.c +++ b/APP/peripheral.c @@ -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; } diff --git a/HAL/include/CONFIG.h b/HAL/include/CONFIG.h index 02bce9f..2394d71 100644 --- a/HAL/include/CONFIG.h +++ b/HAL/include/CONFIG.h @@ -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 diff --git a/bsp/src/bsp_ml307r.c b/bsp/src/bsp_ml307r.c index 413e6f7..e046c55 100644 --- a/bsp/src/bsp_ml307r.c +++ b/bsp/src/bsp_ml307r.c @@ -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;