Here we can all chat about fixing the AT+ command structure and the associated responses.
User avatar
By PRIYANKA
#62210 when I wrote a code to send a data to thingspeak.com, one time the data went to field1 rest all times the server replies closed.

the following commands were returned...
AT+CIPSTART="TCP","184.106.153.149",80

CONNECT

OK
AT+CIPSEND=80

OK
>CLOSED
Recv 80 bytes
SEND FAIL

How will I again send data to thingspeak?






AT
OK
AT+GMR
AT version:0.60.0.0(Jan 29 2016 15:10:17)
SDK version:1.5.2(7eee54f4)
Ai-Thinker Technology Co. Ltd.
May 5 2016 17:30:30
OK
AT+RST
OK
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79
2nd boot version : 1.5
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000
don't use rtc mem data
{l??/ÿ
Ai-Thinker Technology Co. Ltd.
ready
WIFI DISCONNECT
AT+CWLAP
+CWLAP:(4,"D3S3464",-88,"08:86:3b:fd:f2:32",1,-41,0)
+CWLAP:(4,"CUSAT Launchpad",-92,"c8:b3:73:4c:24:89",6,-17,0)
+CWLAP:(0,"AndroidAP6504",-34,"e4:b0:21:1c:e5:fc",6,-26,0)
+CWLAP:(4,"FIBERLAB",-84,"6c:72:20:fb:bc:7b",7,-14,0)
+CWLAP:(0,"zxaryo",-74,"c8:d7:79:a5:2b:65",7,-24,0)
+CWLAP:(3,"ADDywfhuizahiidf",-84,"40:88:05:b0:75:6d",8,1,0)
+CWLAP:(4,"D-Link_228",-89,"c4:a8:1d:42:6e:7f",11,-7,0)
+CWLAP:(0,"dlink",-91,"78:54:2e:20:80:1e",13,-14,0)
OK
AT+CWJAP="AndroidAP6504","123456789"
WIFI CONNECTED
WIFI GOT IP
OK
AT+CIPMUX=1
OK
AT+CIPSTART="TCP","184.106.153.149",80
CONNECT
OK
AT+CIPSEND=70
OK
> CLOSED
06.153.149",80
busy s...
Recv 70 bytes
SEND FAIL
AT+CIPSTART="TCP","api.thingspeak.com",80
ERROR
AT+CWLAP
+CWLAP:(4,"WTLAB",-77,"10:be:f5:7b:66:a7",1,30,0)
+CWLAP:(3,"AndroidAP6504",-43,"e4:b0:21:1c:e5:fc",6,28,0)
+CWLAP:(3,"Coolpad 8676_I02_04FF",-90,"02:16:6d:10:05:ff",6,51,0)
+CWLAP:(4,"FIBERLAB",-81,"6c:72:20:fb:bc:7b",7,40,0)
+CWLAP:(0,"zxaryo",-74,"c8:d7:79:a5:2b:65",7,30,0)
+CWLAP:(0,"dlink",-88,"78:54:2e:20:80:1e",13,40,0)
OK
AT+CWJAP="AndroidAP6504","123456789"
WIFI CONNECTED
WIFI GOT IP
OK
AT+CIFSR
+CIFSR:STAIP,"192.168.43.215"
+CIFSR:STAMAC,"60:01:94:09:19:b9"
OK
AT+CIPSTART="TCP","api.thingspeak.com",80
CONNECT
OK
AT+CIPSEND=70
OK
> CLOSED //before writing the GET command,server replies CLOSED all of sudden
gspeak.com",80
busy s...
Recv 70 bytes
SEND FAIL
AT+CIPSTART="TCP","api.thingspeak.com",80
CONNECT
OK
AT+CIPSEND=70
OK
> RJ35DSE&field1=100 //after getting this >, i typed GET /update?key=xxxxxxxxxxxxxxxxx&field1=100 and got the following
busy s...
Recv 70 bytes
SEND OK
+IPD,1:4CLOSED //here i received the data in thingspeak
AT+CIPSTART="TCP","api.thingspeak.com",80
CONNECT
OK
AT+CIPSEND=100
OK
> CLOSED

i have to write the command fast in order to get the answer, else it says CLOSED. It doesnt wait for my command.
please help me solve this..