How to read responds from wavecom's modem ?

Status
Not open for further replies.

hasmibaih

Junior Member level 2
Joined
Dec 7, 2013
Messages
23
Helped
1
Reputation
2
Reaction score
0
Trophy points
8
Activity points
286
hai,
can you help me how to read responds from wavecom's modem ?
like as when i type "AT" in wavecom modem through hyperterminal, it will respond "ok"
but i use microcontroller in this case and display the respond in LCD

i had done make a program for this case, but it did not complete
the respond is not like as it should be

this is my syntax :

Code:
void main(void)
{
char data[32];
int i;
lcd_clear();
lcd_putsf("Hasmi Baih");
delay_ms(5000);
printf("AT+CSQ");
putchar(10);
putchar(13);
for (i=0;i<32;i++)
data[i]=0; //bersihkan variabel
for (i=0;i<32;i++)
{
data[i] = getchar();
if(data[i]==0x0A)//char enter
break;
}
lcd_clear(); 
lcd_puts(data); 
delay_ms(2000);
}


baudrate between microcontroller and wavecom modem is fine, serial cable is ok
because i can using it for sms gateway
but i can not read responds from wavecom modem

help me please
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…