![]() |
Hi, This is a little out of the ordinary I guess. Does anyone know how to clear a modem buffer? By this I mean flush all it's output and input? I have a small C program that kills any modem processes, removes the lock file and then sends ATH0 and ATZ to the modem. Sometimes this doesn't work and it ends up spewing back garbage left over from the last modem process and doesn't do anything. I am running Solaris 2.6 on a SPARC platform with a USR V.Everything modem. Below is the program output. > >Resetting modem... >Opening /dev/cua/a... >Command >ATH0 >Response>ATZ OK <-- left over from some other process >Command >ATZ >Response> <-- should respond with a 0 >Closing /dev/cua/a... > Now this *does* work perfectly 99% of the time. But every once in a while I get this problem and I'd like to know how to fix it. I suppose the easiest solution would be to remove any previous I/O data in the modem. I am not overly knowledgeable of the ins and outs of serial port programming so if some gurus out there have some pointers that'd be great. TIA:) -Timothy Timothy McPherson E-mail: timothy@sheret.com Computer Tech. Webpage: www.sheret.com HomePage: mail.asl.bc.ca/~timothy/ ____________________ HylaFAX(tm) Users Mailing List _______________________ To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null