请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC1312R工具/软件:
对于 802.15.4 信标启用模式的点对点消息传递是否可以在 MAC 和/或应用级别完成?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:
对于 802.15.4 信标启用模式的点对点消息传递是否可以在 MAC 和/或应用级别完成?
尊敬的 Gerard:
使用 API: TI-15.4 Stack API:api_mac.h 文件参考
例如、在间接用例图中、您可以看到我们正在寻址一个特定的器件。
此致、
Arthur
尊敬的 Gerard:
现在更清楚了。 由于传感器不知道彼此的存在、因此您必须使用广播消息。
如果在传感器应用程序中实施该方法、则可以发送广播消息:
static void sendBroadcastMsg(Smsgs_cmdIds_t type, uint16_t len,
uint8_t *pData)
{
ApiMac_mcpsDataReq_t dataReq;
/* Current example is only implemented for FH mode */
if(!fhEnabled)
{
return;
}
/* Fill the data request field */
memset(&dataReq, 0, sizeof(ApiMac_mcpsDataReq_t));
dataReq.dstAddr.addrMode = ApiMac_addrType_none;
dataReq.srcAddrMode = ApiMac_addrType_short;
dataReq.dstPanId = devicePanId;
dataReq.msduHandle = getMsduHandle(type);
dataReq.txOptions.ack = false;
dataReq.txOptions.indirect = false;
dataReq.msdu.len = len;
dataReq.msdu.p = pData;
#ifdef FEATURE_MAC_SECURITY
/* Fill in the appropriate security fields */
Cllc_securityFill(&dataReq.sec);
#endif /* FEATURE_MAC_SECURITY */
/* Send the message */
ApiMac_mcpsDataReq(&dataReq);
} 然后在数据 ind 回调中处理广播应答。
此致、
Arthur