-->
Page 1 of 1

"link is not valid" at AT+CIPSEND=0,11

PostPosted: Sun Jul 19, 2020 11:22 am
by normnet52
The following fails at AT+CIPSEND=0,11 with a response in a similar program of "link is not valid"
I can ping the IP address however the IP address when entered into a browser times out.
I have made different purchases of ESP8266's so to try different firmware with no luck.
Whats wrong with the following commands or sequence?
Code written in Basic:

HSerOut ["AT+CWMODE=3",13,10] '3 = join other WiFi AP + serves as an WiFi AP)
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CWMODE=3 OK",13]

HSerOut ["AT+CWLAP",13,10] 'search for WiFi network available
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CWLAP OK",13]

HSerOut ["AT+CWJAP=",34,"xxxxxxx",34,",",34,"xxxxxxx",34,13,10] '34 = " 'JOIN NETWORK
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CWJAP OK",13]

HSerOut ["AT+CIFSR",13,10] 'GET IP address
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CIFSR OK",13]

HSerOut ["AT+CIPMUX=1",13,10] 'turn on multiple connection to this module
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CIPMUX=1 OK",13]

HSerOut ["AT+CIPSERVER=1,80",13,10] 'use standard port 80
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CIPSERVER=1,80 OK",13]

HSerOut ["AT+CIPSEND=0,11",13,10] 'SEND DATA LENGTH '***** FAILS HERE "link is not valid" "ERROR" *****
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CIPSEND=0,11 OK",13]

HSerOut ["HELLO WORLD"] 'SEND DATA
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["HELLO WORLD OK",13]

HSerOut ["AT+CIPCLOSE=0",13,10] 'CLOSE
HSerIn [Wait("OK")]
SerOut cSEROUT_PIN,cBAUD, ["AT+CIPCLOSE=0 OK",13]

' SerOut RESULTS:
' AT+CWMODE=3 OK
' AT+CWLAP OK
' AT+CWJAP OK
' AT+CIFSR OK
' AT+CIPMUX=1 OK
' AT+CIPSERVER=1,80 OK

Re: "link is not valid" at AT+CIPSEND=0,11

PostPosted: Mon Jul 20, 2020 2:16 pm
by JurajA
you didn't start a connection with CIPSTART or receive a CONNECT from server's client

Re: "link is not valid" at AT+CIPSEND=0,11

PostPosted: Tue Jul 21, 2020 6:16 am
by normnet52
I tried addition of CIPSTART with no luck. Both the TCP and UDF version result in "link is not valid" at AT+CIPSEND=0,11

Is their a simple complete example of AT+ commands which will save readings to the ESP8266 server which then can be read from a browser?

Re: "link is not valid" at AT+CIPSEND=0,11

PostPosted: Wed Jul 22, 2020 12:39 am
by JurajA
use a library. the older WiFiEsp or my WiFiEspAT