user39270: I need to print data on the Arduino serial monitor received from the Xbee in AT mode. I have searched on most forums and have not found anything on how to do this.
I have my Xbee tx connected to Arduino nano Rx and rx connected to tx.

user42015: You connected the Xbee to the single hardware serial interface that the Nano has. Is is also used by the USB to Serial chip, which connects to the Serial Monitor. So what you are sending to the Xbee is also sent to the Serial Monitor. What the Xbee sends is only sent to the Arduino (since the Xbee TX pin is connected to RX of Arduino and also TX of the Arduino's USB to Serial chip).
But you can separate then by using a SoftwareSerial interface on any other pins of your liking. Then you can connect the Xbee to it. Then forward the output of the SoftwareSerial interface to the Serial interface. To see how this works have a look the first example of the SoftwareSerial library. It's basically checking both interfaces, reads available data from one interface and writes it to the other (note the write() in contrast to print() since when forwarding you don't want to interpret the data again to another format like print() does).
Also there are plenty examples and tutorials about SoftwareSerial on the web. An important restriction is that only one SoftwareSerial interface can listen to data at any time. The Hardware Serial interface doesn't have such a problem.

39270: <p>I need to print data on the Arduino serial monitor received from the Xbee in AT mode. I have searched on most forums and have not found anything on how to do this.</p>
<p>I have my Xbee tx connected to Arduino nano Rx and rx connected to tx.</p>
 42015: <p>You connected the Xbee to the single hardware serial interface that the Nano has. Is is also used by the USB to Serial chip, which connects to the Serial Monitor. So what you are sending to the Xbee is also sent to the Serial Monitor. What the Xbee sends is only sent to the Arduino (since the Xbee TX pin is connected to RX of Arduino and also TX of the Arduino's USB to Serial chip).</p>
<p>But you can separate then by using a <code>SoftwareSerial</code> interface on any other pins of your liking. Then you can connect the Xbee to it. Then forward the output of the <code>SoftwareSerial</code> interface to the <code>Serial</code> interface. To see how this works have a look the <a href="https://github.com/arduino/ArduinoCore-avr/blob/master/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino" rel="nofollow noreferrer">first example of the <code>SoftwareSerial</code> library</a>. It's basically checking both interfaces, reads available data from one interface and writes it to the other (note the <code>write()</code> in contrast to <code>print()</code> since when forwarding you don't want to interpret the data again to another format like <code>print()</code> does).</p>
<p>Also there are plenty examples and tutorials about <code>SoftwareSerial</code> on the web. An important restriction is that only one <code>SoftwareSerial</code> interface can listen to data at any time. The Hardware <code>Serial</code> interface doesn't have such a problem.</p>
