微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > 求助,关于数据发送的时序控制

求助,关于数据发送的时序控制

时间:10-02 整理:3721RD 点击:

我现在做串口透传,想实现如下功能:

1,zigbee发出去消息,如果收到response,继续发送下一条数据。

2,如果没有接受到response,丢掉当前数据,发送下一条。

现在第一点比较容易实现,可是如何判断第二条?如果协议栈发出去的数据没有回应会产生什么事件吗?

我先现在在应用层做了个200ms的超时,如果200ms内没有接受到response,就直接转发下一条,但是总觉得协议栈应该会产生事件通知才对。

MAC层ACK,还是应用层的ACK(AF_DATA_CONFIRM_CMD)

都有ACK 事件。参看develop guide的第八章

8.End-to-end acknowledgements

For non-broadcast messages, there are basically 2 types of message retry: end-to-end acknowledgement (APS
ACK) and single-hop acknowledgement (MAC ACK). MAC ACKs are always on by default and are usually
sufficient to guarantee a high degree of reliability in the network. To provide additional reliability, as well as to
enable the sending device get confirmation that a packet has been delivered to its destination, APS
acknowledgements may be used.


APS acknowledgement is done at the APS layer and is an acknowledgement system from the destination device to
the source device. The sending device will hold the message until the destination device sends an APS ACK
message indicating that it received the message. This feature can be enabled/disabled for each message sent with the
options field of the call to AF_DataRequest(). The options field is a bit map of options, so OR in
AF_ACK_REQUEST to enable APS ACK for the message that you are sending. The number of times that the
message is retried (if APS ACK message isn’t received) and the timeout between retries are configuration items in
f8wConfig.cfg. APSC_MAX_FRAME_RETRIES is the number of retries the APS layer will send the
message if it doesn’t receive an APS ACK before giving up. APSC_ACK_WAIT_DURATION_POLLED is the time
between retries.

APS层有retry跟pool参数,那MAC层的ACK有类似的参数吗?

APSC_MAX_FRAME_RETRIES 

APSC_ACK_WAIT_DURATION_POLLED

也有。但建议使用默认的。不要修改。

比如 MAC_MAX_FRAME_RETRIES

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top