I'm trying to build a simple application that can dial a phone number of another modem (connected to a PC) or can recieve a call from another modem.
I've expiramented both ways using an instance of HyperTerminal on each PC and it works fine. One dials, the other answers and the connection is established.
I can't get this to happen when on one side I have my C application instead of HyperTerminal. I've used the same settings as with HyperTerminal so it's verified that I have the correct parameters.
The code I use basicaly initializes the port setting and then performs a "WriteFile" function call. After that I'm supposed to hear the modem dial (in case I'm the side that's dialing) but nothing happens.
The code I used is very similar to what's in: http://web6.codeproject.com/system/SerialPortComm.asp?df=100
The only difference is that before WriteFile I have:
strcpy(command, "ATZ\aATD45716\a"); // command for modem
where the number I dial is 45716.
I case I'm trying to pick up a call my command is:
strcpy(command, "ATZ\aATS0=1\a"); // command for modem
Any idea where the problem is and how I can get this to work?
Thanks in advance.