Send Data on email using GPRS
Moderator: Benj
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Hi
SIM800
Would be interesting to read the results of testing your module with ThingSpeak.
Can you publish a separate topic about it?
PC + PuTTY + Sim800
I used PuTTY to control the RPi2 'headless'.
Would be great if you publish about this project as well.
As I didn't use any GSM module (so far) I would be happy to read and get an idea how to test SIM800 with PC.
Control lights from Mobile phone
popular Android apps for smart lighting:
Smart Life - https://play.google.com/store/apps/deta ... l=en&gl=US
Philips Hue - https://play.google.com/store/apps/deta ... l=en&gl=US
Hue Disco - https://play.google.com/store/apps/deta ... l=en&gl=US
Ecobee – This app is great for controlling the temperature and smart home lighting in your home. https://play.google.com/store/apps/deta ... l=en&gl=US
----------------------------
In your home you need a smart light bulb + WiFi router,
Or
Need a smart switch -> light bulb + WiFi router
Example with Arduino + WiFi
Uno+Ethernet shield + WiFi router
Example with Arduino without any WiFi
SMS controlled Relay: Ard+GSM module + Relay module.
https://www.instructables.com/Control-t ... -GPRS-SMS/
I can be wrong, but I think the SMS message will have at the end some parameters as: 'on', 'off', etc.
Links
Arduino GSM Sim 800L Relay control ON/OFF
https://create.arduino.cc/projecthub/te ... ing-2472b3
GSM Based Automation - https://create.arduino.cc/projecthub/br ... ion-c8806c
SIM800
Would be interesting to read the results of testing your module with ThingSpeak.
Can you publish a separate topic about it?
PC + PuTTY + Sim800
I used PuTTY to control the RPi2 'headless'.
Would be great if you publish about this project as well.
As I didn't use any GSM module (so far) I would be happy to read and get an idea how to test SIM800 with PC.
Control lights from Mobile phone
popular Android apps for smart lighting:
Smart Life - https://play.google.com/store/apps/deta ... l=en&gl=US
Philips Hue - https://play.google.com/store/apps/deta ... l=en&gl=US
Hue Disco - https://play.google.com/store/apps/deta ... l=en&gl=US
Ecobee – This app is great for controlling the temperature and smart home lighting in your home. https://play.google.com/store/apps/deta ... l=en&gl=US
----------------------------
In your home you need a smart light bulb + WiFi router,
Or
Need a smart switch -> light bulb + WiFi router
Example with Arduino + WiFi
Uno+Ethernet shield + WiFi router
Example with Arduino without any WiFi
SMS controlled Relay: Ard+GSM module + Relay module.
https://www.instructables.com/Control-t ... -GPRS-SMS/
I can be wrong, but I think the SMS message will have at the end some parameters as: 'on', 'off', etc.
Links
Arduino GSM Sim 800L Relay control ON/OFF
https://create.arduino.cc/projecthub/te ... ing-2472b3
GSM Based Automation - https://create.arduino.cc/projecthub/br ... ion-c8806c
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi
Whilst awaiting delivery of my much needed capacitor I had a look at things again. I remember now why I'd "forgotten" about ThingSpeak. It now uses HTTPS over HTTP which could make things a bit more complicated. No real problem if a Pi or perhaps Arduino but a low power PIC may struggle.
Need to look more into it especially as they allow MQTT and I think Flowcode has a component for that. I've not touched any of this for a few years so I'm a little rusty.
Regards
Whilst awaiting delivery of my much needed capacitor I had a look at things again. I remember now why I'd "forgotten" about ThingSpeak. It now uses HTTPS over HTTP which could make things a bit more complicated. No real problem if a Pi or perhaps Arduino but a low power PIC may struggle.
Need to look more into it especially as they allow MQTT and I think Flowcode has a component for that. I've not touched any of this for a few years so I'm a little rusty.
Regards
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Hi
I will wait for sim-card and look around for SIM7670+Ard projects.
That is it so far.
Thanks again for the help.
I will wait for sim-card and look around for SIM7670+Ard projects.
That is it so far.
Thanks again for the help.
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi Viktor
I've a couple of things on this week but I hope to play with the 800 as per previous posts. Using SMS messaging to control should be quite straight forward and I'll update as I go.
Regards
I've a couple of things on this week but I hope to play with the 800 as per previous posts. Using SMS messaging to control should be quite straight forward and I'll update as I go.
Regards
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Hi
I found on youtube:
Data to Thingspeak Server using SIM800
https://www.youtube.com/watch?v=aYQKJFromXs
I found on youtube:
Data to Thingspeak Server using SIM800
https://www.youtube.com/watch?v=aYQKJFromXs
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
One more interesting project (tracker) with ThingsBoard Setup
https://create.arduino.cc/projecthub/bo ... r&offset=0
https://create.arduino.cc/projecthub/bo ... r&offset=0
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi Abhi and Viktor
I was a bit busy this week (and wet) not just because of my dishwasher issues. I rebuilt after fitting the new capacitor and discovered that I had extra bits left over, which of course meant a complete strip down to fit. Hours later I'm connecting it back in and the rubber waste hose then decided now would be the best time to deteriorate in my hands. New hose obtained and fitted and the marrigold's consigned to the cupboard £20 versus over £200 seems a bargain if you don't count the hours...
Yesterday I revisited a previous project (FCv6) in which I used LoRa to communicate the status of water tanks and an ESP8266 to subsequently communicate to Pushingbox via WiFi if an alarm was active / clear. Upon receipt of a trigger Pushingbox would send the appropriate email / Push.
I wanted to refamiliarise myself using "known" projects before exploring further. I created a chart in FCv8, connected a PIC to the ESP8266 and a USB to Serial convertor running a terminal program (e.g. PuTTY) to monitor to/from the PIC/ESP.
All good until I reached "ClientSendRequest" in which the ESP would send the appropriate "GET" request. This failed and I suspect a bug in the component (bug report submitted) as I could circumvent using the UART macro "SendString" to send the necessary commands.
So, I am pleased to say that having tested both, Pushingbox and ThingSpeak do work happily using HTTP meaning you can not only send data to the "cloud" for storage / manipulation / action but also send triggers that then email / Push / whatever.
My next step is to play with the SIM8600 module. I'm going to try connecting to the above sites and also to send/receive SMS.
I'll keep you updated.
Regards
I was a bit busy this week (and wet) not just because of my dishwasher issues. I rebuilt after fitting the new capacitor and discovered that I had extra bits left over, which of course meant a complete strip down to fit. Hours later I'm connecting it back in and the rubber waste hose then decided now would be the best time to deteriorate in my hands. New hose obtained and fitted and the marrigold's consigned to the cupboard £20 versus over £200 seems a bargain if you don't count the hours...
Yesterday I revisited a previous project (FCv6) in which I used LoRa to communicate the status of water tanks and an ESP8266 to subsequently communicate to Pushingbox via WiFi if an alarm was active / clear. Upon receipt of a trigger Pushingbox would send the appropriate email / Push.
I wanted to refamiliarise myself using "known" projects before exploring further. I created a chart in FCv8, connected a PIC to the ESP8266 and a USB to Serial convertor running a terminal program (e.g. PuTTY) to monitor to/from the PIC/ESP.
All good until I reached "ClientSendRequest" in which the ESP would send the appropriate "GET" request. This failed and I suspect a bug in the component (bug report submitted) as I could circumvent using the UART macro "SendString" to send the necessary commands.
So, I am pleased to say that having tested both, Pushingbox and ThingSpeak do work happily using HTTP meaning you can not only send data to the "cloud" for storage / manipulation / action but also send triggers that then email / Push / whatever.
My next step is to play with the SIM8600 module. I'm going to try connecting to the above sites and also to send/receive SMS.
I'll keep you updated.
Regards
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Hi
The dishwater machine is alive. Good news.
I am searching info in relation to SIM7600x module.
Bought one from Ali and waiting for delivery.
All my future posts will be in sim7600 subject.
------------------------------
Looks like Abhi is busy with some other projects.
Not a single post about his progress with sending data via gsm/gprs.
The dishwater machine is alive. Good news.
I am searching info in relation to SIM7600x module.
Bought one from Ali and waiting for delivery.
All my future posts will be in sim7600 subject.
------------------------------
Looks like Abhi is busy with some other projects.
Not a single post about his progress with sending data via gsm/gprs.
- AbhijitR
- Posts: 300
- Joined: Fri Nov 07, 2014 12:48 pm
- Location: Pune, India
- Has thanked: 283 times
- Been thanked: 80 times
Re: Send Data on email using GPRS
Hello! Viktor
Good morning
Yes you are absolutely right, I am busy for the moment finishing one of the projects using LoRa (GAMMA) and for your surprise it is Chipfryer27 who educated me about using that module, I will share the pictures of that project once ready, probably in the beginning of next week.
Regarding the GSM project I am still unaware of few things which I never knew, everything is new for me. I can only use PIC microcontroller, no more, thanks to Flowcode.
The links which you shared were helpful, let's wait to hear from Chipfryer27, I am sure he will come out with some answer.
Thank you again for your concern.
Abhi
Good morning
Yes you are absolutely right, I am busy for the moment finishing one of the projects using LoRa (GAMMA) and for your surprise it is Chipfryer27 who educated me about using that module, I will share the pictures of that project once ready, probably in the beginning of next week.
Regarding the GSM project I am still unaware of few things which I never knew, everything is new for me. I can only use PIC microcontroller, no more, thanks to Flowcode.
The links which you shared were helpful, let's wait to hear from Chipfryer27, I am sure he will come out with some answer.
Thank you again for your concern.
Abhi
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Good luck with your project AbhijitR
I will move a bit away to Sim7600 module Ard to mobile phone SMS project.
All the best.
I will move a bit away to Sim7600 module Ard to mobile phone SMS project.
All the best.
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi guys,
I powered up the SIM800L and the results were not good, well not until I put the SIM in the right way round.... Doh..... (fyi sloped edge to outside)
It runs on standard AT commands so I'm pretty sure all SIMxxxx modules will have the same command set and will be compatible with the Flowcode component (Viktor should be able to use / modify FC examples etc for his 7600). Unfortunately EE (network provider of my SIM) was down in my area today so I couldn't actually do anything fun. However I did explore some of the AT commands which are quite useful. It seems a handy little module.
EE is now available, but so is a nice Rioja........
I'll have a play tomorrow, hopefully, and let you know how I get on.
Regards
I powered up the SIM800L and the results were not good, well not until I put the SIM in the right way round.... Doh..... (fyi sloped edge to outside)
It runs on standard AT commands so I'm pretty sure all SIMxxxx modules will have the same command set and will be compatible with the Flowcode component (Viktor should be able to use / modify FC examples etc for his 7600). Unfortunately EE (network provider of my SIM) was down in my area today so I couldn't actually do anything fun. However I did explore some of the AT commands which are quite useful. It seems a handy little module.
EE is now available, but so is a nice Rioja........
I'll have a play tomorrow, hopefully, and let you know how I get on.
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi
I noticed a few things with the FC components which may or may not be "bugs". It could be that since the components were created firmware has changed.
I'll write up my findings perhaps tomorrow, but I did manage to send a SMS to my phone using FC, but not without some teething issues, and from the looks of things it will be straight forward enough to receive a message into FC for processing.
One strange thing is that I rewrote the code I used for Pushingbox and ThingSpeak using FCv9 and now they don't work. Need to investigate that further.
Regards
I noticed a few things with the FC components which may or may not be "bugs". It could be that since the components were created firmware has changed.
I'll write up my findings perhaps tomorrow, but I did manage to send a SMS to my phone using FC, but not without some teething issues, and from the looks of things it will be straight forward enough to receive a message into FC for processing.
One strange thing is that I rewrote the code I used for Pushingbox and ThingSpeak using FCv9 and now they don't work. Need to investigate that further.
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi
Findings using SIM800L and Flowcode Generic GSM component (based on AT Commands).
The component macro "Initialise" states Returns 0 for OK, 255 for no reply and 254 for command fail.
Monitoring the Tx/Rx ports of my chip I see AT+CMGF=1 being sent when Initialise macro is reached (sets SMS messaging to Text Mode), and the reply of
AT+CMGF=1
OK
That would suggest that the module accepted the command however FC returns 255.
Moving on I thought it a good idea to check the network status before doing anything fun. FC allows such with the CheckNetworkStatus which states for Return 0=Not Connected 1=Connected 255=No Reply from GSM
I see AT+CREG? being transmitted and depending on status I get a reply from the module of
+CREG: 0,x
OK
where x = status 0=Not Registered 1=Registered Home 2=Not Registered but Seeking 3= Denied 4=Unknown 5=Roaming
Depending on what is happening I can see values for x of 0,1,2 and 3 however Flowcode always return 255
When I'm lucky enough to be connected (module LED flashes once every few seconds rather than every second) I get brave and text using the SendTextMessage macro which states a Return of 0=Success 255=Failure
I see the commands and message being sent. Depending on Network status this does actually send the message OK or it fails with ERROR being sent back from the module. However FC always returns 255.
It would appear that FC isn't reading or is perhaps misinterpreting the module responses. It would be nice if this is resolved as the component macros simplify a lot of work.
When a text is received by the module, it automatically passes on details including CLID and Message. You could have the chip automatically store these in a Circular Buffer and then polling for the presence of either authorised number etc or you could use the CheckForIncoming / GetTextNumber / GetTextString macros to obtain. I haven't yet done anything with Rx and probably won't until I get a SIM from a different provider as my module seems to only register <1% of the time.
Regards
EDIT.....
EE (network provider) has been problematic in my area for days now. They advertise how fast and reliable their services are by using their connectivity to set up a ATC centre in someone's living room and land a plane..... As I haven't heard sirens nor saw a plume of smoke I guess they didn't film it here...
Findings using SIM800L and Flowcode Generic GSM component (based on AT Commands).
The component macro "Initialise" states Returns 0 for OK, 255 for no reply and 254 for command fail.
Monitoring the Tx/Rx ports of my chip I see AT+CMGF=1 being sent when Initialise macro is reached (sets SMS messaging to Text Mode), and the reply of
AT+CMGF=1
OK
That would suggest that the module accepted the command however FC returns 255.
Moving on I thought it a good idea to check the network status before doing anything fun. FC allows such with the CheckNetworkStatus which states for Return 0=Not Connected 1=Connected 255=No Reply from GSM
I see AT+CREG? being transmitted and depending on status I get a reply from the module of
+CREG: 0,x
OK
where x = status 0=Not Registered 1=Registered Home 2=Not Registered but Seeking 3= Denied 4=Unknown 5=Roaming
Depending on what is happening I can see values for x of 0,1,2 and 3 however Flowcode always return 255
When I'm lucky enough to be connected (module LED flashes once every few seconds rather than every second) I get brave and text using the SendTextMessage macro which states a Return of 0=Success 255=Failure
I see the commands and message being sent. Depending on Network status this does actually send the message OK or it fails with ERROR being sent back from the module. However FC always returns 255.
It would appear that FC isn't reading or is perhaps misinterpreting the module responses. It would be nice if this is resolved as the component macros simplify a lot of work.
When a text is received by the module, it automatically passes on details including CLID and Message. You could have the chip automatically store these in a Circular Buffer and then polling for the presence of either authorised number etc or you could use the CheckForIncoming / GetTextNumber / GetTextString macros to obtain. I haven't yet done anything with Rx and probably won't until I get a SIM from a different provider as my module seems to only register <1% of the time.
Regards
EDIT.....
EE (network provider) has been problematic in my area for days now. They advertise how fast and reliable their services are by using their connectivity to set up a ATC centre in someone's living room and land a plane..... As I haven't heard sirens nor saw a plume of smoke I guess they didn't film it here...
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi
Talking to ThingSpeak again
You may remember that I had problems with the ESP8266 ClientSendRequest macro and therefore sent "AT"commands instead using UART SendString macros.
When I rewrote in FC9 (which has the same issue regarding ClientSendRequest) I forgot to include a small delay between connecting and sending.
Adding in the delay allows me again to post to ThingSpeak. Now that is sorted, when I get another SIM I'll look at posting via GPRS.
Regards
Talking to ThingSpeak again
You may remember that I had problems with the ESP8266 ClientSendRequest macro and therefore sent "AT"commands instead using UART SendString macros.
When I rewrote in FC9 (which has the same issue regarding ClientSendRequest) I forgot to include a small delay between connecting and sending.
Adding in the delay allows me again to post to ThingSpeak. Now that is sorted, when I get another SIM I'll look at posting via GPRS.
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi Guys
Been a little busy the last few days but whilst my EE connectivity is dubious to say the least, I have been working on making the module do as I wish.
Unfortunately my connection is so unstable I don't know if the connection dropped due to network issues or something I've done (wrong)
However I think I've a good handle on what should be done and I'll revisit once my connection issues are resolved. Flowcode is still problematic regarding component response, but by using "AT" commands sent from a Terminal program I'm documenting what steps need to be taken so that I can use FC to undertake.
Big weekend in UK so I'll update next week some time. Hopefully by then EE will able to land planes again, but best to pack a parachute...
Have fun...
Regards
Been a little busy the last few days but whilst my EE connectivity is dubious to say the least, I have been working on making the module do as I wish.
Unfortunately my connection is so unstable I don't know if the connection dropped due to network issues or something I've done (wrong)
However I think I've a good handle on what should be done and I'll revisit once my connection issues are resolved. Flowcode is still problematic regarding component response, but by using "AT" commands sent from a Terminal program I'm documenting what steps need to be taken so that I can use FC to undertake.
Big weekend in UK so I'll update next week some time. Hopefully by then EE will able to land planes again, but best to pack a parachute...
Have fun...
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi Guys
I've been a little busy this last while.
Discovered my SIM800L module had two issues. The first was with using the EE network which had it's own problems. Once they were resolved I was still having intermittent connectivity which came down to an issue with the supplied antenna. I received two, one being a little coil of wire to be soldered in place and the other, a formed antenna with a little plug to connect to the board.It was this antenna that was causing trouble. Once I replaced it with the coil I could get a relatively stable signal. Well, enough for me to play with
Just using a terminal program to send "AT" commands (which are similar to an extent to the ESP8266) I did get some success but failed when I actually attempted to update ThingSpeak, receiving a"400"error from the server (basically I'm sending nonsense as far as it's concerned).
This was actually finger trouble...... mine......
I'd set predefined "macros" in my terminal program so that instead of typing in AT+blah blah I just press a key. Unfortunately I was pressing the wrong key and sending the wrong string....
Once I'd realised my error, and I'm not saying how long it took for me to realise, things went better. I could update my ThingSpeak channels with ease.
Once I get a bit more time I'll document my commands for both the SIM and ESP to update ThingSpeak / PushingBox and I'll perhaps knock up a Flowcode example too.
Regards
I've been a little busy this last while.
Discovered my SIM800L module had two issues. The first was with using the EE network which had it's own problems. Once they were resolved I was still having intermittent connectivity which came down to an issue with the supplied antenna. I received two, one being a little coil of wire to be soldered in place and the other, a formed antenna with a little plug to connect to the board.It was this antenna that was causing trouble. Once I replaced it with the coil I could get a relatively stable signal. Well, enough for me to play with
Just using a terminal program to send "AT" commands (which are similar to an extent to the ESP8266) I did get some success but failed when I actually attempted to update ThingSpeak, receiving a"400"error from the server (basically I'm sending nonsense as far as it's concerned).
This was actually finger trouble...... mine......
I'd set predefined "macros" in my terminal program so that instead of typing in AT+blah blah I just press a key. Unfortunately I was pressing the wrong key and sending the wrong string....
Once I'd realised my error, and I'm not saying how long it took for me to realise, things went better. I could update my ThingSpeak channels with ease.
Once I get a bit more time I'll document my commands for both the SIM and ESP to update ThingSpeak / PushingBox and I'll perhaps knock up a Flowcode example too.
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi guys
Attached is a guide to using the SIM800L module to update ThingSpeak using AT commands. As these commands are pretty standard I expect them to work with any similar module. The guide can easily be modified to update PushingBox or similar.
Now that I know what steps I need to take I can base my Flowcode around them to automate the process for me
I'll post a chart once I get time.
Regards
EDIT (again)......
Bigger woops... There were actually a couple of typo's in the doc due to me accidentally uploading a working copy. I've replaced the document entirely. If you have already downloaded it, please download again.
Attached is a guide to using the SIM800L module to update ThingSpeak using AT commands. As these commands are pretty standard I expect them to work with any similar module. The guide can easily be modified to update PushingBox or similar.
Now that I know what steps I need to take I can base my Flowcode around them to automate the process for me
I'll post a chart once I get time.
Regards
EDIT (again)......
Bigger woops... There were actually a couple of typo's in the doc due to me accidentally uploading a working copy. I've replaced the document entirely. If you have already downloaded it, please download again.
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi guys
Attached is a Flowchart that will update ThingSpeak with sensor data using the SIM800L GSM module (and most likely any similar module by using AT commands), based on the steps documented in a previous post.
It uses the "Combo" board for display and inputs, but of course you can tailor to your own needs.
Briefly, it waits until a button is pressed, samples a sensor and then posts the result to ThingSpeak. Before running you will need to assign unique details to certain variables such as access point name, host and api key.
Once a command is issued, it waits for the appropriate response from the module by polling the Circular Buffer before moving on to the next command. The display shows the command being processed.
The purpose of the chart is to show each step in turn, and can of course drastically reduced to be more compact by omitting unnecessary components once you have it working with your credentials. For example you don't really need to display each step in turn and you could use the "wait for" command in the CB. Instead of "switching" to the next step you might just create a more linear chart or you may wish to omit checking for certain responses entirely by adding a delay between commands. You could even just directly assign certain strings instead of "building them". Typically I like to see what is happening where and when to aid debugging before stripping away all the padding
Flowcode does have a Generic GSM component which would greatly simplify things but as mentioned earlier in the thread it appears to have some bugs, constantly returning incorrect values.
If I were creating a gadget, I'd first test that everything works and updates correctly, then create a very basic no frills chart to update, perhaps calling it as a User Macro.
Another useful thing is a USB to Serial convertor monitoring what the module is sending to the microcontroller. This greatly aids debugging (especially if sent commands are echo'd).
Operators count both Tx and Rx data in determining how much data you have consumed each month, and from messing around with this, a reasonable guesstimate to update a server would be around 250 bytes (depending on what you are sending etc). If you were updating once every minute that would total around 11MB per month and is easily accommodated by even the most miserly of PAYG plans. However, as per earlier in the thread you would possibly be better off getting an IOT SIM.
I might create a more compact chart later in the week, if I have time.
Regards
Attached is a Flowchart that will update ThingSpeak with sensor data using the SIM800L GSM module (and most likely any similar module by using AT commands), based on the steps documented in a previous post.
It uses the "Combo" board for display and inputs, but of course you can tailor to your own needs.
Briefly, it waits until a button is pressed, samples a sensor and then posts the result to ThingSpeak. Before running you will need to assign unique details to certain variables such as access point name, host and api key.
Once a command is issued, it waits for the appropriate response from the module by polling the Circular Buffer before moving on to the next command. The display shows the command being processed.
The purpose of the chart is to show each step in turn, and can of course drastically reduced to be more compact by omitting unnecessary components once you have it working with your credentials. For example you don't really need to display each step in turn and you could use the "wait for" command in the CB. Instead of "switching" to the next step you might just create a more linear chart or you may wish to omit checking for certain responses entirely by adding a delay between commands. You could even just directly assign certain strings instead of "building them". Typically I like to see what is happening where and when to aid debugging before stripping away all the padding
Flowcode does have a Generic GSM component which would greatly simplify things but as mentioned earlier in the thread it appears to have some bugs, constantly returning incorrect values.
If I were creating a gadget, I'd first test that everything works and updates correctly, then create a very basic no frills chart to update, perhaps calling it as a User Macro.
Another useful thing is a USB to Serial convertor monitoring what the module is sending to the microcontroller. This greatly aids debugging (especially if sent commands are echo'd).
Operators count both Tx and Rx data in determining how much data you have consumed each month, and from messing around with this, a reasonable guesstimate to update a server would be around 250 bytes (depending on what you are sending etc). If you were updating once every minute that would total around 11MB per month and is easily accommodated by even the most miserly of PAYG plans. However, as per earlier in the thread you would possibly be better off getting an IOT SIM.
I might create a more compact chart later in the week, if I have time.
Regards
- Attachments
-
- Update via GSM example_v8.fcfx
- (40.95 KiB) Downloaded 331 times
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Hello
Checked the AT commands for Sim7600.
Found the next:
AT+CIPSHUT , AT+CIPMUX ,AT+CSTT ,AT+CIICR,AT+CIICR,AT+CIFSR,AT+CIPSPRT
No command found for Sim7600
-----------------------------------
Is it correct?
Have I missed something or some AT commands work for Sim7600?
Checked the AT commands for Sim7600.
Found the next:
AT+CIPSHUT , AT+CIPMUX ,AT+CSTT ,AT+CIICR,AT+CIICR,AT+CIFSR,AT+CIPSPRT
No command found for Sim7600
-----------------------------------
Is it correct?
Have I missed something or some AT commands work for Sim7600?
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi
The SIM7600 is a far more capable module. If I were in the market I would certainly be considering it especially with the decline of 2G. I've only briefly looked but it seems that whilst it is backwards compatible some of the AT commands appear to have changed (I'm looking at the V2 command manual). I think the functionality is still present just that "names have changed" so to speak.
However both modules cater for HTTP and this may be a better option for you. I've not explored it yet on the 800 as I don't really have a need and I expect to lose 2G service in the coming months.
From sniffing around the web and assuming you have a ThingSpeak account and a terminal program connected to your module, try the following remembering to wait for a reply (expected in blue, hopefully) before moving on. I don't have your module so can't test for myself (Note: the forum thinks the HTTPPARA command below is a link and abbreviates it. After update? it should read api_key=your-key&field1=xx where your-key and xx are unique to you) :-
AT+CREG?
+CREG: 0,1
OK
AT+CGATT=1
OK
AT+CGACT=1,1
OK
AT+CGDCONT=1,"IP","your-access-point-name"
OK
AT+HTTPINIT
OK
AT+HTTPPARA="URL","https://api.thingspeak.com/update?api_k ... &field1=xx"
OK
AT+HTTPACTION=0
OK
+HTTPACTION: 0,200,1
AT+HTTPTERM
OK
Hope this helps or at least points in the direction.
I'm going to document sending / receiving SMS messages with the 800 when I next get time/service.
Regards
EDIT....
If anyone has a 7600 I'd appreciate any feedback re the above. If it works great, but if it fails please let me know at which point. Probably can't fix it but I can give it a bash
The SIM7600 is a far more capable module. If I were in the market I would certainly be considering it especially with the decline of 2G. I've only briefly looked but it seems that whilst it is backwards compatible some of the AT commands appear to have changed (I'm looking at the V2 command manual). I think the functionality is still present just that "names have changed" so to speak.
However both modules cater for HTTP and this may be a better option for you. I've not explored it yet on the 800 as I don't really have a need and I expect to lose 2G service in the coming months.
From sniffing around the web and assuming you have a ThingSpeak account and a terminal program connected to your module, try the following remembering to wait for a reply (expected in blue, hopefully) before moving on. I don't have your module so can't test for myself (Note: the forum thinks the HTTPPARA command below is a link and abbreviates it. After update? it should read api_key=your-key&field1=xx where your-key and xx are unique to you) :-
AT+CREG?
+CREG: 0,1
OK
AT+CGATT=1
OK
AT+CGACT=1,1
OK
AT+CGDCONT=1,"IP","your-access-point-name"
OK
AT+HTTPINIT
OK
AT+HTTPPARA="URL","https://api.thingspeak.com/update?api_k ... &field1=xx"
OK
AT+HTTPACTION=0
OK
+HTTPACTION: 0,200,1
AT+HTTPTERM
OK
Hope this helps or at least points in the direction.
I'm going to document sending / receiving SMS messages with the 800 when I next get time/service.
Regards
EDIT....
If anyone has a 7600 I'd appreciate any feedback re the above. If it works great, but if it fails please let me know at which point. Probably can't fix it but I can give it a bash
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Hello chipfryer27
Re:ThingSpeak account
No, I don't have one as right now I am focused on SMS messages from home security system to mobile phone and back.
I bought a Sim7600 module (without the voice support chip) from China and have managed to exchange some basic AT commands (by using PuTTy).
As I am waiting for an antenna I cannot send or rx the SMS now.
The reason I was interesting in Sim800 AT commands is to check the compatability of Sim800 with Sim7600.
So far I understood that not just some commands are different, but many.
-------------------------------------------
Sim800 example
AT
AT+CREG: 0,1 Network registration
AT+CGATT? Packet domain attach or detach - The read command returns the current Packet Domain service state.
AT+CIPSHUT - Deactivate GPRS PDP context
AT+CIPMUX=0 Start up Multi-IP connection
AT+CSTT= Start task and set APN, user name, password
AT+CIICR Bring up wireless connection with GPRS or CSD
AT+CIFSR Get local IP address
AT+CIPSPRT=0 Set prompt of > when module sends data
-----------------------------------------------
Sim7600 example
AT
....
AT+HTTPHEAD Read the HTTP Header Information of Server
AT+CDNSGIP Query the IP address of given domain name
AT+CDNSGHNAME Query the domain name of given IP address
AT+CPING Ping destination address
AT+CHTPSERV Set HTP server info
-------------------------------------
I have to repeat: I am focused on SMS only right now.
However it is interesting to read your posts chipfryer27.
Thanks...
Re:ThingSpeak account
No, I don't have one as right now I am focused on SMS messages from home security system to mobile phone and back.
I bought a Sim7600 module (without the voice support chip) from China and have managed to exchange some basic AT commands (by using PuTTy).
As I am waiting for an antenna I cannot send or rx the SMS now.
The reason I was interesting in Sim800 AT commands is to check the compatability of Sim800 with Sim7600.
So far I understood that not just some commands are different, but many.
-------------------------------------------
Sim800 example
AT
AT+CREG: 0,1 Network registration
AT+CGATT? Packet domain attach or detach - The read command returns the current Packet Domain service state.
AT+CIPSHUT - Deactivate GPRS PDP context
AT+CIPMUX=0 Start up Multi-IP connection
AT+CSTT= Start task and set APN, user name, password
AT+CIICR Bring up wireless connection with GPRS or CSD
AT+CIFSR Get local IP address
AT+CIPSPRT=0 Set prompt of > when module sends data
-----------------------------------------------
Sim7600 example
AT
....
AT+HTTPHEAD Read the HTTP Header Information of Server
AT+CDNSGIP Query the IP address of given domain name
AT+CDNSGHNAME Query the domain name of given IP address
AT+CPING Ping destination address
AT+CHTPSERV Set HTP server info
-------------------------------------
I have to repeat: I am focused on SMS only right now.
However it is interesting to read your posts chipfryer27.
Thanks...
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi
Sending and receiving SMS messages is very easy and both modules seem to be more or less using the same commands.
The manual(s) will explain commands in detail but it's easier to work with the unit in "Text" mode, and this is done by issuing a command:-
AT+CMGF=1
OK
This is the most basic setup and you can send / receive from this point on.
To send:-
AT+CMGS="123456789"
> Text-To-Send (Ctrl+Z)
Where 123456789 is the target number to send to, Text-To-Send is your message and terminated by Ctrl+Z (ascii SUB / Hex 1A)
That's it, your message should be sent.
When a message is received, the module will forward the following:-
+CMTI:"SM",x
This indicates unread message(s) where "x" is the message number.
To read unread messages issue the following:-
AT+CMGL="REC UNREAD",0
The module will respond (for each unread message):-
+CMGL: x,"REC UNREAD","+yy123456789","","date,time+zz"
The-Message
Where x = Message Number / yy = country code / 123456789 = Sending Number / +zz = GMT Offset
The-Message = the actual SMS message received
The above is all that is required, but as mentioned it's a very basic setup and you may wish to configure differently, perhaps including a test to see if first connected to the Network, or perhaps prohibiting incoming indications being forwarded whilst "on-line". You might even wish to just allow messages to pass straight through to your microcontroller directly, storing the incoming stream directly in a Circular Buffer for processing.
Issuing
AT+CNMI=1,2,0,0,0
OK
Will do that.
I suspect you will probably only have a limited number of predefined texts to send to indicate status and the same for incoming texts. If you parse the received message for your telephone number AND one of your predefined messages then you can be pretty certain it will only respond to valid commands issued by yourself.
I might get a chance to create a simple chart illustrating the above if EE stops messing around with a barber's shop up Snowden and fixes service in my area........
The Flowcode component can do most of what you want, but as mentioned in a previous post the return values are incorrect.
Regards
EDIT...
Just discovered that FC doesn't appear to be sending much to the module so best not to use the GSM component until it is fixed. I use the UART to send and receive.
Sending and receiving SMS messages is very easy and both modules seem to be more or less using the same commands.
The manual(s) will explain commands in detail but it's easier to work with the unit in "Text" mode, and this is done by issuing a command:-
AT+CMGF=1
OK
This is the most basic setup and you can send / receive from this point on.
To send:-
AT+CMGS="123456789"
> Text-To-Send (Ctrl+Z)
Where 123456789 is the target number to send to, Text-To-Send is your message and terminated by Ctrl+Z (ascii SUB / Hex 1A)
That's it, your message should be sent.
When a message is received, the module will forward the following:-
+CMTI:"SM",x
This indicates unread message(s) where "x" is the message number.
To read unread messages issue the following:-
AT+CMGL="REC UNREAD",0
The module will respond (for each unread message):-
+CMGL: x,"REC UNREAD","+yy123456789","","date,time+zz"
The-Message
Where x = Message Number / yy = country code / 123456789 = Sending Number / +zz = GMT Offset
The-Message = the actual SMS message received
The above is all that is required, but as mentioned it's a very basic setup and you may wish to configure differently, perhaps including a test to see if first connected to the Network, or perhaps prohibiting incoming indications being forwarded whilst "on-line". You might even wish to just allow messages to pass straight through to your microcontroller directly, storing the incoming stream directly in a Circular Buffer for processing.
Issuing
AT+CNMI=1,2,0,0,0
OK
Will do that.
I suspect you will probably only have a limited number of predefined texts to send to indicate status and the same for incoming texts. If you parse the received message for your telephone number AND one of your predefined messages then you can be pretty certain it will only respond to valid commands issued by yourself.
I might get a chance to create a simple chart illustrating the above if EE stops messing around with a barber's shop up Snowden and fixes service in my area........
The Flowcode component can do most of what you want, but as mentioned in a previous post the return values are incorrect.
Regards
EDIT...
Just discovered that FC doesn't appear to be sending much to the module so best not to use the GSM component until it is fixed. I use the UART to send and receive.
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Thank you Chipfryer for a good info.
Please explain a bit more about Ctrl+Z.
Does it mean I have to send in ascii
SUB / Hex 1A ?
OR
\x1A
-------------------------------------------------------
Re: FC doesn't appear to be sending much to the module
I don't use FC8 GSM component, but the UART component only.
The main reason:
I want to learn more about the AT commands and Sim7600 module.
Thanks
Please explain a bit more about Ctrl+Z.
Does it mean I have to send in ascii
SUB / Hex 1A ?
OR
\x1A
-------------------------------------------------------
Re: FC doesn't appear to be sending much to the module
I don't use FC8 GSM component, but the UART component only.
The main reason:
I want to learn more about the AT commands and Sim7600 module.
Thanks
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Send Data on email using GPRS
Hi
You're correct, just add \x1A to the end of your "message" string to terminate.
It's a pity that the component isn't working as it has the capability to extract both number and message from the incoming stream, which would simplify your application. However if you store the incoming stream in the Circular Buffer you could look for the presence of your telephone number and your specific message on a case by case basis.
Regards
You're correct, just add \x1A to the end of your "message" string to terminate.
It's a pity that the component isn't working as it has the capability to extract both number and message from the incoming stream, which would simplify your application. However if you store the incoming stream in the Circular Buffer you could look for the presence of your telephone number and your specific message on a case by case basis.
Regards
-
- Posts: 364
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 45 times
- Been thanked: 62 times
- Contact:
Re: Send Data on email using GPRS
Hi
Looks like I have to send as:
Looks like I have to send as:
- Attachments
-
- uart_tx_sms_1.jpg (42.68 KiB) Viewed 31401 times