Can't communicate with Atmega1284p over serial-RS232

I am trying to communicate with an Xbee module with an ATmega1284P microcontroller through UART/RS232. When I connect the microcontroller’s RS232 port to my PC, I can see data coming in at the set baud rate of 9600. When I connect the Xbee to the computer and send some commands using X-CTU, I can see data being transferred through the LEDs on the DIN pin (same settings of baud rate, parity bit and stop bit). Xbee is also doing the wireless transmission correctly since I receive the data through another Xbee connected to my PC. But when I connect the microcontroller directly to the XBee through UART, there is no data coming in. The DIN LEDs don’t light up. Any idea what the issue here might be?