Announcements
Community Announcement : Welcome to the NEW Cypress Developer Community.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

Anonymous
Not applicable

 Hi all,

   

           I am sending message from GSM 900 module attached to PSoC 4 Pioneer kit. But I am not getting proper message that I configured in my code. Please help me out. My workspace file is attached here. 

0 Likes
12 Replies
Anonymous
Not applicable

 I am getting message like PU(Q    only.

0 Likes
HeLi_263931
Honored Contributor II

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?

0 Likes
HeLi_263931
Honored Contributor II

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...

0 Likes
rola_264706
Honored Contributor II

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,

0 Likes
rola_264706
Honored Contributor II

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.

0 Likes
Anonymous
Not applicable

 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...???

0 Likes
rola_264706
Honored Contributor II

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?

0 Likes
Bob_Marlowe
Expert II

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

0 Likes
rola_264706
Honored Contributor II

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.

0 Likes
Anonymous
Not applicable

 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...???

0 Likes
Bob_Marlowe
Expert II

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

0 Likes
ETRO_SSN583
Esteemed Contributor

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.

0 Likes