Keil Logo Arm Logo

Discussion Forum

gets function

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
aswathnarayana sripuram
Posted
10-Jul-2003 11:27 GMT
Toolset
C51
New! gets function
hi

I have connected to the RXD, TXD signals of 8031 to PC. The 8031 is sending a string AT+cmgrusing printf statement (hyper terminal display AT+cmgr, when i type message successful in hyperterminal (8031 is receiving this message and storing the same in the 8031 external memory)

Now i have connected the TXD and RXD signals of 8031 to GSM modem and sending a command
AT+cmgs = 9845055406 0x0d using printf command
"send sms" 0x1A using printf statement, TheGSM modem is sending sms.

When i try to read the message from gsm modem (using function gets) it is not working

any help to solve this problem

thanks
aswathnarayana
Read-Only
Author
Heinrich Raman
Posted
8-Sep-2003 14:57 GMT
Toolset
C51
New! RE: gets function
I've got a similar problem is it possible that someone can assist me on this problem

heinrich@tlabs.ac.za
Read-Only
Author
Drew Davis
Posted
8-Sep-2003 17:52 GMT
Toolset
C51
New! RE: gets function
What, if anything, is your GSM modem sending? Do you get any characters at all over the serial port?

gets() will wait until it receives a "newline" character (one or both of ASCII CR / LF). The actual definition of "newline" varies from platform to platform. Are you sure your modem produces the same "newline" that the Keil gets() is expecting?

Experiment with your own routine using getchar() (or just peek at the code in the LIB/_getkey.c file) to see what's really coming in over the serial port.
Read-Only
Author
Andy Neil
Posted
8-Sep-2003 21:39 GMT
Toolset
C51
New! RE: gets function
"The actual definition of "newline" varies from platform to platform."

With modems, it can be specified via an S-Register - see the modem's Manual

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.