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.

CC2530: Zigbee Broadcast msg for RSSI Location (AF_SKIP_ROUTING)

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK

I"m using z-stack 3.0.2, and I'm using zigbee for RSSI location. The msg which I broadcast is send to all neighborhood devices, which if is routers, it will re-sent the msg to the coordinator with the collected RSSI.

I'm using this command lines in End Device:

dstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR_DEVZCZR;
dstAddr.addrMode = (afAddrMode_t)AddrBroadcast;
dstAddr.endPoint = AF_BROADCAST_ENDPOINT;

status = AF_DataRequest(&dstAddr, &NanoTrack_EpDesc, ZCL_CLUSTER_ID_NANOTRACK,
Z_EXTADDR_LEN, &buffer[0], &NanoTrack_TransID, AF_DISCV_ROUTE | AF_SKIP_ROUTING, 1);

But, using this command, the msg is only delivered to my EndDevice parent.

Is there something that I'm missing?

Does MULTICAST_ENABLED=FALSE play a role on this? Or there is another #define that I must use to achieve this?

Thanks!

  • Hi Marcelo,

    Can you please explain your decision behind the AF data request TX options?  AF_DISCV_ROUTE is no longer available (included for backwards compatibility) and AF_SKIP_ROUTING will cause the device to skip routing and try to send the message directly (not multihop, not inherently an issue for broadcast messages but still).  You also set the radius of AF_DataRequest to one so I would expect the broadcast message to stop after one hop.  I don't expect multicast messages to be necessary or involved.  You can refer to the following relevant E2E threads:

    https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/929007 
    https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/931344 

    Regards,
    Ryan

  • My decision was based on broadcast to all nearby routers. I want that each nearby router, detect the RSSI received from the end device msg, and send it to the coordinator. Using AF_SKIP_ROUTING I was expecting that the msg should be delivered to any visibly router device, but what I'm seeing is that only the end device parent receive this msg.

    In my test I have two routers, one coordinator and one end device. When I send this msg, only the end device parent receive those msgs and resend to the coordinator. The others (which I'like to receive the same msg) does nothing.

    The routers are using the same firmware, but only one re-send the msg to the coordinator as you can see in this attachment.

    Thanks.Broadcast Msg.psd

  • Thanks for providing the sniffer log.  Typically, a ZED arranges broadcast packets with the MAC destination set as the parent device but the NWK destination as 0xFFFD.  Then it is the parent's responsibility to broadcast the message through the network with a MAC destination of 0xFFFF but the NWK source would still be that of the child.  Please refer to ZDP_DeviceAnnce as an example and try removing AF_SKIP_ROUTING as well as increasing the radius to evaluate network behavior and modify it according to the needs of your application.

    Regards,
    Ryan

  • Thank you for your fast reply.

    I thought that using AF_SKIP_ROUTING those msg would be delivered to the other device directly, avoiding the route, that need the msg to pass through it's parent.

    So, if am I in this cenario below:

    ZED1 -> ZR1

    ZED2 -> ZR2 

    And using AF_SKIP_ROUTING, and I'm sending a msg to ZR2.  Does the route be ZED1->ZR1->ZR2 instead of ZED1->ZR2 ?

    In my case, I was wondering ZED broadcast, and the same msg is delivered to ZR1 and ZR2 without any hop. But, what you say is that, if i'm using this AF_SKIP_ROUTING, the broadcast is send to ZR1 and then it is broadcast to ZR2.

    So, whats the diference using AF_SKIP_ROUTING and normal route? Or it's valid only on some cenarios?

    By the way, I wil take a closer look at ZDP_DeviceAnnce as you suggest.

      

  • Messages from a ZED have to pass through their parent.  Please see my first reply for an explanation of AF_SKIP_ROUTING, it applies to unicast messages and broadcasts from routing devices.  The route will be ZED1->ZR1->ZR2.  If you have multiple router destinations then using a broadcast is still valid, if you only need the destination to be ZR2 then unicast will be suitable.

    Regards,
    Ryan

  • So, to finish this thread, AF_SKIP_ROUTING only works for msg from rounting devices (ZR and ZC). ZED always send the msg to it's parent, and there is no way of ZED sending the msg to another router directly without passing by it's parent.

    If that's correct, my issue is resolved.

    Is there a way that in this cenario above, ZR2 send a msg directly to ZED1 ? (ZR2->ZED1), or  will be ZR2->ZR1->ZED1?

  • Sleepy ZEDs can only request data from their parent device.

    Regards,
    Ryan