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.

IEEE Address don't match

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi, everybody!

I use the z-stack on CC2530 chip. 

The end-device transmits data to the coordinator in the same network. I want to get the srcAddr.addr.extAddr of afIncomingMSGPacket_t type from the incomming data,

but the extAddr don't match with the Primary IEEE address that i see at the SmartRF Flash Programmer. 

I understand Z-stack to get the IEEE address mechanism from Z-Stack User's Guide - CC2530DB, then modify the zmain_ext_addr function in the AF.c.

static void zmain_ext_addr(void)

{

  //directly read Primary IEEE address

  osal_memcpy(aExtendedAddress, (uint8 *)(P_INFOPAGE+HAL_INFOP_IEEE_OSET), Z_EXTADDR_LEN);

  (void)ZMacSetReq(MAC_EXTENDED_ADDRESS, aExtendedAddress);

}

So, i want to ask why the extAddr in incoming packet don't match with the Primary IEEE address.

 

 

  • Hi there,

     

    How exactly you'r sending a packet, what is the addressing mode being in use?

  • thank you for your reply.

    addressing mode is afAddr16Bit

  • Hi,

     

    That was just out of curiosity.

    IEEE can't be extracted from received packet. You can do the following:

    1. In case you are 100% sure that a sending device is always a child
      of a receiving device then you can easily extract a IEEE address from
      in a parent from its children table by using short (NWK) address.
    2. You can initiate network lookup request for IEEE address based on
      short Address.
    3. You can send IEEE address as a part of the payload in application 
      packet and later extract it upon receiving.

    In first two methods you should be using APSME_LookupExtAddr() and ZDP_IEEEAddrReq()

    respectively. More information regarding these functions can be found in "Z-stack API.pdf".

    The third method is pretty straight forward.

  • hi, sherer. Thank you for your reply again.

    I think and try for a long time. In my situation, i chose the third method.

    thank you again. bless to  you.