# xbee.send() does not transmitt anything

**URL:** <https://forums.digi.com/t/xbee-send-does-not-transmitt-anything/19680>\
**Category:** XBee - Zigbee\
**Tags:** arduino-xbee, serial-communication, xbee\
**Created:** [July 9, 2018, 1:19pm UTC](https://forums.digi.com/t/xbee-send-does-not-transmitt-anything/19680 "2018-07-09T13:19:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mb-Pejvak](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Mb-Pejvak](https://forums.digi.com/u/Mb-Pejvak)\
**Post date:** [July 9, 2018, 1:19pm UTC](https://forums.digi.com/t/xbee-send-does-not-transmitt-anything/19680/1 "2018-07-09T13:19:42Z")

</div>

I use Xbee S2 and arduinoSTM (ARM Based) to communicate module to each other. The coordinator connected to xctu on PC and router to MC. the coordinator send data to the router but the reverse communication does not happen, in fact xbee.send(xbeeTXrequest) does not work.

the code is as follow:

Code:  
uint8\_t payloadRX[6] = {0};  
XBee xbee = XBee();

XBeeAddress64 addCoord = XBeeAddress64(0X0013A200,0X40C8E51F);

ZBTxRequest zBTxReq = ZBTxRequest(addCoord, payloadRX, sizeof(payloadRX));;  
ZBTxStatusResponse txStatus = ZBTxStatusResponse();  
XBeeResponse response = XBeeResponse();  
ZBRxResponse zBRxRes = ZBRxResponse();

void setup()  
{  
// Set up Serial ports  
Serial1.begin(115200);

```
xbee.begin(Serial1);

flashLed(WorkingLED,3,300);

```

}

void loop()  
{

xbee.readPacket();  
if(xbee.getResponse().isAvailable())  
{

```
if (xbee.getResponse().getApiId() == ZB_RX_RESPONSE)
{
  xbee.getResponse().getZBRxResponse(zBRxRes);
  for (int i = 0; i &lt; zBRxRes.getDataLength(); i++) 
  {
    payloadRX[i] = zBRxRes.getData()[i];
  }
  
  if (handleMsg() == FLASH_LED)
  {
    flashLed(WorkingLED,5,1000);
  }
  
  
  
  if (handleMsg() == READ_TEMPERATURE)
  {
    zBTxReq.setPayloadLength(sizeof(payloadRX));
    zBTxReq.setPayload(payloadRX);
    zBTxReq.setAddress64(addCoord);

    zBTxReq = ZBTxRequest(addCoord, payloadRX, sizeof(payloadRX));

    xbee.send(zBTxReq);

    delay(750);
    
    if(xbee.readPacket(1000))
    {
      if (xbee.getResponse().getApiId() == ZB_TX_STATUS_RESPONSE)
      {
        xbee.getResponse().getZBTxStatusResponse(txStatus);
        Serial1.flush(); 
        if (txStatus.getDeliveryStatus() == SUCCESS)
        {
          flashLed(StatusLED,5,50);
        } else
        {
          flashLed(ErrorLED,3,500);
        }
      }
    } else if (xbee.getResponse().isError())
      {
      flashLed(ErrorLED, 2, 500);
    } else
    {
      flashLed(ErrorLED, 1, 500);
    }
  }
} else 
{
  // not something we were expecting
  flashLed(ErrorLED, 1, 25);    
}

```

}  
//flashLed(WorkingLED, 1, 2000);  
Serial1.flush();  
}
