Problem with AT+CIPSEND

nhatdq
Posts: 3
Joined: Tue Jul 19, 2016 12:40 am

Problem with AT+CIPSEND

Postby nhatdq » Tue Jul 19, 2016 12:46 am

Hi !
I'm having problem with AT+CIPSEND, when I input AT+CIPSEND=61 and enter 61 character, It respondes with following message:
Recv 61 bytes
SEND OK
CLOSED

I don't understand why It closes the TCP Connection?
My settings are AT+CWMODE=3, AT+ CIPMUX=0
I'm testing with server : tcp://iot.eclipse.org:1883
I'm studying about MQTT so I need to hold the connection to send CONNECT packet, then send PUBLISH or SUBSCRIBE packet.

Thank you :)

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: Problem with AT+CIPSEND

Postby ESP_Rubin » Tue Jul 19, 2016 10:46 am

Hi,
Which SDK&AT version used for this test?
I just tried it with 8266 NONOS SDK 1.5.4 + AT 1.1.0.0, seems everything is OK, you can refer to my test result picture[img]H:\nettest.bmp[/img]

nhatdq
Posts: 3
Joined: Tue Jul 19, 2016 12:40 am

Re: Problem with AT+CIPSEND

Postby nhatdq » Tue Jul 19, 2016 10:48 pm

esp_rubin wrote:Hi,
Which SDK&AT version used for this test?
I just tried it with 8266 NONOS SDK 1.5.4 + AT 1.1.0.0, seems everything is OK, you can refer to my test result picture[img]H:\nettest.bmp[/img]


Hi, Here is my SDK and AT version
AT+GMR

AT version:0.40.0.0(Aug 8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04
OK

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: Problem with AT+CIPSEND

Postby ESP_Rubin » Wed Jul 20, 2016 8:22 pm

could you try our latest SDK & AT, link as: viewtopic.php?f=46&t=2451

nhatdq
Posts: 3
Joined: Tue Jul 19, 2016 12:40 am

Re: Problem with AT+CIPSEND

Postby nhatdq » Wed Jul 20, 2016 10:02 pm

esp_rubin wrote:could you try our latest SDK & AT, link as: viewtopic.php?f=46&t=2451

Hi, I'm studying about MQTT so may I try this: https://github.com/tuanpmt/esp_mqtt ?
Sorry but I just begin to study esp8266 so how can I flash https://github.com/tuanpmt/esp_mqtt to esp8266 ??? The project doesn't have bin file as usual :|

Vasekdvor
Posts: 3
Joined: Sun Oct 02, 2016 6:08 am

Re: Problem with AT+CIPSEND

Postby Vasekdvor » Sun Oct 02, 2016 6:15 am

Do not try latest SDK & AT, its not a best option, lets take some stable version.
I already have had the same problem with sending data over GET to my Webserver and its doing the same thing as to you.

I had esp8266_nonos_sdk_v2.0.0_16_08_10, and there its isn't working. There is a some new problem with sending HTTP commands.

USE esp8266_nonos_sdk_v1.5.4_16_05_20 with boot_v1.5.bin. Just like in the picture in attachment, and it will work.

I am using black ESP-01.
Attachments
esp8266_nonos_sdk_v1.5.4_16_05_20.png

pratik

Re: Problem with AT+CIPSEND

Postby pratik » Sun Oct 02, 2016 11:58 am

If connection is closed too soon, it is usually the "keep-alive" parameter of an HTTP header (if you are using HTTP over TCP, that is). You should have a proper keep-alive timeout value sent to the server so that it knows it should not close a connection too soon. The default timeout is too short on most modern connected devices.

Vasekdvor
Posts: 3
Joined: Sun Oct 02, 2016 6:08 am

Re: Problem with AT+CIPSEND

Postby Vasekdvor » Sun Oct 02, 2016 8:04 pm

pratik wrote:If connection is closed too soon, it is usually the "keep-alive" parameter of an HTTP header (if you are using HTTP over TCP, that is). You should have a proper keep-alive timeout value sent to the server so that it knows it should not close a connection too soon. The default timeout is too short on most modern connected devices.


I have already tried that and it still doesn't works. Trust me i have tried that all the 1.10.2016 day, with different HEADERS and nothing was functional, until reflashing firmware to 1.5.4.

pratik

Re: Problem with AT+CIPSEND

Postby pratik » Thu Oct 13, 2016 11:28 am

What about the server end? Could that be a problem? Try using XAMPP maybe?
Issues like this can get a little tough to debug! I am still unable to reproduce your problem...

Who is online

Users browsing this forum: No registered users and 189 guests