您的位置:首页 > 其它

在Z-stack中,我们调用数据发送函数,可以发送的最大字节数即ASDU最大是多少呢?

2012-02-20 21:45 561 查看
在Z-stack中,我们调用数据发送函数,可以发送的最大字节数即ASDU最大是多少呢?

在f8wConfig.cfg文件中定义了

/* Set the MAC MAX Frame Size (802.15.4 default is 102) */

-DMAC_MAX_FRAME_SIZE=116

计算出来的

用这个值,参考NWK层和MAC层的常量,计算出来的值应该是85,但是我做测试却是最大可以发送99字节,并且修改了MAC_MAX_FRAME_SIZE值后并没有影响,所以搞不懂了。

通过AF_DataRequest发送的数据长度超过MAC_MAX_FRAME_SIZE,将会出现很大的延时,或直接发送不成功,本人暂时想到的办法是分段发送,接收,zigbee协议只能这样了,有待完善。

下面贴出TI官方论坛的回答:http://e2e.ti.com/support/low_power_rf/f/158/t/134895.aspx


sensor application: MAC_MAX_FRAME_SIZE

This question is answered

Posted by Leila Keyvani on 16 Sep 2011 11:26 AM

Expert1060 Points
Hello all,

What can be the maximum number we can use for MAC_MAX_FRAME_SIZE, if I want  to send a 100-byte net data over the air( I want the length of my application data be 100 bytes).

Thanks in advance,

Leila

ZigBee PRO, ZStack 2.3.0 SensorDemo
Reply

Posted by LPRF Rocks the World replied on 16 Sep 2011 12:00 PM
Verified by Leila Keyvani Verified Answer

Expert7500 Points
Leila:

With the IEEE 802.15.4? the MPSDU can be 102 bytes unless you implement Fragementation. With our Z-Stack we have implementation Fragementation to handle larger frames.

LPRF Rocks the World

"Customer Centricity, Enthusiasm, Mass collaboration and Great minds are the best path towards great products"

timac, Max Frame Size
Reply

Posted by Leila Keyvani replied on 16 Sep 2011 12:07 PM

Expert1060 Points
Yes, with IEEE 802.15.4. I am using zigbee pro and modifying sensor demo app released by TI. Could you please let me know what is MPSDU?

Thank you,

Leila

Reply

Posted by LPRF Rocks the World replied on 16 Sep 2011 2:11 PM
Verified by Leila Keyvani Verified Answer

Expert7500 Points
With the Sensor Demo application you can only use 99 bytes for the payload now I believe. This application have not added the ZigBee Fragmentation to the OsalTaskIint() and the task table handler for the process event function. You can search for ZIGBEE_FRAGMENTATION compile flag for any other sample application such as the GenericApp and see how the APFS is added to the code.

LPRF Rocks the World

"Customer Centricity, Enthusiasm, Mass collaboration and Great minds are the best path towards great products"

Sensor Demo, Fragmentation
Reply

Posted by Leila Keyvani replied on 20 Sep 2011 9:43 AM

Expert1060 Points
Can you please let me know how you came up with 99 bytes? I changed my payload to be 99 however packet sniffer shows an error of  "parsed data too long, data length: 1510" when I try to send a packet. Could you please help me about this?

Thanks,

Leila

Reply

Posted by LPRF Rocks the World replied on 20 Sep 2011 2:04 PM
Verified by Leila Keyvani Verified Answer

Expert7500 Points
Leila:

There are two questions here one for the packet sniffer. I guess we can look at few things you can do.

1. Upgrade to the latest TI Packet Sniffer 2.15.2
2. Upgrade the FW revision on your CC2531 if you are using this for packet sniffing.
3. Sniffer configurations needs to be changed in order to decode long IEEE 802.15.4 packets.

Open C:\Program Files\Texas Instruments\Packet Sniffer\General\Plugin\IEEE802_15_4\IEEE802_15_4_MAC_and_ZigBee.plt
Increase Packet_length_parsed_data from 1500 to 1600.
Restart Sniffer.
With respect to the 99 bytes this is based on something related to indirect addressing, 0xFFFE when you call zb_SendDataRequest(). Try to send fragementation using a direct address, 0x0000.

LPRF Rocks the World

"Customer Centricity, Enthusiasm, Mass collaboration and Great minds are the best path towards great products"

Fragmentation, Indirect addressing, Binding: Packet Sniffer, PLT
Reply

Posted by Leila Keyvani replied on 21 Sep 2011 3:18 PM

Expert1060 Points
you guys are awesome! it works, Thanks
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐