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.

CC2538: PANID and extendedPANID manipulation

Part Number: CC2538

I experimented that I want to form one network use NLME_NetworkFormationRequest(). Furthermore, I want to form the network with PANID and extended PANID as the parameters I set myself, but not random number. Right now it does not work,

Can I change the PANID and ExtendedPANID by some API? Or how can the NetworkFormationRequest() form the network as the PANID and extendedPANID as I set?

Best Regards

 Xian Wang

  • PANID is set by changing -DZDAPP_CONFIG_PAN_ID=0xFFFF in f8wConfig.cfg. By default, 0xFFFF will randomize the PANID.

    EPID is set by changing the IEEE Addr of the network leader, or by changing this API call in zgInit()in ZGlobals.c:

    // Initialize the Extended PAN ID as my own extended address
    ZMacGetReq( ZMacExtAddr, zgExtendedPANID );
  • Thank you for the reply.

    I just checked the zginit() code and it seems said that the EPID is copied from the Device Mac Address, is there any way that I can make such two parameters different?

    Best Regards
    Xian Wang
  • You can try to comment out “ZMacGetReq( ZMacExtAddr, zgExtendedPANID );” and assign your own EPID to zgExtendedPANID.