litham
Newbie level 6
- Joined
- Jun 17, 2009
- Messages
- 13
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,376
AT+CGATT?
+CGATT: 1
OK
AT+CIPCCON?
+CIPCCON: 1
OK
AT+CLIP?
+CLIP: 1,0
OK
AT+CIPSTART="tcp","213.202.225.39","21"
OK
CONNECT FAIL
STATE: IP IND
+PDP: DEACT
AT+CIPSTART="tcp","213.202.225.39","21"
OK
STATE: PDP DEACT
AT+CGACT?
+CGACT: 1,0
OK
AT+CIPSTART="tcp","213.202.225.39","21"
OK
STATE: PDP DEACT
at
OK
at+cpin?
+CPIN: READY
OK
at+cgatt?
+CGATT: 1
OK
at+cstt
ERROR
at+cstt
ERROR
at+ciicr
ERROR
at+cipserver
ERROR
at+cipshut
STATE: PDP DEACT
SHUT OK
at+cipstatus
OK
STATE: IP INITIAL
at+cgact=?
+CGACT: (0-1)
OK
at+cgact?
OK
at+cgact=1
+CME ERROR: 596
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
>> 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: [url]www.google.com[/url]
>> Connection: Keep-Alive
>> Accept: */*
>> Accept-Language: en-us
>>
<< data from server returned - Server will return data here
at+cipstart="tcp","207.210.244.11","9201"
OK
CONNECT FAIL
STATE: IP IND
+PDP: DEACT
AT+CIPSTART="TCP","www.google.com","80" - TCP connection to Google.com on Port 80
AT+CDNSORIP=1
Call Ready
at+cipstatus
OK
STATE: IP INITIAL
at+cgdcont=?
+CGDCONT: (1-10),"IP",,,(0,1),(0,1)
OK
at+cgdcont=1,"IP","websfr",
OK
at+cstt=?
+CSTT: "APN","USER","PWD"
OK
at+cstt="websfr"
OK
at+cstt?
+CSTT: "websfr","",""
OK
at+cdnsorip?
+CDNSORIP: 0
OK
at+cdnsorip=?
+CDNSORIP: (0-IP ADDR,1-DOMAIN NAME)
OK
AT+CDNSORIP=1
OK
at+cipstart="TCP","www.google.fr","9201"
ERROR
AT+CIPSTART="TCP","www.google.com","9201"
ERROR
AT+CIPSTART="TCP","www.google.com",9201
ERROR
at+cipstatus
OK
STATE: IP START
at+cipshut
SHUT OK
at+cdnsorip?
+CDNSORIP: 1
OK
at+cipstart="TCP","www.google.fr","9201"
OK
CONNECT FAIL
STATE: IP IND
+PDP: DEACT
at+ciicr
ERROR
at+cipshut
STATE: PDP DEACT
SHUT OK
AT+CIICR
ERROR
at+cipstatus
OK
STATE: IP INITIAL
AT+CIPSTART="TCP","www.google.fr","9201"
OK
CONNECT FAIL
STATE: IP IND
+PDP: DEACT
at+cstt?
+CSTT: "websfr","",""
OK
at+cgdcont?
+CGDCONT: 1,"IP","websfr","",0,0
OK
at+cgact?
+CGACT: 1,0
OK
at+cgatt?
+CGATT: 1
OK
at+cdnsorip?
+CDNSORIP: 1
OK
at+creg?
+CREG: 0,1
OK
at+creg=1
OK
at+creg?
+CREG: 1,1
OK
at+cipstatus
OK
STATE: PDP DEACT
at+cipshut
STATE: PDP DEACT
SHUT OK
at+cipstart="tcp","www.google.fr","9201"
OK
CONNECT FAIL
STATE: IP IND
+PDP: DEACT
at+cipshut
STATE: PDP DEACT
SHUT OK
at+cipstart="tcp","www.google.fr","80"
OK
CONNECT FAIL
STATE: IP IND
+PDP: DEACT
at+cipstart="TCP","www.google.fr","9201"
at+cipstart="TCP","www.google.fr","80"
Sorry, but this isn't true - there is no requirement that you query the local IP address! This is simply an 'infomrational' command - provides information only.pepin82 said:Dear litham: you forgot to ask for SIM300 local ip, this step is madatory.)
GSM Man said:First, make sure you can connect to a remote server on the internet using HTTP on port 80. Your service provider may be blocking ports other than 80.
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: [url]www.google.com[/url] >> Connection: Keep-Alive >> Accept: */* >> Accept-Language: en-us >> << data from server returned - Server will return data here
If you get this working you can try connecting via the FTP Port. The problem with FTP'ing is that you need two simulataneous connections - one for commnds and one for the data transfer.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?