I need to write a program similar to windows hyperterminal.

Problem is i need to automise the process so that my program can send AT commands to a modem and recieve responses back. Without human interferance.

I need to either emulate the hyperterminal or communicate directly with the device.

Any ideas how I can do this ??