Dear all,
I am trying to write a program in C for calling phone numbers by sending modem strings. But the program is not working. Could someone help pls.
the program is as under: ----------------------------------- #include <termios.h> #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <sys/signal.h>
#define MODEMDEVICE "/dev/modem"
int modem; char ch; FILE *fname;
void to_modem(char comm[100]);
int main()
{
fname = fopen(MODEMDEVICE,"r+");
ch=getchar();
to_modem("+++");
to_modem("ATZ0");
ch=getchar();
to_modem("ATX3 Q0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0 M1L2H1");
to_modem("ATDT9811210920");
return 0;
}void to_modem(char comm[100])
{
fputs(comm,fname);
fflush(fname);
ch=getchar();
}
--------------Thanks in advance for the help.
Regards Rajesh Jha
_________________________________________________________________
Citibank Suvidha account at No Minimum Balance! http://creative.mediaturf.net/creatives/suvidha/suvidha_hmtagoffline_dec04.htm Apply & get FREE watch!
_______________________________________________ ilugd mailinglist -- [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/[email protected]/
