>>AT+CIPSHUT $0D //Disconnect wireless connection
<<SHUT OK
>>AT+CIPSTATUS $0D //Query current connection status
<<OK
<<STATE: IP INITIAL
>>AT+CIPSPRT=1 $0D //Set echo ‘>’ prompt and show ‘send ok’
<<OK
>>AT+CDNSORIP=0 $0D //Connect with IP address
<<OK
>>AT+CIPSRIP=1 $0D //Set whether display ‘IP’ add and ‘port’ of sender when receive data
<<OK
>>AT+CIPHEAD=1 $0D //Add IP Header when receiving data
<<OK
>>AT+CGDCONT=1,"IP","rcomnet" $0D //Set IP and APN
<<OK
>>AT+CSTT="rcomnet","","" $0D //Set APN, User Name, Password
<<OK
>>AT+CIICR $0D //Bring up wireless connection with GPRS
<<OK
>>AT+CIPSTATUS $0D //Query current connection status
<<OK
<<STATE: IP GPRSACT
>>AT+CIFSR $0D //Get local IP address
<<115.246.168.26
>>AT+CIPSTATUS $0D //Query current connection status
<<OK
<<STATE: IP STATUS
>>AT+CIPSTART="TCP","192.168.1.9","21" $0D //Star up TCP connection
<<OK
<<STATE: IP CLOSE
<<CONNECT FAIL
you need a public IP to do that. IP that is accessible through internet
It doesn't work this way. You need to configure your internet router for forwarding TCP port 21 to the PC and start the port 21 server at the PC. Then you should be able to connect to it through internet using the dynamic IP address of your router. Incomming connections to ports without defined forwarding are rejected at the router.Hay i got my public ip but when i try to set tcp-ip server in socket test software using that ip it shows me error..?
It doesn't work this way. You need to configure your internet router for forwarding TCP port 21 to the PC and start the port 21 server at the PC. Then you should be able to connect to it through internet using the dynamic IP address of your router. Incomming connections to ports without defined forwarding are rejected at the router.
>>AT+CIPSHUT $0D //Disconnect wireless connection
<<SHUT OK
>>AT+CIPSTATUS $0D //Query current connection status
<<OK
<<STATE: IP INITIAL
>>AT+CIPSPRT=1 $0D //Set echo ‘>’ prompt and show ‘send ok’
<<OK
>>AT+CDNSORIP=0 $0D //Connect with IP address
<<OK
>>AT+CIPSRIP=1 $0D //Set whether display ‘IP’ add and ‘port’ of sender when receive data
<<OK
>>AT+CIPHEAD=1 $0D //Add IP Header when receiving data
<<OK
>>AT+CGDCONT=1,"IP","***your APN****" $0D //Set IP and APN
<<OK
>>AT+CSTT="***your APN***","***your USERNAME***","***your PASS***" $0D //Set APN, User Name, Password
<<OK
>>AT+CIICR $0D //Bring up wireless connection with GPRS
<<OK
>>AT+CIPSTATUS $0D //Query current connection status
<<OK
<<STATE: IP GPRSACT
>>AT+CIFSR $0D //Get local IP address
<<***your IP for sim300***
>>AT+CIPSTATUS $0D //Query current connection status
<<OK
<<STATE: IP STATUS
>>AT+CIPSTART="TCP","***your dynamic IP***","***port NO***(21 in this case)" $0D //Star up TCP connection
<<OK
<<CONNECT OK
>>AT+CIPSEND
> Hellow there$1A
<<SEND OK
<<RECV FROM:***your dynamic IP***:***port NO***(21 in this case)
<<+IPD13:Fine here
AT+CGATT=1
>OK
AT+CGDCONT=1,"IP","airtelgprs"
>OK
AT+CSTT="airtelgprs",,
>OK
AT+CIICR
>OK
AT+CIFSR
>will get ip address here
AT+CGATT=1
> +CME ERROR: 107
at
OK
at+csq
+CSQ: 24,0
OK
at+cgatt=1
OK
at+cgdcont=1,"IP","airtelgprs"
OK
at+cstt="airtelgprs",,
OK
at+cipstatus
OK
STATE: IP START
at+ciicr
OK
at+cipstatus
OK
STATE: IP GPRSACT
at+cifsr
223.183.234.83
at+cipstatus
OK
STATE: IP STATUS
at+cdnsorip=1
OK
at+cipstart="TCP","www.google.com","80"
OK
CONNECT OK
at+cipsend
> hai
SEND OK
at+cipclose
CLOSE OK
at+cipshut
SHUT OK
at+cgdcont=1,"IP","airtelgprs.com"
OK
at+cstt="airtelgprs.com",,
OK
at+ciicr
OK
at+cifsr
223.191.252.229
at+cipstart="TCP","www.google.com","80"
OK
CONNECT OK
at+cipshut
SHUT OK
Hai,
Once you enter into a state other than IP INITIAL, and if you want to start Gprs context again, you have to shut down the current context using AT+CIPSHUT
Code:at OK at+csq +CSQ: 24,0 OK at+cgatt=1 OK at+cgdcont=1,"IP","airtelgprs" OK at+cstt="airtelgprs",, OK at+cipstatus OK STATE: IP START at+ciicr OK at+cipstatus OK STATE: IP GPRSACT at+cifsr 223.183.234.83 at+cipstatus OK STATE: IP STATUS at+cdnsorip=1 OK at+cipstart="TCP","www.google.com","80" OK CONNECT OK at+cipsend > hai SEND OK at+cipclose CLOSE OK at+cipshut SHUT OK at+cgdcont=1,"IP","airtelgprs.com" OK at+cstt="airtelgprs.com",, OK at+ciicr OK at+cifsr 223.191.252.229 at+cipstart="TCP","www.google.com","80" OK CONNECT OK at+cipshut SHUT OK
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?