LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Modem Quick Answer (https://www.linuxquestions.org/questions/programming-9/modem-quick-answer-212935/)

jardun 08-03-2004 11:04 AM

Modem Quick Answer
 
I'm trying to write a modem server (in C on Linux) that sits on /dev/ttyS0 and answers incoming calls. Using the Hayes AT commands, the best I can seem to get is for the modem to pick up after 1 complete ring, yet I notice when I dial ISP's they pick up immediately before any ring takes place.

So far all I can find is to set the modem's S-registers such that it picks up on first ring (really AFTER first ring) when the modem sends the "RING" string up the line. Using this means that it takes at least 12 seconds from then the client dials to when the host picks up. When the client dials an ISP it takes more along the lines of 6 seconds and the host picks up before a ring has completed. How (probably in general terms) do I get my program/modem to do that? Is there some way to test the lines and actually detect a ring before the modem send "RING" up the line?

Thanks,

Justin Manning

james.zhang 08-05-2004 10:41 PM

You can use AT cmd to set the modem to answer automatic
It will take less 2 seconds.


All times are GMT -5. The time now is 05:37 AM.