- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting message like PU(Q only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What exactly do you expect where? I see only UART_PutChar in your code? Do you mean the GSM modem sends out a text message but the message content is wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a nice tutorial at Tronixlabs: http://tronixstuff.com/2014/01/08/tutorial-arduino-and-sim900-gsm-modules/
You might want to try adding delays after each AT command, to give the modem time to process. Also, in that tutorial I see some additional linebreaks in the send SMS command.
For debugging, maybe read the command result output from the modem and display it on a LCD - maybe you get some errors...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The GSM modem chips and modules have a CTS which stands for clear to send. I believe you should feed the CTS signal into the TX enable so that it will prevent the transmission if the modem is not ready. "You will have to check the spec's for your part to determine if what the level is and then you may need to add some logic to get it to work correctly. Yes a delay would work also however it should be handle by the modem signals for the best design,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also what baud rate it the module set for? You should check this out. To get the flow control click configure and select flow control button that will give you the CTS termainal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I configured different message contents in code and I am getting different message in cell. Are there different commands for GSM 900 module interface with PSoC...??? And where I have to configure sending delay...???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should be using the CTS signal but if you want to use the delay add the Cydelay(500) in each message loop. Also did you check the specs to determine the baud rate of you GSM module?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You usually receive garbage when the baud-rates of the communicating devices are not the same. I wonder if the GSM-module is sending back an acknowledge like "OK" which you could wait for and accept. Alternavively a delay between the sending of the messages with CyDelay() might work as well.
Some things are easier to program when using strings instead, look at my changes in your program.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I asked him if his baud rate was correct. I did some research and most of the devices are set to 19200 not 9600. Some are set even higher. I like your way of combining the string instead of the for loops. He could always add another uart and check the data on Putty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Now I am getting proper message. Thanks.
But next problem is that, I wrote code to send message after human is detected via IR proximity sensor. But it is sending message countineously. I am not getting the exact flow of code. What should I do...???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Easiest will be to post your actual project, so that we can see what the reason for the contineous alarm is.
I am afraid you did not start with a "Functional Specification Document" which clearly states what you want to do. This document is usually part of the project's documentation and will help you realizing, programming and maintaining the project.
So after successfully having sent an sms what you want to do? Disabling sending for an amount of time? Waiting until the proximity doesn't "see" the visitor any more?? A combination of both???
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But next problem is that, I wrote code to send message after human is detected via IR proximity sensor. But it is sending message countineously. I am not getting the exact flow of code. What should I do...???
One technique is to draw a decison flowchart, sometimes visual view quite
effective at spotting an error in code flow/decisions.
At the least sounds like you do not have a flag being tested for message having
been sent. And of course your code must have ability to reset that flag at the
appropriate time.
Regards, Dana.