electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Send several bytes via GPRS - SIM300


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Send several bytes via GPRS - SIM300
Author Message
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post23 Jul 2009 8:00   

cipsend telnet


Hi,
I want to send several bytes via GPRS with sim300.
But I dont know how to initialized this module with AT commands.
I searched in the NET and found a series command but I can't send data with none of them.
If someone has been able to initialize GPRS with this module and send data via GPRS please help me, and introduce a series of AT commands for configuration GPRS to me .
Thanks
Back to top
Google
AdSense
Google Adsense




Post23 Jul 2009 8:00   

Ads




Back to top
GSM Man



Joined: 15 Apr 2009
Posts: 357
Helped: 46
Location: New Jersey, USA


Post25 Jul 2009 3:11   

sim300 tcp example


Here's the commands you need to send. In the example below '>>' indicates data you send to the module, while'<<' indicates data returned from the module. This example is for connecting through the AT&T/Cingular network. You'll need to get the APN, user name and password for the network you are using. Also, you'll need to add your data to the request.

Code:
 
First you need to open a PDP context.

>> AT+CGATT=1   - Attach to GPRS Service
<< OK

>> AT+CGDCONT=1,"IP","wap.cingular"   - Define PDP Context (cid, PDP type, APN)
<< OK

>> AT+CDNSCFG="208.67.222.222","208.67.220.220" - Configure Domain Name Server (primary DNS, secondary DNS)
<< OK

>> AT+CSTT="wap.cingular","wap(at)cingulargprs.com","cingular1" - Start Task & set APN, User ID, and password
<< OK

>> AT+CIICR     - Bring up wireless connection with GPRS - THIS MAY TAKE A WHILE
<< OK

>> AT+CIFSR      - Get Local IP address
<< 10.190.245.172   - returns IP address assigned to your module
<< OK

>> AT+CIPSTATUS      - Get Connection Status
<< OK
<< STATE: IP STATUS   - returns status of connection, needs to be 'IP STATUS' before you can connect to a server
 



After you have context, you need to make a connection to the server and then send your data.
Code:



>> AT+CIPHEAD=1      - Tells module to add an 'IP Header' to receive data
<< OK

>> AT+CDNSORIP=1   - Indicates whether connection request will be IP address (0), or domain name (1)
<< OK

>> AT+CIPSTART="TCP","www.google.com","80" - Start up TCP connection (mode, IP address/name, port)
<< OK
<< CONNECT OK      - Indicates you've connected to the server - IT MAKE TAKE A WHILE FOR THIS TO BE RETURNED

>> AT+CIPSEND      - Issue Send Command
<< >                   - wait for module to return'>' to indicate it's ready to receive data
>> GET / HTTP/1.1   - Send data - this example is an HTTP request for the default page
>> Host: www.google.com
>> Connection: Keep-Alive
>> Accept: */*
>> Accept-Language: en-us
>>
<< data from server returned - Server will return data here
 
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post25 Jul 2009 7:21   

gprs sim300


I run these AT commands.And can I get an IP. for example : 10.15.152.55
AT+CDNSCFG="xxx.xxx.xxx.xxx","xxx.xxx.xxx.xxx"
AT+CSTT="xxxxxx","",""
AT+CIICR
AT+CIFSR
AT+CIPHEAD=1
AT+CDNSORIP=1
AT+CIPSTART="TCP","www.google.com","80"
AT+CIPSEND
>

But I want send email (for example to xxx(at)gmail.com) or send data through GPRS to a client or server or other GSM module and I can monitor this data on email , client, or server.
Please help me what I do?
Back to top
FvM



Joined: 22 Jan 2008
Posts: 5161
Helped: 767
Location: Bochum, Germany


Post25 Jul 2009 9:22   

send email using sim 300


Some GPRS modules, e.g. from Telit have dedicated TCP sendmail commands. SIM300 hasn't, thus sendmail protocol (SMTP) has to be implemented in software. You should consult the respective RFC 0821 to understand the basic protocol. The complexity of required actions depends also on the authentification scheme used by the addressed SMTP server. Generally, the connection isn't made to gmail.com rather than an SMTP server that is granting access to you.

You also increase the chances to get effective help by telling your exact intention e.g. "Send several bytes as email..." in the thread title.
Back to top
GSM Man



Joined: 15 Apr 2009
Posts: 357
Helped: 46
Location: New Jersey, USA


Post25 Jul 2009 12:14   

how 2 send mail via sim300


hne573 wrote:
But I want send email (for example to xxx(at)gmail.com) or send data through GPRS to a client or server or other GSM module and I can monitor this data on email , client, or server.
Please help me what I do?


It's not difficult if your server is using the SMTP protocol. To do that you connect to the server on port 25 and exchange messages to identify the recipeints, and the message. For a good explanation with an example check out this wen page: http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post26 Jul 2009 8:46   

send mail sim300


Hi GSM Man
Thank you for your reply,
Now I can connect to the site with at commands,
but my purpose is send data to an email.

I study SMTP transport example.
By telnet commands I can send an email now.
Email port is 25.
Now I want to know that with this information can I send an email?
Quote:

Telnet mail.example.com 25
helo example.com
mail from:<xxxxxxxxxx>
rcpt to:<xxxxxxxxxx.x xxx(at)xxx.xxx>
data
from:xxxxxx
subject:xxxxxx
test mail
...............
.[Enter]



This Commands is practical with sim300?

AT+CIPSTART="TCP","mail.example.com","25"
<<Connect Ok
>>AT+CIPSEND
>
>helo example.com
>mail from:<xxxxxxxxxx>
>rcpt to:<xxxxxxxxxx.x xxx(at)xxx.xxx>
>data
>from:xxxxxx
>subject:xxxxxx
>test mail
>...............
>.
ctrl+z[/quote]

Please help me.Crying or Very sad
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post27 Jul 2009 10:22   

how to send data with sim300 gprs


Hi,
I runned these commands.

Quote:

at+cipshut
SHUT OK
AT+CGATT=1
OK
AT+CGDCONT=1,"IP","HotCell"
OK
AT+CDNSCFG="208.67.222.222","208.67.220.220"
OK
AT+CSTT="HotCell","",""
OK
AT+CIICR
OK
AT+CIFSR
10.13.26.20
AT+CIPSTATUS
OK

STATE: IP STATUS
AT+CIPHEAD=1
OK
AT+CDNSORIP=1
OK
at+cipstart="TCP","example.mail.com","25"
OK
+IPD43:220 *************************************


Now, I don't know what do?
With these commands I can connect to Server mail with port 25 for send an email.
But I don't know how run at+cipsend for send an email.

Please note that for send an email with SMTP server these command should be run:

Quote:

Telnet mail.example.com 25
helo example.com
mail from:<xxxxxxxxxx>
rcpt to:<xxxxxxxxxx.x xxx(at)xxx.xxx>
data
from:xxxxxx
subject:xxxxxx
test mail
...............
.[Enter]


With this information please help me for next commands.
Thank you
Back to top
GSM Man



Joined: 15 Apr 2009
Posts: 357
Helped: 46
Location: New Jersey, USA


Post28 Jul 2009 11:52   

sim300 gprs data


When you send the SMTP commands to the server you are having a dialog with it. You have to send one line and then wait for the response from the server, so each line has to be sent using the "AT+CIPSEND" command. YOU than have to wait until you receive the correct response from the server and then send the next command.
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post30 Jul 2009 12:56   

gprs initializing


Hi my friend,
I can connect to smtp server with port 25 and
get an answer
Quote:

at+cipstart="TCP","example.mail.com","25"
OK
+IPD43:220 *************************************


after this stage, I used "AT+CIPSEND" and send each line(SMTP commands)
with it.But I don't received any answer.
Quote:

AT+CIPSEND[enter]
>helo example.com[ctrl+z]
send ok

AT+CIPSEND[enter]
>mail from:<xxxxxxxxxx>[ctrl+z]
send ok

AT+CIPSEND[enter]
>rcpt to:<xxxxxxxxxx.x xxx(at)xxx.xxx> [ctrl+z]
send ok
....
Similarly to the other end

AT+CIPSEND[enter]
>quit[ctrl+z]
send ok


After these at commands an email should be sent, but when check my inbox
Not receive the email .
Why?
please help me.

With Best Regards.
Back to top
GSM Man



Joined: 15 Apr 2009
Posts: 357
Helped: 46
Location: New Jersey, USA


Post30 Jul 2009 13:27   

sending data via gprs at


Each line has to have Carriage return before the Ctl-Z. That's what indicates the 'end of a line' to the server.
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post30 Jul 2009 13:32   

telnet using sim300


Thank you.
Is your mean that after "AT+CIPSEND" and type SMTP command
I must press "Enter" and then press "Ctrl+Z"???
Thank you for your reply.
Please explain more for me.
Back to top
GSM Man



Joined: 15 Apr 2009
Posts: 357
Helped: 46
Location: New Jersey, USA


Post30 Jul 2009 13:38   

data exchange through gprg sim300


Yes, that is exactly it !
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post30 Jul 2009 15:27   

at+cipsend & c code example


Hi again,
I test this method but I can't send email.
I connected to SMTP server,
then run "at+cipsend"
and send SMTP commands
then press [enter]
then press [ctrl+z]
then answer = send ok
but any answer wasn't received.
so I send smtp commands in the series
at+cipsend
>helo example.com[enter]
[ctrl+z]
send ok
.
.
.
.
.

but when check my inbox any email recevied.
Why?
help me Crying or Very sad
Back to top
GSM Man



Joined: 15 Apr 2009
Posts: 357
Helped: 46
Location: New Jersey, USA


Post30 Jul 2009 16:54   

config gprs sim300


hne573 wrote:
but any answer wasn't received.
so I send smtp commands in the series
at+cipsend
>helo example.com[enter]
[ctrl+z]
send ok
.
.
The 'Send OK' means the module has sent the command. If you are not receiving a response from the sever, then it is not see the 'end-of-line'. I don't know what program you are using to send the commands, but it should be sending a carriage return and line feed when you press the Enter key.
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post31 Jul 2009 20:05   

sim300 example code


Wow,
I can't understand.
I test these at+commands with PuTTy and Hyperterminal
But I can't send an email
I can connect to smtp server
and send smtp command
and receive "send ok"
but no email was received
and server no answer to me.

If should set any setting in heyper terminal please help me
for send <CR> or ...
I can't send an email Crying or Very sad
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post02 Aug 2009 13:53   

send data to sim300


Where is my friend?Crying or Very sad
Help
Back to top
gaurav_sharma132



Joined: 03 Feb 2009
Posts: 26


Post23 Sep 2009 6:54   

Re: Send several bytes via GPRS - SIM300


Hi

I am also trying to send email through SIM300 but failed. I'm using vodafone GPRS. Through AT+CGATT=1 reply is ok so it is connected to GPRS. But
I'm unable to define PDP context and further.. as it gives error.

Also response to signal strength command AT+CSQ is always less than 14.

Basically, I want to send email to xyz(at)gmail.com . So can anyone let me know the settings.

Any help is appreciated.

Thanks in Advance!
------------------
Regards
Gaurav Sharma
Back to top
hne573



Joined: 26 Feb 2009
Posts: 16
Helped: 4


Post23 Sep 2009 7:32   

Re: Send several bytes via GPRS - SIM300


Hi,
I could connect with sim300 and get an IP.
and connect to a site for example www.google.com
and my purpose was send an email.
So now, I can connect to SMTP server for email sending.
But for sending command to SMTP server I have problems.
No any one help me about this.
Crying or Very sadCrying or Very sadCrying or Very sad
Back to top
jagrut911



Joined: 20 Aug 2009
Posts: 12
Location: Ahmedabad


Post23 Oct 2009 8:08   

Re: Send several bytes via GPRS - SIM300


Hello all,

i had followed the command,
AT+CGDCONT...
AT+CSTT...
...
...
...
upto at+cdnsorip=1, its fine.
but Finally i reached the command like, AT+CIPSTART="TCP","www.google.com","80"
the response will be like,

OK

ERROR: 6

STATE: IP STATUS

So what does it mean?
is it possible that i don't have tcp/ip stack facility in my modem or any other reason behind this...???

please help me out...
thanks...
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Send several bytes via GPRS - SIM300
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
How to send block of 16 bytes fr PC serially? (3)
Help transmit data (bytes) via analog radio. (4)
sim300 gprs module (1)
SIM300 GSM/ GPRS Module (4)
connection to GPRS using SIM300 (2)
GPRS SIM300 (WEB SERVER) (2)
Intercomunicate between two sim300 (GPRS) (1)
Simcom Sim300 GPRS connection problem (12)
GPRS data comm using SIM300 (2)
Simcom Sim300 GPRS connection problem (14)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS