Send Data on email using GPRS

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

chipfryer27
Valued Contributor
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

Post by chipfryer27 »

Hi

Pretty much :)

Don't forget to include CRLF after each command though. You can add in to your string by including \r and \n

So for example UART:: SendString("AT+CMGF=1\r\n")

You can include quotation marks within quotes by using \" too. Personally I like to see "what's happening and when" before compacting and I use a terminal program to send/receive before creating code. This lets me check command/response are good.

You don't need that last UART:: SendString("Hello") though, which is probably an oversight.

Regards

viktor_au
Posts: 362
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

Post by viktor_au »

Thank you chipfryer

Will try when I'll get the antenna.

chipfryer27
Valued Contributor
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

Post by chipfryer27 »

Hi Abhi

I've been looking at a few more options and ThingsBoard may be of interest if you want to host an IOT service locally or privately, as they offer a free open source community version.

Interestingly it can run on a Pi 3 which I just happen to have lying around doing nothing, so I will at some point try and host my own local service when I get a bit of free time.

Regards

User avatar
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

Post by AbhijitR »

Hi! Chipfryer
good evening

Kindly excuse for the silence on the project, i am traveling to north of India to complete the LoRa project, probably will finish in next week, i hope :D, site work always take time to finish as customer always has something to modify till the last moment :evil:.
I've been looking at a few more options and ThingsBoard may be of interest if you want to host an IOT service locally or privately, as they offer a free open source community version.
This sounds interesting, hope this works as expected. Kindly excuse to speak my mind but Pi3 is again a new study compared to PIC or somewhat same, unfortunately i never used that, and if i am not wrong i will need to upgrade my chip pack, isn't it? Probably i shall get few more pack this time when FC version 10 is launched, probably by the end of this year i guess.

Thank you again for your time my friend.

Regards
Abhi

chipfryer27
Valued Contributor
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

Post by chipfryer27 »

Hi Abhi

So jealous of the cuisine.....

Whilst Flowcode has the capability to create charts for a Raspberry Pi the ThingsBoard wouldn't need it. Basically you just take a normal Pi and download the software from ThingsBoard. Now your Pi is the server :) Many tutorials online to guide you in using a Pi if your linux skills are a bit rusty. Mine always seem to be....

This Pi could be on your own network or accessed via the internet and of course is totally private. You can do whatever you wish with the data etc. Once I have a chance to play I'll update, but you certainly now have options to send data for storage via the SIM800 module.

Regards

chipfryer27
Valued Contributor
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

Post by chipfryer27 »

Hi

Tried to run ThingsBoard on a Raspberry Pi today. It claims it can run on a Pi 3, which has 1GB of RAM and however much space on your SD card (max 32GB I believe). I just happened to have a 32GB card so off I went.

Installed latest OS on a formatted SD card and followed the instructions. Once installed and running things became very, very slow indeed. So much so that the Pi was to all intent and purposes unusable. I had to physically remove power to reboot and gain any control, but once anything was "clicked" it became so slow as to be useless again.

Not a very impressive start....

However I thought perhaps I was asking too much of it with a Desktop environment enabled so I reformatted and loaded the "headless" OS with no desktop environment. Great thing about Pi's is that you can go right back to scratch in minutes... <s>

Being headless you need to login via PuTTY or whatever to interact with it.

Went through the installation again and once complete tried to login on the designated port(:8080/) using my laptop browser (Firefox) but this was unsuccessful. Firefox has a lot of security features enabled so I tried again with Microsoft Edge. Success... :) I could log in using the credentials supplied when installing and I could access all the demo data I loaded too.

It appears to be running fine and it is clearly quite a powerful piece of software full of features. I will however need go through all the tutorials to figure out how to work it though. Not sure when I'll get the time but it seems to be worth the effort.

So, it seems you can host your own free server quite easily as an alternative to a 3rd party hosted version.

Regards

chipfryer27
Valued Contributor
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

Post by chipfryer27 »

Hi Guys

In another post I documented trying to get the MQTT component to work over GSM, but failed as the Network component wasn't able to play with the GSM component. I did capture the required strings which could be used to mimic, but as I can update using the UART and API keys it probably isn't worth the trouble. However Ben (Matrix) informed of what the network component does and I think it might be possible to get them all to play nice.

This might be of interest to Abhi if he ever considers using a service hosted on his own network, as not all allow the use of API keys. I'll update as I find out more.

Viktor, how are things with your SMS project? I've been a bit preoccupied with other stuff recently but keen to hear of any progress.

Regards

viktor_au
Posts: 362
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

Post by viktor_au »

Hi
Re: SMS project
--------------------
I have managed (after I read a few times the AT manual for Sim7600) to Tx the SMS.
Now I am working on the receiving SMS macro.
As I am busy with other projects in my life (like all of us) I move forward not as fast as I want to.

chipfryer27
Valued Contributor
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

Post by chipfryer27 »

Hi

Depending on how you set up the module affects what happens with incoming SMS. Off hand I can't remember which is which but will check at the weekend. In one mode, incoming messages are stored on the module and you need to "look" for the messages manually (i.e. get your uC to poll for new messages periodically). In the other mode, incoming messages are passed straight to your uC. Either will work fine for you, just depends on how you wish to utilise.

As I think you will only have a limited number of "instructions", you could easily store incoming in a circular buffer and then "look for" your specific instruction within the message(s), branching if found.

Regards

viktor_au
Posts: 362
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

Post by viktor_au »

Hi
You right.

There are two commands:
AT+CNMI New message indications to MC
AT+CNMA New message acknowledgement to modem
------------------------------------------
I have managed to Rx the SMS msg to Sim7600 from mobile phone today.
I noticed that some people set AT+CNMI=2,2
I did set the AT+CNMI=1,1 (as I don't use UART right now (use the USB Serial)).

I made a few notes, but I hope that somebody can correct me:
--------------------
AT+CNMI <mode>
DTR=0 (no link between Sim7600 and Ard)
--------------
AT+CNMI=0 ->All Rx to Flash Mem, If Mem=Full, re-write
AT+CNMI=1
->DTR=0: No Rx saved
->DTR=1: Direct to Ard
AT+CNMI=2
->DTR=0: wait, and save when DTR=1
->DTR=1: Direct to Ard

AT+CNMI <mt>
Setup depends on data coding scheme, preferred memory storage set.
And if:
0 = No SMS to Ard indication
1= If Msg saved to Mem-> Inform Ard: +CMTI: <mem3>,<index>.
2= Direct to Ard->Depends on Show Text Mode Parameters AT+CSDH set, (meaning - how much txt parameters to show)
3= Direct to Ard. Depends on <mt>=2 and <mt>=1 setup.

chipfryer27
Valued Contributor
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

Post by chipfryer27 »

Hi

Just a quick follow on.

I used a SIM800L module recently and had issues which were related to power. In a rush I used jumpers to a breadboard and this was the issue. When powered the led would flash every second for ten seconds, pause, then repeat. It would not register. With the module powered directly by the PSU the problem disappeared and it registered without issue.

In an earlier post in this thread the issue of Network Operators abandoning 2G/3G services was discussed, with a global switch off by 2033. Many operators were however discontinuing well before then or had already discontinued. In the UK at least, one major operator with a global presence has stated that 3G will go by the end of this year but they intend to support 2G until 2033. So it seems there is life in the old SIM800L yet :)

Regards

Post Reply