My problem is solved. I've checked the signalling of uart.
I was setting 9600 baudrate for uart, but when I connect the modem for the first time, my program was sending data at 115200 baud rate. I don't why this happens?
The modem has an IC to convert the usb data to serial data. I've configured the baudrate of the IC to 9600. So, at whatever baudrate the system tries to communicate with the modem, the IC converts it to 9600 baud rate. Now it is working from my program...
But still ,I don't understand, why the system sends at 115200 baudrate, even if I set uart at 9600.