Ammar Rana

MyWireless Application different address assignment.

Discussion created by Ammar Rana on Sep 24, 2007
Latest reply on Sep 24, 2007 by Ammar Rana
Hej All,
This time i am trying to assign different short address from PAN coordinator to 4 Mc13213 SRB . For this purpose i have globally declared a variable maaddress counter and then use it in App_SendAssociateResponse . My simple code is like this , and this code is working every time its assign a unique address to  the devices, but i am facing the problem that it is assigning address to only one or 2 device at a time , and other devices were not assigned any. And after so many hits then it worked for all devices and assigned them unique short address at the same time.
   be assigned to it. */
    if(pMsgIn->msgData.associateInd.capabilityInfo & gCapInfoAllocAddr_c)
      /* Assign a unique short address less than 0xfffe if the device requests so. */
       pAssocRes->assocShortAddress[0] = madevicecounter+01;
      pAssocRes->assocShortAddress[1] = 0x00;
      /* A short address of 0xfffe means that the device is granted access to
         the PAN (Associate successful) but that long addressing is used.*/
      pAssocRes->assocShortAddress[0] = 0xFE;
      pAssocRes->assocShortAddress[1] = 0xFF;