Hi everyone,
Is there any way in which I can interface a GSM modem with a 8051 and retrieve the decoded SMS. The motivation behind this is that... even if i can get the encoded SMS from the GSM modeme using AT commands, the decoding complexity is very high for a 8051. And I think the GSM module should have some kind of decoding code (using this would be benificial and reduce code complexity for 8051)
Also please let me know exactly how to interface the GSM modem to 8051. I dont want a PC interface in between.
Please help me out..
Sambit NIT ROURKELA
Please use the Search facility and search for "GSM modem" - everything you need has been discussed already; most of it quite recently!
"Is there any way in which I can interface a GSM modem with a 8051"
The one and only way that you can interface anything to a GSM modem is to use its serial port - the modem neither knows nor cares whether it's a terminal, a PC, an 8051, or anything else that's connected to that port.
What do you mean by "encoded" SMS?
"And I think the GSM module should have some kind of decoding code (using this would be benificial and reduce code complexity for 8051)"
Have you looked at Wavecom's Open-AT, and the embedded scripting facilities from other manufacturers?
Hmmm.... the 'Search' seems to be broken at the moment!
It just says, "There is no catalog."
So... can we directly retrieve the SMS in text format from the GSM module?
what change of configuration is required?
Basically, I was referring the PDU format as encoded SMS.
Is there any means by which i can access the previous discussion u hav mentioned?
"can we directly retrieve the SMS in text format from the GSM module?"
Almost certainly yes - see the module's Manual for details.
"Is there any means by which i can access the previous discussion u hav mentioned?"
Yes - the 'Search' is now working again!
Dear sir, I am able to send all the commands through the controller and also able to receive the response from the GSM module. The problem is when i send SMS through the controller i am not able to receive the response. i sent AT+CMGF=1 from the controller and received OK response.
But when i send AT+CMGS="PHone number" and send the SMS text message and send CTRLZ i am receiving ERROR response.
Is there is any data to be sent after CTRLZ Regards sapthagiri
"when i send SMS through the controller I am not able to receive the response."
Does it work when you do it manually through Hypoterminal (or similar)?
After sending the AT+CMGS="PHone number", you need to wait for the '>' prompt before you send the text of the message.
"i am receiving ERROR response"
Use AT+CMEE=1 to enable extended error incidations, then look-up the error code...
Dear sir, After sending the Phone Number I am waiting for > Promt. I am getting this Promt also. But when i send the Text message and send CTRLZ i am receiving the ERROR response.
Allthe commands including the SMS working on hyperterminal.
Sir,I checked AT+CMEE=1 , i iam getting +CME=100 I saw the manual for this error and i found it was unkown.
Regards sapthagiri
If it works on Hypoterminal, but not from your code, you need to examine the differences!
One obvious difference will be timing - a microcontroller can send commands much faster than you can type them! As a first step, try adding some delays.
Also, be sure that your code is sending exactly the same as Hypoterminal - especially things like line-endings (CR or CRLF?)...
AS FAR AS I AM AWARE, REFERENCES TO <BOLD><ITALIC>HYPOTERMINAL</ITALIC></BOLD> SHOULD BE READ AS <BOLD><ITALIC>HYPERTERMINAL</ITALIC></BOLD>
You're doing it again!
You really do need to pay attention to the 'Preview' - your Bold & Italic formatting didn't work either, did they?!
Yes, "Hypoterminal" (sic) is a malapropism - a deliberate error for humourous effect: " Presumably, they called it "Hyper-terminal" to give the impression that it's "so much more" than a plain old terminal. en.wiktionary.org/.../Hyper-
But many would agree that "Hyperterminal" is a rather poor terminal - it has too many quirks, limitations, and annoyances. Hence I call it "Hypo-terminal" to indicate its deficiencies: en.wikipedia.org/.../Hypo
I don't know if you're the first to notice this, but you're certainly the first to comment!
Andy isn't the only one to write Hypoterminal on this forum. I think it's the most common name used.
I tend to use the correct M$ (see, I also like to change some names (: ) name, just to make sure that there is no single way of understanding what program to use.
"Andy isn't the only one to write Hypoterminal on this forum."
And there was me thinking I was being original! Foiled again! :-(
In fact, I did a quick search, and found that "Hypoterminal" is quite widely used on many other forums...
Dear Sir, I have given delay of 2 sec after every command sent to receive the response. I have changed the Baud rate to 9600 using AT+IPR=9600 command. Still i am getting the same Error. i saw the commands sent from the controller to GSM on the Hyperterminal and the commands what i send through the controller is exactly same as from the hyperterminal.
what is wrong with this code plese
unsigned char mmc_init(void) { unsigned int i; unsigned char response; MMC_CS_TRIS=0; MMC_VCC_KEY_TRIS=0; //out MMC_VCC_KEY=0; //MMC power ON MMC_DOUT_TRIS=1; //input MMC_DOUT_TRIS = 1; // dout as input. MMC_CS_TRIS = 0; // CS as output. MMC_CLK_TRIS = 0; // CLK as output. MMC_DI_TRIS = 0; // DI as output MMC_CLK = 1; mmc_powerup(); mmc_unselect(); for(i = 0; i < 10; ++i) mmc_read_write(0xFF); /* address card */ mmc_select(); /* reset card */ for(i = 0; ; ++i) { response = mmc_send_command_r1(CMD_GO_IDLE_STATE, 0); if(response == 1) break; if(i == 0x1ff) { mmc_unselect(); return 0; } } /* wait for card to get ready */ for(i = 0; ; ++i) { response = mmc_send_command_r1(CMD_SEND_OP_COND, 0); if(!(response & 1)) break; if(i == 0x7fff) { mmc_unselect(); return 0; } } /* set block size to 512 bytes */ if(mmc_send_command_r1(CMD_SET_BLOCKLEN, 512)) { mmc_unselect(); return 0; } /* deaddress card */ mmc_unselect(); raw_block_address = 0xffffffff; if(!mmc_read(0)) return 0; return 1; }
That it is a quite long line???
Are you _really_ sure you didn't notice this problem in the preview?
Appology please here is bad code
"I have given delay of 2 sec after every command sent to receive the response."
Do you have a delay after receiving the response before you send the next command.
How have you confirmed that what your software is sending is identical to what Hypoterminal sends?
Dear sir, Yes I am waiting for 2 sec before and after sending the command so that i can see the received Response in the debugger. i am sending the identical commands and waiting for response. I had simulated on the hyperterminal before sending it to GSM module.
"i am sending the identical commands and waiting for response. I had simulated on the hyperterminal before sending it to GSM module."
You still haven't said how you are certain that what you sent from hypoterminal was absolutely identical to what your code sends!
How have you proved this?
In particular, are you certain that the line endings are the same - CR, or CRLF?
dear Sir, These are the following steps i have followed to debug and simulate the Commands sent from the Microcontroller.
1)First i confirmed that commands sent from the hyperterminal to GSM are working perfectly and received the response from the GSM.
2)Later i checked the SMS from the hyperterminal and it was also working.
3)Then i sent commands from the controller to the hyperterminal before sending to GSM module. I came to know that what i am sending from the controller to the hyperterminal was same as the commands sent from the hyperterminal to GSM.
4) Later i started sendin the commands one by one and received response for all the commands except for SMS. For SMS After sending the Text Message i sent CTRLZ ascii value(26) from the controller and simulated the same by sending it to hyperterminal. I am getting the same ERROR response. Till now i am facing the same problem.
Create the minimum complete application that just attempts to send an SMS. If this works, then build on it, adding-in your other functionality one step at a time. Test throughly after each step. Save a backup of each step.
If it doesn't work, post it here - taking care to read & follow the instructions for posting source code. Also be sure to use copy-and-paste (don't manually re-type), no TABs (spaces only).
You do know that 26 is the decimal value, don't you?
i am not sure abt ur problem... but what i guess is that u are not getting any response from the GSM modem... rt?
trying sending the command serially... followed by linefeed and carriage return. This will actually execute the command in the GSM Modem.
wait for some time for the command to execute...
u can check the response in the CRO... u will find blocks of data being transmitted and received..
do check that.. one more thing that u need to look into is the handshaking part.. check if that is working fine or not. IN case of a normal microcontroller... the RTS pin is NOT CONNECTED.. that is a very important pin for handshaking.. I think that should be active LOW.. u need to make a manual connection for that.
do mail me ur actual problem at sambit.nitrkl@gmail.com
would be glad if ucan help u... we had similar problems.. :)
"i am not sure abt ur problem"
Your post is almost unintelligible!
Please use full words - "about", "your" etc.
You're not on a cell phone now - there's no need for it, and it just makes it really hard to understand your message!
The language barrier can be hard enough as it is, without needlessly adding to the problem like this!
"i guess is that u are not getting any response from the GSM modem... rt?"
No: he has specifically said that he is getting a response - but that response is "ERROR"
"trying sending the command serially"
He says he's already done that with hypoterminal
Do please read the foregoing discussion carefully!
"followed by linefeed and carriage return"
No! AT commands should be terminated with CR only.
When CR and LF are used together, it should be CR first, then LF - hence the common abbreviation "CRLF"
"wait for some time for the command to execute..."
Delays have already been discussed.
I am sorry, Sir
Yes I have send it 0x1a which hex value of 26
View all questions in Keil forum