C prog to talk to modem in UNIX
Posted on 1998-09-01
I'm trying to communicate with my modem hanging from /dev/ttyS1 on my Linux machine. I'm trying to write something to talk to the modem in C/C++ and I can write data to it, I just can't read the response. For example if I send down an ATDT1234 I can hear the modem go off the hook and dial (then hangup) however I can't get the response back from the modem to manipulate in my program.
I'd like some sample code if anyone has got it, on how to send an AT command to the modem and monitor the modem for its response, and no DOS/Win code please, only code suitable for Linux/*nix.
Thanks in advance