This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PAN ID

Other Parts Discussed in Thread: Z-STACK, CC2538

Hi all,

I start the coordinator and end device, when the end device's status changed into DEV_END_DEVICE, I obtain the end device's PAN ID, and it is equal to -1. I dont know what does this mean. any body could help?

Thank you!

  • Dears,

    How and When do you get the device's PAN ID?

  • There is a field show PAN ID in _NIB data structure, i.e. _NIB.nwkPanId.

  • Hello Yikai Sir,
    I am trying to control router from my Coordinator i want the network state to be remains same so I have used the -DNV_RESTORE compile flag in config file and given the same in compile option with
    -DZDAPP_CONFIG_PAN_ID=0x3434
    -DNV_RESTORE
    -DNV_INIT
    But each time the device Boots up it is taking the new PAN ID i am using HA 1.2 stack .
    please Help
    thanks regards
    Manish
  • Hi mannish,
    Do you set this specific PANID on coordinator? By the way, what do you mean you want the network state to be remains same?
  • Yes I Have set the Specific PAN ID along with NV_RESTORE compile Option every time the Module restarts it changes its PAN ID ,
    And Network state means fix router and end node Network Address.
    Thanks and Regards
    Manish
  • If you set -DZDAPP_CONFIG_PAN_ID=0x1234 in f8wconfig.cfg, rebuild coordinator, and start Zigbee network, does it form Zigbee network with PANID=0x1234. Please check this first.

  • Hello Sir got your Point


    Have already Done This.

    /*
    * f8wConfig.cfg
    *
    * Compiler command-line options used to define a TI Z-Stack ZigBee device.
    * To move an option from here to the project file, comment out or delete the
    * option from this file and enter it into the "Define Symbols" box under the
    * Preprocessor tab of the C/C++ Compiler Project Options. New user defined
    * options may be added to this file, as necessary.
    *
    * Each macro is prefixed with '-D'. The entries are to be constructed as if
    * they are to be on the compiler command line invocation (which they are).
    *
    * NOTE: The RHS (Right-Hand-Side) must be quoted if there are embedded blanks.
    * See the DEFAULT_KEY definition for an example.
    */

    /* Enable ZigBee-Pro */
    -DZIGBEEPRO

    /* Set to 1 to enable security. To disable set to 0 */
    -DSECURE=1
    -DZG_SECURE_DYNAMIC=0

    /* Enable the Reflector */
    -DREFLECTOR

    /* Default channel is Channel 11 - 0x0B */
    // Channels are defined in the following:
    // 0 : 868 MHz 0x00000001
    // 1 - 10 : 915 MHz 0x000007FE
    // 11 - 26 : 2.4 GHz 0x07FFF800
    //
    //-DMAX_CHANNELS_868MHZ 0x00000001
    //-DMAX_CHANNELS_915MHZ 0x000007FE
    //-DMAX_CHANNELS_24GHZ 0x07FFF800
    //-DDEFAULT_CHANLIST=0x04000000 // 26 - 0x1A
    //-DDEFAULT_CHANLIST=0x02000000 // 25 - 0x19
    //-DDEFAULT_CHANLIST=0x01000000 // 24 - 0x18
    //-DDEFAULT_CHANLIST=0x00800000 // 23 - 0x17
    //-DDEFAULT_CHANLIST=0x00400000 // 22 - 0x16
    //-DDEFAULT_CHANLIST=0x00200000 // 21 - 0x15
    //-DDEFAULT_CHANLIST=0x00100000 // 20 - 0x14
    //-DDEFAULT_CHANLIST=0x00080000 // 19 - 0x13
    //-DDEFAULT_CHANLIST=0x00040000 // 18 - 0x12
    //-DDEFAULT_CHANLIST=0x00020000 // 17 - 0x11
    //-DDEFAULT_CHANLIST=0x00010000 // 16 - 0x10
    //-DDEFAULT_CHANLIST=0x00008000 // 15 - 0x0F
    //-DDEFAULT_CHANLIST=0x00004000 // 14 - 0x0E
    //-DDEFAULT_CHANLIST=0x00002000 // 13 - 0x0D
    //-DDEFAULT_CHANLIST=0x00001000 // 12 - 0x0C
    -DDEFAULT_CHANLIST=0x00000800 // 11 - 0x0B

    /* Define the default PAN ID.
    *
    * Setting this to a value other than 0xFFFF causes
    * ZDO_COORD to use this value as its PAN ID and
    * Routers and end devices to join PAN with this ID
    */
    //

    -DZDAPP_CONFIG_PAN_ID=0xE433
    -DNV_RESTORE

    /* Minimum number of milliseconds to hold off the start of the device
    * in the network and the minimum delay between joining cycles.
    */
    -DNWK_START_DELAY=100

    /* Mask for the random joining delay. This value is masked with
    * the return from osal_rand() to get a random delay time for
    * each joining cycle. This random value is added to NWK_START_DELAY.
    * For example, a value of 0x007F will be a joining delay of 0 to 127
    * milliseconds.
    */
    -DEXTENDED_JOINING_RANDOM_MASK=0x007F

    /* Minimum number of milliseconds to delay between each beacon request
    * in a joining cycle.
    */
    -DBEACON_REQUEST_DELAY=100

    /* Mask for the random beacon request delay. This value is masked with the
    * return from osal_rand() to get a random delay time for each joining cycle.
    * This random value is added to DBEACON_REQUEST_DELAY. For example, a value
    * of 0x00FF will be a beacon request delay of 0 to 255 milliseconds.
    */
    -DBEACON_REQ_DELAY_MASK=0x00FF

    /* Jitter mask for the link status report timer. This value is masked with the
    * return from osal_rand() to add a random delay to _NIB.nwkLinkStatusPeriod.
    * For example, a value of 0x007F allows a jitter between 0-127 milliseconds.
    */
    -DLINK_STATUS_JITTER_MASK=0x007F

    /* in seconds; set to 0 to turn off route expiry */
    -DROUTE_EXPIRY_TIME=30

    /* This number is used by polled devices, since the spec'd formula
    * doesn't work for sleeping end devices. For non-polled devices,
    * a formula is used. Value is in 2 milliseconds periods
    */
    -DAPSC_ACK_WAIT_DURATION_POLLED=3000

    /* Default indirect message holding timeout value:
    * 1-65535 (0 -> 65536) X CNT_RTG_TIMER X RTG_TIMER_INTERVAL
    */
    -DNWK_INDIRECT_MSG_TIMEOUT=7

    /* The number of simultaneous route discoveries in network */
    -DMAX_RREQ_ENTRIES=8

    /* The maximum number of retries allowed after a transmission failure */
    -DAPSC_MAX_FRAME_RETRIES=3

    /* Max number of times retry looking for the next hop address of a message */
    -DNWK_MAX_DATA_RETRIES=2

    /* Number of times retry to poll parent before indicating loss of synchronization
    * with parent. Note that larger value will cause longer delay for the child to
    * rejoin the network.
    */
    -DMAX_POLL_FAILURE_RETRIES=2

    /* The number of items in the broadcast table */
    -DMAX_BCAST=9

    /* The maximum number of groups in the groups table */
    -DAPS_MAX_GROUPS=16

    /* Number of entries in the regular routing table plus additional
    * entries for route repair
    */
    -DMAX_RTG_ENTRIES=40

    /* Maximum number of entries in the Binding table. */
    -DNWK_MAX_BINDING_ENTRIES=4

    /* Maximum number of cluster IDs for each binding table entry.
    * Note that any value other than the default value may cause a
    * compilation warning but Device Binding will function correctly.
    */
    -DMAX_BINDING_CLUSTER_IDS=4

    /* Default security key. */
    -DDEFAULT_KEY="{0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0D}"

    /* Reset when ASSERT occurs, otherwise flash LEDs */
    //-DASSERT_RESET

    /* Set the MAC MAX Frame Size (802.15.4 default is 102) */
    -DMAC_MAX_FRAME_SIZE=116

    /* Minimum transmissions attempted for Channel Interference detection,
    * Frequency Agility can be disabled by setting this parameter to zero.
    */
    -DZDNWKMGR_MIN_TRANSMISSIONS=20

    /****************************************
    * The following are for End Devices only
    ***************************************/

    -DRFD_RCVC_ALWAYS_ON=FALSE

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

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

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

    /* 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=440
  • Do you make sure your coordinator forms ZIgbee network with PANID=0xE433?
  • Yes Sir ,

    I want to fix the PAN ID but it is not fixing to any specific value I dont know the reason because it was working for CC 2530 and Now when i am trying it for CC2538 with same configuration parameters it is not taking the Static ID
    please Help
    thanks and regards
    manish
  • Just test on Z-Stack Home 1.2.2 and CC2538. I can set PANID to 0x1234 without problem.
  • Dear YK Chen,

    I, already have my network with fixed PAN_ID. However, if the router stared before the coordinator, I mean that the router power-up process completed before the coordinator, then the coordinator take a new PAN_ID, which is "The fixed PAN_ID + 1".

    Could you please help me to come over this.

    Note that, I tried to use NV_RESTORE flag for this, but it made the coordinator device started as a router, at least that what has been displayed on the LCD.

    I'm using Z-stack mesh.

    Thanks in advance.

    Best regards,
    Mohammad Harraz
  • 1. When you say if the router stared before the coordinator, I mean that the router power-up process completed before the coordinator, then the coordinator take a new PAN_ID, which is "The fixed PAN_ID + 1". Do you enable NV_RESTORE in this test?
    2. That's not possible. If you download GenericApp coordinator FW with or without NV_RESTORE, it won't become router. You should test it again.
  • Dear YK Chen,

    What you said it is impossible, already happened when I was trying. However, I could figure out the problem, it was that the device neededto be erased first. After erasing the memory and start to test again, every thing went well.
    Thank you for you participation.

    Best regards,
    Mohammad Harraz
  • It means that you still run router FW on device since you don't erase flash. Basically, it is still not possible that you download coordinator FW but it comes out as router. Anyway, it is good to know you solve the problem.