collector发送数据:
if(sendMsg(Smsgs_cmdIds_trackingReq, TEMPSN,false,sizeof(impr_uart_head)+impr_uart_head.packageLen, &sensortemp)==true){
*status = sensor_idel1;
}else{
// memset(revCMDBuftmp, 0, sizeof(revCMDBuftmp));
*status = sensor_idel2;
}
sensor接收:
/* Make sure the message is the correct size */
if (pDataInd->msdu.len == SMSGS_TRACKING_REQUEST_MSG_LENGTH)
{
/* Update stats */
Sensor_msgStats.trackingRequests++;
/* Indicate tracking message received */
Ssf_trackingUpdate(&pDataInd->srcAddr);
/* send the response message directly */
cmdBytes[0] = (uint8_t) Smsgs_cmdIds_trackingRsp;
Sensor_sendMsg(Smsgs_cmdIds_trackingRsp, &pDataInd->srcAddr,
true, 1, cmdBytes);
}
else
{
uint8_t *pBuf = pDataInd->msdu.p;
short lens = (char) pDataInd->msdu.len;
if (lens != 0)
{
ADC_buf_write((char *) pBuf, lens, &sensorCMDWrite,
&sensorCMDRead, ReceiveData);
}
//DataAnalysis();
// Util_setEvent(&Sensor_events, SENSOR_IMPR_DATA_EVT);
}
break;
Yonghua Pan:
是一直都无法接收吗?连接可以建立吧,可以抓个包分析一下。
Alvin Chen:
这个帖子之前没发现啊,Wireshark抓个包看看