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.

RSSI Location cluster

Other Parts Discussed in Thread: CC2530, Z-STACK

Hello,

I would like to use the RSSI Location cluster to be able to locate an end_device.

The problem is that I don't manage to send an RSSI_Ping message in broadcast to

all devices around end_device. The messages are always send to parent instead of being

send from end_device to all. This means that the RSSI measure by anchor device is not good

because sender is the parent and not the end_device. I managed to send broadcast messages

but throw the parent.

Can we use (CC2530 with Zstack 2.5.0) end_device to send direct broadcast messages?

Thanks,

 

  • Hi Launix,

     

    Have you tried to send a broadcast msg from the end device in the following way:

    In the Z-Stack it is a common way to send OTA messages

     

    myApp_DstAddr.addr.shortAddr = 0xFFFC; // Broadcast to routers (no end device involved)

    myApp_DstAddr.addrMode = (afAddrMode_t)AddrBroadcast;

    myApp_DstAddr.endPoint = MY_APP_ENDPOINT;

     

    AF_DataRequest( &myApp_DstAddr,
    myApp_epDesc,
    MY_APP_CLUSTERID,
    myBufLen,
    (byte *)myBuf,
    &My_App_TransID,
    AF_DISCV_ROUTE | AF_SKIP_ROUTING,
    1 );

     

    In this case the routin feature of ZigBee is disabled, and the radius of the broadcast equals to 1,

    thus the message won't be retransmitted to the next hop.

     

    Br,

    Igor

  • Hi Igor,

    I used a Send_RSSI_Ping() with Dstaddr as you write except that I used BROADCAST_ENDPOINT(0xFF).

    I will test this tomorrow, and nice if I can sent only for 1 hop too.

    Thanks.

    Launix.

  • It works fine Igor, Thanks for your help.

    Best regards,

    Launix.

  • Here is one way of transmitting a broadcast message:

      afAddrType_t dstAddr;
      dstAddr.addrMode = afAddrBroadcast;
      dstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR_DEVALL;
      dstAddr.endPoint = LOCATION_REFNODE_ENDPOINT;


      (void)AF_DataRequest( &dstAddr, (endPointDesc_t *)&epDesc,
                             LOCATION_RSSI_BLAST, 0,
                             NULL, &transId,
                             AF_SKIP_ROUTING, 1 );

    LPRF Rocks the World

  • Hi launix,

    I have the same problem. I've tried the presented solutions by LPRF and Igor but couldn't manage to make it work. Do you have any suggestions about this problem? Maybe I'm missing some basic points?

    Regards,

    Necdet

  • Hi Necdet,

    I use this solution explain and it works. What is your problem exactly?

    Launix.

     

  • Hi Launix,

    I want to broadcast a message from an end device to the nearby routers only for RSSI localization. Then the routers will take the message, form a data packet  and send it to the coordinator. The problem is, if I use SKIP_ROUTING the message is not delivered. only AF_DISCV_ROUTE works. I use radius as 1. 

    Regards,

    Necdet

  • The message I send from end_device is this one:

     AF_DataRequest( &dstAddr_RSSI, epDesc, ZCL_CLUSTER_ID_GEN_LOCATION, msgLen, msgBuf,
                                 &NwkTransID, AF_DISCV_ROUTE | AF_SKIP_ROUTING, 1 );

     

    This works for me. And I made what u said, until return to coordinator by Report_RSSI().

    Launix.

  • Hi Launix,

    For example;

    You have two or more routers in the communication range of an end device. Can you manage to send same message to both of them to take separate RSSI readings?I can only communicate with one of them. I understand the radius, but what does SKIP_ROUTING do?

    Regards,

    Necdet

  • RSSI Ping command and RSSI_Request command must be send in broadcast to be received by all

    routers. So take care to use dest_addr like that:

      // Use a broadcast address
      dstAddr_RSSI.addrMode = (afAddrMode_t)AddrBroadcast;
      dstAddr_RSSI.addr.shortAddr = NWK_BROADCAST_SHORTADDR_DEVZCZR;
      // Broadcast endpoint
      dstAddr_RSSI.endPoint = AF_BROADCAST_ENDPOINT;

    Launix.

  • Thanks Launix,

    I think I've tried everthing, it's not working. I must think another way for RSSI localization.

    Regards,

    Necdet