• 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 Proprietary Software & SimpliciTI Forum » How to get ED's adress from LinkID on AP side?
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

How to get ED's adress from LinkID on AP side?

How to get ED's adress from LinkID on AP side?

This question is answered
khodidas ghinaiya
Posted by khodidas ghinaiya
on May 01 2012 07:17 AM
Intellectual270 points

Hello,

 

I set NUM_CONNECTIONS = 10 on AP side and using it as HUB in star network. When I join ED's in networks,

it's linkID is given obtained in sLID[10] arrays.

 My question is how I can get adress of   ED's from sLID[] array's LinkID?

 what I found is to map linkID(sLID[]) with  index in sPersistInfo.connStruct[X], but what I observed is I am getting this array element as zero in debugger every time?

Regards,

khodidas 

 

 

SimpliciTI
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Leo Hendrawan
    Posted by Leo Hendrawan
    on May 02 2012 11:58 AM
    Verified Answer
    Verified by Leo Hendrawan
    Mastermind27025 points

    Hi,

    i haven't tested it yet, but i think this should be possible by doing this:

    add the following function in nwk.c file:

    void nwkGetPeerAddr(linkID_t sLinkId, addr_t *peerAddr)
    {
      uint8_t index;
     
      if(map_lid2idx(sLinkId, &index))
      {
        memcpy(peerAddr->addr, sPersistInfo.connStruct[index].peerAddr, NET_ADDR_SIZE);
      }  
    }

    and add the following declaration if necessary:

    extern void nwkGetPeerAddr(linkID_t sLinkId, addr_t *peerAddr);

    please notice however that the the link ID given in the function above should be a valid one (retrieved from either SMPL_Link() or SMPL_LinkListen() function).

    Let me know if this works for you.

    Regards,

    Leo Hendrawan


    - Now that my signature has caught your attention, please click the "Verify Answer" button if this post answers your question. Thanks! -

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Kai Liu101519
    Posted by Kai Liu101519
    on May 10 2012 08:15 AM
    Intellectual280 points

    I have some issues. Actually I used your code in my project, I can read out the MAC address related to the LinkID. However the result is not stable, at least print out string shows unstable result. For example, if peer Address is 7A3F3940, sometimes it prints out correctly, sometimes it only prints 940. The low-level UART print hex routine should be all right, since all other hex content like appload is printed correctly.

    The source file is here with small modification from TI demo. BTW, I think peer addr information, including other information should be available from API level. It is very important to understand who is talking to the application.

    2742.ez430-RF2500-2009-MacAddr-Unstable.zip

     

    Log:

    AP->ED:414C4B
    Node:HUB0,Temp: 91.2F,Battery:3.6V,Strength:000%,RE:no
    ED->AP:F0001E
    MAC:7A3F3940
    $0002, 75.2F,3.0,029,N#

    AP->ED:414C4BNode:HUB0,Temp: 91.2F,Battery:3.6V,Strength:000%,RE:no

    ED->AP:F0001E
    MAC:940
    $0002, 75.2F,3.0,029,N#
    AP->ED:414C4B

     

    CC2500 SimpliciTI RF
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Leo Hendrawan
    Posted by Leo Hendrawan
    on May 10 2012 09:00 AM
    Mastermind27025 points

    Hi,

    maybe you can try to put your breakpoint after the function to see whether the peerAddress is correct or not.

    Could it be a problem with the transmit function? Because according to your description, if the log shows wrong data, it basically shows only part of the data.

    Regards,

    Leo Hendrawan


    - Now that my signature has caught your attention, please click the "Verify Answer" button if this post answers your question. Thanks! -

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Kai Liu101519
    Posted by Kai Liu101519
    on May 10 2012 19:20 PM
    Intellectual280 points

    Hi,  lhend

    Actually I find that it is a bug for print() statement prior to hex print() statement due to mismatch string length parameter. So the print is weried. All transmission drivers and MAC addr are correct. Now this issue is closed.

    Thank you for the information.

    Allan K Liu

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Leo Hendrawan
    Posted by Leo Hendrawan
    on May 11 2012 02:16 AM
    Mastermind27025 points

    Hi Allan,

    glad to hear the good news, and thank you for testing it. So i think my code should really works in this case.

    Regards,

    Leo Hendrawan


    - Now that my signature has caught your attention, please click the "Verify Answer" button if this post answers your question. Thanks! -

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • khodidas ghinaiya
    Posted by khodidas ghinaiya
    on May 11 2012 03:28 AM
    Verified Answer
    Verified by khodidas ghinaiya
    Intellectual270 points

    leo,

    you solution has worked for me.

    khodidas

    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