Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

modem

avisunavisun Member Posts: 35

hello


i wrote this prog on VC++,XP os

can anyone tell me what's wrog here?? why does it(the modem)
never answer the call???
or how can i switch the modem to another AT command while its
detecting a call??


thanx a.
source :
#include
#include
#include
#include


void Listen(FILE *temp);
void HangUp(FILE *temp);
void AnswerCall(FILE *temp);


int main(){

FILE *Modem=fopen("COM3","w+t");

printf("Listen :
");


Listen(Modem);

AnswerCall(Modem);

HangUp(Modem);



return 1;
}
/////
void Listen(FILE *temp){

int i=10;//new line
while(i==10){

i= getc(temp);
}

printf("RING
");
}
/////
void HangUp(FILE *temp){

fprintf(temp,"ATH
");
printf("HANG UP!!!");
fclose(temp);
}
/////
void AnswerCall(FILE *temp){

fprintf(temp,"ATA
");


}



Comments

  • Shawn CarterShawn Carter Member Posts: 0

    _ // http://forcoder.org // free video tutorials and ebooks about \ PL/SQL R Python Visual Basic C JavaScript Objective-C Swift Assembly PHP MATLAB Visual Basic .NET Delphi C++ Scratch Go Ruby Perl Java C# Awk Crystal Dart Hack FoxPro Lisp SAS Bash ABAP Apex ML Rust Lua VBScript Logo COBOL Transact-SQL Prolog Kotlin Erlang D Clojure Scheme F# Julia Alice Fortran Scala Ada LabVIEW \ ______________

Sign In or Register to comment.