I was trying to setup a data transfer between 2 Arduino's using Zigbee modules. My setup is an Arduino Uno and Mega, and 2 Zigbee Xbee modules.
When I run the XCTU software after connecting Zigbee to my computer through Zigbee development board, it detects it perfectly.
When when I connect the RX of Zigbee to TX of UNO and TX of Zigbee to RX of UNO or VICE VERSA, the zigbee module just disconnects, or it doesnt discover again unless I remove the RX and TX connection.
I tried many solutions on the internet out there such as trying with/without the development board, connecting only the RX and not TX or vice versa, trying different Zigbee modules and Arduino boards, but the outcome is the same.
Based on your mention of XCTU, I assume you're using XBee modules by Digi International.
When connecting TTL level serial ports, make sure you're also connecting the grounds in addition to TX and RX.
In your case, I believe the Uno and Mega run at 5V, and most (if not all) of the XBee modules use 3.3V. It's likely the XBee module does NOT have 5V tolerant I/O, so you cannot connect the Arduino TX directly to the XBee RX.