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.

sending data to coordinator without binding

Hi,

I am using ZStack-CC2530-2.3.1 and have a question about sending data to the coordinator.

Since the coordinator has a known short address 0x0000, can a device/router send data to the coordinator without binding with the coordinator first ?

If it is possible, could you please instruct me to the correct API for sending data and indication of data arrival ?

regards,

winston

  • Hi Winston Lee,

    it is possible to send data to the coordinator without bindind.

    To send it, just send to the 0x0000 address using AF_DataRequest and receive in the void YOUAPP_ProcessMSGCmd( afIncomingMSGPacket_t *pkt )

    for example for sending:

    SerialApp_TxAddr.addrMode = (afAddrMode_t)Addr16Bit;
    SerialApp_TxAddr.addr.shortAddr = 0x0000;
    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;

     

    if (afStatus_SUCCESS == AF_DataRequest(&SerialApp_TxAddr,
                                               (endPointDesc_t *)&SerialApp_epDesc,
                                                SERIALAPP_CLUSTERID1,
                                                5, "TEST!",
                                                &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS))
        {

        }

     

    then you "filter" the msg in

     

    void SerialApp_ProcessMSGCmd( afIncomingMSGPacket_t *pkt )
    {

     
      switch ( pkt->clusterId )
      {
        
           
           
      // A message with a serial data block to be transmitted on the serial port.
      case SERIALAPP_CLUSTERID1:

    //FILTER HERE

     

    }

     

    You need to send the message to the correct address, end point and cluster. This triology is very important!!!!!