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.

AF Broadcast (cc2480)

Other Parts Discussed in Thread: CC2431, CC2530, CC2430

 No matter what options i try, the broadcast messages i send is only received by ONE device... even if i put the coordinator and some routers side by side. what am i doing wrong??

 i use AF Register with no clusters , endpoint 3 for routers/coordinator and endpoint 1 for enddevices

im using AF Data Request with address 0xFFFC (already tried 0xFFFD and 0xFFFF), i limit the hops to 1 (only devices in range should receive the broadcast). I have double-checked the pBuf sent to the cc2480 and everything seems alright...

I have even tryed disabling SAPI binds and registers, but i still use SAPI to do the join.

 

it seems to me that my enddevices are only sending broadcasts to their parents, is that true? how can i make it send to everyone in range?

 

Thanks,

MrGuga


  • ok, after reading a lot, i found something in zigbee.org docs:

    "To transmit a broadcast MSDU, the NWK layer of a ZigBee router or ZigBee
    coordinator issues an MCPS-DATA.request primitive to the MAC sub-layer with
    the DstAddrMode parameter set to 0x02 (16-bit network address) and the
    DstAddr parameter set to 0xffff. For a ZigBee end device, the MAC destination
    address of the broadcast frame shall be set equal to the 16-bit network address of
    the parent of the end device. The PANId parameter shall be set to the PANId of the
    ZigBee network."

     seems that end devices dont broadcast directly... however, i need my end devices to scream "HELLO ALL ROUTERS IN MY RANGE, IM HERE!!! PLEASE READ MY LINK QUALITY BYTE AND CALCULATE MY POSITION" or something like that.

    Any ideas on how to do that? I will try to somehow make a low powered router and see if i can make it broadcast to all other routers.

  • sending to the address 0xFFFF sends a broadcast to all devices. Unfortunately, if your end devices are sleepy, they may not receive these messages. 0xFFFC is reserved for broadcast only to routers and coordinators. Try using this address instead.

  • i dont want to send messages TO end devices... i want end devices to send messges to routers... and i send the broadcasts with max hops set to 1,., this way, all routers in range should receive the message and measure the link quality byte and then the message should die... (i only need to measure link quality to calculate position)

    the problem is that it seems the broadcast messages are sent only to the enddevice's parent, (so the parent would broadcast it to others) and so it dies on this parent (1 hop) and i can only measure ONE link quality...

    it would make no sense to rise max hops because i need to measure end device's link quality and not the routers link quality....

     

    so, now i'm trying to build a low powered router (because routers dont have parents) but im now stuck in CC2480 config... i read somewhere that all cc2480 low-powered devices MUST be set as enddevices.... i could set my device as a router and set the "RxOnWhenIdle" flag to false, but there is no way to change that flag in CC2480.

    The only option left for me is configure my low powered device as a router and force it to sleep with the RESET_N pin.

    Ill try that and see if it works, but i'm afraid what will happen if this router actually try to ROUTE something lol =)

     

     

    oh and yes, i tried 0xFFFF, 0xFFFC and 0xFFFD, all of them gave me the same result: end devices broadcasting only to their parents.

     

    Thanks for the answers

    MrGuga

     

  • I have a network of 3 nodes

    Imagine a light switch that I want to control  2 lights.

    one of these lights is a coordinator the other light is an end device and the switch is also an end device.

    Each of these lights is on endpoint 0x02 which I want to add to group 1 or 0x0001

    Each of these lights adds itself to group 1 at start up which is basically just a table of endpoints and group ids

    The endpoints are registered with the cc2480 using af_register.

    So basically using the AF_Data_request 

    DstAddress = is the group_id  0x0001

    DestEndpoint = 0xFF(there is no endpoint with groups)

    This message is then broadcast to all devices and the application itself checks which endpoint are associated with the group and passes the command to the application endpoint.

     

    MY Question is what else needs to be done with the packet. I have a feeling the options should be set to something but the specification doesn't mention the options.

     

    Anyone any advice?

     

     

     

  • any TI employees around who can answer this question?

    Does the cc2480 have any way of sending a message to a group. I would have imagined the AF_DATA_REQUEST would do it but how.

     

    The zigbee specification for sending to a group is using a broacast command with the destAddress containing the group_id??

     

    ANYONE!!

  • I never sent messages to a group, but don't you set the group for the devices in their configuration files, then populate the sending address structure with that group number before sending the message?

    Scott

  • Simon, you cannot send group messages using the CC2480

  • Thanks "Double O"

    You can receive group messages because the group_id is present in the af_data_indication and using the Application can set itself to be a member of a group so that is fine for the receiving node.

    My problem is that I want to have a number of devices all with cc2480's which can be part of a group and then to be able to either add these devices to a group maybe using zcl group cluster or as the application starts up on the receiver.

     

    If cc2480's cannot sent group commands which is what I wanted to be able to do to send a request to the devices which were part of the group I will need to have some seperate platform to provide the client(sending) packets.

     

    is RF4CE a valid alternative and would this work with cc2480(zigbee 2006) because that seems to be where it's going.

  • If I use the ZDO_BIND_REQ I can specify in the dstAddrMode that it is a groupcast. I then need to simply call af_data_request with dstAddr =  0XFFFE and dstAddress = group_id which would then use the binding table to send  groupcast request.

     

     

     

  • Double 0

    With reference to group messages.

    In my previous post I mentioned looking at creating a binding with zdo_bind_req

    I set the following parameters.

    dstAddr = short address of the device sending the bind req
    srcAddr = 64 bit address of the device sending the bind req
    srcEndPoint = 0x02
    clusterID 0x0006
    dstAddrMode = 0x01
    dstAddress = 0x0001 (which is my group id)
    dstEndPoint 0xff (shouldn't matter with groups).

     

    When I send this request it returns sucess and my packet sniffer shows some activity but no packet on the receiving node.

    It works if I use 64Bit IEEE address.

     

    I know you said it the last message cc2480 will not do group messages then why in the interface specification does it mention group address?

    If this think cannot send group messages it's useless for home automation applications.

     

     

     

     

  • OK then do any of TI's (supposed) zigbee products send out a group request. Nobody seems to be able to answer my questions about the cc2480 unless anyone knows my answer regarding the above.

  • I want to do the location estimation based on RSSI just like you do. I did my research, and it looks like ZigBee doesn't support this kind of broadcasting (correct me if I'm wrong). 

    My plan is adjust the TI ZigBee stack and handle this kind of broadcasting before ZigBee stack touch it. I'm still working on it now.

     

     

  • Hi Simon, I think you're at a dead end with trying to use ONLY the 2480 to effectively handle group messages. I don't know a way to add CC2480 devices to a group. There's no API. If you were using a full stack on one of the platforms I posted as a sticky, you can add devices to a group by calling a function Aps_AddGroup(group_id). Then, a CC2480 that would send to the broadcast address with the cluster id = group id would then be able to deliver that groupcast to that specific group. So, really, the problem is being able to add a specific CC2480 device to a group.

  • Jason,

    You should look at our location demo application in the sample app folder.

  • I know CC2431 can easily do that. However, I have to use CC2530. I didn't find the location sample in stack folder. Could you please give me a more details instruction on how to find the sample?

  • The CC2530 does not have the Location Engine on-chip, so there is no Location sample application included in the ZStack-CC2530 installer.

  • I have more or less implemented ZCL on the cc2480 and written some code to implement group functions. The cc2480 will recieve a group id so it's just  a case of seeing if the endpoint is a member of the group.

     

    Trouble is I can not send a groupcase message to test my group functions on the recieving node..

     

     

  • Double o

    The problem is not adding a cc2480 device to a group that is handled within the application. The problem is I cannot use the cc2480 to send a group message!.

    From the interface spec below and the ZDO_IND_REQ command the DstAddrMode states 01 for a group address. Which I would assume the dstAddress is the 2 bytes to indicate the group_id and the DstEndpoint is 0(no endpoint for groups).

     

    Are you saying this is not true and the interface documentation is incorrect. I have tried this and it didn't work..

     

     

    DstAddr – 2 bytes – Specifies the destination address of the device generating the bind request  
    SrcAddress – 8 bytes – 64 bit Binding source IEEE address
    SrcEndpoint – 1 byte – Specifies the binding source endpoint.
    ClusterID – 2 byte2 – Specifies the cluster ID to match in messages.
    DstAddrMode – 1 byte – Specifies destination address mode: 01 for Group address; 03 for
    Extended address.   
    DstAddress –  8 bytes  / 2bytes –  Binding destination  IEEE  address. Not  to be confused with
    DstAddr.
    DstEndpoint– 1 byte / 0 byte – Specifies the binding destination endpoint. It is used only when
    DstAddrMode is 64 bits extended address
    SRSP:

     

  • Hi Simon,

    I did some more digging based on your responses, and it looks like if you logical OR in 0x02 with the Options field in AF_DATA_REQUEST, that this will set the dest addr mode to group address.
    I'm not sreally sure why we didn't have the same field for DstAddrMode as the ZDO_BIND_REQ....
    Give this a try and let me know.

    -- "Double O"

  • Thanks Double O..

     

    I will try it on monday and let you know the outcome. It sounds a reasonable way of achieving it.

    Thanks for your time..

     

    Simon

     

  • Tried this by setting options = options | 0x02

    My packet sniffer did pick up something but it was just invalid data. I am correct in saying the short address is then the group_id

     

    In my function that sends the af_data_request.. 

    Shortaddr = 0x0001(the group_id), options = 0x02 the srcEP = 0x02 and destEP =0xFF

     

    is there any more information available on these options?

     

      afStatus_t AF_DataRequest( afAddrType_t *dstAddr, uint8 srcEP,
                                 uint16 cID, uint16 len, uint8 *buf, uint8 transID,
                                 uint8 options, uint8 radius )
      {
      
        uint8 *pBuf = zaccelMsgBuf;
        //APSDE_DataReq_t req;
        uint16 destination = dstAddr->addr.shortAddr;
        uint8 destEP   = dstAddr->endPoint;
      
        //req.dstAddr.addrMode = dstAdd->addrMode;
        *(pBuf+MT_RPC_POS_LEN) = 10 + len;
        *(pBuf+MT_RPC_POS_CMD0) = MT_RPC_SYS_AF | (uint8)(MT_RPC_CMD_SREQ);
        *(pBuf+MT_RPC_POS_CMD1) = MT_AF_SEND_DATA_REQ;

        *(pBuf+MT_RPC_POS_DAT0) = (uint8)destination;
        *(pBuf+MT_RPC_POS_DAT0+1) = (uint8)(destination >> 8);
        *(pBuf+MT_RPC_POS_DAT0+2) = destEP;
        *(pBuf+MT_RPC_POS_DAT0+3) = srcEP;
        *(pBuf+MT_RPC_POS_DAT0+4) = (uint8)cID;
        *(pBuf+MT_RPC_POS_DAT0+5) = (uint8)(cID >> 8);
        *(pBuf+MT_RPC_POS_DAT0+6) = transID;
        *(pBuf+MT_RPC_POS_DAT0+7) = options;
        *(pBuf+MT_RPC_POS_DAT0+8) = radius;
        *(pBuf+MT_RPC_POS_DAT0+9) = len;
        if (buf)
        {
         memcpy((pBuf+MT_RPC_POS_DAT0+10), buf, len);
        }

        zaccelRPC(pBuf);
       
        return (afStatus_t)0;
      }

     

  • the group address should be the same value as the cluster ID. The short address should be broadcast (0xFFFF).

  • Thanks I did try this yesterday but it didn't work. Basically if the options flag is or'd with 0x02 and the shortaddress is 0xFFFF then the cluster_id will contain the group_id..

     

    The receiving AF_DATA_IND will then have the group_id set? and every single node in thhe PAN will recieve this message

     

    I didn't spend long trying to get it working because I have some other pressing stuff but is this something you have tried yourself or something that you have documented?

     

    Once I get back from my holiday I will try this again..

     

    Simon

  • Setting shortAddress to 0xFFFF and cluster_id = group_id  with options = 0x02

    the sending device indicated a succesful request but the no messages where received on any nodes which in this case was just the coordinator.

     

    As anybody managed to send group requests between cc2480 devices?

  • Obviously not. I do have to say I am very dissapointed with this forum. Either nobody knows anything about the mysterious ZCL or they don't want to give anything away.

     

    I will be looking at some alternative stacks in the hope they truly do implement zigbee..

  • Hi MrGuga,

    I am looking for a solution for exactly what you described except I am using CC2430 with Zstack. May I know how you ended up doing it?

    Thanks and best regards,

    Yuan Jian