GSM Component
Moderator: Benj
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
GSM Component
Hi guys,
Is there any way of extracting the number of a call to a GSM module. The component to extract the number from an incoming SMS works well for an SMS, but I'm trying to get the number of an incoming call. Any ideas?
Thanks
Is there any way of extracting the number of a call to a GSM module. The component to extract the number from an incoming SMS works well for an SMS, but I'm trying to get the number of an incoming call. Any ideas?
Thanks
- Bachman
- Posts: 116
- Joined: Sun Sep 07, 2014 11:37 am
- Location: Hungary
- Has thanked: 9 times
- Been thanked: 53 times
- Contact:
Re: GSM Component
Did you try pure UART (RS232) communication? I think, when you call the GSM module, it's sending the information via UART.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: GSM Component
Which GSM module are you using? If you look at the AT command datasheet for the module then there should be a way of getting the caller ID. Maybe via an AT command or maybe it is sent along with the incoming RING message.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hello,
i would prefer to ask this in this topic instead of creating a new one.
With Flowcode V6 i am using the well known GS M Module SIM8OOL and i need to receive an SMS message.
Inside a loop i read a variable for the incoming message.
If i got the variable for incoming message equal to 1 then using an IF statement i compare the incoming string with a string of my preference and if both are identical then i turn on an LED.
Usually this works fine but sometimes i need to send the sms multiple times in order to get the LED turned on.
One of the questions that i have is: should i place a delay component inside the loop that i check for an incoming message ? And if yes, what is the time delay value?
Do you have any idea what may be the solution for the above issue?
Thanks In Advance
Regards
George
i would prefer to ask this in this topic instead of creating a new one.
With Flowcode V6 i am using the well known GS M Module SIM8OOL and i need to receive an SMS message.
Inside a loop i read a variable for the incoming message.
If i got the variable for incoming message equal to 1 then using an IF statement i compare the incoming string with a string of my preference and if both are identical then i turn on an LED.
Usually this works fine but sometimes i need to send the sms multiple times in order to get the LED turned on.
One of the questions that i have is: should i place a delay component inside the loop that i check for an incoming message ? And if yes, what is the time delay value?
Do you have any idea what may be the solution for the above issue?
Thanks In Advance
Regards
George
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: GSM Component
Hi George,
Can you post your chart so that we can have a look what you are doing, I am playing with this module at the moment myself and I am finding them very unstable, you need filter caps as close to the board as possible, also you need a good 4.5 - 4.8 volt power supply that can handle a 2 amp spike when the module makes a call or sends a text, I will find a diagram of the filter caps for you and put it on here.
Thanks
Stuart
EDIT: Here you go: https://bigdanzblog.wordpress.com/2016/ ... stability/
Can you post your chart so that we can have a look what you are doing, I am playing with this module at the moment myself and I am finding them very unstable, you need filter caps as close to the board as possible, also you need a good 4.5 - 4.8 volt power supply that can handle a 2 amp spike when the module makes a call or sends a text, I will find a diagram of the filter caps for you and put it on here.
Thanks
Stuart
EDIT: Here you go: https://bigdanzblog.wordpress.com/2016/ ... stability/
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hi Stuart, thank you for your help!
The Module that i have at the moment is This
I will try to upload the flowcode Program when i will have free time in the weekend
Many thanks
George
The Module that i have at the moment is This
I will try to upload the flowcode Program when i will have free time in the weekend
Many thanks
George
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hello,
I tried to use the capacitors according the details in the link above, without any change.
The current problem that i am facing is that sometimes i receive the sms message and sometimes i don't.
I will try to upload the program so you can have a better view.
Have you experienced this issues before?
Regards
George
I tried to use the capacitors according the details in the link above, without any change.
The current problem that i am facing is that sometimes i receive the sms message and sometimes i don't.
I will try to upload the program so you can have a better view.
Have you experienced this issues before?
Regards
George
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: GSM Component
Hi George,
Sounds like a powering problem to me. If you have a scope then look at the power rails and see if you get any high frequency dips in the voltage.
Caps will certainly help, tantalum caps are best for this as they can provide large amounts of current in a small amount of time which is what the GSM module will likely need.
Are you using a voltage regulator? If so then what current can it handle?
I have often powered GSM modules off single cell lipo batteries. These have a working voltage range from 3.7V - 4.2V and can be connected directly to provide all the current the module needs.
Sounds like a powering problem to me. If you have a scope then look at the power rails and see if you get any high frequency dips in the voltage.
Caps will certainly help, tantalum caps are best for this as they can provide large amounts of current in a small amount of time which is what the GSM module will likely need.
Are you using a voltage regulator? If so then what current can it handle?
I have often powered GSM modules off single cell lipo batteries. These have a working voltage range from 3.7V - 4.2V and can be connected directly to provide all the current the module needs.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: GSM Component
Hi George,
as Ben says the power supply for these devices have to be bang on, if you click on the link that I sent you above, at the bottom of the page a reader has replied to the blog adding 2 x links that explain decoupling power supplies and how best to achieve it, well worth a read, it helped me.
Thanks
Stuart
as Ben says the power supply for these devices have to be bang on, if you click on the link that I sent you above, at the bottom of the page a reader has replied to the blog adding 2 x links that explain decoupling power supplies and how best to achieve it, well worth a read, it helped me.
Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hi to all and thank you for your replies!
Yes, I am using a voltage regulator L2576 to convert 12V(from a 7Ah battery) to 5V for the GSM module. I assume that the regulator provides enough mount of current for the Module.
I will come back with more details of the investigation of the issue.
Thank you all
Have a nice day
George
I will monitor the power rails with the scope soon.Benj wrote: Sounds like a powering problem to me. If you have a scope then look at the power rails and see if you get any high frequency dips in the voltage.
Caps will certainly help, tantalum caps are best for this as they can provide large amounts of current in a small amount of time which is what the GSM module will likely need.
Are you using a voltage regulator? If so then what current can it handle?
Yes, I am using a voltage regulator L2576 to convert 12V(from a 7Ah battery) to 5V for the GSM module. I assume that the regulator provides enough mount of current for the Module.
I will definitely read the links you suggested.acestu wrote:Hi George,
as Ben says the power supply for these devices have to be bang on, if you click on the link that I sent you above, at the bottom of the page a reader has replied to the blog adding 2 x links that explain decoupling power supplies and how best to achieve it, well worth a read, it helped me.
Thanks
Stuart
I will come back with more details of the investigation of the issue.
Thank you all
Have a nice day
George
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hello, finally i found some time to run a couple of tests for the problem mentioned above.
1) I measured the power rails using an oscilloscope, as Benj suggested. The result on the scope was pretty good in term of noise even if I use a switching DC Step down converter (LM2576) to convert the 12V from a battery to 5V for the GSM module.
2) I measured the current consumption of the GSM Module. The maximum current i got measured was 75mA while the module was sending an SMS. Standby current was bellow 60mA.
3) I have attached decoupling capacitors as Stuart suggested.
Some times i get the reading from the message fine, but some times not.
I have attached the part of the program that i am using to Receive a message.
Thank You
George
1) I measured the power rails using an oscilloscope, as Benj suggested. The result on the scope was pretty good in term of noise even if I use a switching DC Step down converter (LM2576) to convert the 12V from a battery to 5V for the GSM module.
2) I measured the current consumption of the GSM Module. The maximum current i got measured was 75mA while the module was sending an SMS. Standby current was bellow 60mA.
3) I have attached decoupling capacitors as Stuart suggested.
Some times i get the reading from the message fine, but some times not.
I have attached the part of the program that i am using to Receive a message.
Thank You
George
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: GSM Component
Hi George,
I have rearranged your program about a bit. Give this a go and see how you get on.
I have rearranged your program about a bit. Give this a go and see how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hi Benj, Thank you for your reply!
I will try this the soonest.
I see that you removed the component with the AT command "AT+CMGD=1,4" which i was using to delete all the messages. Is there any reason of doing this?
Thank you
George
I will try this the soonest.
I see that you removed the component with the AT command "AT+CMGD=1,4" which i was using to delete all the messages. Is there any reason of doing this?
Thank you
George
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: GSM Component
Hi George,
It's not strictly necessary to delete the messages.They will continue to come in and I'm not sure if the default is to save onto the SIM card or not.
Anyway have a go and see if this is any better.
It's not strictly necessary to delete the messages.They will continue to come in and I'm not sure if the default is to save onto the SIM card or not.
Anyway have a go and see if this is any better.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hi again!
I tried the rearranged code from Benj. Unfortunately after the test i observed the same operation as before.
I am wondering if the values, "String Array Size" and "Message Array Size" will affect the receiving procedure?
Flowcode has these values by default equal to 80.
Regards
George
I tried the rearranged code from Benj. Unfortunately after the test i observed the same operation as before.
I am wondering if the values, "String Array Size" and "Message Array Size" will affect the receiving procedure?
Flowcode has these values by default equal to 80.
Regards
George
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hello all,
I was trying to find a reason why the GSM modem would not give correct data while a new message arrives.
I made a couple of test with no luck again.
One thing that i have noticed is that if i reduce the number of the text characters from 18(CN9435693495OK,3,3) to 2, everything will be just fine even if i send sms again and again.
Is there any other idea of what may be going on ?
Thanks
George
I was trying to find a reason why the GSM modem would not give correct data while a new message arrives.
I made a couple of test with no luck again.
One thing that i have noticed is that if i reduce the number of the text characters from 18(CN9435693495OK,3,3) to 2, everything will be just fine even if i send sms again and again.
Is there any other idea of what may be going on ?
Thanks
George
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hello,
This is a sample of a message that i get some times..
I tried to change the baud rate value but no change on the results as you can see below
+CMT: "+3##########","","16/07/18,23:58:54+12âC…(úÊÂÊÒ949´§jŠiiSHø
This is a sample of a message that i get some times..
I tried to change the baud rate value but no change on the results as you can see below
+CMT: "+3##########","","16/07/18,23:58:54+12âC…(úÊÂÊÒ949´§jŠiiSHø
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: GSM Component
That looks like you might be reading the message in PDU mode and the message data is in its encoded form.
Have a good read through the AT command reference for your modem and see if there are commands for setting text mode.
Have a good read through the AT command reference for your modem and see if there are commands for setting text mode.
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: GSM Component
Hi, thanks for your reply,
I have already configured the modem to operate in text mode.
I have already configured the modem to operate in text mode.
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: GSM Component
Hi all,
I have been using the GSM component with a lot of success. What I would like to do is request the signal strength from the unit. The AT command to do this for my module is:
AT+CSQ
This is not catered for in the GSM component, so I need to manually send the command to the unit. I assume one would do this by using the "SendCommand" macro of the GSM component? The next question, is how to receive the reply. There is a macro called "StringReceive", but the variable that stores the reply is a BYTE, so Im not sure how to read the reply as the reply will be in a string form?
Any ideas?
Thanks
I have been using the GSM component with a lot of success. What I would like to do is request the signal strength from the unit. The AT command to do this for my module is:
AT+CSQ
This is not catered for in the GSM component, so I need to manually send the command to the unit. I assume one would do this by using the "SendCommand" macro of the GSM component? The next question, is how to receive the reply. There is a macro called "StringReceive", but the variable that stores the reply is a BYTE, so Im not sure how to read the reply as the reply will be in a string form?
Any ideas?
Thanks
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: GSM Component
Hi,
It's probably not as clear as it ought to be...
The StringReceive returns the value 1 if a string (reply) was received, 0 otherwise.
If the return is value 1, then call ReadString to copy what was received to your local string.
Hope that helps,
Leigh
It's probably not as clear as it ought to be...
The StringReceive returns the value 1 if a string (reply) was received, 0 otherwise.
If the return is value 1, then call ReadString to copy what was received to your local string.
Hope that helps,
Leigh