在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
在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
相关文章推荐
- 一个页面中用Get方法到底可以发送多少字节的数据呢?
- Z-stack 射频数据发送最大个数是101字节
- tcp send函数发送的最大长度可以超过65535字节吗?
- 串口发送一帧数据时,两个字节的间隔时间是多少?
- 保证函数调用时stack的起始地址是十六字节对齐的方法
- 根据user stack 数据分析函数调用栈
- 有时我们需要调用一个函数时,返回多个不同类型的数据
- 这是一个求两数之和的题目,输入多对用空格分开的两个数a b,输出a+b的和,每一对数据的和占一行。编写代码时需要注意的是,由于没有指出有多少对输入数据,因此我们可以编写如下代码:
- 设计一个指向函数的一个指针,处理一个一维数组,调用该函数三次可以输出总和,最大值,平均值
- 报ORA-4031错误时,我们通常可以根据Oracle无法分配多少字节的内存,来判断共享池碎片的严重程度,以下是4031错误官方的解释
- C++语言笔试题目 C++中为什么用模板类&& 类中如何使用const &&函数重载,我们靠什么来区分调用的那个函数?靠返回值判断可以不可以
- 在c++中,静态数据成员可以被非静态成员函数调用吗?如果可以调用的话那为什么还要定义静态成员函数呢
- 16位平台、32位平台、64位平台下char、short、int、long、指针 分别占多少字节,操作系统可以使用的最大内存空间
- IOS之URL Scheme的使用(可以在app之间调用传递数据)
- 串口发送浮点型数据及int(2个字节)long int(4个字节)的方法
- 栈帧(stack frame),函数调用栈的情况
- android 通过HTTP协议发送XML数据并调用
- qtcpsocket调用write和read函数写数据乱码问题解决方法
- 让我们愉快的切割吧 - 3: 用DAX的LEN,LEFT,SEAECH等函数拆分数据
- 10月7日 c语言 函数调用 输入两个整数,要求输出其中值较大者,要求用函数找到最大数