bouvett2
Newbie level 5
Hi Guys,
I am a newbie to the SIM908 module so please be patient with me.
I would like to create an IP connection with a PC server which I created with "Socket test".
I read much of the AT command manual, and I got this code working:
I am sending the data via UART through a serial port monitor. The log of the data is pasted below:
As you can see, the TCP connection was not successful. I have verified the APN and the IP.
Can anyone suggest what might be the reason why the state is consistently as TCP CLOSED?
Thanks for your time.
regards
I am a newbie to the SIM908 module so please be patient with me.
I would like to create an IP connection with a PC server which I created with "Socket test".
I read much of the AT command manual, and I got this code working:
Code:
AT+CIPSHUT
AT+CIPMUX=0
AT+CIPSTATUS
AT+CSTT="internet","",""
AT+CIPSTATUS
AT+CIICR
AT+CIPSTATUS
AT+CIFSR
AT+CIPSTATUS
AT+CIPSTART="TCP","213.165.160.134","2000"
AT+CIPSEND=30
I am sending the data via UART through a serial port monitor. The log of the data is pasted below:
Code:
[28/04/2015 15:21:59] - Written data
41 54 2b 43 49 50 53 48 55 54 0d 0a AT+CIPSHUT..
[28/04/2015 15:21:59] - Read data
41 54 2b 43 49 50 53 48 55 54 0d 0a 0d 0a 53 48 AT+CIPSHUT....SH
55 54 20 4f 4b 0d 0a UT OK..
[28/04/2015 15:22:07] - Written data
41 54 2b 43 49 50 4d 55 58 3d 30 0d 0a AT+CIPMUX=0..
[28/04/2015 15:22:07] - Read data
41 54 2b 43 49 50 4d 55 58 3d 30 0d 0a 0d 0a 4f AT+CIPMUX=0....O
4b 0d 0a K..
[28/04/2015 15:25:17] - Written data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a AT+CIPSTATUS..
[28/04/2015 15:25:17] - Read data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a 0d 0a AT+CIPSTATUS....
4f 4b 0d 0a 0d 0a 53 54 41 54 45 3a 20 49 50 20 OK....STATE: IP
49 4e 49 54 49 41 4c 0d 0a INITIAL..
[28/04/2015 15:27:24] - Written data
41 54 2b 43 53 54 54 3d 22 69 6e 74 65 72 6e 65 AT+CSTT="interne
74 22 2c 22 22 2c 22 22 0d 0a t","",""..
[28/04/2015 15:27:24] - Read data
41 54 2b 43 53 54 54 3d 22 69 6e 74 65 72 6e 65 AT+CSTT="interne
74 22 2c 22 22 2c 22 22 0d 0a 0d 0a 4f 4b 0d 0a t","",""....OK..
[28/04/2015 15:28:34] - Written data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a AT+CIPSTATUS..
[28/04/2015 15:28:34] - Read data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a 0d 0a AT+CIPSTATUS....
4f 4b 0d 0a 0d 0a 53 54 41 54 45 3a 20 49 50 20 OK....STATE: IP
53 54 41 52 54 0d 0a START..
[28/04/2015 15:30:06] - Written data
41 54 2b 43 49 49 43 52 0d 0a AT+CIICR..
[28/04/2015 15:30:07] - Read data
41 54 2b 43 49 49 43 52 0d 0a 0d 0a 4f 4b 0d 0a AT+CIICR....OK..
[28/04/2015 15:31:16] - Written data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a AT+CIPSTATUS..
[28/04/2015 15:31:16] - Read data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a 0d 0a AT+CIPSTATUS....
4f 4b 0d 0a 0d 0a 53 54 41 54 45 3a 20 49 50 20 OK....STATE: IP
47 50 52 53 41 43 54 0d 0a GPRSACT..
[28/04/2015 15:31:32] - Written data
41 54 2b 43 49 46 53 52 0d 0a AT+CIFSR..
[28/04/2015 15:31:32] - Read data
41 54 2b 43 49 46 53 52 0d 0a 0d 0a 31 30 39 2e AT+CIFSR....109.
32 30 30 2e 34 37 2e 38 38 0d 0a 200.47.88..
[28/04/2015 15:33:21] - Written data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a AT+CIPSTATUS..
[28/04/2015 15:33:21] - Read data
41 54 2b 43 49 50 53 54 41 54 55 53 0d 0a 0d 0a AT+CIPSTATUS....
4f 4b 0d 0a 0d 0a 53 54 41 54 45 3a 20 49 50 20 OK....STATE: IP
53 54 41 54 55 53 0d 0a STATUS..
[28/04/2015 15:34:52] - Written data
41 54 2b 43 49 50 53 54 41 52 54 3d 22 54 43 50 AT+CIPSTART="TCP
22 2c 22 32 31 33 2e 31 36 35 2e 31 36 30 2e 31 ","213.165.160.1
33 34 22 2c 22 32 30 30 30 22 0d 0a 34","2000"..
[28/04/2015 15:34:52] - Read data
41 54 2b 43 49 50 53 54 41 52 54 3d 22 54 43 50 AT+CIPSTART="TCP
22 2c 22 32 31 33 2e 31 36 35 2e 31 36 30 2e 31 ","213.165.160.1
33 34 22 2c 22 32 30 30 30 22 0d 0a 0d 0a 4f 4b 34","2000"....OK
0d 0a 0d 0a 53 54 41 54 45 3a 20 54 43 50 20 43 ....STATE: TCP C
4c 4f 53 45 44 0d 0a 0d 0a 43 4f 4e 4e 45 43 54 LOSED....CONNECT
20 46 41 49 4c 0d 0a FAIL..
As you can see, the TCP connection was not successful. I have verified the APN and the IP.
Can anyone suggest what might be the reason why the state is consistently as TCP CLOSED?
Thanks for your time.
regards