• 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 » leaving and joing in a new PAN
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

leaving and joing in a new PAN

leaving and joing in a new PAN

This question is not answered
Giordano Bruno Wolaniuk
Posted by Giordano Bruno Wolaniuk
on May 23 2012 16:42 PM
Prodigy250 points

Dear,

I need to scan the PAN_ID with a router to form a list of PANs in the area. Then I need to choose one PAN to join and send some packets to an application. If no one answer the packets, it means that it is not my PAN, so I need to disconnect and connect in another PAN of my list, until achieve the correct PAN.

This problem has a solution?

Basically, what I want to know is:

1- How to make a list of PAN_IDs in the area from a ROUTER;

2-How to LEAVE the current PAN;

3-How to force a ROUTER to joing in a determinated PAN.



Thank you

Giordano

leave and join in a list of PAN's
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • YiKai Chen
    Posted by YiKai Chen
    on May 23 2012 21:22 PM
    Mastermind9540 points

    Hi,

    Question 1: There is no way to make such a list. I think this is due to security concern.

    Question 2: You can use ZDP_MgmtLeaveReq() to leave current PAN.

    Question 3: No, you can not force a router or device to join a specified PAN.

    Regards!

    YK Chen

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Giordano Bruno Wolaniuk
    Posted by Giordano Bruno Wolaniuk
    on May 24 2012 07:19 AM
    Prodigy250 points

    Hi YK Chen, so there is a other way to jump from a PAN to other without a LIST of PANs. Imagine there is an area with 2 coordinators, PAN1 and PAN2. I could try the PAN 1, if it is not my PAN, I leave this PAN to try PAN 2. To do this I need to know:

    1) Is possible to forbid my router to join in a determined PAN? (example: if there is PAN1 and PAN2 and I forbid my router to join in PAN1, it will join in PAN2)

    Thanks for your attention
    Giordano

    forbidden a join in determinated PAN
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ilya Averin
    Posted by Ilya Averin
    on May 24 2012 07:44 AM
    Expert1600 points

    Hi YiKai Chen,

    the answer on question 3 is incorrect - it is possible to force a router to join specified PAN. The details are given in Z-stack Developer Guide, for example.

    To solve the task defined in question 1 Mgmt_NWK_Disc_req  ZDO command can be used. 

    Regards,

    Ilya

    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 May 25 2012 00:14 AM
    Mastermind9540 points

    Hi Ilya,

    It is nice to hear that Zstack has this capability. Could you specify more clearly about which developer guide describe it? Do you have a try on it and worked well? By the way, I also can not find any thing about where and how Mgmt_NWK_Disc_req to be used. Could you describe it too?

    Sincerely

    YK

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ilya Averin
    Posted by Ilya Averin
    on May 25 2012 02:54 AM
    Expert1600 points

    Hi YK,

    I meant Z-stack Developer's Guide swra176. It claims (9.2 Configuring the PAN ID and Network to join):

    ...This is an optional configuration item to control which network a ZigBee Router or End Device will join. The ZDO_CONFIG_PAN_ID parameter in f8wConfig.cfg can be set to a value (between 0 and 0xFFFE). A coordinator will use this value as the PANId of the network that it starts. A router or end-device will only join a network that has a PANId configured in this parameter. To turn this feature off, set the parameter to a value of 0xFFFF...

    I've tried this option and it does work.

    Regarding Mgmt_NWK_Disc_req, it is introduced in ZigBee Specification and aka ZDP_MgmtNwkDiscReq() in Z-stack API document. I'm not sure whether it returns direct information about the 'short' (2-byte) PAN IDs but it should return information about  the 64-bit extended PAN identifier of the discovered networks.

    Regards,

    Ilya

    network scan
    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 May 25 2012 03:57 AM
    Mastermind9540 points

    Hi,

    It is a hard code way to use ZDO_CONFIG_PAN_ID parameter in f8wConfig.cfg but we are interested in joined a specified PAN_ID at run time. Anyway, thanks for your information.

    Regards!

    YK Chen

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ilya Averin
    Posted by Ilya Averin
    on May 25 2012 04:10 AM
    Expert1600 points

    Hi YK Chen,

    actually, this parameter is just an item stored in NV memory. You can change it any time you want. Of course, the device reset with clearing of the previous network state must be performed to apply new value.

    Regards,

    Ilya

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Di Chen
    Posted by Di Chen
    on May 27 2012 23:03 PM
    Prodigy180 points

    Hi Chen YiKai,

    I confirm the router can join a specified PAN_ID at run time. I modified two attribute of the NIB. Success! Following code:

    _NIB.nwkPanId = panId;
    _NIB.nwkLogicalChannel = channelId;

    NLME_UpdateNV(0x01);

    SystemReset();

    Regards!

    Chen Di

    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 May 28 2012 00:00 AM
    Mastermind9540 points

    Yes, it works in this way. However, my problem is how we could know all the PAN_ID in the environment and decide which one to join? My original thought is that we can assign the IEEE address of a specified end device or router to coordinator and let coordinator to allow the ED/router to join its network when this device is doing becon. But, I could not get this though workable on Zstack.

    Regards!

    YK

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ilya Averin
    Posted by Ilya Averin
    on May 28 2012 00:21 AM
    Expert1600 points

    Hi YiKai Chen,

    could you clarify your task?

    If I understood correctly, you have several ED/routers and several coordinators in the same area and the ED/router should join the network with certain PAN ID. What is the criterion assumed? What type of solution is supposed - ZEC-based or ZER/ZED-based? Does an ED/router have a predefined list of possible PAN IDs?

    Regards,

    Ilya

    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 May 28 2012 01:02 AM
    Mastermind9540 points

    Dear Ilya,

    For example, I have two coordinator and 5 end device. If I want 3 of 5 EDs (no.1~no.3) to join coordinator 1 and 2 of 5 EDs (no.4 and No.5 to join coordinator 2. I prefer to assign IEEE address of No.1~No.3 EDs to coordinator 1 and IEEE address of No.4 and No.5 EDs to coordinator 2. So, the 5 EDs will join the related coordinators without specifying PAN_ID from end device sides. Do you have any suggestion how to approach this?

    Regards!

    YK Chen

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ilya Averin
    Posted by Ilya Averin
    on May 28 2012 01:30 AM
    Expert1600 points

    Dear YK Chen,

    first of all, let assume that a ZED can change its PAN ID at runtime.

    At the initial stage of deployment you can start all ZEDs with 0xFFFF PAN ID. This means they will join any network they come across. On the ZC side it will be known what ZED joins and what is its IEEE address. So, the final stage is to send a command (custom defined)  from the ZC to the ZED with PAN ID it should apply. To start with the new PAN ID, the ZED should restart with the clearing of previous network state. Of course, the channel list should be set correctly.

    Regards,

    Ilya

    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 May 28 2012 03:15 AM
    Mastermind9540 points

    Hi Ilya,

    Yes, I am using similar approach in my system. I just wonder that if it is possible not allowed ED to join a coordinator except you have add its IEEE address to coordinator. Otherwise, I always need to reset ED to have it to look for a new network to join.

    Regards!

    YK Chen

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Giordano Bruno Wolaniuk
    Posted by Giordano Bruno Wolaniuk
    on May 28 2012 13:36 PM
    Prodigy250 points

    Hi Ilya,YK Chen and Di Chen,

    I am trying to do a LIST of PAN_IDs with the command:

    ZDP_MgmtNwkDiscReq( (zAddrType_t*)&dstAddr,
    0x00100000,
    BEACON_ORDER_1_SECOND,
    0,
    0);

    When the answer is available, the event "case Mgmt_NWK_Disc_rsp" is  risen by the osal:

    I treat this event in this way

    mgmtNwkDiscItem_t pans[10]; //global array of pans

    void ZDApp_ProcessMsgCBs( zdoIncomingMsg_t *inMsg )
    {
      switch ( inMsg->clusterID )
      {
                      case Mgmt_NWK_Disc_rsp:
          {
                                     ZDO_MgmNwkDiscRsp_t *MgmNwkDiscRsp = NULL;
                                     int8 rightpan = -1;
                                     MgmNwkDiscRsp = ZDO_ParseMgmNwkDiscRsp(inMsg);
                                     for(char i = 0;i<10;i++)  {
                                                     pans[i] = MgmNwkDiscRsp->list[i];
                                     }

                                   ...

    Then, I leave the current PAN with the command:

    NLME_LeaveReq_t leavereq;
    leavereq.extAddr = null;//aExtendedAddress;
    leavereq.removeChildren = true;
    leavereq.rejoin = true;
    leavereq.silent = false;
    NLME_LeaveReq( (NLME_LeaveReq_t*)&leavereq );

    And I try another PAN from the array of PANs with the command:

    NLME_JoinRequest( MgmNwkDiscRsp->list[i].extendedPANID,
    MgmNwkDiscRsp->list[i].PANId,
    0x14,0x06,0,10);

    It is not working because:

    1) The array of pans doesn't have the PAN_ID (16bits), only the extended_PAN_ID (8bytes);

    2) I dont know the meaning of the last two arguments of the command NLME_JoinRequest;

    3) Disassembling the code of NLME_JoinRequest, I saw that some variable could be writen in non volatile memory if we use correctly the functions (may be the new PAN_ID to join), but my way of use of this function is wrong. But in this case the method shown by Di Chen appear to work.

    Giordano

    NLME_JoinRequest NLME_LeaveReq ZDP_MgmtNwkDiscReq
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Giordano Bruno Wolaniuk
    Posted by Giordano Bruno Wolaniuk
    on May 29 2012 08:58 AM
    Prodigy250 points

    Is possible to get the PAN_ID if I have the EXTENDED PAN_ID?

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