Need help to send serial data from arduino to XBee and to another XBee wirelessly?
You are using it as in non-API mode when data are passed to Xbee wireless transparently. To use Xbee in API mode use e.g. Xbee-Arduino library.