View previous topic :: View next topic |
Author |
Message |
glenjoy
Joined: 18 Oct 2004 Posts: 21
|
Capturing ECHO and OK of a modem in AT commands |
Posted: Thu Aug 04, 2005 8:30 pm |
|
|
I have this small application for a modem and micro, now what I encountered is that in hyperterminal when I type AT<CR>, hyperterminal echoes back, AT<CR> and OK. When I give ATS0=1<CR>, hyperterminal echoes back ATS0=1<CR> and OK. And you can see also that the modem accepted the said command because the LED in modem showing AA (Auto Answer) turns on.
Now, if the modem is connected to the PIC micro, and I excute the same commands, the modem reacts the same way, shows that it can receive the command by turning the AA led ON, but my problem is that I cannot see in the LCD the OK reply nor the command I gave, AT<CR> and ATS0=1<CR>.
Thanks. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Aug 05, 2005 6:15 am |
|
|
Did ya print them to the LCD as well? Sending them out the serial port doesn't print them to the LCD also. That would be a separate printf. |
|
|
glenjoy
Joined: 18 Oct 2004 Posts: 21
|
|
Posted: Fri Aug 05, 2005 8:43 am |
|
|
Yes, I print it to LCD using this command, printf(lcd_putc,""); |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Aug 05, 2005 8:45 am |
|
|
Well if you can print data to the LCD and this works okay then you should be able to print the command to the LCD as well.
As far as the response, you are going to have to receive that data and then print it to the LCD |
|
|
glenjoy
Joined: 18 Oct 2004 Posts: 21
|
|
Posted: Fri Aug 05, 2005 8:54 am |
|
|
Hi,
I used the printf....., but there is no any text that was printed, and I know my format is correct. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Aug 05, 2005 10:34 am |
|
|
post a code snippet showing this |
|
|
glenjoy
Joined: 18 Oct 2004 Posts: 21
|
|
Posted: Fri Aug 05, 2005 10:50 am |
|
|
I got now the echo in display, my problem now is capturing the OK reply from the modem.
When I execute AT<CR>, I can now echo them on the LCD, now after the <CR>, the modem will respond with OK, I cannot get the OK. But the modem responds that the command reached it. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Aug 05, 2005 11:08 am |
|
|
Mark wrote: | post a code snippet showing this |
|
|
|
|