<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>8-bit MicrocontrollersのトピックRe: My coordinator change my address</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/My-coordinator-change-my-address/m-p/213667#M18432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I give a address with beekit, but my coordinator change the address when my end device see the network.&lt;/DIV&gt;&lt;DIV&gt;My coordinator set address 0x001 for the first end device, and after it set 0x14fe for my second device.&lt;/DIV&gt;&lt;DIV&gt;Why it isn't 0x002 for the second address.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2009 16:24:15 GMT</pubDate>
    <dc:creator>Nicolas_martel</dc:creator>
    <dc:date>2009-01-07T16:24:15Z</dc:date>
    <item>
      <title>My coordinator change my address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/My-coordinator-change-my-address/m-p/213666#M18431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Hi all&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I use a MC13213 with Accelerometer Demo Upgraded for my test.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My coordinator change the address of my end device when my end device join the network.&lt;/DIV&gt;&lt;DIV&gt;He give 0x0001.I don't want my coordinator change the address of my end device.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Do you help me please&amp;nbsp;?&lt;/DIV&gt;&lt;DIV&gt;sorry for my english &lt;A href="http://forums.freescale.com/i/smilies/16x16_smiley-sad.gif"&gt;&lt;IMG border="0" height="16" src="http://forums.freescale.com/i/smilies/16x16_smiley-sad.gif" width="16" /&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;_Nicolas&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 18:32:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/My-coordinator-change-my-address/m-p/213666#M18431</guid>
      <dc:creator>Nicolas_martel</dc:creator>
      <dc:date>2009-01-06T18:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: My coordinator change my address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/My-coordinator-change-my-address/m-p/213667#M18432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I give a address with beekit, but my coordinator change the address when my end device see the network.&lt;/DIV&gt;&lt;DIV&gt;My coordinator set address 0x001 for the first end device, and after it set 0x14fe for my second device.&lt;/DIV&gt;&lt;DIV&gt;Why it isn't 0x002 for the second address.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 16:24:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/My-coordinator-change-my-address/m-p/213667#M18432</guid>
      <dc:creator>Nicolas_martel</dc:creator>
      <dc:date>2009-01-07T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: My coordinator change my address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/My-coordinator-change-my-address/m-p/213668#M18433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Nicolas,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;this is the expected behaviour in the demo example code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you examine the 802.15.4 spec you will see that you need to do something special to NOT change the address.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Also if you examine the source code of the function that handles the associate procedure you will see the answer to your question (marked with bold):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;static uint8_t App_SendAssociateResponse(nwkMessage_t *pMsgIn){  mlmeMessage_t *pMsg;  mlmeAssociateRes_t *pAssocRes;   UartUtil_Print("Sending the MLME-Associate Response message to the MAC...", gAllowToBlock_d);   /* Allocate a message for the MLME */  pMsg = MSG_AllocType(mlmeMessage_t);  if(pMsg != NULL)  {    /* This is a MLME-ASSOCIATE.res command */    pMsg-&amp;gt;msgType = gMlmeAssociateRes_c;        /* Create the Associate response message data. */    pAssocRes = &amp;amp;pMsg-&amp;gt;msgData.associateRes;     &lt;STRONG&gt;   /* Assign a short address to the device. In this example we simply       choose 0x0001. Though, all devices and coordinators in a PAN must have       different short addresses. However, if a device do not want to use        short addresses at all in the PAN, a short address of 0xFFFE must       be assigned to it. */&lt;/STRONG&gt;    if(pMsgIn-&amp;gt;msgData.associateInd.capabilityInfo &amp;amp; gCapInfoAllocAddr_c)    {      /* Assign a unique short address less than 0xfffe if the device requests so. */      pAssocRes-&amp;gt;assocShortAddress[0] = 0x01;      pAssocRes-&amp;gt;assocShortAddress[1] = 0x00;    }    else    {      /* A short address of 0xfffe means that the device is granted access to         the PAN (Associate successful) but that long addressing is used.*/      pAssocRes-&amp;gt;assocShortAddress[0] = 0xFE;      pAssocRes-&amp;gt;assocShortAddress[1] = 0xFF;    }    /* Get the 64 bit address of the device requesting association. */    FLib_MemCpy(pAssocRes-&amp;gt;deviceAddress, pMsgIn-&amp;gt;msgData.associateInd.deviceAddress, 8);    /* Association granted. May also be gPanAtCapacity_c or gPanAccessDenied_c. */    pAssocRes-&amp;gt;status = gSuccess_c;    /* Do not use security */    pAssocRes-&amp;gt;securityEnable = FALSE;        /* Save device info. */    FLib_MemCpy(maDeviceShortAddress, pAssocRes-&amp;gt;assocShortAddress, 2);    FLib_MemCpy(maDeviceLongAddress,  pAssocRes-&amp;gt;deviceAddress,     8);        /* Send the Associate Response to the MLME. */    if(MSG_Send(NWK_MLME, pMsg) == gSuccess_c)    {      UartUtil_Print("Done\n\r", gAllowToBlock_d);      return errorNoError;    }    else    {      /* One or more parameters in the message were invalid. */      UartUtil_Print("Invalid parameter!\n\r", gAllowToBlock_d);      return errorInvalidParameter;    }  }  else  {    /* Allocation of a message buffer failed. */    UartUtil_Print("Message allocation failed!\n\r", gAllowToBlock_d);    return errorAllocFailed;  }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;So what you need to do is to change the end device to NOT request an address.&lt;/DIV&gt;&lt;DIV&gt;I have marked the line with bold that you need to change:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;static uint8_t App_SendAssociateRequest(void){  mlmeMessage_t *pMsg;  mlmeAssociateReq_t *pAssocReq;  UartUtil_Print("Sending the MLME-Associate Request message to the MAC...", gAllowToBlock_d);    /* Allocate a message for the MLME message. */  pMsg = MSG_AllocType(mlmeMessage_t);  if(pMsg != NULL)  {    /* This is a MLME-ASSOCIATE.req command. */    pMsg-&amp;gt;msgType = gMlmeAssociateReq_c;        /* Create the Associate request message data. */    pAssocReq = &amp;amp;pMsg-&amp;gt;msgData.associateReq;     /* Use the coordinator info we got from the Active Scan. */    FLib_MemCpy(pAssocReq-&amp;gt;coordAddress, mCoordInfo.coordAddress, 8);    FLib_MemCpy(pAssocReq-&amp;gt;coordPanId,   mCoordInfo.coordPanId, 2);    pAssocReq-&amp;gt;coordAddrMode      = mCoordInfo.coordAddrMode;    pAssocReq-&amp;gt;logicalChannel     = mCoordInfo.logicalChannel;    pAssocReq-&amp;gt;securityEnable     = FALSE; &lt;STRONG&gt;   /* We want the coordinator to assign a short address to us. */    pAssocReq-&amp;gt;capabilityInfo     = gCapInfoAllocAddr_c;&lt;/STRONG&gt;          /* Send the Associate Request to the MLME. */    if(MSG_Send(NWK_MLME, pMsg) == gSuccess_c)    {      UartUtil_Print("Done\n\r", gAllowToBlock_d);      return errorNoError;    }    else    {      /* One or more parameters in the message were invalid. */      UartUtil_Print("Invalid parameter!\n\r", gAllowToBlock_d);      return errorInvalidParameter;    }  }  else  {    /* Allocation of a message buffer failed. */    UartUtil_Print("Message allocation failed!\n\r", gAllowToBlock_d);    return errorAllocFailed;  }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;I can only recommend downloading the 802.15.4 specification from the &lt;A href="http://www.ieee.org" rel="nofollow noopener noreferrer" target="_blank"&gt;www.ieee.org&lt;/A&gt; website so you can look up the behaviour of the different 802.15.4 commands and features.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BR,&lt;/DIV&gt;&lt;DIV&gt;Mads&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2009 17:58:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/My-coordinator-change-my-address/m-p/213668#M18433</guid>
      <dc:creator>Mads</dc:creator>
      <dc:date>2009-01-16T17:58:20Z</dc:date>
    </item>
  </channel>
</rss>

