/* (1)This is a demo program which demonstrate how you can use the GSM function for 7188XA. (2)Connect the DB-9 connector of GSM module to COM1 of 7188XA. (3)Then you can transmit data to remote host via GSM module. Compiler file: GSMDEMO.c 7188XA.lib GSM.lib 2002/02/06 written by Tony */ #include #include #include"..\lib\7188xa.h" #include"..\lib\gsm.h" void main(void) { char buf[512]; int type; int ver; EnableWDT(); EnableLEDmsg(); type=Is7188xa(); /*detect the current operation system*/ if(type){ ver=GetLibVersion(); Print("Hello 7188XA! (Flash memory is %d K)\n\r",type); Print("Library version is %d.%02d",ver>>8,ver&0xff); } else{ Print("Hello PC!, this program is not run under 7188XA."); return; } InstallCom1(9600,8,0,1); InstallCom3(9600,8,0); DataLink(1,"0939220164","Hello",buf); /*Dial to remote Host*/ Print("\r\n%s",buf); /*show the response of remote Host.*/ DelayMs(100); if(SMS(1,"0939220164","Hello")) /*SMS*/ Print("\r\nError"); Print("\r\nSMS success"); RestoreCom1(); RestoreCom3(); }