Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Send several bytes via GPRS - SIM300

Status
Not open for further replies.
Thanks GSM Man...

I have gone through the link which you have sent, but i guess it might quite difficult to implement...

I need one suggestion from you that should i use some other modem instead of SIM300??

so is there any modem which has inbuilt command facility for SMTP??

please give me some references regarding this issue...
 

There is no GSM Modem that I'm aware of that has built-in SMTP. The SMTP protocol is really pretty simple, and the posts on this thread give you a pretty good idea of what you need to send.

If you have experience communicating with the SIM300 then it shouldn't be that difficult for you to implement SMTP - certainly no harder than doing it on any other platform.
 

I have done what u have mentioned in this thread before, but the problem is with after the AT+CIPSEND.

What i mean to say is that once i send the command like,
AT+CIPSTART="TCP","smtp.mail.com","25"

it will respond like, OK ... and then CONNECT OK...

and replyh from the server is like,
+IPD73:220 rly-dh01.mx.aol.com ESMTP WebSuites/MUA Thirdparty client Interface

then i will send the command AT+CIPSEND
it will give the prompt like, >

then which command and how i send the command through which i will be able to get the mail with some data inside..

i tried the commands which has been mentioned in the above thread but it will not get me the mail...

thanks in advcnce...
 

Re: gprs initializing

Sending an SMTP message involves a 'dialog' between your device and the SMTP Server. You send the Server a series of commands/data and it returns specific 'codes' to indicate if your command/data was valid. A carriage return <CR> indicates and end-of-line to the Server. A Control-Z <CTRL-Z> indicates the end-of-packet to the Modem (SIM300). Below is an example of the 'conversation' to send an Email.

-> is data you send to the SIM300
<- is data it returns to you.
In the code below '(at)' represents an At-symbol

Code:
-> AT+CIPSEND<CR>
<- >
-> HELO relay.example.com<CR><CTRL-Z>
<- SEND OK
<- 250 Hello relay.example.com

-> AT+CIPSEND<CR>
<- >
-> MAIL FROM:<bob@example.com><CR><CTRL-Z>
<- SEND OK
<- 250 Ok

-> AT+CIPSEND<CR>
<- >
-> RCPT TO:<alice@example.com><CR><CTRL-Z>
<- SEND OK
<- 250 Ok

-> AT+CIPSEND<CR>
<- >
-> RCPT TO:<theboss@example.com><CR><CTRL-Z>
<- SEND OK
<- 250 Ok

-> AT+CIPSEND<CR>
<- >
-> DATA
<- SEND OK
<-  354

-> AT+CIPSEND<CR>
<- >
-> From: "John Smith" <bob@example.com><CR>
-> To: Jane Doe <alice@example.com><CR>
-> Cc: [email]TheBoss@example.com[/email]<CR>
-> Date: Sat, 9 Jan 2010 16:02:43 -0500<CR>
-> Subject: Test message<CR>
-> <CR>
-> Hello Alice.<CR>
-> This is a test message with 5 header fields and 4 lines in the message body.<CR>
-> Your friend<CR>
-> Bob<CR>
-> .<CR><CTRL-Z>
<- SEND OK
<-  250 Ok

-> AT+CIPSEND<CR>
<- >
-> QUIT<CR><CTRL-Z>
<- SEND OK
 Server Will Disconnect
It may make it easier to understand the protocol if you connect to the STMP server from your PC using Telnet. You can then type the commands/data and see the repsonses.
 

Hey GSM man.. thanks for ur reply..

i have tried but i m still bit confused regarding the name of the smtp server..

is it necessary to keep the smtp server name is of our company's smtp which has allocated to the company's outlook express..???

if i wish to mail from the gmail and to recieve into the yahoo, then which smtp name should i have to use??
 

The server you coionnect to is the one that you will be using to send the mail - which in your example would be GMAIL.
 

okay i understand which smtp server name should i have to use..

in my case i am using gmail's and yahoo's smtp server name like smtp.gmail.com and smtp.mail.yahoo.com respectively with port number is 25.

But as u mentioned in the above thread that the response came from the server side with following the 250 is not achieved by me..

Though i am following the command format which you have mentioned before, i am not getting the response from the server side and it will time out within some time... and it is obvious that once if i get the response of the first sentence like,

> HELO smtp.gmail.com <enter><ctrl+z>
< send ok

it should reply here... but i am not getting at all...

so please help me...
 

Can you post all of the commands you send and their responses. It's difficult to troubleshoot your problem with so little information.
 

Ok fine..
Here i am sending the code which i have written in my Teminal window.

The same phenomena which u considered in your code like,
>> is data I send to the SIM300
<< is data it returns to me.

************

>> at
<< OK

>> at+cmgf=1
<< OK

>> at+cops?
<< +COPS: 0,0,"AirTel"
<< OK

>> at+csq
<< +CSQ: 23,0
<< OK

>> at+cgatt?
<< +CGATT: 1
<< OK

>> AT+CGDCONT=1,"IP","AIRTELGPRS.COM"
<< OK

>> AT+CSTT="AIRTELGPRS.COM","",""
<< OK

>> at+ciicr
<< OK

>> at+cifsr
<< 117.98.181.241

>> at+cipstatus
<< OK
<< STATE: IP STATUS

>> at+ciphead=1
<< OK

>> at+cdnsorip?
<< +CDNSORIP: 0
<< OK

>> at+cdnsorip=1
<< OK

>> at+cipstatus
<< OK

<< STATE: IP STATUS

>> at+cipstart="tcp","smtp.gmail.com","25"
<< OK

<< CONNECT OK

<< +IPD42:220 mx.google.com ESMTP 7sm1169108yxd.44

>> at+cipsend
>> > HELO smtp.gmail.com
<< SEND OK

But there is no any reply from the server side. And after some time it will give the time out error and then automatically close the connection by writing CLOSED.

Instead of Gmail, if i am writing the smtp.mail.yahoo.com the same thing happend with me..

One more thing i wanna share with u that, is there any kind of setting required for the DNS setting? Actually i have tried for the same by using globle DNS which was mentioned in the above thread but the problem was the same..

So now please help me out from this stuff..
 

Try adding both a carriage return and line-feed after each command (before the Ctrl-Z). For example:
Code:
HELO smtp.gmail.com<CR><LF><CTRL-Z>

The fact that are establishing a connection indicates that the DNS server settings are OK.
 

I had tried so many times..

by the way if i am pressing ENTER key, then it means that <CR><LF> both included in it..?? Right???

Till now i am pressing an ENTER key only. I it fair enough to press an ENTER key or should i have to do some another logic.?
 

Thanks for your kind support...

Now i am able to get the response from the server side, but when i send the commands to the server it will response me like,

>> at+cipstart="tcp","smtp.gmail.com","25"
<< OK

<< CONNECT OK
<< +IPD42:220 mx.google.com ESMTP 8sm2041661yxg.60

>> at+cipsend
>> > helo smtp.gmail.com
<< SEND OK
<< +IPD35:250 mx.google.com at your service

>> at+cipsend
>> > mail from: jagrut911@gmail.com
<< SEND OK
<< +IPD65:530 5.7.0 Must issue a STARTTLS command first. 8sm2041661yxg.60

so how do i start the TLS feature by AT commands?? Means what should i have to do to for the same... Also tell me the difference between these TLS and SSL..
why it is used??
 

jagrut911 said:
so how do i start the TLS feature by AT commands?? Means what should i have to do to for the same... Also tell me the difference between these TLS and SSL..
why it is used??
The server you are connecting to is using "Transport Layer Security". It's an application indepentent protocol that adds encryption to your connection. You can get details on it at: https://tools.ietf.org/html/rfc5246
 

hey i am just near to reach to establish the connection..

when i configure smtp for the gmail, it will response me by telling like,

+IPD64:530 5.7.0 Must issue a STARTTLS command first. 5sm314910yxg.46

and when i configure smtp for the yahoo, it will give like,

+IPD97:530 authentication required - for help go to https://help.yahoo.com/help/us/mail/pop/pop-11.html

so i think it requires authentication for the TLS or SSL, but how i dont know..
so please tell me the AT commands for the same..

thanks in advance...
 

i am able to start the TLS feature by writing STARTTLS command,

but now the problem is with MAIL FROM command.

i mean to say when i write the command, MAIL FROM:jagrut911@gmail.com

it will reply CLOSE immediately...

so what should i do now for establishment of the connection..

please reply me as soon as fast...
 

Hello GSM man..

i am waiting for your reply.. i need to get it as soon as possible.

as i told u that i cant do anything after starting the TLS connection.
it will automatically CLOSED by the server side.

and i also dont know how to send the AT commands for the authentication..
i mean to say which commands should i have to implement between HELO and MAIL FROM command...

please reply me soon...
 

Post11 Feb 2010 2:21
need help.. pls..
Reply with quote Edit/Delete this post Delete this post
Report this post to the moderators of this forum
i need help on how to interface Sim 340 interfacing 16f877a using mikroC.. i found some ATcommands unfortunately i dont know how am i going to attached it on a MikroC program or any C language.. pls do help me.. thanx.. i need sample commands on how to send and receive msgs
 

Hi jagrut911
jagrut911 said:
which commands should i have to implement between HELO and MAIL FROM command...
I have the same issue, have you managed to send the STARTTLS cmd?

Rec
 

Hi Everyone!
Good news is i m able to connect with a vodafone sim card
but I m trying with TATA DOCOMO(India). I m unable to get a response from the server(google.com)
Kindly help me.
i m sticking my code here:
AT+CGATT=1
AT+CGDCONT=1,"IP","TATA.DOCOMO.INTERNET"
AT+CSTT="TATA.DOCOMO.INTERNET","",""
AT+CIICR
AT+CIFSR >>115.118.93.58
AT+CDNSCFG ="0.0.0.0","0.0.0.0"
AT+CIPHEAD=1
AT+CDNSORIP=1
AT+CIPSTART="TCP","www.google.com","80"
>>OK
>>Connect OK
AT+CIPSEND
>> GET / HTTP/1.1 ^m ^j
Host:www.google.com^m^j
Accept: */*^m ^j
Accept-Language: en-us ^m ^j^m ^j^Z

***************************
I dont get any response thereafter.after ten mins it says CLOSED as i understand timer runs out. But, if i give AT+CIPSTATUS
>>Connect ok
:|
I m stuck here.. i read most the help.. i m unable to solve here.
Kindly help
But i can work with vodafone sim ofcourse there i use proxy ip:10.10.1.100 and proxy port:9401 given in their website

I need some real help!!!
I m unable to get the data. I still have to work for uploading the Data too

Thanks in advance!!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top