• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF ZigBee® Software & IEEE 802.15.4 Forum » Zstack transmit problem
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

Zstack transmit problem

This question is answered
Risto Mustonen
Posted by Risto Mustonen
on May 09 2012 00:38 AM
Prodigy80 points

Hello,

I have found an strange issue on zstack communication. I am using zstack varsion 2.5.1a for cc2530 chip and one of the examples called SampleApp. I found out that sometimes the delay after function AF_DataRequest (message is seen with packet sniffer) can be as long as 300 - 500 ms, when it is normally about 20-50 m. I am doing a test where large amount of data packets is sent through network and these kind of delays are not wanted. Same issue occurs zstack earlier version 2.5.0. The delay is in Coordinator's transmit. End Device seems to transmit OK.

It looks like the situation occurs when radio signal gets weak, for example there is some obstacle between antennas or suchlike. When system goes to "slow-mode" it will continue slow even if signal level gets back to good. SystemReset corrects the situation back to normal.

Has anyone had this kind of problems, and is there any solutions of this?

Thanks to all,

Risto

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Dirty Harry
    Posted by Dirty Harry
    on May 09 2012 11:22 AM
    Mastermind19350 points

    Would you plese describe more step-by-step detail on how to duplicate your observation? When you say "delay after function AF_DataRequest" what delay are you talking about and how are you measuring this delay? For example, are you toggling a GPIO after calling AF_DataRequest, and then what to measure a delay?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Risto Mustonen
    Posted by Risto Mustonen
    on May 10 2012 01:06 AM
    Prodigy80 points

    Hi, Mr Dirty Harry.

    I mean with the "delay" the time after AF_DataRequest call to the time when radio message is shown on the air. I have measured it with PacketSniffer and doing some instrumentations with GPIOs. I have connected these GPIO pulses to scope and measured the time values.

    The duration of AF_DataRequest - function is allways the same (about 3 ms). Packet start sending duration is also the same. ED response time is the same (ACK messages comes at the same time). The only thing that increases is the delay between packets. With PacketSniffer it can be seen that time between last received message and next transmission is increased. With GPIO instrumentation I can observe that time is spent somewhere after AF_DataRequest.

    I could add some GPIO instrumentation after the AF_DataRequest to the point where the actual packet is leaving from the zstack, to examine where the time is spent. But I do not know the exact operation of zstack's OSAL layer or transmit sequence neither.

    Br,

    Risto

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dirty Harry
    Posted by Dirty Harry
    on May 10 2012 11:37 AM
    Mastermind19350 points

    Hello - I still don't understand how you measure on the scope the time from the AF_DataRequest on the sender to the time packet is detected over the air by the sniffer - is there also a gpio on the sniffer device that gets toggled, and how does the sniffer determine when to toggle the gpio, etc.? You realize that the ZC cannot even send the message over the air until the ZED makes a poll for data, thus the time from the AF_DataRequest to the time packet is detected over the air can vary wildly. So I would need a more concrete, step-by-step process by which I could duplicate this observation on devices using the Z-Stack sample application.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Risto Mustonen
    Posted by Risto Mustonen
    on May 11 2012 05:04 AM
    Prodigy80 points
    tx_rate_compare.pdf

    Hi.

    I can not synchronize the measurement with sniffer and Z-stack code. They are totally separate. So, I am not able to measure the exact point where the message goes OTA. Sorry, for the confusion. I can only examine these information separately. Now when I have been figured out this issue more carefully, I cannot be sure where the delay is. It can be after AF_DataRequest or it can be before AF_INCOMING_MSG_CMD. Take a look at enclosed document.

    Yes, I am aware that there is some vary of timing and it's absolutely normal. But the main issue is why the situation changes so dramatically?

    Step-by-step transmission cycle:

    - CO sends the data request to the ED (Address 0x0000 -> 0x7EAE), 29 Bytes

    - ED sends the ACK

    - ED sends the data packet to CO (Address 0x7AEA -> 0x000), full packet 120 Bytes

    - CO sends the ACK

    This simple cycle is running continuously. Note, that new data request is sent to OTA normally about 20 ms after CO's ACK (it can be seen with Packet Sniffer). When the situation changes the new data request is sent about 400 ms after CO's ACK. The change can be triggered by limiting the radio signal. Note, that the situation is not happening every time, you may try several times until the problem occurs.

    Packet Sniffer snapshots are enclosed to PDF - file (three cycles for each situation). Also there is timing diagram where sniffer times are printed in red (for ease to compare). There are two gray boxes on both end of "Radio Message Handling" slot. The duration of those boxes is not known (marked with ? ms). Whole slot "Radio Message Handling" means that data is controlled by CO's low level Z-Stack and End Device.

    Hope this clarifies the situation.

    Thanks,

    Risto

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dirty Harry
    Posted by Dirty Harry
    on May 11 2012 11:57 AM
    Mastermind19350 points

    I suspect that what your sniffer trace is showing is the situation when the packet sniffer suffers from radio interference and misses packets over the air.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • licheng Li
    Posted by licheng Li
    on May 12 2012 00:38 AM
    Prodigy220 points

    The reason of thedelay is that the end device will sleep and poll.

    So the transmission cycle actually is: 

    -The MCU sends the data to CO by AF_DATA_REQUEST

    -CO would not send the data immediately,it only keeps the data in it's buffer and wating the polling from ED

    - ED wake up and send polling message to CO

    and below is what you had know:

    -----------------------------------------------------------------------------------------------------------------------------------

    - CO sends the data request to the ED (Address 0x0000 -> 0x7EAE), 29 Bytes

    - ED sends the ACK

    - ED sends the data packet to CO (Address 0x7AEA -> 0x000), full packet 120 Bytes

    - CO sends the ACK

     

    Because the end device will take a sleep of 1S(default),so what you had got is that the message will be delay  0~1000ms to send over air and after you had execute the AF_DATA_REQUES command.

    But if the ED send a message to the CO,because the CO never fall to sleep,the message will be send over air immediately.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Risto Mustonen
    Posted by Risto Mustonen
    on May 14 2012 04:00 AM
    Prodigy80 points

    The situation is real and sniffer is collecting the data correctly. This is seen by the scope measurements. We also measure the elapsed time after 20 kB datafile transfer. System's transfer rate is about 15 kbit/s in fast mode and about 2 kbit/s in slow mode.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Risto Mustonen
    Posted by Risto Mustonen
    on May 14 2012 04:09 AM
    Prodigy80 points

    Hi,

    Good idea, but I am using the following options on ED:

    -DRFD_RCVC_ALWAYS_ON=TRUE

    /* The number of milliseconds to wait between data request polls to the coordinator. */
    -DPOLL_RATE=0

    /* This is used after receiving a data indication to poll immediately
     * for queued messages...in milliseconds.
     */
    -DQUEUED_POLL_RATE=0

    /* This is used after receiving a data confirmation to poll immediately
     * for response messages...in milliseconds
     */
    -DRESPONSE_POLL_RATE=0

    /* This is used as an alternate response poll rate only for rejoin request.
     * This rate is determined by the response time of the parent that the device
     * is trying to join.
     */
    -DREJOIN_POLL_RATE=0

    I assume that with these options the ED will never go to sleep and no polling is done. I cannot use polling because it slows down the transfer rate too much.

    Anyway, thanks for the idea, but the real problem is somewhere else...

    Br,

    Risto

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Risto Mustonen
    Posted by Risto Mustonen
    on May 14 2012 07:24 AM
    Prodigy80 points

    New clue: the function ZDOInitDevice() in coordinator stops the slow mode and fast mode starts to run on the fly. End Device remains as it is.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Risto Mustonen
    Posted by Risto Mustonen
    on May 18 2012 04:30 AM
    Prodigy80 points

    It looks like slow communication problem is only with End Device. If I use Router instead the slow mode is not staying permanently. With router the communication does slows down for couple of rounds (when the radio signal level goes down), but it remains back after a while. With ED the slow mode stays forever.

    This is very easy to demonstrate. I use two MiniKit evaluation devices loaded with XStack 2.5.1a SampleApp software. Software is modified a little, so the CO sends a packet to RT (or ED). RT/ED answers full length packet back and after CO receives this it will start the cycle again. MiniKit's M430 processor is modified to stay in reset, so the only CC2530's software is running. Couple of IO lines is going through MiniKit's debug connector and behavior is examined with oscilloscope.

    Slow mode is started by putting the ED to Static Shield Bag. This makes radio signal weaker. ED stays in slow mode but RT does not. ED should not be in sleep because of the -DRFD_RCVC_ALWAYS_ON=TRUE flag. ED can sometimes even start on slow mode and stays in it.

    This observation helps me a lot. I can now use RT instead ED. Still this is a bit weird effect with ZStack - software packet.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dirty Harry
    Posted by Dirty Harry
    on Jun 05 2012 10:24 AM
    Verified Answer
    Verified by Risto Mustonen
    Mastermind19350 points

    I can duplicate the problem and have reported it to management.

    But this problem cannot occur with the normal build of the ZED, it can only be duplicated when building with  -DRFD_RCVC_ALWAYS_ON=TRUE

    So your workaround to this problem is to not use ZED built with that flag - if you need receiver always on, use a ZigBee Router instead.

    By the way, what is the real life use of such a weird ZED build - with receiver always on you burn almost as much energy as a full router but have so much less functionality?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Risto Mustonen
    Posted by Risto Mustonen
    on Jun 06 2012 01:35 AM
    Prodigy80 points

    Thanks for the answer.

    Actually there is no need to build the project for ZED. The only reason I am doing this is that I have too small cc2530 FLASH at the moment. I got the hardware with bigger FLASH size recently, so I can start using router with all devices right now.

    Hope this helps someone who has experienced same kind of problems.

    Problem is now solved, thanks.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use