• 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 » The Z-Stack-CC2530 gets RSSI from source to destination
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

The Z-Stack-CC2530 gets RSSI from source to destination

The Z-Stack-CC2530 gets RSSI from source to destination

This question is answered
Dennis Kao
Posted by Dennis Kao
on Jun 05 2012 04:10 AM
Prodigy190 points

Dear all,

               I use Z-Stack-CC2530 to develop a position system.

               In SampleApp, I use pkt->rssi to read the RSSI.

               But, the RSSI is not between source and destination.

               How should I get RSSI from source to destination?

RSSI CC2530
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Igor Sherer
    Posted by Igor Sherer
    on Jun 05 2012 05:41 AM
    Guru21965 points

    Hi,

    That depends on several scenarios, but my guess is you are following the next scenario:

    An End Device (with unknown position - in other words a bind node) broadcasting a message

    to nearest routers, then routers forward extracted RSSI values to concentrator node, where the

    position is calculated from received data (in case where concentrator node used as gateway,

    these calculations can be performed by the host)

    So if this is your scenario you can do the following to get true values of RSSI:

    1. Blind Node should broadcast a ZigBee application level message (it can be even a
      dummy message) to nearest routers (broadcast radius = 1, in this case no rebroadcasts
      will be carried out by the router)
    2. In each router that got the dummy message, extract the RSSI value, construct a new
      message that must contain at least two arguments; RSSI value and short address of the
      blind node. Send this message (fro each router participating in this carnival) to 
      concentrator node.
    3. In concentrator (or host PC) collect all the messages with RSSI values and then
      you are ready to do the math crunching :) 

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 05 2012 08:40 AM
    Prodigy190 points

    Dear,

                 Sorry, I don't understand dummy message. 

                 I just use  a coordinator, a router and a end-device.

                 The end-device send a request to router. 

                 Then the router send a message to end-device.

                 After receive the message, the end-device extracts RSSI values, and construct a new message.

                 Finally, the end-device send the new message to coordinator.

                 I use above-mentioned method to extract RSSI values, but the RSSI values is not between router and end-device.

                 It is between router and coordinator.

                 

    I have two problems, now.

                 1.Is the method error?

                 2.How should I extract RSSI values between router and end-device or end-device and end-device? 

    RSSI CC2530
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Jun 05 2012 08:54 AM
    Verified Answer
    Verified by Dennis Kao
    Guru21965 points

    Hi,

    This method won't work with many routers, since all the messages addressed to end device must be

    routed through the parent, hence the wrong RSSI values in your case (probably the parent of the end

    device in your case is the coordinator).

    So basically, in this very simple network of yours (coordinator, one router and a single end device) you

    can ensure that the router will also act as parent (not coordinator):

    • Power on coordinator
    • Take some distance and power on the router
    • Ensure that the end device will be powered on while it's far enough from coordinator, but still
      close to router to join the network. In that way the end device will join to router instead of
      coordinator (check it with packet sniffer) 

    Dummy message is a message where the content of data is not important, what is important is the

    destination of this message, an address of the sending device and of course the RSSI value. 

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 06 2012 01:39 AM
    Prodigy190 points

    Dear,

              I understand what you mean.

              Can one end-device join two router at one time?

              Because I need three reference node positioned one bind node.

              The reference node is router and the bind node is end-device. 

    Best regards,

    RSSI CC2530
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • YiKai Chen
    Posted by YiKai Chen
    on Jun 06 2012 01:51 AM
    Mastermind9150 points

    Hi,

    It is impossible to join two router at one time.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 06 2012 02:10 AM
    Prodigy190 points

    Dear,

               OK, I see.

                I will try it.

                Thanks you for your answer and suggest.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 06 2012 03:26 AM
    Prodigy190 points

    Dear,

               Can I set  scan range of the router or the coordinator?

               If I can. How should I do?

               

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Jun 06 2012 03:29 AM
    Guru21965 points

    Hi,

    What you mean by scan range?

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 06 2012 03:58 AM
    Prodigy190 points

    Dear,

                             Assume the distance is 1m between the router and the end device.

                              The router can discover the end device and the end device join the router.

                              Can I set the distance between the router and the end device, in Z-Stack ?

                              I want to set the distance that the end device join the router.

      Best regards,

                Dennis

    RSSI CC2530
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Jun 06 2012 04:18 AM
    Guru21965 points

    Hi,

    Well, there is no direct way that I'm aware of. The indirect way is to reduce

    You can read about changing transmit power of device in "Z-stack API.pdf"

    section 3.5.1

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 06 2012 10:13 AM
    Prodigy190 points

    Dear,

                 I increase a router called in the zigbee network.

                 So, it has two router, one is R1 and the other is R2.

                 Now, the parent of the end device is the R1.

                  I can extract RSSI value between the R1 and the end device.

                  But, I can not extract RSSI values between the R2 and the end device.

    Best regards,

                     Dennis

                 

    RSSI CC2530
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Jun 06 2012 11:26 AM
    Guru21965 points

    Hi,

    Well that is a normal behavior of ZigBee network, all messages addressed

    to a specific ZED will be routed to ZEDs parent, then the parent will send this

    message to ZED.

    So, your question is how to overcome this behavior?

    Well, one way is to implement the scenario I have described in my first post in

    this thread. You may try it. :)

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 06 2012 12:57 PM
    Prodigy190 points

    Dear Igor,

      I have been try it.

     If the parent of end device is R1. I can extract RSSI values between the R1 and the end device. The RSSI values is right.

     But, when I extract RSSI values between the R2 and the end device, the RSSI values is error.

     If the parent of end device is R2. I can extract RSSI values between the R2 and the end device. The RSSI values is right, too.

     But, when I extract RSSI values between the R1 and the end device, the RSSI values is error, too.

      I need the RSSI measured the distance between R1 and end device, and  the distance between R2 and end device.  

     I have to extract RSSI values between R1 and end device, and between R2 and end device at one time.

     So, my question is how to get right RSSI values between R1 and end device, and between R2 and end device?

      I use CC2530 chip. The ZStack version is ZStack-CC2530-2.3.0-1.4.0.

      In the zigbee application layer, I use pkt->rssi to extract RSSI values.

     Best regards,

                Dennis                 

    RSSI CC2530
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Igor Sherer
    Posted by Igor Sherer
    on Jun 06 2012 14:59 PM
    Guru21965 points

    Hi,

    It sounds like the ZED isn't broadcasting this message, in other words, in your ZED project you should use

    AF_DataRequest() function as follows:

    RTR_App_DstAddr.addr.shortAddr = 0xFFFC; //Routers and coordinator
    RTR_App_DstAddr.addrMode = (afAddrMode_t)AddrBroadcast;
    RTR_App_DstAddr.endPoint = RTR_ENDPOINT;

    AF_DataRequest( &RTR_App_DstAddr, &XZED_App_epDesc,
    RTR_APP_CLUSTERID,
    someLen,
    (byte *)message,
    &ZED_App_TransID,
    AF_DISCV_ROUTE | AF_SKIP_ROUTING,
    1 );

    Pay attention on lines marked with red:

    The destination address should be of broadcast type (0xFFFC or 0xFFFD)

    Addressing mode should be AddrBroadcast.

    In options field, AF_SKIP_ROUTING must be ORed with other options (this flag

    prevents from ZigBee to perform routing)

    Radius field should be set to 1 (that means no broadcasting beyond the first wave).

    Br,

    Igor

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dennis Kao
    Posted by Dennis Kao
    on Jun 07 2012 05:32 AM
    Prodigy190 points

    Dear Igor,

                       I think that the problem is the parent of end device.

                       I use zb_SendDataRequest()  function as follow:

    void zb_SendDataRequest ( uint16 destination, uint16 commandId, uint8 *pData, uint8 len, uint8 radius )
    {
    afAddrType_t dstAddr;
    /* 設置目的地址 */
    if (destination == 0xFFFF)
    {
    // 廣播
    dstAddr.addrMode = AddrBroadcast;
    dstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR; //0xFFFF 資料封包將被傳送到網路中所有的設備
    dstAddr.endPoint = SampleApp_epDesc.endPoint;
    if ( AF_DataRequest( &dstAddr,
    &SampleApp_epDesc,
    commandId,
    len,
    pData,
    &SampleApp_TransID,
    AF_DISCV_ROUTE,
    AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )
    {
    }
    else
    {

    // Error occurred in request to send.
    }
    }
    else if (destination == 0xFFFC)
    {
    dstAddr.addrMode = (afAddrMode_t)AddrBroadcast;;
    dstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR_DEVZCZR; //0xFFFC 廣播給協調者和全部的路由器
    dstAddr.endPoint = SampleApp_epDesc.endPoint;
    if ( AF_DataRequest( &dstAddr,
    &SampleApp_epDesc,
    commandId,
    len,
    pData,
    &SampleApp_TransID,
    AF_DISCV_ROUTE | AF_SKIP_ROUTING,
    1 ) == afStatus_SUCCESS )
    {
    }
    }
    else
    {
    // 使用短位址
    dstAddr.addrMode = afAddr16Bit;
    dstAddr.addr.shortAddr = destination; //shortAddr 目標設備位址
    /* 設置端點 */
    dstAddr.endPoint = SampleApp_epDesc.endPoint;

    /* 發送消息 */
    if ( AF_DataRequest( &dstAddr,
    &SampleApp_epDesc,
    commandId,
    len,
    pData,
    &SampleApp_TransID,
    AF_DISCV_ROUTE,
    AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )
    {
    }
    else
    {

    // Error occurred in request to send.
    }
    }
    }

    Best regards,

                  Dennis

    RSSI CC2530
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12345»
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