modem


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
");


}



Sign In or Register to comment.

Howdy, Stranger!

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

Categories